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 7aef0de6
authored
Feb 01, 2023
by
李君
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
等待时长统计,报警规则优化
1 parent
07305494
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
145 additions
and
39 deletions
src/api/queueManagementApi.js
src/router/modules/queueManagement.js
src/views/queueManagement/alarmEvent/addRule.vue
src/views/queueManagement/alarmEvent/index.vue
src/views/queueManagement/waitingTimeStatistics/index.vue
src/api/queueManagementApi.js
View file @
7aef0de
...
@@ -96,7 +96,7 @@ const queueManagementApi = {
...
@@ -96,7 +96,7 @@ const queueManagementApi = {
return
req
(
'POST'
,
`/d-cashier-alarm-rule`
,
params
,
config
)
return
req
(
'POST'
,
`/d-cashier-alarm-rule`
,
params
,
config
)
},
},
updateAlarmRules
(
params
,
config
)
{
updateAlarmRules
(
params
,
config
)
{
return
req
(
'PUT'
,
`/d-cashier-alarm-rule
/
${
params
.
id
}
`
,
params
,
config
)
return
req
(
'PUT'
,
`/d-cashier-alarm-rule`
,
params
,
config
)
},
},
// 排队详情
// 排队详情
getqueueDetailList
(
params
,
config
)
{
getqueueDetailList
(
params
,
config
)
{
...
@@ -106,6 +106,9 @@ const queueManagementApi = {
...
@@ -106,6 +106,9 @@ const queueManagementApi = {
getExitClosedList
(
params
,
config
)
{
getExitClosedList
(
params
,
config
)
{
return
req
(
'get'
,
`/queuing/counters/exit/closed`
,
params
,
config
)
return
req
(
'get'
,
`/queuing/counters/exit/closed`
,
params
,
config
)
},
},
getDistributeList
(
params
,
config
)
{
return
req
(
'get'
,
`/queuing/waitTime/distribute`
,
params
,
config
)
},
}
}
...
...
src/router/modules/queueManagement.js
View file @
7aef0de
...
@@ -105,6 +105,13 @@ const queueManagementRouterMap = {
...
@@ -105,6 +105,13 @@ const queueManagementRouterMap = {
permissionPath
:
'exitFormClosedCounters'
permissionPath
:
'exitFormClosedCounters'
},
},
component
:
()
=>
import
(
'@/views/queueManagement/exitFormClosedCounters/'
),
component
:
()
=>
import
(
'@/views/queueManagement/exitFormClosedCounters/'
),
},{
name
:
'waitingTimeStatistics'
,
path
:
'/queueManagement/waitingTimeStatistics'
,
meta
:
{
permissionPath
:
'waitingTimeStatistics'
},
component
:
()
=>
import
(
'@/views/queueManagement/waitingTimeStatistics/'
),
},
},
]
]
...
...
src/views/queueManagement/alarmEvent/addRule.vue
View file @
7aef0de
...
@@ -2,22 +2,24 @@
...
@@ -2,22 +2,24 @@
<div>
<div>
<el-dialog
:title=
"$t('button.alarmRules')"
class=
"manage-dialog dialog_lj"
:visible
.
sync=
"addDialogVisible"
<el-dialog
:title=
"$t('button.alarmRules')"
class=
"manage-dialog dialog_lj"
:visible
.
sync=
"addDialogVisible"
:close-on-click-modal=
"false"
v-if=
"addDialogVisible"
@
close=
"addDialogClose()"
>
:close-on-click-modal=
"false"
v-if=
"addDialogVisible"
@
close=
"addDialogClose()"
>
<el-form
:model=
"addForm"
label-width=
"120px"
status-icon
:rules=
"rules"
ref=
"addForm"
>
<el-form
:model=
"addForm"
label-width=
"100px"
status-icon
:rules=
"rules"
ref=
"addForm"
>
<!-- 区域名称 -->
<div
class=
"inlineBlock"
v-for=
"item in counterTypeData"
:key=
"item.id"
>
<!--
<p
class=
"itemTitle"
>
{{
$t
(
'button.alarmRules'
)
}}
</p>
-->
<template
v-if=
"item.key != '4'"
>
<!--
<el-form-item
>
<p
class=
"itemTitle"
style=
"font-weight: 900"
>
{{
item
.
text
}}
</p>
<el-checkbox
v-model=
"addForm.queueLengthSwitch"
>
{{
$t
(
'table.queueLengthAlert'
)
}}
</el-checkbox>
<el-checkbox
v-model=
"addForm.waitTimeSwitch"
>
{{
$t
(
'table.waitTimeAlert'
)
}}
</el-checkbox>
</el-form-item>
-->
<el-form-item
:label=
"$t('table.alarmPensonNum')"
prop=
"queueLengthThreshold"
>
<el-form-item
:label=
"$t('table.alarmPensonNum')"
prop=
"queueLengthThreshold"
>
<el-input-number
v-model=
"addFor
m.queueLengthThreshold"
:min=
"0"
:controls =
'false'
:precision =
'0'
></el-input-number>
{{
$t
(
'format.perNum'
)
}}
<el-input-number
v-model=
"ite
m.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=
"waitTimeThreshold"
>
<el-form-item
:label=
"$t('table.waitingTime')"
prop=
"waitTimeThreshold"
>
<el-input-number
v-model=
"addForm.waitTimeThreshold"
:min=
"0"
:controls =
'false'
:precision =
'0'
></el-input-number>
{{
$t
(
'format.minute'
)
}}
<el-input-number
v-model=
"item.waitTimeThreshold"
:min=
"0"
:controls =
'false'
:precision =
'0'
></el-input-number>
{{
$t
(
'format.minute'
)
}}
</el-form-item>
<el-form-item
label=
"Trolle No."
prop=
"trolleyThreshold"
>
<el-input-number
v-model=
"item.trolleyThreshold"
:min=
"0"
:controls =
'false'
:precision =
'0'
></el-input-number>
</el-form-item>
</el-form-item>
<el-form-item
:label=
"$t('table.alarmCycle')"
prop=
"alarmInterval"
>
<el-form-item
:label=
"$t('table.alarmCycle')"
prop=
"alarmInterval"
>
<el-input-number
v-model=
"addFor
m.alarmInterval"
:min=
"0"
:controls =
'false'
:precision =
'0'
></el-input-number>
{{
$t
(
'format.minute'
)
}}
<el-input-number
v-model=
"ite
m.alarmInterval"
:min=
"0"
:controls =
'false'
:precision =
'0'
></el-input-number>
{{
$t
(
'format.minute'
)
}}
</el-form-item>
</el-form-item>
</
template
>
</div>
<p
class=
"info"
>
{{$t('message.alarmInfo')}}
</p>
<p
class=
"info"
>
{{$t('message.alarmInfo')}}
</p>
<p
class=
"itemTitle"
>
{{$t('table.alarmReceiver')}}
</p>
<p
class=
"itemTitle"
>
{{$t('table.alarmReceiver')}}
</p>
<div
v-for=
"(item,index) in alarmReceiverList"
:key=
'index'
style=
"margin-top: 10px;"
>
<div
v-for=
"(item,index) in alarmReceiverList"
:key=
'index'
style=
"margin-top: 10px;"
>
...
@@ -43,46 +45,44 @@ export default {
...
@@ -43,46 +45,44 @@ export default {
addDialogVisible
:
false
,
addDialogVisible
:
false
,
addForm
:
{
addForm
:
{
},
},
counterTypeData
:
[],
alarmReceiverList
:[{
alarmReceiverList
:[{
email
:
''
email
:
''
}],
}],
isAdd
:
true
,
isAdd
:
true
,
rules
:
{
rules
:
{
queueLengthThreshold
:
[{
//
queueLengthThreshold: [{
required
:
true
,
//
required: true,
message
:
this
.
$t
(
'pholder.input'
),
//
message: this.$t('pholder.input'),
trigger
:
'blur'
//
trigger: 'blur'
}],
//
}],
waitTimeThreshold
:
[{
// waitTimeThreshold:
[{
required
:
true
,
//
required: true,
message
:
this
.
$t
(
'pholder.input'
),
//
message: this.$t('pholder.input'),
trigger
:
'blur'
//
trigger: 'blur'
}],
//
}],
alarmInterval
:[{
//
alarmInterval:[{
required
:
true
,
//
required: true,
message
:
this
.
$t
(
'pholder.input'
),
//
message: this.$t('pholder.input'),
trigger
:
'blur'
//
trigger: 'blur'
}],
//
}],
}
}
}
}
},
},
mounted
()
{
this
.
getCounterType
()
},
methods
:
{
methods
:
{
dialogInit
(
data
,
mallId
,
areaId
)
{
dialogInit
(
data
,
mallId
,
areaId
)
{
this
.
addForm
=
{
this
.
addForm
=
{
mallId
:
''
,
mallId
:
''
,
areaId
:
""
,
areaId
:
""
,
// queueLengthSwitch:false,
queueLengthThreshold
:
''
,
// waitTimeSwitch:false,
waitTimeThreshold
:
''
,
alarmInterval
:
''
,
sendEmail
:
''
,
sendEmail
:
''
,
channelRules
:[]
};
};
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.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
++
)
{
...
@@ -90,6 +90,18 @@ export default {
...
@@ -90,6 +90,18 @@ export default {
email
:
arr
[
i
]
email
:
arr
[
i
]
})
})
}
}
data
[
0
].
channelRules
.
forEach
(
itemR
=>
{
this
.
counterTypeData
.
forEach
(
item
=>
{
if
(
itemR
.
counterType
==
item
.
key
){
item
.
alarmInterval
=
itemR
.
alarmInterval
;
item
.
queueLengthThreshold
=
itemR
.
queueLengthThreshold
;
item
.
trolleyThreshold
=
itemR
.
trolleyThreshold
;
item
.
waitTimeThreshold
=
itemR
.
waitTimeThreshold
;
item
.
counterTypeId
=
itemR
.
id
;
}
})
})
this
.
$forceUpdate
()
this
.
$forceUpdate
()
}
else
{
}
else
{
this
.
addForm
.
mallId
=
mallId
;
this
.
addForm
.
mallId
=
mallId
;
...
@@ -97,6 +109,20 @@ export default {
...
@@ -97,6 +109,20 @@ export default {
}
}
this
.
addDialogVisible
=
true
;
this
.
addDialogVisible
=
true
;
},
},
// 通道类型
getCounterType
()
{
this
.
$api
.
base
.
dataDic
({
type
:
'counterType'
}).
then
(
res
=>
{
this
.
counterTypeData
=
res
.
data
.
data
.
map
(
item
=>
{
if
(
localStorage
.
getItem
(
'lang'
)
==
'en_US'
)
{
item
.
value
=
item
.
valueEn
;
}
item
.
text
=
item
.
value
return
item
;
});
})
},
addEmail
(){
addEmail
(){
this
.
alarmReceiverList
.
push
({
this
.
alarmReceiverList
.
push
({
email
:
''
email
:
''
...
@@ -112,10 +138,31 @@ export default {
...
@@ -112,10 +138,31 @@ export default {
}
}
this
.
addForm
.
sendEmail
=
arr
.
join
(
';'
)
this
.
addForm
.
sendEmail
=
arr
.
join
(
';'
)
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
console
.
log
(
valid
)
if
(
valid
)
{
if
(
valid
)
{
this
.
addForm
.
queueLengthSwitch
=
1
let
channelRules
=
[]
this
.
addForm
.
waitTimeSwitch
=
1
for
(
let
item
of
this
.
counterTypeData
)
{
if
(
item
.
key
!=
4
){
if
(
item
.
queueLengthThreshold
&&
item
.
queueLengthThreshold
&&
item
.
queueLengthThreshold
&&
item
.
trolleyThreshold
){
channelRules
.
push
({
queueLengthThreshold
:
item
.
queueLengthThreshold
,
waitTimeThreshold
:
item
.
waitTimeThreshold
,
alarmInterval
:
item
.
alarmInterval
,
trolleyThreshold
:
item
.
trolleyThreshold
,
counterType
:
item
.
key
,
id
:
item
.
counterTypeId
||
null
})
}
else
{
this
.
$message
({
message
:
this
.
$t
(
'pholder.input'
)
+
item
.
text
+
this
.
$t
(
'button.alarmRules'
),
type
:
'warning'
});
return
false
}
}
}
// this.addForm.queueLengthSwitch = 1
// this.addForm.waitTimeSwitch = 1
this
.
addForm
.
channelRules
=
channelRules
if
(
this
.
isAdd
){
if
(
this
.
isAdd
){
this
.
$api
.
queueManagementApi
.
addAlarmRules
(
this
.
addForm
)
this
.
$api
.
queueManagementApi
.
addAlarmRules
(
this
.
addForm
)
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
...
@@ -171,7 +218,7 @@ export default {
...
@@ -171,7 +218,7 @@ export default {
<
style
scoped
lang=
"less"
>
<
style
scoped
lang=
"less"
>
.dialog_lj
{
.dialog_lj
{
/deep/.el-dialog{
/deep/.el-dialog{
width
:
1
0
00px
!important
;
width
:
1
3
00px
!important
;
}
}
/
deep
/
.el-form
{
/
deep
/
.el-form
{
...
@@ -188,6 +235,18 @@ export default {
...
@@ -188,6 +235,18 @@ export default {
.receiverEmail
{
.receiverEmail
{
width
:
500px
!important
;
width
:
500px
!important
;
}
}
.inlineBlock
{
/deep/.el-form-item{
display
:
inline-block
;
}
/
deep
/
.el-form-item__content
{
width
:
180px
!important
;
min-width
:
180px
!important
;
}
/
deep
/
.el-input-number
{
width
:
100px
;
}
}
/
deep
/
.el-form-item__label
{
/
deep
/
.el-form-item__label
{
line-height
:
30px
;
line-height
:
30px
;
height
:
30px
;
height
:
30px
;
...
...
src/views/queueManagement/alarmEvent/index.vue
View file @
7aef0de
...
@@ -59,13 +59,18 @@
...
@@ -59,13 +59,18 @@
</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=
"
create
Time"
width=
"160"
></el-table-column>
<el-table-column
:label=
"$t('table.sentDate')"
align=
"center"
prop=
"
send
Time"
width=
"160"
></el-table-column>
<el-table-column
:label=
"$t('table.state')"
align=
"center"
prop=
"status"
width=
"100"
>
<el-table-column
:label=
"$t('table.state')"
align=
"center"
prop=
"status"
width=
"100"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
status
==
1
?
$t
(
'table.sendSuccess'
):
$t
(
'table.sendFail'
)
}}
</span>
<span>
{{
scope
.
row
.
status
==
1
?
$t
(
'table.sendSuccess'
):
$t
(
'table.sendFail'
)
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
:label=
"$t('table.recipient')"
align=
"center"
prop=
"sendEmail"
>
<el-table-column
:label=
"$t('table.recipient')"
align=
"center"
prop=
"sendEmail"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
:label=
"$t('table.operate')"
align=
"center"
width=
"120"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"text"
class=
"tab-btn"
@
click=
"getDetail(scope.row)"
>
{{
$t
(
'button.look'
)
}}
</el-button>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
<el-pagination
<el-pagination
...
@@ -86,6 +91,15 @@
...
@@ -86,6 +91,15 @@
</div>
</div>
</div>
</div>
<add-dialog
ref=
"addModel"
></add-dialog>
<add-dialog
ref=
"addModel"
></add-dialog>
<el-dialog
:title=
"$t('allPages.Image')"
class=
"manage-dialog dialog_lj imgDialog"
:visible
.
sync=
"imgDialogVisible"
:close-on-click-modal=
"false"
v-if=
"imgDialogVisible"
@
close=
"imgDialogVisible = false"
>
<div
style=
"height: 600px;"
>
<el-image
v-for=
"(item,index) in imgArr"
:key=
"index"
:src=
'picUrl+item'
></el-image>
</div>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"imgDialogVisible = false"
class=
"dialog-btn"
>
{{ $t('dialog.close') }}
</el-button>
</div>
</el-dialog>
</div>
</div>
</template>
</template>
...
@@ -95,6 +109,9 @@
...
@@ -95,6 +109,9 @@
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
picUrl
:
''
,
imgArr
:[],
imgDialogVisible
:
false
,
mallListForTerm
:[],
mallListForTerm
:[],
channelListData
:[],
channelListData
:[],
areaListData
:[],
areaListData
:[],
...
@@ -124,6 +141,7 @@
...
@@ -124,6 +141,7 @@
addDialog
,
addDialog
,
},
},
mounted
()
{
mounted
()
{
this
.
picUrl
=
window
.
_vionConfig
.
picUrl
this
.
getMallListForTerm
()
this
.
getMallListForTerm
()
},
},
computed
:
{
computed
:
{
...
@@ -133,6 +151,17 @@
...
@@ -133,6 +151,17 @@
},
},
},
},
methods
:
{
methods
:
{
getDetail
(
row
){
if
(
row
.
screenshotPath
){
this
.
imgArr
=
row
.
screenshotPath
.
split
(
";"
)
this
.
imgDialogVisible
=
true
}
else
{
this
.
$message
({
message
:
this
.
$t
(
'echartsTitle.noData'
),
type
:
'warning'
});
}
},
// 广场
// 广场
getMallListForTerm
()
{
getMallListForTerm
()
{
this
.
mallListForTerm
=
[];
this
.
mallListForTerm
=
[];
...
@@ -263,6 +292,11 @@
...
@@ -263,6 +292,11 @@
</
script
>
</
script
>
<
style
scoped=
"scoped"
lang=
"less"
>
<
style
scoped=
"scoped"
lang=
"less"
>
.imgDialog
{
/deep/.el-dialog{
width
:
1000px
!important
;
}
}
/
deep
/
.el-select
{
/
deep
/
.el-select
{
width
:
180px
;
width
:
180px
;
}
}
...
@@ -273,4 +307,7 @@
...
@@ -273,4 +307,7 @@
/
deep
/
.el-date-editor
{
/
deep
/
.el-date-editor
{
width
:
250px
!important
;
width
:
250px
!important
;
}
}
/
deep
/
.el-table
.cell
{
text-overflow
:
ellipsis
!important
;
}
</
style
>
</
style
>
src/views/queueManagement/waitingTimeStatistics/index.vue
0 → 100644
View file @
7aef0de
This diff is collapsed.
Click to expand it.
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