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 6f062f12
authored
Nov 04, 2022
by
李君
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
优化
1 parent
eaa5fd77
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
26 deletions
src/views/queueManagement/dataPlayback/index.vue
src/views/queueManagement/dataPlayback/index.vue
View file @
6f062f1
...
@@ -13,10 +13,17 @@
...
@@ -13,10 +13,17 @@
</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
type=
"date"
:placeholder=
"$t('pholder.date')"
v-model=
"searchForm.countDate"
></el-date-picker>
<el-date-picker
v-model=
"searchForm.countDate"
type=
"datetimerange"
:range-separator=
"$t('dialog.to')"
:start-placeholder=
"$t('table.startTime')"
:end-placeholder=
"$t('table.endTime')"
>
</el-date-picker>
<!--
<el-date-picker
type=
"date"
:placeholder=
"$t('pholder.date')"
v-model=
"searchForm.countDate"
></el-date-picker>
-->
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<
el-time-picker
is-range
v-model=
"searchForm.time"
:range-separator=
"$t('dialog.to')"
:start-placeholder=
"$t('pholder.startDate')"
:end-placeholder=
"$t('pholder.endDate')"
placeholder=
"选择时间范围"
>
</el-time-picker
>
<
!--
<el-time-picker
is-range
v-model=
"searchForm.time"
:range-separator=
"$t('dialog.to')"
:start-placeholder=
"$t('pholder.startDate')"
:end-placeholder=
"$t('pholder.endDate')"
placeholder=
"选择时间范围"
>
</el-time-picker>
--
>
</el-form-item>
</el-form-item>
<el-form-item
:label=
"$t('table.granularity')"
>
<el-form-item
:label=
"$t('table.granularity')"
>
<el-select
v-model=
"searchForm.granularity"
:placeholder=
"$t('pholder.select')"
>
<el-select
v-model=
"searchForm.granularity"
:placeholder=
"$t('pholder.select')"
>
...
@@ -279,7 +286,7 @@
...
@@ -279,7 +286,7 @@
searchForm
:
{
searchForm
:
{
mallId
:
''
,
mallId
:
''
,
cashierAreaId
:
''
,
cashierAreaId
:
''
,
countDate
:
new
Date
()
,
countDate
:
[
''
,
''
]
,
time
:[
new
Date
(),
new
Date
()],
time
:[
new
Date
(),
new
Date
()],
granularity
:
5
granularity
:
5
},
},
...
@@ -408,6 +415,9 @@
...
@@ -408,6 +415,9 @@
}
}
}
}
},
},
created
()
{
this
.
searchForm
.
countDate
=
[
moment
().
format
(
'YYYY-MM-DD'
)
+
' 08:00:00'
,
moment
().
format
(
'YYYY-MM-DD'
)
+
' 23:00:00'
]
},
mounted
()
{
mounted
()
{
this
.
getMallListForTerm
();
this
.
getMallListForTerm
();
this
.
getCounterType
()
this
.
getCounterType
()
...
@@ -425,6 +435,7 @@
...
@@ -425,6 +435,7 @@
this
.
chart_right
.
resize
();
this
.
chart_right
.
resize
();
});
});
this
.
loading
=
true
;
this
.
loading
=
true
;
console
.
log
(
this
.
searchForm
)
},
},
computed
:
{
computed
:
{
tableHeight
()
{
tableHeight
()
{
...
@@ -503,8 +514,8 @@
...
@@ -503,8 +514,8 @@
getCountData
(
time
){
getCountData
(
time
){
this
.
$api
.
queueManagementApi
.
getCountData
({
this
.
$api
.
queueManagementApi
.
getCountData
({
cashierAreaId
:
this
.
searchForm
.
cashierAreaId
,
cashierAreaId
:
this
.
searchForm
.
cashierAreaId
,
countDate
:
moment
(
this
.
searchForm
.
countDate
).
format
(
'YYYY-MM-DD'
),
countDate
:
moment
(
this
.
searchForm
.
countDate
[
0
]
).
format
(
'YYYY-MM-DD'
),
startCountTime
:
moment
(
this
.
searchForm
.
countDate
).
format
(
'YYYY-MM-DD'
)
+
' '
+
time
startCountTime
:
time
?
moment
(
this
.
progressTime
).
format
(
'YYYY-MM-DD HH:mm:ss'
):
moment
(
this
.
searchForm
.
countDate
[
0
]).
format
(
'YYYY-MM-DD HH:mm:ss'
)
}).
then
(
res
=>
{
}).
then
(
res
=>
{
let
result
=
res
.
data
;
let
result
=
res
.
data
;
if
(
result
.
code
==
200
)
{
if
(
result
.
code
==
200
)
{
...
@@ -525,7 +536,7 @@
...
@@ -525,7 +536,7 @@
cashierAreaId
:
this
.
searchForm
.
cashierAreaId
,
cashierAreaId
:
this
.
searchForm
.
cashierAreaId
,
mallId
:
this
.
searchForm
.
mallId
,
mallId
:
this
.
searchForm
.
mallId
,
chartType
:
"line"
,
chartType
:
"line"
,
countDate
:
moment
(
this
.
searchForm
.
countDate
).
format
(
'YYYY-MM-DD'
),
countDate
:
moment
(
this
.
searchForm
.
countDate
[
0
]
).
format
(
'YYYY-MM-DD'
),
cashierChannelId
:
this
.
laneId
,
cashierChannelId
:
this
.
laneId
,
});
});
...
@@ -551,7 +562,7 @@
...
@@ -551,7 +562,7 @@
this
.
$api
.
queueManagementApi
.
getCustomersOverview
({
this
.
$api
.
queueManagementApi
.
getCustomersOverview
({
mallId
:
this
.
searchForm
.
mallId
,
mallId
:
this
.
searchForm
.
mallId
,
chartType
:
"line"
,
chartType
:
"line"
,
countDate
:
moment
(
this
.
searchForm
.
countDate
).
format
(
'YYYY-MM-DD'
),
countDate
:
moment
(
this
.
searchForm
.
countDate
[
0
]
).
format
(
'YYYY-MM-DD'
),
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
){
if
(
res
.
data
.
code
==
200
){
let
resData
=
res
.
data
.
data
;
let
resData
=
res
.
data
.
data
;
...
@@ -583,7 +594,7 @@
...
@@ -583,7 +594,7 @@
this
.
searchForm
.
mallId
=
result
.
data
[
0
].
id
;
this
.
searchForm
.
mallId
=
result
.
data
[
0
].
id
;
this
.
setSessionLocal
(
"mallId"
,
this
.
searchForm
.
mallId
);
this
.
setSessionLocal
(
"mallId"
,
this
.
searchForm
.
mallId
);
}
}
this
.
getOpenTime
()
//
this.getOpenTime()
this
.
mallListForTerm
=
result
.
data
;
this
.
mallListForTerm
=
result
.
data
;
}
}
this
.
getAreaList
(
this
.
searchForm
.
mallId
);
this
.
getAreaList
(
this
.
searchForm
.
mallId
);
...
@@ -593,7 +604,7 @@
...
@@ -593,7 +604,7 @@
this
.
setSessionLocal
(
"mallId"
,
val
);
this
.
setSessionLocal
(
"mallId"
,
val
);
this
.
searchForm
.
cashierAreaId
=
''
this
.
searchForm
.
cashierAreaId
=
''
// this.channelNum = 0
// this.channelNum = 0
this
.
getOpenTime
()
//
this.getOpenTime()
this
.
getAreaList
(
val
)
this
.
getAreaList
(
val
)
},
},
// 获取门店开门关闭时间
// 获取门店开门关闭时间
...
@@ -663,20 +674,20 @@
...
@@ -663,20 +674,20 @@
// })
// })
// },
// },
playFun
(){
playFun
(){
this
.
startTime
=
moment
(
this
.
searchForm
.
time
[
0
]).
format
(
'HH:mm:ss'
)
//
this.startTime = moment(this.searchForm.time[0]).format('HH:mm:ss')
this
.
endTime
=
moment
(
this
.
searchForm
.
time
[
1
]).
format
(
'HH:mm:ss'
)
//
this.endTime = moment(this.searchForm.time[1]).format('HH:mm:ss')
let
openT
=
''
,
closeT
=
''
;
let
openT
=
''
,
closeT
=
''
;
if
(
this
.
pauseBtn
){
if
(
this
.
pauseBtn
){
openT
=
new
Date
(
this
.
progressTime
).
getTime
();
openT
=
new
Date
(
this
.
progressTime
).
getTime
();
closeT
=
new
Date
(
this
.
searchForm
.
tim
e
[
1
]).
getTime
();
closeT
=
new
Date
(
this
.
searchForm
.
countDat
e
[
1
]).
getTime
();
}
else
{
}
else
{
openT
=
new
Date
(
this
.
searchForm
.
tim
e
[
0
]).
getTime
();
openT
=
new
Date
(
this
.
searchForm
.
countDat
e
[
0
]).
getTime
();
closeT
=
new
Date
(
this
.
searchForm
.
tim
e
[
1
]).
getTime
();
closeT
=
new
Date
(
this
.
searchForm
.
countDat
e
[
1
]).
getTime
();
}
}
this
.
searchFun
()
this
.
searchFun
()
this
.
getCountData
(
moment
(
openT
).
format
(
'HH:mm:ss'
))
//
this.getCountData(moment(openT).format('HH:mm:ss'))
this
.
getDistribution
(
moment
(
openT
).
format
(
'HH:mm:ss'
))
//
this.getDistribution(moment(openT).format('HH:mm:ss'))
this
.
playBtnShow
=
true
this
.
playBtnShow
=
true
this
.
progressShow
=
true
;
this
.
progressShow
=
true
;
...
@@ -689,8 +700,8 @@
...
@@ -689,8 +700,8 @@
return
false
return
false
}
else
{
}
else
{
this
.
progressTime
=
moment
(
openT
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
this
.
progressTime
=
moment
(
openT
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
this
.
getCountData
(
moment
(
openT
).
format
(
'HH:mm:ss'
)
)
this
.
getCountData
(
this
.
progressTime
)
this
.
getDistribution
(
moment
(
openT
).
format
(
'HH:mm:ss'
)
)
this
.
getDistribution
(
this
.
progressTime
)
}
}
},
1500
);
},
1500
);
},
},
...
@@ -706,20 +717,15 @@
...
@@ -706,20 +717,15 @@
this
.
pauseBtn
=
false
this
.
pauseBtn
=
false
this
.
progressTime
=
''
this
.
progressTime
=
''
this
.
getDistribution
()
this
.
getDistribution
()
this
.
getCountData
(
moment
(
this
.
searchForm
.
time
[
0
]).
format
(
'HH:mm:ss'
)
)
this
.
getCountData
()
this
.
getCustomersOverview
()
this
.
getCustomersOverview
()
this
.
getchart
()
this
.
getchart
()
},
},
// 获取主页大屏人员点位分布
// 获取主页大屏人员点位分布
async
getDistribution
(
time
)
{
async
getDistribution
(
time
)
{
if
(
time
){
this
.
searchForm
.
countDate
=
moment
(
this
.
searchForm
.
countDate
).
format
(
'YYYY-MM-DD'
)
+
' '
+
time
}
else
{
this
.
searchForm
.
countDate
=
moment
(
this
.
searchForm
.
countDate
).
format
(
'YYYY-MM-DD'
)
+
' '
+
moment
(
this
.
searchForm
.
time
[
0
]).
format
(
'HH:mm:ss'
)
}
let
parmas
=
{
let
parmas
=
{
cashierAreaId
:
this
.
searchForm
.
cashierAreaId
,
cashierAreaId
:
this
.
searchForm
.
cashierAreaId
,
countDate
:
t
his
.
searchForm
.
countDate
,
countDate
:
t
ime
?
moment
(
this
.
progressTime
).
format
(
'YYYY-MM-DD HH:mm:ss'
):
moment
(
this
.
searchForm
.
countDate
[
0
]).
format
(
'YYYY-MM-DD HH:mm:ss'
)
,
}
}
let
res
=
await
this
.
$api
.
queueManagementApi
.
getdistribution
(
parmas
);
let
res
=
await
this
.
$api
.
queueManagementApi
.
getdistribution
(
parmas
);
let
{
code
,
data
}
=
res
.
data
;
let
{
code
,
data
}
=
res
.
data
;
...
@@ -947,7 +953,7 @@
...
@@ -947,7 +953,7 @@
width
:
180px
;
width
:
180px
;
}
}
/
deep
/
.el-date-editor
{
/
deep
/
.el-date-editor
{
width
:
180px
;
//
width
:
180px
;
}
}
/
deep
/
.el-date-editor--timerange.el-input__inner
{
/
deep
/
.el-date-editor--timerange.el-input__inner
{
width
:
220px
;
width
:
220px
;
...
...
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