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
13ef5e70
Commit
13ef5e70
authored
Oct 08, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
车辆出行统计
parent
c34ca821
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
269 additions
and
0 deletions
+269
-0
index.js
src/api/vehicle/vehicleCount/index.js
+18
-0
index.js
src/router/index.js
+6
-0
detail.vue
src/views/order/rentVehicleInfo/detail.vue
+1
-0
index.vue
src/views/order/rentVehicleInfo/index.vue
+17
-0
index.vue
src/views/vehicle/vehicleCount/index.vue
+227
-0
No files found.
src/api/vehicle/vehicleCount/index.js
0 → 100644
View file @
13ef5e70
import
fetch
from
'utils/fetch'
;
export
function
get
(
query
)
{
return
fetch
({
url
:
'/vehicle/vehicleCount/app/unauth/get'
,
method
:
'get'
,
params
:
query
});
}
export
function
excelExport
(
query
)
{
return
fetch
({
url
:
'/vehicle/vehicleCount/app/unauth/export'
,
method
:
'post'
,
data
:
query
});
}
src/router/index.js
View file @
13ef5e70
...
@@ -373,6 +373,12 @@ export const asyncRouterMap = [{
...
@@ -373,6 +373,12 @@ export const asyncRouterMap = [{
name
:
'车辆排班记录'
,
name
:
'车辆排班记录'
,
authority
:
'vehicleRecords'
authority
:
'vehicleRecords'
},
},
{
path
:
'vehicleCount'
,
component
:
_import
(
'vehicle/vehicleCount/index'
),
name
:
'车辆出行统计'
,
authority
:
'vehicleCount'
},
// {
// {
// path: 'dispatchApply',
// path: 'dispatchApply',
// component: _import('vehicle/dispatchApply/index'),
// component: _import('vehicle/dispatchApply/index'),
...
...
src/views/order/rentVehicleInfo/detail.vue
View file @
13ef5e70
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
<span
v-if=
"row.status == '4'"
>
待出行
</span>
<span
v-if=
"row.status == '4'"
>
待出行
</span>
<span
v-if=
"row.status == '5'"
>
出行中
</span>
<span
v-if=
"row.status == '5'"
>
出行中
</span>
<span
v-if=
"row.status == '6'"
>
已完成
</span>
<span
v-if=
"row.status == '6'"
>
已完成
</span>
<span
v-if=
"row.status == '-1'"
>
定损中
</span>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
...
...
src/views/order/rentVehicleInfo/index.vue
View file @
13ef5e70
...
@@ -71,6 +71,7 @@
...
@@ -71,6 +71,7 @@
<el-option
:key=
"5"
label=
"出行中"
:value=
"5"
></el-option>
<el-option
:key=
"5"
label=
"出行中"
:value=
"5"
></el-option>
<el-option
:key=
"6"
label=
"已完成"
:value=
"6"
></el-option>
<el-option
:key=
"6"
label=
"已完成"
:value=
"6"
></el-option>
<el-option
:key=
"2"
label=
"已取消"
:value=
"2"
></el-option>
<el-option
:key=
"2"
label=
"已取消"
:value=
"2"
></el-option>
<el-option
:key=
"-1"
label=
"定损中"
:value=
"-1"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
...
@@ -696,6 +697,7 @@ export default {
...
@@ -696,6 +697,7 @@ export default {
});
});
},
},
handleOrderDetail
(
row
)
{
handleOrderDetail
(
row
)
{
debugger
this
.
form
=
row
;
this
.
form
=
row
;
if
(
this
.
form
.
status
==
2
)
{
if
(
this
.
form
.
status
==
2
)
{
this
.
form
.
ststusName
=
"取消"
;
this
.
form
.
ststusName
=
"取消"
;
...
@@ -712,6 +714,9 @@ export default {
...
@@ -712,6 +714,9 @@ export default {
if
(
this
.
form
.
status
==
6
)
{
if
(
this
.
form
.
status
==
6
)
{
this
.
form
.
ststusName
=
"已完成"
;
this
.
form
.
ststusName
=
"已完成"
;
}
}
if
(
this
.
form
.
status
==
-
1
)
{
this
.
form
.
ststusName
=
"定损中"
;
}
this
.
form
.
orderRentVehicleDetail
.
startTime
=
this
.
form
this
.
form
.
orderRentVehicleDetail
.
startTime
=
this
.
form
.
orderRentVehicleDetail
.
startTime
.
orderRentVehicleDetail
.
startTime
?
timestamp2Date
(
this
.
form
.
orderRentVehicleDetail
.
startTime
)
?
timestamp2Date
(
this
.
form
.
orderRentVehicleDetail
.
startTime
)
...
@@ -802,6 +807,9 @@ export default {
...
@@ -802,6 +807,9 @@ export default {
if
(
this
.
form
.
status
==
6
)
{
if
(
this
.
form
.
status
==
6
)
{
this
.
form
.
ststusName
=
"已完成"
;
this
.
form
.
ststusName
=
"已完成"
;
}
}
if
(
this
.
form
.
status
==
-
1
)
{
this
.
form
.
ststusName
=
"定损中"
;
}
this
.
form
.
orderRentVehicleDetail
.
startTime
=
timestamp2Date
(
this
.
form
.
orderRentVehicleDetail
.
startTime
=
timestamp2Date
(
this
.
form
.
orderRentVehicleDetail
.
startTime
this
.
form
.
orderRentVehicleDetail
.
startTime
);
);
...
@@ -862,6 +870,9 @@ export default {
...
@@ -862,6 +870,9 @@ export default {
if
(
this
.
form
.
status
==
6
)
{
if
(
this
.
form
.
status
==
6
)
{
this
.
form
.
ststusName
=
"已完成"
;
this
.
form
.
ststusName
=
"已完成"
;
}
}
if
(
this
.
form
.
status
==
-
1
)
{
this
.
form
.
ststusName
=
"定损中"
;
}
this
.
form
.
orderRentVehicleDetail
.
startTime
=
timestamp2Date
(
this
.
form
.
orderRentVehicleDetail
.
startTime
=
timestamp2Date
(
this
.
form
.
orderRentVehicleDetail
.
startTime
this
.
form
.
orderRentVehicleDetail
.
startTime
);
);
...
@@ -958,6 +969,9 @@ export default {
...
@@ -958,6 +969,9 @@ export default {
if
(
this
.
form
.
status
==
6
)
{
if
(
this
.
form
.
status
==
6
)
{
this
.
form
.
ststusName
=
"已完成"
;
this
.
form
.
ststusName
=
"已完成"
;
}
}
if
(
this
.
form
.
status
==
-
1
)
{
this
.
form
.
ststusName
=
"定损中"
;
}
this
.
form
.
orderRentVehicleDetail
.
startTime
=
timestamp2Date
(
this
.
form
.
orderRentVehicleDetail
.
startTime
=
timestamp2Date
(
this
.
form
.
orderRentVehicleDetail
.
startTime
this
.
form
.
orderRentVehicleDetail
.
startTime
);
);
...
@@ -1071,6 +1085,9 @@ export default {
...
@@ -1071,6 +1085,9 @@ export default {
if
(
el
.
status
==
6
)
{
if
(
el
.
status
==
6
)
{
el
.
ststusName
=
"已完成"
;
el
.
ststusName
=
"已完成"
;
}
}
if
(
el
.
status
==
-
1
)
{
el
.
ststusName
=
"定损中"
;
}
});
});
}
}
this
.
list
=
response
.
data
.
data
;
this
.
list
=
response
.
data
.
data
;
...
...
src/views/vehicle/vehicleCount/index.vue
0 → 100644
View file @
13ef5e70
<
template
>
<div
class=
"app-container calendar-list-container"
>
<div
class=
"filter-container"
ref=
"filter-container"
>
<el-form
ref=
"queryForm"
:model=
"listQuery"
label-width=
"100px"
>
<el-row>
<el-col
:span=
"5"
>
<el-form-item
label=
"类型"
>
<el-select
class=
"filter-item"
v-model=
"listQuery.type"
placeholder=
"请选择"
>
<el-option
:key=
"undefined"
label=
"无"
:value=
"undefined"
></el-option>
<el-option
v-for=
"val in typeList"
:key=
"val.id"
:label=
"val.name"
:value=
"val.id"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"5"
>
<el-form-item>
<el-date-picker
v-model=
"listQuery.time"
type=
"date"
:editable=
"false"
format=
"yyyy-MM-dd"
prop=
"time"
placeholder=
"请选择日期"
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-button
class=
"filter-item"
type=
"primary"
@
click=
"handlerSearch"
>
查询
</el-button>
<el-button
class=
"filter-item"
type=
"primary"
@
click=
"downloadExcel"
>
导出
</el-button>
</el-row>
</el-form>
<el-table
id =
"out-table"
:key=
'tableKey'
:data=
"list"
border
fit
highlight-current-row
style=
"width: 100%"
>
<el-table-column
type=
"index"
align=
"center"
label=
"序号"
width=
"117"
>
</el-table-column>
<el-table-column
width=
"150"
align=
"center"
label=
"类型"
>
<template
scope=
"scope"
>
<span>
{{
getType
(
scope
.
row
.
type
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
width=
"150"
align=
"center"
label=
"应交车"
>
<
template
scope=
"scope"
>
<span>
{{
scope
.
row
.
departureNum
}}
</span>
</
template
>
</el-table-column>
<el-table-column
width=
"150"
align=
"center"
label=
"提前交车"
>
<
template
scope=
"scope"
>
<span>
{{
scope
.
row
.
beforeDepartureNum
}}
</span>
</
template
>
</el-table-column>
<el-table-column
width=
"150"
align=
"center"
label=
"正常交车"
>
<
template
scope=
"scope"
>
<span>
{{
scope
.
row
.
actualDepartureNum
}}
</span>
</
template
>
</el-table-column>
<el-table-column
width=
"150"
align=
"center"
label=
"延后交车"
>
<
template
scope=
"scope"
>
<span>
{{
scope
.
row
.
afterDepartureNum
}}
</span>
</
template
>
</el-table-column>
<el-table-column
width=
"150"
align=
"center"
label=
"应收车"
>
<
template
scope=
"scope"
>
<span>
{{
scope
.
row
.
arrivalNum
}}
</span>
</
template
>
</el-table-column>
<el-table-column
width=
"150"
align=
"center"
label=
"提前收车"
>
<
template
scope=
"scope"
>
<span>
{{
scope
.
row
.
beforeArrivalNum
}}
</span>
</
template
>
</el-table-column>
<el-table-column
width=
"150"
align=
"center"
label=
"正常收车"
>
<
template
scope=
"scope"
>
<span>
{{
scope
.
row
.
actualArrivalNum
}}
</span>
</
template
>
</el-table-column>
<el-table-column
width=
"150"
align=
"center"
label=
"延后收车"
>
<
template
scope=
"scope"
>
<span>
{{
scope
.
row
.
afterArrivalNum
}}
</span>
</
template
>
</el-table-column>
<el-table-column
width=
"200"
align=
"center"
label=
"日期"
>
<
template
scope=
"scope"
>
<span>
{{
scope
.
row
.
countDate
}}
</span>
</
template
>
</el-table-column>
</el-table>
</div>
</div>
</template>
<
script
>
import
FileSaver
from
'file-saver'
import
XLSX
from
'xlsx'
import
{
get
,
excelExport
}
from
'api/vehicle/vehicleCount'
;
import
{
formatDate
,
deepCopyDate
,
getYMD
}
from
"../../../utils/dateUtils"
;
export
default
{
name
:
'vehicleInfo'
,
data
()
{
return
{
listQuery
:
{
type
:
null
,
startTime
:
getYMD
(
new
Date
().
getTime
())
},
tableKey
:
0
,
typeList
:
[
{
'id'
:
1
,
"name"
:
"用户租车"
},
{
'id'
:
2
,
"name"
:
"用户旅游"
},
{
'id'
:
3
,
"name"
:
"内部用车"
}
],
list
:
[],
header
:
[
'序号'
,
'类型'
,
'应交车'
,
'提前交车'
,
'正常交车'
,
'延期交车'
,
'应还车'
,
'提前还车'
,
'正常还车'
,
'延期还车'
,
'日期'
],
name
:
'出车统计'
}
},
created
()
{
this
.
handlerSearch
()
},
computed
:
{
},
methods
:
{
handlerSearch
()
{
get
(
this
.
listQuery
).
then
(
response
=>
{
if
(
response
.
status
===
200
)
{
this
.
list
=
response
.
data
}
else
{
this
.
$notify
({
title
:
"失败"
,
message
:
response
.
message
,
type
:
"error"
,
duration
:
2000
});
}
})
},
getType
(
item
)
{
if
(
item
==
1
)
{
return
'用户租车'
;
}
if
(
item
==
2
)
{
return
'用户旅游'
;
}
if
(
item
==
3
)
{
return
'内部用车'
;
}
return
''
;
},
downloadExcel
()
{
this
.
$confirm
(
'确定导出吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
var
valueList
=
[]
var
mapList
=
[]
this
.
list
.
forEach
(
v
=>
{
for
(
let
key
in
v
)
{
if
(
key
==
'type'
)
{
if
(
v
[
key
]
==
1
)
{
mapList
.
push
(
'用户租车'
)
}
if
(
v
[
key
]
==
2
)
{
mapList
.
push
(
'用户旅游'
)
}
if
(
v
[
key
]
==
3
)
{
mapList
.
push
(
'内部用车'
)
}
}
else
{
mapList
.
push
(
v
[
key
])
}
}
valueList
.
push
(
mapList
)
mapList
=
[]
})
let
param
=
{
"data"
:
valueList
,
"header"
:
this
.
header
,
"name"
:
this
.
name
}
excelExport
(
param
).
then
(
response
=>
{
if
(
response
.
status
===
200
)
{
this
.
$notify
({
title
:
"成功"
,
message
:
this
.
name
+
"导出到D盘成功!"
,
type
:
"success"
,
duration
:
3000
});
}
else
{
this
.
$notify
({
title
:
"失败"
,
message
:
response
.
message
,
type
:
"error"
,
duration
:
2000
});
}
})
})
},
}
}
</
script
>
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