Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
李君
/
carrefour
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 7ee72fa2
authored
Nov 14, 2022
by
李君
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
优化
1 parent
901a1b10
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
63 additions
and
49 deletions
src/views/queueManagement/alarmEvent/addRule.vue
src/views/queueManagement/alarmEvent/index.vue
src/views/queueManagement/dataPlayback/index.vue
src/views/queueManagement/queueLive/index.vue
src/views/queueManagement/alarmEvent/addRule.vue
View file @
7ee72fa
...
@@ -5,17 +5,17 @@
...
@@ -5,17 +5,17 @@
<el-form
:model=
"addForm"
label-width=
"100px"
status-icon
:rules=
"rules"
ref=
"addForm"
>
<el-form
:model=
"addForm"
label-width=
"100px"
status-icon
:rules=
"rules"
ref=
"addForm"
>
<!-- 区域名称 -->
<!-- 区域名称 -->
<p
class=
"itemTitle"
>
{{
$t
(
'button.alarmRules'
)
}}
</p>
<p
class=
"itemTitle"
>
{{
$t
(
'button.alarmRules'
)
}}
</p>
<el-form-item
>
<
!--
<
el-form-item
>
<el-checkbox
v-model=
"addForm.queueLengthSwitch"
>
{{
$t
(
'table.queueLengthAlert'
)
}}
</el-checkbox>
<el-checkbox
v-model=
"addForm.queueLengthSwitch"
>
{{
$t
(
'table.queueLengthAlert'
)
}}
</el-checkbox>
<el-checkbox
v-model=
"addForm.waitTimeSwitch"
>
{{
$t
(
'table.waitTimeAlert'
)
}}
</el-checkbox>
<el-checkbox
v-model=
"addForm.waitTimeSwitch"
>
{{
$t
(
'table.waitTimeAlert'
)
}}
</el-checkbox>
</el-form-item>
</el-form-item>
-->
<el-form-item
:label=
"$t('table.alarmPensonNum')"
prop=
"
name"
v-if=
"addForm.queueLengthSwitch
"
>
<el-form-item
:label=
"$t('table.alarmPensonNum')"
prop=
"
alarmPensonNum
"
>
<el-input-number
v-model=
"addForm.queueLengthThreshold"
:min=
"0"
:controls =
'false'
:precision =
'0'
></el-input-number>
{{
$t
(
'format.perNum'
)
}}
<el-input-number
v-model=
"addForm.queueLengthThreshold"
:min=
"0"
:controls =
'false'
:precision =
'0'
></el-input-number>
{{
$t
(
'format.perNum'
)
}}
</el-form-item>
</el-form-item>
<el-form-item
:label=
"$t('table.waitingTime')"
prop=
"
code"
v-if=
"addForm.waitTimeSwitch
"
>
<el-form-item
:label=
"$t('table.waitingTime')"
prop=
"
waitingTime
"
>
<el-input-number
v-model=
"addForm.waitTimeThreshold"
:min=
"0"
:controls =
'false'
:precision =
'0'
></el-input-number>
{{
$t
(
'format.minute'
)
}}
<el-input-number
v-model=
"addForm.waitTimeThreshold"
:min=
"0"
:controls =
'false'
:precision =
'0'
></el-input-number>
{{
$t
(
'format.minute'
)
}}
</el-form-item>
</el-form-item>
<el-form-item
:label=
"$t('table.alarmCycle')"
prop=
"
counterType
"
>
<el-form-item
:label=
"$t('table.alarmCycle')"
prop=
"
alarmInterval
"
>
<el-input-number
v-model=
"addForm.alarmInterval"
:min=
"0"
:controls =
'false'
:precision =
'0'
></el-input-number>
{{
$t
(
'format.minute'
)
}}
<el-input-number
v-model=
"addForm.alarmInterval"
:min=
"0"
:controls =
'false'
:precision =
'0'
></el-input-number>
{{
$t
(
'format.minute'
)
}}
</el-form-item>
</el-form-item>
<p
class=
"info"
>
{{
$t
(
'message.alarmInfo'
)
}}
</p>
<p
class=
"info"
>
{{
$t
(
'message.alarmInfo'
)
}}
</p>
...
@@ -48,16 +48,21 @@ export default {
...
@@ -48,16 +48,21 @@ export default {
}],
}],
isAdd
:
true
,
isAdd
:
true
,
rules
:
{
rules
:
{
// name: [{
alarmPensonNum
:
[{
// required: true,
required
:
true
,
// message: this.$t('pholder.input'),
message
:
this
.
$t
(
'pholder.input'
),
// trigger: 'blur'
trigger
:
'blur'
// }],
}],
// code:[{
waitingTime
:[{
// required: true,
required
:
true
,
// message: this.$t('pholder.input'),
message
:
this
.
$t
(
'pholder.input'
),
// trigger: 'blur'
trigger
:
'blur'
// }],
}],
alarmInterval
:[{
required
:
true
,
message
:
this
.
$t
(
'pholder.input'
),
trigger
:
'blur'
}],
}
}
}
}
},
},
...
@@ -66,9 +71,9 @@ export default {
...
@@ -66,9 +71,9 @@ export default {
this
.
addForm
=
{
this
.
addForm
=
{
mallId
:
''
,
mallId
:
''
,
areaId
:
""
,
areaId
:
""
,
queueLengthSwitch
:
false
,
//
queueLengthSwitch:false,
queueLengthThreshold
:
''
,
queueLengthThreshold
:
''
,
waitTimeSwitch
:
false
,
//
waitTimeSwitch:false,
waitTimeThreshold
:
''
,
waitTimeThreshold
:
''
,
alarmInterval
:
''
,
alarmInterval
:
''
,
sendEmail
:
''
,
sendEmail
:
''
,
...
@@ -76,8 +81,8 @@ export default {
...
@@ -76,8 +81,8 @@ export default {
if
(
data
&&
data
.
length
>
0
){
if
(
data
&&
data
.
length
>
0
){
this
.
isAdd
=
false
;
this
.
isAdd
=
false
;
this
.
addForm
=
Object
.
assign
({},
data
[
0
]);
this
.
addForm
=
Object
.
assign
({},
data
[
0
]);
this
.
addForm
.
queueLengthSwitch
=
data
[
0
].
queueLengthSwitch
==
1
?
true
:
false
;
//
this.addForm.queueLengthSwitch = data[0].queueLengthSwitch==1?true:false;
this
.
addForm
.
waitTimeSwitch
=
data
[
0
].
waitTimeSwitch
==
1
?
true
:
false
;
//
this.addForm.waitTimeSwitch = data[0].waitTimeSwitch==1?true:false;
let
arr
=
data
[
0
].
sendEmail
.
split
(
";"
)
let
arr
=
data
[
0
].
sendEmail
.
split
(
";"
)
this
.
alarmReceiverList
=
[]
this
.
alarmReceiverList
=
[]
for
(
var
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
...
@@ -108,8 +113,8 @@ export default {
...
@@ -108,8 +113,8 @@ export default {
this
.
addForm
.
sendEmail
=
arr
.
join
(
';'
)
this
.
addForm
.
sendEmail
=
arr
.
join
(
';'
)
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
this
.
addForm
.
queueLengthSwitch
=
this
.
addForm
.
queueLengthSwitch
?
'1'
:
'0'
this
.
addForm
.
queueLengthSwitch
=
1
this
.
addForm
.
waitTimeSwitch
=
this
.
addForm
.
waitTimeSwitch
?
'1'
:
'0'
this
.
addForm
.
waitTimeSwitch
=
1
if
(
this
.
isAdd
){
if
(
this
.
isAdd
){
this
.
$api
.
queueManagementApi
.
addAlarmRules
(
this
.
addForm
)
this
.
$api
.
queueManagementApi
.
addAlarmRules
(
this
.
addForm
)
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
...
...
src/views/queueManagement/alarmEvent/index.vue
View file @
7ee72fa
...
@@ -18,12 +18,12 @@
...
@@ -18,12 +18,12 @@
<el-option
v-for=
"item in channelListData"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
/>
<el-option
v-for=
"item in channelListData"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
:label=
"$t('table.alarmType')"
>
<
<!--
el-form-item :label="$t('table.alarmType')">
<el-select
v-model=
"searchForm.messageType"
clearable
:placeholder=
"$t('pholder.selectLane')"
>
<el-select
v-model=
"searchForm.messageType"
clearable
:placeholder=
"$t('pholder.selectLane')"
>
<el-option
:label=
"$t('pholder.all')"
value=
""
/>
<el-option
:label=
"$t('pholder.all')"
value=
""
/>
<el-option
v-for=
"item in messageTypetData"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
/>
<el-option
v-for=
"item in messageTypetData"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
-->
<el-form-item
:label=
"$t('table.date')"
>
<el-form-item
:label=
"$t('table.date')"
>
<el-date-picker
<el-date-picker
v-model=
"searchForm.countDate"
v-model=
"searchForm.countDate"
...
@@ -52,11 +52,11 @@
...
@@ -52,11 +52,11 @@
header-row-class-name=
"manage-tab-head"
header-row-class-name=
"manage-tab-head"
>
>
<el-table-column
:label=
"$t('table.order')"
align=
"center"
type=
"index"
width=
"100"
></el-table-column>
<el-table-column
:label=
"$t('table.order')"
align=
"center"
type=
"index"
width=
"100"
></el-table-column>
<el-table-column
:label=
"$t('table.alarmType')"
align=
"center"
prop=
"messageType"
width=
"160"
>
<!--
<el-table-column
:label=
"$t('table.alarmType')"
align=
"center"
prop=
"messageType"
width=
"160"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
messageType
==
0
?
$t
(
'table.queueLengthAlert'
):
$t
(
'table.waitTimeAlert'
)
}}
</span>
<span>
{{
scope
.
row
.
messageType
==
0
?
$t
(
'table.queueLengthAlert'
):
$t
(
'table.waitTimeAlert'
)
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
-->
<el-table-column
:label=
"$t('table.laneName')"
width=
"160"
align=
"center"
prop=
"cashierChannelId"
:formatter=
"landFormat"
></el-table-column>
<el-table-column
:label=
"$t('table.laneName')"
width=
"160"
align=
"center"
prop=
"cashierChannelId"
:formatter=
"landFormat"
></el-table-column>
<el-table-column
:label=
"$t('table.messageContent')"
align=
"center"
prop=
"messageContent"
show-overflow-tooltip
></el-table-column>
<el-table-column
:label=
"$t('table.messageContent')"
align=
"center"
prop=
"messageContent"
show-overflow-tooltip
></el-table-column>
<el-table-column
:label=
"$t('table.sentDate')"
align=
"center"
prop=
"createTime"
width=
"160"
></el-table-column>
<el-table-column
:label=
"$t('table.sentDate')"
align=
"center"
prop=
"createTime"
width=
"160"
></el-table-column>
...
@@ -108,7 +108,7 @@
...
@@ -108,7 +108,7 @@
mallId
:
''
,
mallId
:
''
,
cashierAreaId
:
''
,
cashierAreaId
:
''
,
cashierChannelId
:
''
,
cashierChannelId
:
''
,
messageType
:
''
,
//
messageType:'',
countDate
:
[
new
Date
(),
new
Date
()],
countDate
:
[
new
Date
(),
new
Date
()],
},
},
messageTypetData
:[{
messageTypetData
:[{
...
@@ -234,7 +234,7 @@
...
@@ -234,7 +234,7 @@
mallId
:
this
.
searchForm
.
mallId
,
mallId
:
this
.
searchForm
.
mallId
,
cashierAreaId
:
this
.
searchForm
.
cashierAreaId
,
cashierAreaId
:
this
.
searchForm
.
cashierAreaId
,
cashierChannelId
:
this
.
searchForm
.
cashierChannelId
,
cashierChannelId
:
this
.
searchForm
.
cashierChannelId
,
messageType
:
this
.
searchForm
.
messageType
,
//
messageType: this.searchForm.messageType,
startDate
:
moment
(
this
.
searchForm
.
countDate
[
0
]).
format
(
'YYYY-MM-DD'
),
startDate
:
moment
(
this
.
searchForm
.
countDate
[
0
]).
format
(
'YYYY-MM-DD'
),
endDate
:
moment
(
this
.
searchForm
.
countDate
[
1
]).
format
(
'YYYY-MM-DD'
),
endDate
:
moment
(
this
.
searchForm
.
countDate
[
1
]).
format
(
'YYYY-MM-DD'
),
pageNum
:
this
.
currentPage
,
pageNum
:
this
.
currentPage
,
...
...
src/views/queueManagement/dataPlayback/index.vue
View file @
7ee72fa
...
@@ -116,12 +116,9 @@
...
@@ -116,12 +116,9 @@
<div
class=
"tabel_title"
>
<div
class=
"tabel_title"
>
<!--
<span>
{{
$t
(
'home.queuingmonitoring'
)
}}
</span>
-->
<!--
<span>
{{
$t
(
'home.queuingmonitoring'
)
}}
</span>
-->
<span>
Queue Monitoring
</span>
<span>
Queue Monitoring
</span>
<div
class=
"lenged"
>
<div
class=
"lenged"
v-if=
"!(JSON.stringify(ruleObj) =='
{}')"
>
<p>
<p>
<small>
{{
safeingNum
}}
~
{{
warningNum
}}
</small><small
class=
"colorBox colorBox_yellow"
></small>
<small>
Customers in Queue >
{{
ruleObj
.
queueLengthThreshold
}}
&
AVG.Waiting >
{{
ruleObj
.
waitTimeThreshold
}}
min
</small><small
class=
"colorBox colorBox_red"
></small>
</p>
<p>
<small>
>
{{
warningNum
}}
</small><small
class=
"colorBox colorBox_red"
></small>
</p>
</p>
</div>
</div>
<div
class=
"openBtn"
@
click=
"openDialog('table')"
>
<div
class=
"openBtn"
@
click=
"openDialog('table')"
>
...
@@ -271,6 +268,7 @@
...
@@ -271,6 +268,7 @@
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
ruleObj
:{},
dialogShow
:
false
,
dialogShow
:
false
,
openDialogType
:
''
,
openDialogType
:
''
,
laneName
:
''
,
laneName
:
''
,
...
@@ -462,6 +460,22 @@
...
@@ -462,6 +460,22 @@
}
}
},
},
methods
:
{
methods
:
{
// 报警规则
getRules
(){
this
.
$api
.
queueManagementApi
.
getAlarmRulesList
({
mallId
:
this
.
searchForm
.
mallId
,
areaId
:
this
.
searchForm
.
cashierAreaId
,
pageNum
:
1
,
pageSize
:
999999
}).
then
(
res
=>
{
let
result
=
res
.
data
;
if
(
result
.
code
==
200
)
{
if
(
result
.
data
.
list
&&
result
.
data
.
list
.
length
>
0
){
this
.
ruleObj
=
result
.
data
.
list
[
0
]
}
}
})
},
openDialog
(
type
){
openDialog
(
type
){
this
.
dialogShow
=
true
;
this
.
dialogShow
=
true
;
this
.
openDialogType
=
type
;
this
.
openDialogType
=
type
;
...
@@ -638,9 +652,10 @@
...
@@ -638,9 +652,10 @@
this
.
searchForm
.
cashierAreaId
=
result
.
data
.
list
[
0
].
id
this
.
searchForm
.
cashierAreaId
=
result
.
data
.
list
[
0
].
id
this
.
areaListData
=
result
.
data
.
list
;
this
.
areaListData
=
result
.
data
.
list
;
this
.
areaOneObj
=
result
.
data
.
list
[
0
]
this
.
areaOneObj
=
result
.
data
.
list
[
0
]
this
.
warningNum
=
result
.
data
.
list
[
0
].
warnNum
//
this.warningNum = result.data.list[0].warnNum
this
.
safeingNum
=
result
.
data
.
list
[
0
].
safeNum
//
this.safeingNum = result.data.list[0].safeNum
// this.getChannelList()
// this.getChannelList()
this
.
getRules
();
this
.
pic
=
new
Image
();
this
.
pic
=
new
Image
();
this
.
pic
.
src
=
this
.
areaListData
[
0
]
&&
window
.
_vionConfig
.
picUrl
+
this
.
areaListData
[
0
].
pic
;
this
.
pic
.
src
=
this
.
areaListData
[
0
]
&&
window
.
_vionConfig
.
picUrl
+
this
.
areaListData
[
0
].
pic
;
this
.
pic
.
onload
=
()
=>
{
this
.
pic
.
onload
=
()
=>
{
...
@@ -654,6 +669,7 @@
...
@@ -654,6 +669,7 @@
})
})
},
},
areaChange
(
val
){
areaChange
(
val
){
this
.
getRules
();
this
.
areaOneObj
=
this
.
areaListData
.
find
(
item
=>
item
.
id
==
val
);
this
.
areaOneObj
=
this
.
areaListData
.
find
(
item
=>
item
.
id
==
val
);
this
.
pic
=
new
Image
();
this
.
pic
=
new
Image
();
this
.
pic
.
src
=
this
.
areaOneObj
&&
window
.
_vionConfig
.
picUrl
+
this
.
areaOneObj
.
pic
;
this
.
pic
.
src
=
this
.
areaOneObj
&&
window
.
_vionConfig
.
picUrl
+
this
.
areaOneObj
.
pic
;
...
@@ -661,7 +677,9 @@
...
@@ -661,7 +677,9 @@
this
.
drawCirlce
();
this
.
drawCirlce
();
};
};
// this.getChannelList()
// this.getChannelList()
setTimeout
(()
=>
{
this
.
searchFun
()
this
.
searchFun
()
},
500
)
},
},
// 通道
// 通道
// getChannelList() {
// getChannelList() {
...
@@ -778,12 +796,8 @@
...
@@ -778,12 +796,8 @@
});
});
},
},
tableRowClassName
:
function
({
row
,
rowIndex
})
{
tableRowClassName
:
function
({
row
,
rowIndex
})
{
if
(
row
.
customersInQueue
>
this
.
warningNum
)
{
if
(
(
row
.
customersInQueue
>
this
.
ruleObj
.
queueLengthThreshold
)
&&
(
row
.
averageWaitingTime
>
(
this
.
ruleObj
.
waitTimeThreshold
*
60
))
)
{
return
'danger-row'
;
return
'danger-row'
;
}
else
if
(
row
.
customersInQueue
>
this
.
safeingNum
&&
row
.
customersInQueue
<=
this
.
warningNum
){
return
'warn-row'
;
}
else
{
return
'safe-row'
;
}
}
},
},
// 表格点击触发
// 表格点击触发
...
...
src/views/queueManagement/queueLive/index.vue
View file @
7ee72fa
...
@@ -75,12 +75,12 @@
...
@@ -75,12 +75,12 @@
<!--
<span>
{{
$t
(
'home.queuingmonitoring'
)
}}
</span>
-->
<!--
<span>
{{
$t
(
'home.queuingmonitoring'
)
}}
</span>
-->
<span>
Queue Monitoring
</span>
<span>
Queue Monitoring
</span>
<div
class=
"lenged"
v-if=
"!(JSON.stringify(ruleObj) =='
{}')">
<div
class=
"lenged"
v-if=
"!(JSON.stringify(ruleObj) =='
{}')">
<p
v-if=
"ruleObj.queueLengthSwitch==1"
>
<p>
<small>
>
{{
ruleObj
.
queueLengthThreshold
}}
</small><small
class=
"colorBox colorBox_red"
></small>
<small>
Customers in Queue >
{{
ruleObj
.
queueLengthThreshold
}}
&
AVG.Waiting >
{{
ruleObj
.
waitTimeThreshold
}}
min
</small><small
class=
"colorBox colorBox_red"
></small>
</p>
</p>
<
p
v-if=
"ruleObj.waitTimeSwitch==1"
>
<
!--
<p
>
<small>
>
{{
ruleObj
.
waitTimeThreshold
}}
min
</small><small
class=
"colorBox colorBox_red"
></small>
<small>
>
{{
ruleObj
.
waitTimeThreshold
}}
min
</small><small
class=
"colorBox colorBox_red"
></small>
</p>
</p>
-->
</div>
</div>
<div
class=
"openBtn"
@
click=
"openDialog('table')"
>
<div
class=
"openBtn"
@
click=
"openDialog('table')"
>
<img
src=
"../../../assets/sacle.png"
>
<img
src=
"../../../assets/sacle.png"
>
...
@@ -714,14 +714,9 @@ export default {
...
@@ -714,14 +714,9 @@ export default {
this
.
getCustomersOverview
()
this
.
getCustomersOverview
()
},
},
tableRowClassName
:
function
({
row
,
rowIndex
})
{
tableRowClassName
:
function
({
row
,
rowIndex
})
{
if
(
this
.
ruleObj
.
queueLengthSwitch
==
1
||
this
.
ruleObj
.
waitTimeSwitch
==
1
){
if
((
row
.
customersInQueue
>
this
.
ruleObj
.
queueLengthThreshold
)
&&
(
row
.
averageWaitingTime
>
(
this
.
ruleObj
.
waitTimeThreshold
*
60
)))
{
if
(
row
.
customersInQueue
>
this
.
ruleObj
.
queueLengthThreshold
)
{
return
'danger-row'
;
}
if
(
row
.
averageWaitingTime
>
(
this
.
ruleObj
.
waitTimeThreshold
*
60
))
{
return
'danger-row'
;
return
'danger-row'
;
}
}
}
},
},
// 表格点击触发
// 表格点击触发
handleCurrentChange
(
row
)
{
handleCurrentChange
(
row
)
{
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment