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
5d75d6ae
Commit
5d75d6ae
authored
Oct 09, 2019
by
guoyou
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'base-modify' of
http://113.105.137.151:22280/youjj/cloud-platform-ui
into base-modify
parents
634cccdf
6c1f511a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
280 additions
and
0 deletions
+280
-0
index.js
src/api/vehicle/vehicleCount/index.js
+26
-0
index.js
src/router/index.js
+6
-0
dateUtils.js
src/utils/dateUtils.js
+4
-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
+226
-0
No files found.
src/api/vehicle/vehicleCount/index.js
0 → 100644
View file @
5d75d6ae
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
});
}
export
function
excelDownload
(
query
)
{
return
fetch
({
url
:
'/vehicle/vehicleCount/app/unauth/download'
,
method
:
'get'
,
params
:
query
});
}
src/router/index.js
View file @
5d75d6ae
...
...
@@ -379,6 +379,12 @@ export const asyncRouterMap = [{
name
:
'车辆排班记录'
,
authority
:
'vehicleRecords'
},
{
path
:
'vehicleCount'
,
component
:
_import
(
'vehicle/vehicleCount/index'
),
name
:
'车辆出行统计'
,
authority
:
'vehicleCount'
},
// {
// path: 'dispatchApply',
// component: _import('vehicle/dispatchApply/index'),
...
...
src/utils/dateUtils.js
View file @
5d75d6ae
...
...
@@ -98,3 +98,7 @@ export function getYMD(timestamp) {
let
date
=
new
Date
(
timestamp
);
//时间戳为10位需*1000,时间戳为13位的话不需乘1000
return
formatDate
(
date
,
'yyyy-MM-dd'
);
}
export
function
getYMD_date
(
date
)
{
return
formatDate
(
date
,
'yyyy-MM-dd'
);
}
src/views/order/rentVehicleInfo/detail.vue
View file @
5d75d6ae
...
...
@@ -21,6 +21,7 @@
<span
v-if=
"row.status == '4'"
>
待出行
</span>
<span
v-if=
"row.status == '5'"
>
出行中
</span>
<span
v-if=
"row.status == '6'"
>
已完成
</span>
<span
v-if=
"row.status == '-1'"
>
定损中
</span>
</el-form-item>
</el-col>
</el-row>
...
...
src/views/order/rentVehicleInfo/index.vue
View file @
5d75d6ae
...
...
@@ -71,6 +71,7 @@
<el-option
:key=
"5"
label=
"出行中"
:value=
"5"
></el-option>
<el-option
:key=
"6"
label=
"已完成"
:value=
"6"
></el-option>
<el-option
:key=
"2"
label=
"已取消"
:value=
"2"
></el-option>
<el-option
:key=
"-1"
label=
"定损中"
:value=
"-1"
></el-option>
</el-select>
</el-form-item>
</el-col>
...
...
@@ -696,6 +697,7 @@ export default {
});
},
handleOrderDetail
(
row
)
{
debugger
this
.
form
=
row
;
if
(
this
.
form
.
status
==
2
)
{
this
.
form
.
ststusName
=
"取消"
;
...
...
@@ -712,6 +714,9 @@ export default {
if
(
this
.
form
.
status
==
6
)
{
this
.
form
.
ststusName
=
"已完成"
;
}
if
(
this
.
form
.
status
==
-
1
)
{
this
.
form
.
ststusName
=
"定损中"
;
}
this
.
form
.
orderRentVehicleDetail
.
startTime
=
this
.
form
.
orderRentVehicleDetail
.
startTime
?
timestamp2Date
(
this
.
form
.
orderRentVehicleDetail
.
startTime
)
...
...
@@ -802,6 +807,9 @@ export default {
if
(
this
.
form
.
status
==
6
)
{
this
.
form
.
ststusName
=
"已完成"
;
}
if
(
this
.
form
.
status
==
-
1
)
{
this
.
form
.
ststusName
=
"定损中"
;
}
this
.
form
.
orderRentVehicleDetail
.
startTime
=
timestamp2Date
(
this
.
form
.
orderRentVehicleDetail
.
startTime
);
...
...
@@ -862,6 +870,9 @@ export default {
if
(
this
.
form
.
status
==
6
)
{
this
.
form
.
ststusName
=
"已完成"
;
}
if
(
this
.
form
.
status
==
-
1
)
{
this
.
form
.
ststusName
=
"定损中"
;
}
this
.
form
.
orderRentVehicleDetail
.
startTime
=
timestamp2Date
(
this
.
form
.
orderRentVehicleDetail
.
startTime
);
...
...
@@ -958,6 +969,9 @@ export default {
if
(
this
.
form
.
status
==
6
)
{
this
.
form
.
ststusName
=
"已完成"
;
}
if
(
this
.
form
.
status
==
-
1
)
{
this
.
form
.
ststusName
=
"定损中"
;
}
this
.
form
.
orderRentVehicleDetail
.
startTime
=
timestamp2Date
(
this
.
form
.
orderRentVehicleDetail
.
startTime
);
...
...
@@ -1071,6 +1085,9 @@ export default {
if
(
el
.
status
==
6
)
{
el
.
ststusName
=
"已完成"
;
}
if
(
el
.
status
==
-
1
)
{
el
.
ststusName
=
"定损中"
;
}
});
}
this
.
list
=
response
.
data
.
data
;
...
...
src/views/vehicle/vehicleCount/index.vue
0 → 100644
View file @
5d75d6ae
<
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.startTime"
type=
"date"
:editable=
"false"
format=
"yyyy-MM-dd"
prop=
"startTime"
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
,
excelDownload
}
from
'api/vehicle/vehicleCount'
;
import
{
formatDate
,
deepCopyDate
,
getYMD_date
}
from
"../../../utils/dateUtils"
;
export
default
{
name
:
'vehicleInfo'
,
data
()
{
return
{
listQuery
:
{
type
:
null
,
startTime
:
new
Date
()
},
tableKey
:
0
,
typeList
:
[
{
'id'
:
1
,
"name"
:
"用户租车"
},
{
'id'
:
2
,
"name"
:
"用户旅游"
},
{
'id'
:
3
,
"name"
:
"内部用车"
}
],
list
:
[],
header
:
[
'序号'
,
'类型'
,
'应交车'
,
'提前交车'
,
'正常交车'
,
'延期交车'
,
'应还车'
,
'提前还车'
,
'正常还车'
,
'延期还车'
,
'日期'
],
name
:
'export'
}
},
created
()
{
this
.
handlerSearch
()
},
computed
:
{
},
methods
:
{
handlerSearch
()
{
this
.
listQuery
.
startTime
=
getYMD_date
(
this
.
listQuery
.
startTime
);
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
()
{
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
}
let
fileName
=
null
;
excelExport
(
param
).
then
(
response
=>
{
if
(
response
.
status
===
200
)
{
fileName
=
response
.
data
}
else
{
this
.
$notify
({
title
:
"失败"
,
message
:
response
.
message
,
type
:
"error"
,
duration
:
2000
});
}
})
this
.
$confirm
(
'确定导出吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
var
domain
=
document
.
domain
;
console
.
log
(
domain
)
window
.
location
.
href
=
"https://"
+
domain
+
"/vehicle/vehicleCount/app/unauth/download?path="
+
fileName
;
})
},
}
}
</
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