Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-customization-system
/
micro-trialrun
This project
Loading...
Sign in
Toggle navigation
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 1997c55c
authored
Jun 03, 2021
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'master' of 192.168.3.233:micro-customization-system/micro-trialrun
2 parents
e5c307b9
fda5320f
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
206 additions
and
140 deletions
src/App.vue
src/components/basic-table/index.vue
src/components/map/fenceMap.vue
src/main.js
src/routes/index.js
src/views/specialShop/addShop/index.vue
src/views/specialShop/index.vue
src/views/testDrive/checkList.vue
src/views/vehicleManage/index.vue
src/views/vehicleSubmit/vehicleCheck/index.vue
src/App.vue
View file @
1997c55
...
...
@@ -41,15 +41,39 @@ export default {
if
(
to
.
meta
.
keepAlives
)
{
this
.
keepAlives
.
push
(
to
.
name
);
}
if
(
this
.
isQiankun
)
{
this
.
getBreadcrumb
();
}
}
},
methods
:
{
...
mapMutations
([
'updateBaseURL'
]),
getBreadcrumb
()
{
const
{
getters
:
{
curBreadCrumb
}}
=
this
.
$root
.
parentVuex
;
let
matched
=
this
.
$route
.
matched
.
filter
(
item
=>
item
.
name
);
// this.$route.matched 可以获取到一个数组,包含当前路由的所有嵌套路径片段的路由记录
const
first
=
matched
[
0
];
const
{
meta
,
path
}
=
first
;
const
basePath
=
'/trialRun#'
;
let
breadcrumb
=
[];
if
(
meta
)
{
const
{
title
,
pushState
}
=
meta
;
if
(
pushState
&&
title
)
{
breadcrumb
.
push
({
name
:
title
,
path
:
basePath
+
path
})
history
.
state
.
pushState
=
pushState
;
history
.
state
.
breadcrumb
=
[...
curBreadCrumb
,
breadcrumb
[
0
]];
// this.$root.parentVuex.dispatch('menu/setBreadCrumb', [...curBreadCrumb, breadcrumb[0]]);
}
}
},
goToPage
(
path
)
{
this
.
$root
.
parentRouter
.
push
(
path
);
}
},
created
()
{
mounted
()
{
}
}
</
script
>
...
...
src/components/basic-table/index.vue
View file @
1997c55
...
...
@@ -288,6 +288,7 @@ export default {
this
.
data
=
data
[
this
.
tableParams
.
listName
]
this
.
total
=
data
.
totalElements
this
.
loading
=
false
this
.
$emit
(
'dataFinished'
);
}).
catch
(()
=>
{
this
.
loading
=
false
})
...
...
src/components/map/fenceMap.vue
View file @
1997c55
...
...
@@ -221,7 +221,7 @@ export default{
this
.
getCurrentPosition
().
then
((
pos
)
=>
{
this
.
lng
=
pos
.
lng
;
this
.
lat
=
pos
.
lat
;
this
.
radius
=
1
00
0
;
this
.
radius
=
1
5
0
;
this
.
drawFenceCircle
(
pos
)
this
.
$emit
(
'onUpdateMapData'
,{
...
...
src/main.js
View file @
1997c55
...
...
@@ -34,32 +34,12 @@ function render({ data = {} , container } = {}) {
data
(){
return
{
parentRouter
:
data
.
router
,
parentVuex
:
data
.
store
parentVuex
:
data
.
store
,
parentCommon
:
data
.
common
}
},
render
:
h
=>
h
(
App
),
}).
$mount
(
container
?
container
.
querySelector
(
'#glsx-sub-system'
)
:
'#glsx-sub-system'
);
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
const
metaTitle
=
to
.
meta
.
title
;
const
thisBreadCrumb
=
data
.
store
.
getters
.
curBreadCrumb
;
if
(
metaTitle
)
{
if
(
thisBreadCrumb
)
{
let
nextChildren
=
{};
nextChildren
=
{
active
:
true
,
menuName
:
metaTitle
,
path
:
'/trialRun#'
+
to
.
path
,
params
:
to
.
params
};
thisBreadCrumb
.
children
.
children
=
nextChildren
;
}
}
else
{
thisBreadCrumb
.
children
.
children
=
''
;
}
data
.
store
.
dispatch
(
'menu/setBreadCrumb'
,
thisBreadCrumb
);
next
();
})
}
if
(
!
window
.
__POWERED_BY_QIANKUN__
)
{
...
...
src/routes/index.js
View file @
1997c55
...
...
@@ -10,6 +10,7 @@ const routes = [
name
:
'specialShop'
,
component
:
()
=>
import
(
'../views/specialShop/index.vue'
),
meta
:
{
title
:
'特约店列表'
,
keepAlive
:
true
}
},
...
...
@@ -18,6 +19,7 @@ const routes = [
name
:
'toDo'
,
component
:
()
=>
import
(
'../views/toDo/index.vue'
),
meta
:
{
title
:
'待办列表'
,
keepAlive
:
true
}
},
...
...
@@ -26,6 +28,7 @@ const routes = [
name
:
'vehicleManage'
,
component
:
()
=>
import
(
'../views/vehicleManage/index.vue'
),
meta
:
{
title
:
'试驾车辆列表'
,
keepAlive
:
true
}
},
...
...
@@ -34,15 +37,17 @@ const routes = [
name
:
'vehicleSubmit'
,
component
:
()
=>
import
(
'../views/vehicleSubmit/index.vue'
),
meta
:
{
title
:
'上牌资料提交'
,
keepAlive
:
true
}
},
{
path
:
'/vehicleSubmit/addVehicle'
,
name
:
'addVehicle'
,
meta
:
{
title
:
'资料详情'
},
component
:
()
=>
import
(
'../views/vehicleSubmit/addVehicle/index.vue'
),
meta
:
{
title
:
'上牌资料详情'
,
pushState
:
true
,
keepAlive
:
true
}
},
...
...
@@ -51,6 +56,7 @@ const routes = [
name
:
'vehicleCheck'
,
component
:
()
=>
import
(
'../views/vehicleSubmit/vehicleCheck/index.vue'
),
meta
:
{
title
:
'上牌资料审核'
,
keepAlive
:
true
}
},
...
...
@@ -59,15 +65,16 @@ const routes = [
name
:
'reportManage'
,
component
:
()
=>
import
(
'../views/reportManage/index.vue'
),
meta
:
{
title
:
'有效试驾'
,
keepAlive
:
true
}
},
{
path
:
'/specialShop'
,
name
:
'specialShop'
,
meta
:
{
title
:
'新增特约店'
},
component
:
()
=>
import
(
'../views/specialShop/index.vue'
),
meta
:
{
title
:
'特约店列表'
,
keepAlive
:
true
}
},
...
...
@@ -76,6 +83,8 @@ const routes = [
name
:
'addShop'
,
component
:
()
=>
import
(
'../views/specialShop/addShop/index.vue'
),
meta
:
{
title
:
'新增特约店'
,
pushState
:
true
,
keepAlive
:
false
}
},
...
...
@@ -84,6 +93,7 @@ const routes = [
name
:
'testDriveCheckList'
,
component
:
()
=>
import
(
'../views/testDrive/checkList.vue'
),
meta
:
{
title
:
'试驶线路审核'
,
keepAlive
:
true
}
},
...
...
@@ -92,6 +102,7 @@ const routes = [
name
:
'removeAlarm'
,
component
:
()
=>
import
(
'../views/alarmCenter/removeAlarm.vue'
),
meta
:
{
title
:
'拆除预警'
,
keepAlive
:
true
}
}
...
...
src/views/specialShop/addShop/index.vue
View file @
1997c55
...
...
@@ -12,7 +12,7 @@
<el-form-item
class=
"special-shop-input"
label=
"特约店名称:"
prop=
"specialShop"
>
<el-cascader
ref=
"specialShopCascader"
v-model=
"form.specialShop
Id
"
v-model=
"form.specialShop
Name
"
:value=
"form.specialShopName"
placeholder=
"请选择特约店名称"
:options=
"specialShopOptions"
...
...
@@ -25,7 +25,7 @@
</el-form-item>
<el-form-item
label=
"特约店编码:"
>
<el-input
v-model=
"form.specialShop
Id
"
v-model=
"form.specialShop
Code
"
:size=
"btn_size"
readonly
disabled
...
...
@@ -166,87 +166,87 @@ export default {
}
return
{
btn_size
:
'small'
,
configForm
:
{},
mapData
:
[],
submitting
:
false
,
btnText
:
'保存'
,
restainFenceName
:
''
,
specialShopOptions
:
[],
specialShopDefaultProps
:
{
children
:
'children'
,
label
:
'label'
,
value
:
'id
'
},
readonlyStatus
:
false
,
form
:
{
shopName
:
''
,
shopCode
:
''
,
shopLevel
:
'一级店'
,
fenceName
:
''
,
lng
:
''
,
lat
:
''
,
radius
:
100
0
,
bizFenceType
:
'12'
,
shapeType
:
1
,
specialShopId
:
''
,
specialShopName
:
''
,
// fenceNo: '',
electricFenceType
:
1
,
startTime
:
''
,
endTime
:
''
,
des
:
''
,
areaCode
:
''
,
analysisAddress
:
''
,
status
:
1
,
transferError
:
false
,
timeType
:
2
,
electricTimeFenceType
:
''
,
electricTimeFenceTypes
:
[
{
value
:
1
,
label
:
'1个月'
},
{
value
:
2
,
label
:
'2个月'
},
{
value
:
3
,
label
:
'3个月'
},
{
value
:
4
,
label
:
'4个月'
},
{
value
:
5
,
label
:
'5个月'
},
{
value
:
6
,
label
:
'6个月'
}
],
dateRange
:
[],
msgtel
:
''
},
rules
:
{
specialShop
:
[
{
required
:
true
,
validator
:
checkSpecialShop
,
trigger
:
'change'
}
],
fenceName
:
[
{
required
:
true
,
message
:
'请输入特约店围栏名称'
,
trigger
:
'blur'
},
{
pattern
:
/^
\S{2,200}
$/
,
message
:
'至少2字'
,
trigger
:
'blur'
},
],
radius
:
[
{
validator
:
checkRadius
,
trigger
:
'blur'
}
],
lng
:
[
btn_size
:
'small'
,
configForm
:
{},
mapData
:
[],
submitting
:
false
,
btnText
:
'保存'
,
restainFenceName
:
''
,
specialShopOptions
:
[],
specialShopDefaultProps
:
{
children
:
'children'
,
label
:
'label'
,
value
:
'code
'
},
readonlyStatus
:
false
,
form
:
{
shopName
:
''
,
shopCode
:
''
,
shopLevel
:
'一级店'
,
fenceName
:
''
,
lng
:
''
,
lat
:
''
,
radius
:
15
0
,
bizFenceType
:
'12'
,
shapeType
:
1
,
specialShopId
:
''
,
specialShopName
:
''
,
// fenceNo: '',
electricFenceType
:
1
,
startTime
:
''
,
endTime
:
''
,
des
:
''
,
areaCode
:
''
,
analysisAddress
:
''
,
status
:
1
,
transferError
:
false
,
timeType
:
2
,
electricTimeFenceType
:
''
,
electricTimeFenceTypes
:
[
{
value
:
1
,
label
:
'1个月'
},
{
value
:
2
,
label
:
'2个月'
},
{
value
:
3
,
label
:
'3个月'
},
{
value
:
4
,
label
:
'4个月'
},
{
value
:
5
,
label
:
'5个月'
},
{
value
:
6
,
label
:
'6个月'
}
],
dateRange
:
[],
msgtel
:
''
},
rules
:
{
specialShop
:
[
{
required
:
true
,
validator
:
checkSpecialShop
,
trigger
:
'change'
}
],
fenceName
:
[
{
required
:
true
,
message
:
'请输入特约店围栏名称'
,
trigger
:
'blur'
},
{
pattern
:
/^
\S{2,200}
$/
,
message
:
'至少2字'
,
trigger
:
'blur'
},
],
radius
:
[
{
validator
:
checkRadius
,
trigger
:
'blur'
}
],
lng
:
[
{
required
:
true
,
validator
:
checkLng
,
trigger
:
'blur'
}
],
lat
:
[
lat
:
[
{
required
:
true
,
validator
:
checkLat
,
trigger
:
'blur'
}
],
analysisAddress
:
[
{
validator
:
checkTransferAddr
,
trigger
:
'change'
}
],
}
analysisAddress
:
[
{
validator
:
checkTransferAddr
,
trigger
:
'change'
}
],
}
}
},
created
()
{
...
...
@@ -293,9 +293,10 @@ export default {
this
.
restainFenceName
=
form
.
fenceName
;
this
.
form
.
fenceName
=
form
.
fenceName
;
this
.
form
.
msgtel
=
data
.
telNumbers
;
this
.
form
.
specialShopId
=
data
.
s
hopCode
;
this
.
form
.
specialShopId
=
data
.
s
pecialShopId
;
this
.
form
.
specialShopName
=
data
.
shopName
;
this
.
form
.
shopLevel
=
data
.
shopLevel
;
this
.
form
.
analysisAddress
=
data
.
address
;
if
(
form
.
shapeType
===
1
){
this
.
mapData
=
{
...
...
@@ -345,8 +346,8 @@ export default {
// 特约店级联选项
if
(
val
&&
val
.
length
>
1
)
{
const
thisNodes
=
this
.
$refs
[
'specialShopCascader'
].
getCheckedNodes
()[
0
];
this
.
form
.
specialShopId
=
val
[
1
]
;
this
.
form
.
specialShopName
=
thisNodes
.
label
;
this
.
form
.
specialShopId
=
thisNodes
.
data
.
id
;
this
.
form
.
specialShopCode
=
thisNodes
.
data
.
code
;
}
},
updateFence
(){
...
...
@@ -396,23 +397,23 @@ export default {
}
},
getAddress
(
flag
){
const
lnglatXY
=
[
this
.
form
.
lng
,
this
.
form
.
lat
];
this
.
form
.
analysisAddress
=
''
this
.
geocoder
.
getAddress
(
lnglatXY
,
(
status
,
result
)
=>
{
if
(
flag
==
this
.
transferFlag
){
if
(
status
===
'complete'
&&
result
.
info
===
'OK'
)
{
//获取地址成功
//console.log(result.regeocode.formattedAddress)
this
.
form
.
analysisAddress
=
result
.
regeocode
.
formattedAddress
;
this
.
transferError
=
false
;
this
.
$refs
.
shopForm
.
validateField
(
'analysisAddress'
);
//this.$refs.fenceMap.updateMap(this.form)
}
else
{
this
.
transferError
=
true
;
this
.
$refs
.
shopForm
.
validateField
(
'analysisAddress'
);
}
}
});
},
const
lnglatXY
=
[
this
.
form
.
lng
,
this
.
form
.
lat
];
this
.
form
.
analysisAddress
=
''
this
.
geocoder
.
getAddress
(
lnglatXY
,
(
status
,
result
)
=>
{
if
(
flag
==
this
.
transferFlag
){
if
(
status
===
'complete'
&&
result
.
info
===
'OK'
)
{
//获取地址成功
//console.log(result.regeocode.formattedAddress)
this
.
form
.
analysisAddress
=
result
.
regeocode
.
formattedAddress
;
this
.
transferError
=
false
;
this
.
$refs
.
shopForm
.
validateField
(
'analysisAddress'
);
//this.$refs.fenceMap.updateMap(this.form)
}
else
{
this
.
transferError
=
true
;
this
.
$refs
.
shopForm
.
validateField
(
'analysisAddress'
);
}
}
});
},
getParams
(){
const
form
=
this
.
form
;
const
params
=
{};
...
...
@@ -479,16 +480,21 @@ export default {
const
params
=
this
.
getParams
();
params
.
id
=
this
.
shopId
;
updateFence
(
JSON
.
stringify
(
params
)
).
then
((
res
)
=>
{
updateFence
(
params
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
){
//this.closeDialog();
this
.
$message
({
message
:
'提交成功'
,
type
:
'success'
});
}
history
.
go
(
-
1
)
}
else
{
this
.
$message
({
message
:
res
.
message
,
type
:
'error'
});
}
this
.
submitting
=
false
;
this
.
$router
.
push
({
path
:
"fenceManagement"
})
});
}
else
{
saveFence
(
this
.
getParams
()).
then
((
res
)
=>
{
...
...
@@ -498,9 +504,14 @@ export default {
message
:
'提交成功'
,
type
:
'success'
});
}
history
.
go
(
-
1
)
}
else
{
this
.
$message
({
message
:
res
.
message
,
type
:
'error'
});
}
this
.
submitting
=
false
;
this
.
$router
.
push
(
'/specialShop'
)
});
}
...
...
@@ -511,7 +522,7 @@ export default {
},
cancel
(){
this
.
$router
.
push
(
'/specialShop'
)
history
.
go
(
-
1
)
},
}
}
...
...
src/views/specialShop/index.vue
View file @
1997c55
...
...
@@ -80,6 +80,7 @@
:tableParams=
"shopTableParams"
:getListApi=
"getListApi"
:searchForm=
"searchForm"
@
dataFinished=
"tableDataFinished"
:hasNum=
"false"
>
<span
...
...
@@ -211,6 +212,11 @@ export default {
})
},
methods
:
{
tableDataFinished
()
{
this
.
$nextTick
(()
=>
{
this
.
$root
.
parentCommon
.
setAuthBtn
();
})
},
refresh
()
{
this
.
searchForm
=
{}
this
.
$refs
.
shopTable
.
refreshTable
()
...
...
src/views/testDrive/checkList.vue
View file @
1997c55
...
...
@@ -31,6 +31,7 @@
:getListApi=
"getListApi"
:searchForm=
"searchForm"
:hasNum=
"false"
@
dataFinished=
"tableDataFinished"
>
<span
slot=
"status"
...
...
@@ -48,13 +49,13 @@
>
<template
v-for=
"(j, idx) in testDriveTableParams.tableOption.btnList"
>
<!-- approvalStatus为1也就是未审核状态展示全部按钮 -->
<template
v-if=
"scope.scope.approvalStatus == 1"
>
<template
v-if=
"scope.scope.approvalStatus == 1
&& j.remark !== 'viewOrigin'
"
>
<el-button
:key=
"idx"
:type=
"j.type || 'text'"
size=
"mini"
plain
@
click=
"btnClick(j.pType, scope.scope)"
@
click=
"btnClick(j.pType, scope.scope
, j.remark
)"
>
{{
j
.
name
}}
</el-button>
</
template
>
<
template
v-if=
"(j.pType !== 'pass' && j.pType !== 'reject') && scope.scope.approvalStatus != 1 && scope.scope.isAdd == 2"
>
...
...
@@ -63,17 +64,17 @@
:type=
"j.type || 'text'"
size=
"mini"
plain
@
click=
"btnClick(j.pType, scope.scope)"
@
click=
"btnClick(j.pType, scope.scope
, j.remark
)"
>
{{
j
.
name
}}
</el-button>
</
template
>
<!-- isAdd => 1: 只展示查看原围栏 2: 展示查看原围栏和修改后的围栏 -->
<
template
v-if=
"(j.remark == 'view
Origin
') && scope.scope.approvalStatus != 1 && scope.scope.isAdd == 1"
>
<
template
v-if=
"(j.remark == 'view
Updated
') && scope.scope.approvalStatus != 1 && scope.scope.isAdd == 1"
>
<el-button
:key=
"idx"
:type=
"j.type || 'text'"
size=
"mini"
plain
@
click=
"btnClick(j.pType, scope.scope)"
@
click=
"btnClick(j.pType, scope.scope
, j.remark
)"
>
{{
j
.
name
}}
</el-button>
</
template
>
</template>
...
...
@@ -200,7 +201,12 @@ export default {
}
},
methods
:
{
btnClick
(
pType
,
scope
)
{
tableDataFinished
()
{
this
.
$nextTick
(()
=>
{
this
.
$root
.
parentCommon
.
setAuthBtn
();
})
},
btnClick
(
pType
,
scope
,
remark
)
{
const
{
approvalId
}
=
scope
;
this
.
approvalParams
.
id
=
approvalId
;
switch
(
pType
)
{
...
...
@@ -215,7 +221,8 @@ export default {
break
case
'view'
:
let
query
=
{
fenceId
:
scope
.
bizId
,
fenceId
:
remark
===
'viewUpdated'
?
scope
.
bizId
:
scope
.
fenceId
,
btnRemark
:
remark
,
readonlyStatus
:
true
};
const
path
=
'/oEshield#/monitor/editFence'
;
...
...
src/views/vehicleManage/index.vue
View file @
1997c55
...
...
@@ -42,6 +42,7 @@
:tableParams=
"vehicleTableParams"
:getListApi=
"getListApi"
:searchForm=
"searchForm"
@
dataFinished=
"tableDataFinished"
:hasNum=
"false"
>
<span
...
...
@@ -193,6 +194,13 @@ import store from '@/store'
import
{
getList
,
getSpecialShopList
,
addVehicle
,
editVehicle
,
downloadtemplate
,
deleteVehicle
,
unbindVehicle
,
importVehicle
,
exportVehicle
,
infoVehicle
}
from
'services/vehicle'
export
default
{
data
()
{
let
checkShopName
=
(
rule
,
vaule
,
cb
)
=>
{
if
(
this
.
vehicleForm
.
shopName
==
""
){
cb
(
new
Error
(
'请选择特约店名称'
))
}
else
{
cb
();
}
}
return
{
searchForm
:
{},
vehicleFormList
:
[
...
...
@@ -324,7 +332,7 @@ export default {
{
label
:
'设备号:'
,
prop
:
'sn'
,
type
:
'input'
,
maxlength
:
15
,
clearable
:
true
}
],
vehicleRules
:
{
shopName
:
[{
required
:
true
,
message
:
'请选择特约店名称'
,
trigger
:
'blur'
}],
shopName
:
[{
required
:
true
,
validator
:
checkShopName
,
trigger
:
'blur'
}],
vin
:
[{
required
:
true
,
message
:
'请输入车架号'
,
trigger
:
'blur'
},
{
validator
:
this
.
$Common
.
checkvin
,
trigger
:
'blur'
}],
modelId
:
[{
required
:
true
,
message
:
'请选择车型'
,
trigger
:
'blur'
}],
...
...
@@ -363,6 +371,11 @@ export default {
},
methods
:
{
tableDataFinished
()
{
this
.
$nextTick
(()
=>
{
this
.
$root
.
parentCommon
.
setAuthBtn
();
})
},
refresh
()
{
this
.
searchForm
=
{}
this
.
$refs
.
vehicleForm
.
refreshTable
()
...
...
@@ -537,7 +550,14 @@ export default {
})
},
filterConfirm
()
{
const
{
label
,
id
}
=
this
.
$refs
.
tree
.
getCurrentNode
();
const
{
label
,
id
,
children
}
=
this
.
$refs
.
tree
.
getCurrentNode
();
if
(
children
)
{
this
.
$message
({
message
:
'请选择下级特约店'
,
type
:
'error'
})
return
;
}
this
.
$set
(
this
.
vehicleForm
,
'shopName'
,
label
);
this
.
vehicleForm
.
shopNameId
=
id
this
.
closeFilter
();
...
...
src/views/vehicleSubmit/vehicleCheck/index.vue
View file @
1997c55
...
...
@@ -37,6 +37,7 @@
:tableParams=
"checkTableParams"
:getListApi=
"getListApi"
:searchForm=
"searchForm"
@
dataFinished=
"tableDataFinished"
:hasNum=
"false"
>
<span
...
...
@@ -192,6 +193,11 @@ export default {
})
},
methods
:
{
tableDataFinished
()
{
this
.
$nextTick
(()
=>
{
this
.
$root
.
parentCommon
.
setAuthBtn
();
})
},
refresh
()
{
this
.
searchForm
=
{}
this
.
$refs
.
vehicleCheckTable
.
refreshTable
()
...
...
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