Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
youjj
cloud-platform-ui
Commits
a0cf0d8a
Commit
a0cf0d8a
authored
Dec 19, 2019
by
guoyou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单统计
parent
b771882b
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
426 additions
and
67 deletions
+426
-67
index.js
src/api/admin/userManagement/index.js
+9
-0
vehicleStatistics.js
src/api/statistics/vehicleStatistics.js
+10
-0
dateFormattor.js
src/utils/dateFormattor.js
+2
-0
employeesInput.vue
src/views/interior/employeesInput.vue
+80
-47
orderStatistics.vue
src/views/statistics/orderStatistics.vue
+325
-20
No files found.
src/api/admin/userManagement/index.js
View file @
a0cf0d8a
...
@@ -178,3 +178,12 @@ export function updUserChange(params) {
...
@@ -178,3 +178,12 @@ export function updUserChange(params) {
data
:
params
data
:
params
});
});
}
}
// 离职后在职
export
function
updAddPositionChangeRecord
(
params
)
{
return
fetch
({
url
:
'api/admin/postion/admin/updAddPositionChangeRecord'
,
method
:
'post'
,
data
:
params
});
}
\ No newline at end of file
src/api/statistics/vehicleStatistics.js
View file @
a0cf0d8a
...
@@ -18,3 +18,13 @@ export function vehicleInfoExcel(params) {
...
@@ -18,3 +18,13 @@ export function vehicleInfoExcel(params) {
responseType
:
'blob'
responseType
:
'blob'
});
});
}
}
//车辆统计信息列表
export
function
received_statistics
(
params
)
{
return
fetch
({
url
:
'api/order/admin/order/received_statistics'
,
method
:
'post'
,
timeout
:
'50000'
,
data
:
params
});
}
\ No newline at end of file
src/utils/dateFormattor.js
View file @
a0cf0d8a
export
function
formatDate
(
date
,
fmt
)
{
export
function
formatDate
(
date
,
fmt
)
{
console
.
log
(
date
);
if
(
/
(
y+
)
/
.
test
(
fmt
))
{
if
(
/
(
y+
)
/
.
test
(
fmt
))
{
fmt
=
fmt
.
replace
(
RegExp
.
$1
,
(
date
.
getFullYear
()
+
''
).
substr
(
4
-
RegExp
.
$1
.
length
))
fmt
=
fmt
.
replace
(
RegExp
.
$1
,
(
date
.
getFullYear
()
+
''
).
substr
(
4
-
RegExp
.
$1
.
length
))
}
}
...
...
src/views/interior/employeesInput.vue
View file @
a0cf0d8a
<
template
>
<
template
>
<div
class=
"app-container calendar-list-container"
>
<div
class=
"app-container calendar-list-container"
>
<div
class=
"filter-container"
>
<div
class=
"filter-container"
v-loading=
"loading"
>
<el-form
ref=
"queryForm"
:model=
"listQuery"
label-width=
"100px"
>
<el-form
ref=
"queryForm"
:model=
"listQuery"
label-width=
"100px"
>
<el-row>
<el-row>
<el-col
:span=
"4"
>
<el-col
:span=
"4"
>
...
@@ -28,10 +28,10 @@
...
@@ -28,10 +28,10 @@
</el-col>
</el-col>
<el-col
:span=
"4"
>
<el-col
:span=
"4"
>
<el-form-item
label=
"身份"
>
<el-form-item
label=
"身份"
>
<el-select
class=
"filter-item"
v-model=
"listQuery.
status
"
placeholder=
"请选员工身份"
>
<el-select
class=
"filter-item"
v-model=
"listQuery.
positionId
"
placeholder=
"请选员工身份"
>
<el-option
:key=
"undefined"
label=
"全部"
:value=
"undefined"
></el-option>
<el-option
:key=
"undefined"
label=
"全部"
:value=
"undefined"
></el-option>
<el-option
<el-option
v-for=
"(item,index) in statusList
"
v-for=
"(item,index) in statusList"
:key=
"index"
:key=
"index"
:label=
"item.name"
:label=
"item.name"
:value=
"item.id"
:value=
"item.id"
...
@@ -68,7 +68,7 @@
...
@@ -68,7 +68,7 @@
<el-table-column
prop=
"positionName"
label=
"身份"
align=
"center"
></el-table-column>
<el-table-column
prop=
"positionName"
label=
"身份"
align=
"center"
></el-table-column>
<el-table-column
label=
"状态"
align=
"center"
>
<el-table-column
label=
"状态"
align=
"center"
>
<
template
scope=
"scope"
>
<
template
scope=
"scope"
>
<span
v-if=
"scope.row.
status
== 1"
style=
"color:#20a0ff"
>
离职
</span>
<span
v-if=
"scope.row.
isQuit
== 1"
style=
"color:#20a0ff"
>
离职
</span>
<span
v-else
style=
"color:red"
>
在职
</span>
<span
v-else
style=
"color:red"
>
在职
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
...
@@ -147,7 +147,7 @@
...
@@ -147,7 +147,7 @@
<el-button
type=
"text"
v-show=
"whether == 2"
@
click=
"amend(3)"
>
修改
</el-button>
<el-button
type=
"text"
v-show=
"whether == 2"
@
click=
"amend(3)"
>
修改
</el-button>
</el-form-item>
</el-form-item>
<el-form-item
label=
"状态"
v-show=
"whether == 2"
>
<el-form-item
label=
"状态"
v-show=
"whether == 2"
>
<el-input
v-model=
"staffTitleFrom.
status
"
disabled
style=
"width:90%"
></el-input>
<el-input
v-model=
"staffTitleFrom.
isQuit
"
disabled
style=
"width:90%"
></el-input>
<el-button
type=
"text"
@
click=
"amend(5)"
>
修改
</el-button>
<el-button
type=
"text"
@
click=
"amend(5)"
>
修改
</el-button>
</el-form-item>
</el-form-item>
<el-form-item
label=
"职位"
>
<el-form-item
label=
"职位"
>
...
@@ -177,7 +177,7 @@
...
@@ -177,7 +177,7 @@
</el-dialog>
</el-dialog>
<!--批量导入会员窗口-->
<!--批量导入会员窗口-->
<el-dialog
title=
"导入
会员
"
:visible
.
sync=
"tolead"
>
<el-dialog
title=
"导入
员工
"
:visible
.
sync=
"tolead"
>
<el-form
:model=
"fileForm"
>
<el-form
:model=
"fileForm"
>
<el-form-item
label=
"上传文件"
label-width=
"80px"
>
<el-form-item
label=
"上传文件"
label-width=
"80px"
>
<el-button
type=
"primary"
icon=
"el-icon-download"
>
<el-button
type=
"primary"
icon=
"el-icon-download"
>
...
@@ -223,7 +223,7 @@
...
@@ -223,7 +223,7 @@
</span>
</span>
<span>
<span>
<b>
状态:
</b>
<b>
状态:
</b>
{{staffInfo.info.
status
== 1?"离职":'在职'}}
{{staffInfo.info.
isQuit
== 1?"离职":'在职'}}
</span>
</span>
<span>
<span>
<b>
当前所属分公司:
</b>
<b>
当前所属分公司:
</b>
...
@@ -241,12 +241,13 @@
...
@@ -241,12 +241,13 @@
<p
class=
"title"
style=
"margin-top:20px"
>
人事变动记录
</p>
<p
class=
"title"
style=
"margin-top:20px"
>
人事变动记录
</p>
<p
v-for=
"(item,index) in staffInfo.record"
:key=
"index"
>
<p
v-for=
"(item,index) in staffInfo.record"
:key=
"index"
>
<b>
{{item.relTime}}
</b>
<b
v-show=
"!!item.jobRemark"
>
{{item.relTime}}
</b>
<span
v-if=
"item.jobRemark == 1"
>
入职
</span>
<span
v-if=
"item.jobRemark == 1"
v-show=
"!!item.relTime"
>
入职
</span>
<span
v-if=
"item.jobRemark == 4"
>
(人事调动) {{item.
newCompanyName}} => {{item.old
CompanyName}}
</span>
<span
v-if=
"item.jobRemark == 4"
>
(人事调动) {{item.
oldCompanyName}} => {{item.new
CompanyName}}
</span>
<span
v-if=
"item.jobRemark == 2"
>
(职位变更) {{item.
newJobName}} => {{item.old
JobName}}
</span>
<span
v-if=
"item.jobRemark == 2"
>
(职位变更) {{item.
oldJobName}} => {{item.new
JobName}}
</span>
<span
v-if=
"item.jobRemark == 3"
>
(身份变更) {{item.
newPositionName}} => {{item.old
PositionName}}
</span>
<span
v-if=
"item.jobRemark == 3"
>
(身份变更) {{item.
oldPositionName}} => {{item.new
PositionName}}
</span>
<span
v-if=
"item.jobRemark == 5"
>
离职
</span>
<span
v-if=
"item.jobRemark == 5"
>
离职
</span>
<!-- <span v-else></span> -->
</p>
</p>
</el-dialog>
</el-dialog>
<!-- 员工详情 E -->
<!-- 员工详情 E -->
...
@@ -365,7 +366,8 @@ import {
...
@@ -365,7 +366,8 @@ import {
jobs
,
jobs
,
editorUpd
,
editorUpd
,
findPositionChangeRecord
,
findPositionChangeRecord
,
updUserChange
updUserChange
,
updAddPositionChangeRecord
}
from
'src/api/admin/userManagement/index'
}
from
'src/api/admin/userManagement/index'
import
{
getToken
}
from
'src/utils/auth'
import
{
getToken
}
from
'src/utils/auth'
import
{
mapGetters
}
from
'vuex'
import
{
mapGetters
}
from
'vuex'
...
@@ -403,6 +405,7 @@ export default {
...
@@ -403,6 +405,7 @@ export default {
jobId
:
null
,
//职位
jobId
:
null
,
//职位
},
},
loading
:
true
,
//修改分公司
//修改分公司
amendCompany
:
{
amendCompany
:
{
changeStatus
:
3
,
changeStatus
:
3
,
...
@@ -440,7 +443,7 @@ export default {
...
@@ -440,7 +443,7 @@ export default {
listQuery
:
{
listQuery
:
{
name
:
''
,
name
:
''
,
phone
:
''
,
phone
:
''
,
status
:
null
,
positionId
:
null
,
page
:
1
,
page
:
1
,
limit
:
10
,
limit
:
10
,
companyId
:
''
,
companyId
:
''
,
...
@@ -495,7 +498,7 @@ export default {
...
@@ -495,7 +498,7 @@ export default {
relTime
:
null
,
//变更日期
relTime
:
null
,
//变更日期
}
}
}
else
if
(
val
==
5
)
{
}
else
if
(
val
==
5
)
{
this
.
amendContent
=
this
.
staffTitleFrom
.
status
==
'在职'
?
'离职时间'
:
'入职时间'
this
.
amendContent
=
this
.
staffTitleFrom
.
isQuit
==
'在职'
?
'离职时间'
:
'入职时间'
this
.
isShow
=
val
this
.
isShow
=
val
this
.
isJobForm
=
{
this
.
isJobForm
=
{
relTime
:
null
,
//变更日期
relTime
:
null
,
//变更日期
...
@@ -524,7 +527,7 @@ export default {
...
@@ -524,7 +527,7 @@ export default {
this
.
amendCompany
.
companyName
=
name
[
0
].
name
this
.
amendCompany
.
companyName
=
name
[
0
].
name
this
.
amendCompany
.
jobId
=
this
.
staffTitleFrom
.
jobId
this
.
amendCompany
.
jobId
=
this
.
staffTitleFrom
.
jobId
this
.
amendCompany
.
positionId
=
this
.
staffTitleFrom
.
positionId
this
.
amendCompany
.
positionId
=
this
.
staffTitleFrom
.
positionId
this
.
amendCompany
.
is
Del
=
0
this
.
amendCompany
.
is
Quit
=
0
this
.
setApi
(
this
.
amendCompany
)
this
.
setApi
(
this
.
amendCompany
)
}
}
}
else
{
}
else
{
...
@@ -532,7 +535,7 @@ export default {
...
@@ -532,7 +535,7 @@ export default {
this
.
amendCompany
.
companyName
=
name
[
0
].
name
this
.
amendCompany
.
companyName
=
name
[
0
].
name
this
.
amendCompany
.
jobId
=
this
.
staffTitleFrom
.
jobId
this
.
amendCompany
.
jobId
=
this
.
staffTitleFrom
.
jobId
this
.
amendCompany
.
positionId
=
this
.
staffTitleFrom
.
positionId
this
.
amendCompany
.
positionId
=
this
.
staffTitleFrom
.
positionId
this
.
amendCompany
.
is
Del
=
0
this
.
amendCompany
.
is
Quit
=
0
this
.
setApi
(
this
.
amendCompany
)
this
.
setApi
(
this
.
amendCompany
)
}
}
},
},
...
@@ -562,7 +565,7 @@ export default {
...
@@ -562,7 +565,7 @@ export default {
this
.
amendIdentity
.
companyName
=
this
.
staffTitleFrom
.
companyName
this
.
amendIdentity
.
companyName
=
this
.
staffTitleFrom
.
companyName
this
.
amendIdentity
.
jobId
=
this
.
staffTitleFrom
.
jobId
this
.
amendIdentity
.
jobId
=
this
.
staffTitleFrom
.
jobId
this
.
amendIdentity
.
companyId
=
this
.
staffTitleFrom
.
companyId
this
.
amendIdentity
.
companyId
=
this
.
staffTitleFrom
.
companyId
this
.
amendIdentity
.
is
Del
=
0
this
.
amendIdentity
.
is
Quit
=
0
this
.
setApi
(
this
.
amendIdentity
)
this
.
setApi
(
this
.
amendIdentity
)
}
}
...
@@ -578,16 +581,39 @@ export default {
...
@@ -578,16 +581,39 @@ export default {
this
.
isJobForm
.
companyName
=
this
.
staffTitleFrom
.
companyName
this
.
isJobForm
.
companyName
=
this
.
staffTitleFrom
.
companyName
this
.
isJobForm
.
positionId
=
this
.
staffTitleFrom
.
positionId
this
.
isJobForm
.
positionId
=
this
.
staffTitleFrom
.
positionId
this
.
isJobForm
.
companyId
=
this
.
staffTitleFrom
.
companyId
this
.
isJobForm
.
companyId
=
this
.
staffTitleFrom
.
companyId
this
.
isJobForm
.
is
Del
=
1
this
.
isJobForm
.
is
Quit
=
1
this
.
isJobForm
.
changeStatus
=
2
this
.
isJobForm
.
changeStatus
=
2
this
.
isJobForm
.
jobId
=
this
.
staffTitleFrom
.
jobId
this
.
isJobForm
.
jobId
=
this
.
staffTitleFrom
.
jobId
if
(
val
==
'离职时间'
){
this
.
setApi
(
this
.
isJobForm
)
this
.
setApi
(
this
.
isJobForm
)
}
else
{
let
params
=
{}
params
.
phone
=
this
.
staffTitleFrom
.
phone
params
.
id
=
this
.
staffTitleFrom
.
id
params
.
companyName
=
this
.
staffTitleFrom
.
companyName
params
.
positionId
=
this
.
staffTitleFrom
.
positionId
params
.
companyId
=
this
.
staffTitleFrom
.
companyId
params
.
isQuit
=
0
params
.
changeStatus
=
2
params
.
jobId
=
this
.
staffTitleFrom
.
jobId
params
.
name
=
this
.
staffTitleFrom
.
name
updAddPositionChangeRecord
(
params
).
then
(
data
=>
{
if
(
data
.
status
==
200
)
{
this
.
$message
.
success
(
'编辑成功'
)
this
.
amendPop
=
false
;
this
.
bulkUploadMember
=
false
this
.
getList
()
}
else
{
this
.
$message
.
error
(
data
.
message
)
}
})
}
}
}
},
},
//职位变更
//职位变更
positionBtn
(){
positionBtn
(){
if
(
!
this
.
position
.
jobId
||
!
this
.
position
.
relTime
){
if
(
!
this
.
position
.
jobId
||
!
this
.
position
.
relTime
){
this
.
$message
(
'日期不能为空'
)
this
.
$message
(
'
身份和变更
日期不能为空'
)
return
false
return
false
}
else
{
}
else
{
this
.
position
.
changeStatus
=
2
this
.
position
.
changeStatus
=
2
...
@@ -595,7 +621,7 @@ export default {
...
@@ -595,7 +621,7 @@ export default {
this
.
position
.
companyName
=
this
.
staffTitleFrom
.
companyName
this
.
position
.
companyName
=
this
.
staffTitleFrom
.
companyName
this
.
position
.
positionId
=
this
.
staffTitleFrom
.
positionId
this
.
position
.
positionId
=
this
.
staffTitleFrom
.
positionId
this
.
position
.
companyId
=
this
.
staffTitleFrom
.
companyId
this
.
position
.
companyId
=
this
.
staffTitleFrom
.
companyId
this
.
position
.
is
Del
=
0
this
.
position
.
is
Quit
=
0
this
.
setApi
(
this
.
position
)
this
.
setApi
(
this
.
position
)
}
}
},
},
...
@@ -720,6 +746,7 @@ export default {
...
@@ -720,6 +746,7 @@ export default {
},
},
//员工列表
//员工列表
getList
()
{
getList
()
{
this
.
loading
=
true
staffList
(
this
.
listQuery
).
then
(
data
=>
{
staffList
(
this
.
listQuery
).
then
(
data
=>
{
this
.
listLoading
=
true
this
.
listLoading
=
true
if
(
data
.
status
==
200
)
{
if
(
data
.
status
==
200
)
{
...
@@ -728,6 +755,9 @@ export default {
...
@@ -728,6 +755,9 @@ export default {
this
.
listLoading
=
false
this
.
listLoading
=
false
}
}
})
})
setTimeout
(()
=>
{
this
.
loading
=
false
},
300
);
},
},
handleSizeChange
(
val
)
{
handleSizeChange
(
val
)
{
this
.
listQuery
.
limit
=
val
this
.
listQuery
.
limit
=
val
...
@@ -765,7 +795,7 @@ export default {
...
@@ -765,7 +795,7 @@ export default {
this
.
listQuery
=
{
this
.
listQuery
=
{
name
:
''
,
name
:
''
,
phone
:
''
,
phone
:
''
,
status
:
null
,
positionId
:
null
,
page
:
1
,
page
:
1
,
limit
:
10
,
limit
:
10
,
companyId
:
''
,
companyId
:
''
,
...
@@ -803,15 +833,14 @@ export default {
...
@@ -803,15 +833,14 @@ export default {
companyName
:
row
.
companyName
,
companyName
:
row
.
companyName
,
relTime
:
row
.
relTime
,
relTime
:
row
.
relTime
,
id
:
row
.
id
,
id
:
row
.
id
,
jobId
:
row
.
jobId
,
jobId
:
row
.
jobId
==
0
?
null
:
row
.
jobId
,
status
:
row
.
status
==
1
?
'离职'
:
'在职'
isQuit
:
row
.
isQuit
==
1
?
'离职'
:
'在职'
}
}
},
},
//员工详情
//员工详情
infoStaff
(
row
)
{
infoStaff
(
row
)
{
this
.
infoPop
=
true
this
.
infoPop
=
true
this
.
staffInfo
.
info
=
row
this
.
staffInfo
.
info
=
row
console
.
log
(
row
.
phone
)
findPositionChangeRecord
({
phone
:
row
.
phone
}).
then
(
data
=>
{
findPositionChangeRecord
({
phone
:
row
.
phone
}).
then
(
data
=>
{
if
(
data
.
status
==
200
){
if
(
data
.
status
==
200
){
this
.
staffInfo
.
record
=
data
.
data
this
.
staffInfo
.
record
=
data
.
data
...
@@ -821,8 +850,11 @@ export default {
...
@@ -821,8 +850,11 @@ export default {
},
},
//确定
//确定
confirm
(
formName
)
{
confirm
(
formName
)
{
if
(
!!
this
.
staffTitleFrom
.
relTime
)
this
.
staffTitleFrom
.
relTime
=
formatDate
(
this
.
staffTitleFrom
.
relTime
,
'yyyy-MM-dd hh:mm:ss'
)
if
(
this
.
staffTitle
==
'新增员工'
)
{
if
(
this
.
staffTitle
==
'新增员工'
)
{
if
(
!
this
.
staffTitleFrom
.
jobId
){
this
.
$message
(
'职位不能为空'
)
}
else
{
if
(
!!
this
.
staffTitleFrom
.
relTime
)
this
.
staffTitleFrom
.
relTime
=
formatDate
(
new
Date
(
this
.
staffTitleFrom
.
relTime
),
'yyyy-MM-dd hh:mm:ss'
)
addEditor
(
this
.
staffTitleFrom
).
then
(
data
=>
{
addEditor
(
this
.
staffTitleFrom
).
then
(
data
=>
{
if
(
data
.
status
==
200
)
{
if
(
data
.
status
==
200
)
{
this
.
$notify
({
this
.
$notify
({
...
@@ -842,6 +874,7 @@ export default {
...
@@ -842,6 +874,7 @@ export default {
})
})
}
}
})
})
}
}
else
{
}
else
{
this
.
staffTitleFrom
.
id
=
this
.
activeId
this
.
staffTitleFrom
.
id
=
this
.
activeId
editorUpd
(
this
.
staffTitleFrom
).
then
(
data
=>
{
editorUpd
(
this
.
staffTitleFrom
).
then
(
data
=>
{
...
@@ -876,7 +909,7 @@ export default {
...
@@ -876,7 +909,7 @@ export default {
},
},
jobsFn
()
{
jobsFn
()
{
jobs
().
then
(
data
=>
{
jobs
().
then
(
data
=>
{
//console.log(data);
//
console.log(data);
if
(
data
.
status
==
200
)
{
if
(
data
.
status
==
200
)
{
this
.
jobsList
=
data
.
data
this
.
jobsList
=
data
.
data
}
}
...
...
src/views/statistics/orderStatistics.vue
View file @
a0cf0d8a
<
template
>
<
template
>
<ve-line
:data=
"chartData"
></ve-line>
<div
class=
"app-container calendar-list-container"
>
<div
class=
"filter-container"
v-loading=
"loading"
>
<el-form
ref=
"listQuery"
:model=
"listQuery"
label-width=
"100px"
:inline=
"true"
>
<el-row>
<el-form-item
label=
"时间"
>
<el-date-picker
v-model=
"time"
placeholder=
"请选择时间"
type=
"datetimerange"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
></el-date-picker>
</el-form-item>
<el-form-item
label=
"统计周期"
>
<el-radio-group
v-model=
"listQuery.statisticalWay"
>
<el-radio-button
:label=
"1"
>
日
</el-radio-button>
<el-radio-button
:label=
"2"
>
周
</el-radio-button>
<el-radio-button
:label=
"3"
>
月
</el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"订单状态"
>
<el-select
v-model=
"listQuery.orderState"
clearable
placeholder=
"请选择"
>
<!--
<el-option
label=
"全部"
:value=
"null"
></el-option>
-->
<el-option
v-for=
"item in orderArr"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"订单来源"
>
<el-select
v-model=
"listQuery.orderOrigin"
clearable
placeholder=
"请选择"
>
<!--
<el-option
label=
"全部"
:value=
"null"
></el-option>
-->
<el-option
v-for=
"item in orderOriginArr"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"支付方式"
>
<el-select
v-model=
"listQuery.payWay"
clearable
placeholder=
"请选择"
>
<!--
<el-option
label=
"全部"
:value=
"null"
></el-option>
-->
<el-option
v-for=
"item in payWayArr"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
</el-form-item>
<p
style=
"border-top:1px solid #d9d9d9;padding:30px 0 10px 0"
>
统计项目
</p>
<div
style=
"margin-bottom:20px"
>
<el-checkbox-group
v-model=
"listQuery.statisticalSigns"
>
<span
v-for=
"(item,index) in checkArr"
:key=
"index"
class=
"checkStyle"
>
<el-checkbox
:label=
"item.id"
>
{{
item
.
name
}}
</el-checkbox>
<p
v-show=
"item.id== 'ac_oavgq' || item.id== 'bc_rvavgq' || item.id== 'cd_tavgq'"
></p>
</span>
</el-checkbox-group>
</div>
<el-button
type=
"primary"
@
click=
"search"
>
搜索
</el-button>
<el-button
type=
"primary"
@
click=
"clearSearch"
>
清空搜索
</el-button>
<el-button
type=
"primary"
>
导出excel
</el-button>
</el-row>
</el-form>
<!--
<p
v-for=
"(item,index) in chartArr"
:key=
"index"
>
{{
item
.
row
}}
</p>
-->
<div
v-for=
"(item,index) in chartArr"
:key=
"index"
>
<p
style=
"text-align:center"
>
{{
checkArr
.
filter
(
val
=>
val
.
id
==
item
.
title
)[
0
].
name
}}
</p>
<ve-line
:data=
"item"
:extend=
"extend"
:settings=
"chartSettings"
:legend-visible=
"false"
></ve-line>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
import
{
received_statistics
}
from
'api/statistics/vehicleStatistics'
data
:
function
()
{
import
{
formatDate
}
from
'utils/dateFormattor'
import
{
objDeepCopy
}
from
'../../utils'
export
default
{
data
:
function
()
{
this
.
extend
=
{
'xAxis.0.axisLabel.rotate'
:
45
}
this
.
chartSettings
=
{
labelMap
:
{
orderAmount
:
'数量'
,
orderNum
:
'数量'
}
}
return
{
return
{
loading
:
true
,
time
:
null
,
checkArr
:
[
{
name
:
'订单总额 '
,
id
:
'aa_ota'
},
{
name
:
'订单量 '
,
id
:
'ab_otq'
},
{
name
:
'订单平均量 '
,
id
:
'ac_oavgq'
},
{
name
:
'租车订单总额 '
,
id
:
'ba_rvta'
},
{
name
:
'租车订单量'
,
id
:
'bb_rvtq'
},
{
name
:
'租车订单平均量 '
,
id
:
'bc_rvavgq'
},
{
name
:
'旅游订单总额'
,
id
:
'ca_tta'
},
{
name
:
'旅游订单量 '
,
id
:
'cb_ttq'
},
{
name
:
'旅游订单平均量 '
,
id
:
'cd_tavgq'
},
{
name
:
'会员订单总额 '
,
id
:
'da_mta'
},
{
name
:
'普通会员订单总额 '
,
id
:
'db_cmta'
},
{
name
:
'普通会员订单量 '
,
id
:
'dc_cmtq'
},
{
name
:
'黄金会员订单总额 '
,
id
:
'dd_gmta'
},
{
name
:
'黄金会员订单量 '
,
id
:
'de_mgtq'
},
{
name
:
'钻石会员订单总额 '
,
id
:
'df_dmta'
},
{
name
:
'钻石会员订单量 '
,
id
:
'dg_dmtq'
}
],
//快捷筛选
listQuery
:
{
startDate
:
null
,
//开始时间
endDate
:
null
,
//结束时间
page
:
1
,
//当前页
limit
:
10
,
//每页条数
statisticalWay
:
1
,
//统计方式
orderState
:
1
,
//订单状态
orderOrigin
:
1
,
//来源
payWay
:
1
,
//支付方式
statisticalSigns
:
[
'aa_ota'
]
//筛选
},
//订单状态
orderArr
:
[
{
name
:
'未完成'
,
id
:
0
},
{
name
:
'已完成'
,
id
:
1
}
],
//订单来源
orderOriginArr
:
[
{
name
:
'APP'
,
id
:
1
},
{
name
:
'小程序'
,
id
:
2
},
{
name
:
'后台'
,
id
:
3
}
],
//支付方式
payWayArr
:
[
{
name
:
'微信公众号支付'
,
id
:
1
},
{
name
:
'支付宝即时到账'
,
id
:
2
}
],
chartData
:
{
chartData
:
{
columns
:
[
'日期'
,
'访问用户'
,
'下单用户'
,
'下单率
'
],
columns
:
[
'date'
,
'orderAmount
'
],
rows
:
[
rows
:
[
{
'日期'
:
'1/0'
,
'访问用户'
:
1393
,
'下单用户'
:
1093
,
'下单率'
:
0.32
},
// {
{
'日期'
:
'1/1'
,
'访问用户'
:
1393
,
'下单用户'
:
1093
,
'下单率'
:
0.32
},
// 日期: '2019-12-18',
{
'日期'
:
'1/2'
,
'访问用户'
:
3530
,
'下单用户'
:
3230
,
'下单率'
:
0.26
},
// 访问用户: 1393,
{
'日期'
:
'1/3'
,
'访问用户'
:
2923
,
'下单用户'
:
2623
,
'下单率'
:
0.76
},
// },
{
'日期'
:
'1/4'
,
'访问用户'
:
1723
,
'下单用户'
:
1423
,
'下单率'
:
0.49
},
// {
{
'日期'
:
'1/5'
,
'访问用户'
:
3792
,
'下单用户'
:
3492
,
'下单率'
:
0.323
},
// 日期: '2019-12-19',
{
'日期'
:
'1/6'
,
'访问用户'
:
4593
,
'下单用户'
:
4293
,
'下单率'
:
0.78
}
// 访问用户: 1393,
// },
// {
// 日期: '2019-12-20',
// 访问用户: 7000,
// },
// {
// 日期: '2019-12-22',
// 访问用户: 2923,
// },
// {
// 日期: '2019-12-23',
// 访问用户: 1723,
// },
// {
// 日期: '2019-12-24',
// 访问用户: 3792,
// },
// {
// 日期: '2019-12-25',
// 访问用户: 4593,
// },
// {
// 日期: '2019-12-26',
// 访问用户: 4593,
// },
// {
// 日期: '2019-12-27',
// 访问用户: 4593,
// },
// {
// 日期: '2019-12-28',
// 访问用户: 4593,
// },
// {
// 日期: '2019-12-29',
// 访问用户: 4593,
// },
// {
// 日期: '2019-12-30',
// 访问用户: 4593,
// },
// {
// 日期: '2019-12-31',
// 访问用户: 4593,
// },
// {
// 日期: '2020-01-01',
// 访问用户: 4593,
// },
// {
// 日期: '2020-01-02',
// 访问用户: 4593,
// },
// {
// 日期: '2020-01-03',
// 访问用户: 4593,
// },
// {
// 日期: '2020-01-04',
// 访问用户: 5000,
// },
// {
// 日期: '2020-01-05',
// 访问用户: 5000,
// },
// {
// 日期: '2020-01-06',
// 访问用户: 5000,
// },
// {
// 日期: '2020-01-07',
// 访问用户: 5000,
// },
// {
// 日期: '2020-01-08',
// 访问用户: 5000,
// },
// {
// 日期: '2020-01-09',
// 访问用户: 5000,
// },
// {
// 日期: '2020-01-10',
// 访问用户: 5000,
// },
// {
// 日期: '2020-01-11',
// 访问用户: 5000,
// },
// {
// 日期: '2020-01-12',
// 访问用户: 5000,
// }
]
]
},
chartArr
:
{}
}
},
created
()
{
this
.
getList
()
},
methods
:
{
//搜索
search
()
{
if
(
!!
this
.
time
)
{
this
.
listQuery
.
startDate
=
formatDate
(
new
Date
(
this
.
time
[
0
]),
'yyyy-MM-dd hh:mm:ss'
)
this
.
listQuery
.
endDate
=
formatDate
(
new
Date
(
this
.
time
[
1
]),
'yyyy-MM-dd hh:mm:ss'
)
}
this
.
getList
()
},
//清空搜索
clearSearch
()
{
this
.
listQuery
=
{
startDate
:
null
,
//开始时间
endDate
:
null
,
//结束时间
page
:
1
,
//当前页
limit
:
10
,
//每页条数
statisticalWay
:
1
,
//统计方式
orderState
:
1
,
//订单状态
orderOrigin
:
1
,
//来源
payWay
:
1
,
//支付方式
statisticalSigns
:
[
'aa_ota'
]
//筛选
}
this
.
time
=
null
this
.
getList
()
},
getList
()
{
this
.
loading
=
true
received_statistics
(
this
.
listQuery
).
then
(
data
=>
{
if
(
data
.
status
==
200
)
{
let
info
=
data
.
data
let
params
=
{}
let
choose
=
this
.
listQuery
.
statisticalSigns
for
(
let
i
=
0
;
i
<
choose
.
length
;
i
++
)
{
if
(
info
[
choose
[
i
]]
!=
''
)
{
params
[
choose
[
i
]]
=
{
columns
:
[
Object
.
keys
(
info
[
choose
[
i
]][
0
])[
1
],
Object
.
keys
(
info
[
choose
[
i
]][
0
])[
2
]
],
rows
:
info
[
choose
[
i
]],
title
:
choose
[
i
]
}
}
}
}
}
}
this
.
chartArr
=
params
}
}
setTimeout
(()
=>
{
this
.
loading
=
false
},
300
)
})
}
}
}
</
script
>
</
script
>
<
style
scoped
>
.checkStyle
{
margin-right
:
30px
;
/* display: inline-block; */
line-height
:
40px
;
}
</
style
>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment