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
ff0eb9a4
Commit
ff0eb9a4
authored
Dec 20, 2019
by
guoyou
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'base-modify'
parents
277b8175
98fda56f
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
453 additions
and
75 deletions
+453
-75
index.js
src/api/admin/userManagement/index.js
+20
-2
vehicleStatistics.js
src/api/statistics/vehicleStatistics.js
+21
-1
employeesInput.vue
src/views/interior/employeesInput.vue
+105
-52
orderStatistics.vue
src/views/statistics/orderStatistics.vue
+307
-20
No files found.
src/api/admin/userManagement/index.js
View file @
ff0eb9a4
...
...
@@ -112,7 +112,7 @@ export function jobs(obj) {
// 添加员工
export
function
addEditor
(
obj
)
{
return
fetch
({
url
:
'/api/admin/postion/admin/
ad
dUserPostion'
,
url
:
'/api/admin/postion/admin/
up
dUserPostion'
,
method
:
'post'
,
data
:
obj
});
...
...
@@ -177,4 +177,22 @@ export function updUserChange(params) {
method
:
'post'
,
data
:
params
});
}
\ No newline at end of file
}
// 离职后在职
export
function
updAddPositionChangeRecord
(
params
)
{
return
fetch
({
url
:
'api/admin/postion/admin/updAddPositionChangeRecord'
,
method
:
'post'
,
data
:
params
});
}
// 信息修改
// export function updUserPostion(params) {
// return fetch({
// url: 'api/admin/postion/admin/updUserPostion',
// method: 'post',
// data: params
// });
// }
\ No newline at end of file
src/api/statistics/vehicleStatistics.js
View file @
ff0eb9a4
...
...
@@ -17,4 +17,24 @@ export function vehicleInfoExcel(params) {
params
:
params
,
responseType
:
'blob'
});
}
\ No newline at end of file
}
//订单统计
export
function
received_statistics
(
params
)
{
return
fetch
({
url
:
'api/order/admin/order/received_statistics'
,
method
:
'post'
,
timeout
:
'50000'
,
data
:
params
});
}
// 订单统计导出
export
function
excelExport
(
query
)
{
return
fetch
({
url
:
'api/order/admin/order/received_statistics/export'
,
method
:
'post'
,
data
:
query
,
responseType
:
'blob'
});
}
\ No newline at end of file
src/views/interior/employeesInput.vue
View file @
ff0eb9a4
This diff is collapsed.
Click to expand it.
src/views/statistics/orderStatistics.vue
View file @
ff0eb9a4
<
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-date-picker
v-model=
"time"
type=
"daterange"
placeholder=
"请选择时间范围"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
@
change=
"changeTime"
></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
: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"
:loading=
"excelLoading"
@
click=
"downloadExcel"
>
导出报表
</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"
:data-zoom=
"dataZoom"
></ve-line>
</div>
</div>
</div>
</
template
>
<
script
>
export
default
{
data
:
function
()
{
return
{
chartData
:
{
columns
:
[
'日期'
,
'访问用户'
,
'下单用户'
,
'下单率'
],
rows
:
[
{
'日期'
:
'1/0'
,
'访问用户'
:
1393
,
'下单用户'
:
1093
,
'下单率'
:
0.32
},
{
'日期'
:
'1/1'
,
'访问用户'
:
1393
,
'下单用户'
:
1093
,
'下单率'
:
0.32
},
{
'日期'
:
'1/2'
,
'访问用户'
:
3530
,
'下单用户'
:
3230
,
'下单率'
:
0.26
},
{
'日期'
:
'1/3'
,
'访问用户'
:
2923
,
'下单用户'
:
2623
,
'下单率'
:
0.76
},
{
'日期'
:
'1/4'
,
'访问用户'
:
1723
,
'下单用户'
:
1423
,
'下单率'
:
0.49
},
{
'日期'
:
'1/5'
,
'访问用户'
:
3792
,
'下单用户'
:
3492
,
'下单率'
:
0.323
},
{
'日期'
:
'1/6'
,
'访问用户'
:
4593
,
'下单用户'
:
4293
,
'下单率'
:
0.78
}
]
}
}
}
}
</
script
>
\ No newline at end of file
import
{
received_statistics
,
excelExport
}
from
'api/statistics/vehicleStatistics'
import
{
formatDate
}
from
'utils/dateFormattor'
import
{
objDeepCopy
}
from
'../../utils'
export
default
{
data
:
function
()
{
this
.
extend
=
{
// 'xAxis.0.axisLabel.rotate': 45
}
this
.
dataZoom
=
[
{
type
:
'slider'
,
start
:
0
,
end
:
30
}
]
this
.
chartSettings
=
{
labelMap
:
{
orderAmount
:
'金额'
,
orderNum
:
'订单量'
}
}
return
{
excelLoading
:
false
,
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
:
''
,
//订单状态
orderOrigin
:
null
,
//来源
payWay
:
null
,
//支付方式
statisticalSigns
:
[
'aa_ota'
]
//筛选
},
//订单状态
orderArr
:
[
{
name
:
'全部'
,
id
:
''
},
{
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
:
{
columns
:
[
'dateStr'
,
'orderAmount'
],
rows
:
[]
},
chartArr
:
{}
}
},
created
()
{
this
.
getList
()
},
methods
:
{
//时间关闭
changeTime
(
val
)
{
if
(
!
val
)
{
this
.
time
=
null
this
.
listQuery
.
endDate
=
null
this
.
listQuery
.
startDate
=
null
}
},
//导出
downloadExcel
()
{
this
.
excelLoading
=
true
var
u
=
navigator
.
userAgent
,
app
=
navigator
.
appVersion
excelExport
(
this
.
listQuery
,
{
responseType
:
'arraybuffer'
}).
then
(
res
=>
{
const
content
=
res
const
blob
=
new
Blob
([
content
],
{
type
:
'application/vnd.ms-excel'
})
const
fileName
=
'订单统计.xlsx'
if
(
u
.
indexOf
(
'Edge'
)
>
-
1
)
{
window
.
navigator
.
msSaveBlob
(
blob
,
fileName
)
}
else
{
const
elink
=
document
.
createElement
(
'a'
)
elink
.
download
=
fileName
elink
.
style
.
display
=
'none'
elink
.
href
=
URL
.
createObjectURL
(
blob
)
document
.
body
.
appendChild
(
elink
)
elink
.
click
()
URL
.
revokeObjectURL
(
elink
.
href
)
// 释放URL 对象
document
.
body
.
removeChild
(
elink
)
}
this
.
excelLoading
=
false
}
)
},
//搜索
search
()
{
if
(
!!
this
.
time
&&
!!
this
.
time
[
0
])
{
this
.
listQuery
.
startDate
=
formatDate
(
new
Date
(
this
.
time
[
0
]),
'yyyy-MM-dd'
)
+
' 00:00:00'
this
.
listQuery
.
endDate
=
formatDate
(
new
Date
(
this
.
time
[
1
]),
'yyyy-MM-dd'
)
+
' 23:59:59'
}
this
.
getList
()
},
//清空搜索
clearSearch
()
{
this
.
listQuery
=
{
startDate
:
null
,
//开始时间
endDate
:
null
,
//结束时间
page
:
1
,
//当前页
limit
:
10
,
//每页条数
statisticalWay
:
1
,
//统计方式
orderState
:
''
,
//订单状态
orderOrigin
:
null
,
//来源
payWay
:
null
,
//支付方式
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
let
way
=
this
.
listQuery
.
statisticalWay
var
x
var
y
let
dateIndex
=
way
==
1
?
2
:
way
==
2
?
1
:
1
let
orderIndex
=
way
==
1
?
3
:
way
==
2
?
2
:
2
for
(
let
i
=
0
;
i
<
choose
.
length
;
i
++
)
{
if
(
info
[
choose
[
i
]]
!=
''
)
{
params
[
choose
[
i
]]
=
{
columns
:
[
Object
.
keys
(
info
[
choose
[
i
]][
0
])[
dateIndex
],
//年费
Object
.
keys
(
info
[
choose
[
i
]][
0
])[
orderIndex
]
//金额
],
rows
:
info
[
choose
[
i
]].
sort
(
function
(
a
,
b
)
{
if
(
way
===
1
)
{
x
=
a
.
date
y
=
b
.
date
}
if
(
way
===
2
)
{
x
=
a
.
weekOfYear
y
=
b
.
weekOfYear
}
if
(
way
===
3
)
{
x
=
a
.
month
y
=
b
.
month
}
return
x
<
y
?
-
1
:
x
>
y
?
1
:
0
}),
title
:
choose
[
i
]
}
}
}
this
.
chartArr
=
params
}
setTimeout
(()
=>
{
this
.
loading
=
false
},
300
)
})
}
}
}
</
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