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 7368dacc
authored
2 years ago
by
李君
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
优化
1 parent
0e2b99ea
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
314 additions
and
22 deletions
package-lock.json
src/api/queueManagementApi.js
src/router/modules/queueManagement.js
src/views/queueManagement/alarmEvent/addRule.vue
src/views/queueManagement/alarmEvent/index.vue
src/views/queueManagement/basicPassengerFlow/index.vue
src/views/queueManagement/queueLive/index.vue
src/views/queueManagement/queueStatistics/index.vue
src/views/queueManagement/regionalManagement/index.vue
package-lock.json
View file @
7368dac
This diff could not be displayed because it is too large.
This diff is collapsed.
Click to expand it.
src/api/queueManagementApi.js
View file @
7368dac
...
...
@@ -84,6 +84,21 @@ const queueManagementApi = {
getTrajectory
(
params
,
config
)
{
return
req
(
'get'
,
`/queuing/person/trajectory`
,
params
,
config
)
},
// 报警记录
getAlarmMessageList
(
params
,
config
)
{
return
req
(
'get'
,
`/d-cashier-alarm-message-log/page`
,
params
,
config
)
},
// 报警规则
getAlarmRulesList
(
params
,
config
)
{
return
req
(
'get'
,
`/d-cashier-alarm-rule/list`
,
params
,
config
)
},
addAlarmRules
(
params
,
config
)
{
return
req
(
'POST'
,
`/d-cashier-alarm-rule`
,
params
,
config
)
},
updateAlarmRules
(
params
,
config
)
{
return
req
(
'PUT'
,
`/d-cashier-alarm-rule/
${
params
.
id
}
`
,
params
,
config
)
},
}
...
...
This diff is collapsed.
Click to expand it.
src/router/modules/queueManagement.js
View file @
7368dac
...
...
@@ -83,6 +83,14 @@ const queueManagementRouterMap = {
permissionPath
:
'businessTimeSetting'
},
component
:
()
=>
import
(
'@/views/queueManagement/businessTimeSetting/'
),
},
{
name
:
'alarmEvent'
,
path
:
'/queueManagement/alarmEvent'
,
meta
:
{
permissionPath
:
'alarmEvent'
},
component
:
()
=>
import
(
'@/views/queueManagement/alarmEvent/'
),
}
]
...
...
This diff is collapsed.
Click to expand it.
src/views/queueManagement/alarmEvent/addRule.vue
0 → 100644
View file @
7368dac
<
template
>
<div>
<el-dialog
:title=
"$t('button.alarmRules')"
class=
"manage-dialog dialog_lj"
:visible
.
sync=
"addDialogVisible"
:close-on-click-modal=
"false"
v-if=
"addDialogVisible"
@
close=
"addDialogClose()"
>
<el-form
:model=
"addForm"
label-width=
"100px"
status-icon
:rules=
"rules"
ref=
"addForm"
>
<!-- 区域名称 -->
<p
class=
"itemTitle"
>
{{
$t
(
'button.alarmRules'
)
}}
</p>
<el-form-item
>
<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=
"name"
v-if=
"addForm.queueLengthSwitch"
>
<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
:label=
"$t('table.waitingTime')"
prop=
"code"
v-if=
"addForm.waitTimeSwitch"
>
<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
:label=
"$t('table.alarmCycle')"
prop=
"counterType"
>
<el-input-number
v-model=
"addForm.alarmInterval"
:min=
"0"
:controls =
'false'
:precision =
'0'
></el-input-number>
{{
$t
(
'format.minute'
)
}}
</el-form-item>
<p
class=
"info"
>
{{
$t
(
'message.alarmInfo'
)
}}
</p>
<p
class=
"itemTitle"
>
{{
$t
(
'table.alarmReceiver'
)
}}
</p>
<div
v-for=
"(item,index) in alarmReceiverList"
:key=
'index'
style=
"margin-top: 10px;"
>
<el-input
class=
"receiverEmail"
v-model=
"item.email"
></el-input>
<el-button
type=
"primary"
class=
"dialog-btn dialog-confirm-btn"
v-if=
"index==0"
@
click=
'addEmail'
>
{{
$t
(
'button.groupAdd'
)
}}
</el-button>
<el-button
type=
"primary"
class=
"dialog-btn dialog-confirm-btn"
@
click=
'delEmail(index)'
v-if=
"index>0"
>
{{
$t
(
'button.delete'
)
}}
</el-button>
</div>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"addDialogVisible = false"
class=
"dialog-btn"
>
{{
$t
(
'dialog.cancel'
)
}}
</el-button>
<el-button
type=
"primary"
@
click=
"addSubmit('addForm')"
class=
"dialog-btn dialog-confirm-btn"
>
{{
$t
(
'dialog.confirm'
)
}}
</el-button>
</div>
</el-dialog>
</div>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
addDialogVisible
:
false
,
addForm
:
{
},
alarmReceiverList
:[{
email
:
''
}],
isAdd
:
true
,
rules
:
{
// name: [{
// required: true,
// message: this.$t('pholder.input'),
// trigger: 'blur'
// }],
// code:[{
// required: true,
// message: this.$t('pholder.input'),
// trigger: 'blur'
// }],
}
}
},
methods
:
{
dialogInit
(
data
,
mallId
,
areaId
)
{
this
.
addForm
=
{
mallId
:
''
,
areaId
:
""
,
queueLengthSwitch
:
false
,
queueLengthThreshold
:
''
,
waitTimeSwitch
:
false
,
waitTimeThreshold
:
''
,
alarmInterval
:
''
,
sendEmail
:
''
,
};
if
(
data
&&
data
.
length
>
0
){
this
.
isAdd
=
false
;
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
(
";"
)
this
.
alarmReceiverList
=
[]
for
(
var
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
this
.
alarmReceiverList
.
push
({
email
:
arr
[
i
]
})
}
this
.
$forceUpdate
()
}
else
{
this
.
addForm
.
mallId
=
mallId
;
this
.
addForm
.
areaId
=
areaId
;
}
this
.
addDialogVisible
=
true
;
},
addEmail
(){
this
.
alarmReceiverList
.
push
({
email
:
''
})
},
delEmail
(
index
){
this
.
alarmReceiverList
.
splice
(
index
,
1
)
},
addSubmit
(
formName
)
{
let
arr
=
[]
for
(
var
i
=
0
;
i
<
this
.
alarmReceiverList
.
length
;
i
++
)
{
arr
.
push
(
this
.
alarmReceiverList
[
i
].
email
)
}
this
.
addForm
.
sendEmail
=
arr
.
join
(
';'
)
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
addForm
.
queueLengthSwitch
=
this
.
addForm
.
queueLengthSwitch
?
'1'
:
'0'
this
.
addForm
.
waitTimeSwitch
=
this
.
addForm
.
waitTimeSwitch
?
'1'
:
'0'
if
(
this
.
isAdd
){
this
.
$api
.
queueManagementApi
.
addAlarmRules
(
this
.
addForm
)
.
then
((
res
)
=>
{
let
result
=
res
.
data
;
if
(
result
.
code
==
200
){
this
.
$message
({
message
:
result
.
msg
,
type
:
'success'
});
this
.
$parent
.
getTableData
();
this
.
$refs
.
addForm
.
resetFields
();
this
.
addDialogVisible
=
false
}
else
{
this
.
$message
({
message
:
result
.
msg
,
type
:
'error'
});
}
})
}
else
{
this
.
$api
.
queueManagementApi
.
updateAlarmRules
(
this
.
addForm
).
then
((
res
)
=>
{
let
result
=
res
.
data
;
if
(
result
.
code
==
200
){
this
.
$message
({
message
:
result
.
msg
,
type
:
'success'
});
this
.
$parent
.
getTableData
();
this
.
$refs
.
addForm
.
resetFields
();
this
.
addDialogVisible
=
false
}
else
{
this
.
$message
({
message
:
result
.
msg
,
type
:
'error'
});
}
})
}
}
else
{
return
false
;
}
});
},
addDialogClose
()
{
this
.
addDialogVisible
=
false
;
this
.
$refs
.
addForm
.
resetFields
();
},
}
}
</
script
>
<
style
scoped
lang=
"less"
>
.dialog_lj
{
/deep/.el-dialog{
width
:
1000px
!important
;
}
/
deep
/
.el-form
{
height
:
500px
!important
;
}
.itemTitle
{
width
:
100%
;
padding-bottom
:
5px
;
border-bottom
:
1px
solid
#ccc
;
}
.info
{
margin
:
15px
0
;
}
.receiverEmail
{
width
:
500px
!important
;
}
/
deep
/
.el-form-item__label
{
line-height
:
30px
;
height
:
30px
;
text-align
:
left
}
/
deep
/
.el-form-item__label
+
.el-form-item__content
{
float
:
none
!important
;
line-height
:
40px
!important
;
}
/
deep
/
.el-form-item__error
{
padding-top
:
0px
!important
;
}
}
</
style
>
This diff is collapsed.
Click to expand it.
src/views/queueManagement/alarmEvent/index.vue
0 → 100644
View file @
7368dac
This diff is collapsed.
Click to expand it.
src/views/queueManagement/basicPassengerFlow/index.vue
View file @
7368dac
...
...
@@ -10,6 +10,17 @@
<el-form-item
:label=
"$t('table.date')"
>
<el-date-picker
type=
"date"
:placeholder=
"$t('pholder.date')"
v-model=
"searchForm.countDate"
style=
"width: 100%;"
></el-date-picker>
</el-form-item>
<el-form-item
:label=
"$t('table.type')"
>
<el-select
v-model=
"searchForm.chartDataType"
filterable
:placeholder=
"$t('pholder.select')"
>
<el-option
label=
'summary'
value=
"summary"
></el-option>
<el-option
label=
'detail'
value=
"detail"
></el-option>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('table.granularity')"
>
<el-select
v-model=
"searchForm.minuteGranularity"
filterable
:placeholder=
"$t('pholder.select')"
>
<el-option
v-for=
"item in granularityListData"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
class=
"search-btn"
size=
"mini"
plain
@
click=
"searchFun"
>
{{
$t
(
'button.search'
)
}}
</el-button>
</el-form-item>
...
...
@@ -55,12 +66,29 @@
export
default
{
data
()
{
return
{
granularityListData
:[
{
value
:
1
,
label
:
'1min'
},
{
value
:
5
,
label
:
'5min'
},
{
value
:
10
,
label
:
'10min'
},{
value
:
15
,
label
:
'15min'
}
],
mallListForTerm
:
[],
trafficFlow_title
:
"BasicReportdetailData"
,
//报表
loading
:
false
,
searchForm
:
{
mallId
:
''
,
countDate
:
new
Date
(),
chartDataType
:
'summary'
,
minuteGranularity
:
10
},
isTabChart
:
false
,
tabHeadData
:
[],
...
...
This diff is collapsed.
Click to expand it.
src/views/queueManagement/queueLive/index.vue
View file @
7368dac
...
...
@@ -74,12 +74,12 @@
<div
class=
"tabel_title"
>
<!--
<span>
{{
$t
(
'home.queuingmonitoring'
)
}}
</span>
-->
<span>
Queue Monitoring
</span>
<div
class=
"lenged"
>
<p>
<small>
{{
safeingNum
}}
~
{{
warningNum
}}
</small><small
class=
"colorBox colorBox_yellow
"
></small>
<div
class=
"lenged"
v-if=
"!(JSON.stringify(ruleObj) =='
{}')"
>
<p
v-if=
"ruleObj.queueLengthSwitch==1"
>
<small>
>
{{
ruleObj
.
queueLengthThreshold
}}
</small><small
class=
"colorBox colorBox_red
"
></small>
</p>
<p>
<small>
>
{{
warningNum
}}
</small><small
class=
"colorBox colorBox_red"
></small>
<p
v-if=
"ruleObj.waitTimeSwitch==1"
>
<small>
>
{{
ruleObj
.
waitTimeThreshold
}}
min
</small><small
class=
"colorBox colorBox_red"
></small>
</p>
</div>
<div
class=
"openBtn"
@
click=
"openDialog('table')"
>
...
...
@@ -233,6 +233,7 @@ import moment from "moment";
export
default
{
data
()
{
return
{
ruleObj
:{},
dialogShow
:
false
,
openDialogType
:
''
,
laneName
:
''
,
...
...
@@ -263,8 +264,6 @@ export default {
time3
:
null
,
tableData
:
[],
counterTypeData
:[],
warningNum
:
0
,
safeingNum
:
0
,
optionTopConfig
:
{
tooltip
:
{
trigger
:
'axis'
,
...
...
@@ -285,7 +284,7 @@ export default {
left
:
'3%'
,
right
:
'4%'
,
bottom
:
'3%'
,
top
:
'
4
0'
,
top
:
'
5
0'
,
containLabel
:
true
},
color
:
[
'#3BB8FF'
,
'#FFC62E'
,
'#97c05c'
],
...
...
@@ -442,8 +441,10 @@ export default {
htmls
=
`<div><div style="font-size:14px;height:31px;line-height:31px;padding-left:15px;padding-right:15px;">
${
parmas
[
0
].
name
}
</div>`
;
parmas
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
data
!=
null
){
if
(
item
.
seriesName
==
'Queue Length'
){
if
(
item
.
seriesName
==
'Queue Length'
||
item
.
seriesName
==
'Customers Abandoned the Queue'
){
htmls
+=
`<p style="font-size:13px;padding:4px 15px;">
${
item
.
marker
}
${
item
.
seriesName
}
:
${
item
.
data
}${
this
.
$t
(
'format.perNum'
)}
</p>`
;
}
else
if
(
item
.
seriesName
==
'Open Counters'
){
htmls
+=
`<p style="font-size:13px;padding:4px 15px;">
${
item
.
marker
}
${
item
.
seriesName
}
:
${
item
.
data
}${
this
.
$t
(
'iPage.number'
)}
</p>`
;
}
else
{
let
count
=
item
.
data
if
(
count
>
60
){
...
...
@@ -669,6 +670,23 @@ export default {
}
})
},
// 报警规则
getRules
(){
this
.
$api
.
queueManagementApi
.
getAlarmRulesList
({
mallId
:
this
.
mallId
,
areaId
:
this
.
regionId
,
pageNum
:
1
,
pageSize
:
999999
}).
then
(
res
=>
{
let
result
=
res
.
data
;
if
(
result
.
code
==
200
)
{
this
.
getAllData
();
if
(
result
.
data
.
list
&&
result
.
data
.
list
.
length
>
0
){
this
.
ruleObj
=
result
.
data
.
list
[
0
]
}
}
})
},
// 获取区域id
getRegionId
()
{
this
.
$api
.
queueManagementApi
...
...
@@ -677,8 +695,7 @@ export default {
let
result
=
res
.
data
;
if
(
result
.
code
==
200
)
{
this
.
regionId
=
result
.
data
.
list
[
0
]
&&
result
.
data
.
list
[
0
].
id
;
this
.
warningNum
=
result
.
data
.
list
[
0
].
warnNum
this
.
safeingNum
=
result
.
data
.
list
[
0
].
safeNum
this
.
getRules
();
this
.
pic
=
new
Image
();
this
.
pic
.
src
=
result
.
data
.
list
[
0
]
&&
...
...
@@ -686,8 +703,6 @@ export default {
this
.
pic
.
onload
=
()
=>
{
this
.
drawCirlce
();
};
this
.
getAllData
();
}
});
},
...
...
@@ -699,12 +714,13 @@ export default {
this
.
getCustomersOverview
()
},
tableRowClassName
:
function
({
row
,
rowIndex
})
{
if
(
row
.
customersInQueue
>
this
.
warningNum
)
{
if
(
this
.
ruleObj
.
queueLengthSwitch
==
1
||
this
.
ruleObj
.
waitTimeSwitch
==
1
){
if
(
row
.
customersInQueue
>
this
.
ruleObj
.
queueLengthThreshold
)
{
return
'danger-row'
;
}
else
if
(
row
.
customersInQueue
>
this
.
safeingNum
&&
row
.
customersInQueue
<=
this
.
warningNum
){
return
'warn-row'
;
}
else
{
return
'safe-row'
;
}
if
(
row
.
averageWaitingTime
>
(
this
.
ruleObj
.
waitTimeThreshold
*
60
))
{
return
'danger-row'
;
}
}
},
// 表格点击触发
...
...
This diff is collapsed.
Click to expand it.
src/views/queueManagement/queueStatistics/index.vue
View file @
7368dac
...
...
@@ -17,6 +17,11 @@
<el-option
v-for=
"item in channelListData"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
/>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('table.granularity')"
>
<el-select
v-model=
"searchForm.minuteGranularity"
filterable
:placeholder=
"$t('pholder.select')"
>
<el-option
v-for=
"item in granularityListData"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('table.date')"
>
<el-date-picker
type=
"date"
:placeholder=
"$t('pholder.date')"
v-model=
"searchForm.countDate"
style=
"width: 100%;"
></el-date-picker>
</el-form-item>
...
...
@@ -65,6 +70,21 @@
export
default
{
data
()
{
return
{
granularityListData
:[
{
value
:
1
,
label
:
'1min'
},
{
value
:
5
,
label
:
'5min'
},
{
value
:
10
,
label
:
'10min'
},{
value
:
15
,
label
:
'15min'
}
],
mallListForTerm
:
[],
areaListData
:
[],
channelListData
:
[],
...
...
@@ -75,6 +95,7 @@
cashierAreaId
:
''
,
cashierChannelId
:
''
,
countDate
:
new
Date
(),
minuteGranularity
:
10
},
isTabChart
:
false
,
tabHeadData
:
[],
...
...
@@ -148,8 +169,11 @@
let
htmls
=
""
;
htmls
=
`<div><div style="font-size:14px;height:31px;line-height:31px;padding-left:15px;padding-right:15px;">
${
parmas
[
0
].
name
}
</div>`
;
parmas
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
seriesName
==
'Queue Length'
){
if
(
item
.
data
){
if
(
item
.
seriesName
==
'Queue Length'
||
item
.
seriesName
==
'Customers Abandoned the Queue'
){
htmls
+=
`<p style="font-size:13px;padding:4px 15px;">
${
item
.
marker
}
${
item
.
seriesName
}
:
${
item
.
data
}${
this
.
$t
(
'format.perNum'
)}
</p>`
;
}
else
if
(
item
.
seriesName
==
'Open Counters'
){
htmls
+=
`<p style="font-size:13px;padding:4px 15px;">
${
item
.
marker
}
${
item
.
seriesName
}
:
${
item
.
data
}${
this
.
$t
(
'iPage.number'
)}
</p>`
;
}
else
{
let
count
=
item
.
data
if
(
count
>
60
){
...
...
@@ -159,6 +183,7 @@
}
htmls
+=
`<p style="font-size:13px;padding:4px 15px;">
${
item
.
marker
}
${
item
.
seriesName
}
:
${
count
}
</p>`
;
}
}
});
htmls
+=
"</div>"
;
return
htmls
;
...
...
@@ -314,5 +339,7 @@
</
script
>
<
style
scoped=
"scoped"
lang=
"less"
>
/
deep
/
.el-select
{
width
:
180px
!important
;
}
</
style
>
This diff is collapsed.
Click to expand it.
src/views/queueManagement/regionalManagement/index.vue
View file @
7368dac
...
...
@@ -50,11 +50,11 @@
<span>
{{
scope
.
row
.
status
==
0
?
$t
(
'pholder.state1'
):
$t
(
'pholder.state2'
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"QoS"
align=
"center"
prop=
"role_unid"
>
<!--
<el-table-column label="QoS" align="center" prop="role_unid">
<template slot-scope="scope">
<el-button type="text" class="tab-btn" @click="qosConfig(scope.row)">{{$t('asisTab.setting')}}</el-button>
</template>
</el-table-column>
</el-table-column>
-->
<el-table-column
:label=
"$t('table.deviceBind')"
align=
"center"
prop=
"role_unid"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"text"
class=
"tab-btn"
@
click=
"bindRow(scope.row)"
>
{{
$t
(
'button.unbind'
)
}}
</el-button>
...
...
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