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 b36a4e46
authored
Sep 23, 2021
by
吴娟华
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
'1.2.1'
1 parent
9d5f0e8e
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
305 additions
and
194 deletions
src/components/rule-form/index.vue
src/components/search-form/index.vue
src/views/reportManage/outStore.vue
src/views/specialShop/addShop/index.vue
src/views/vehicleManage/index.vue
src/views/vehicleManage/userList.vue
src/views/vehicleManage/vehicleList.vue
src/components/rule-form/index.vue
View file @
b36a4e4
...
@@ -104,7 +104,7 @@ export default {
...
@@ -104,7 +104,7 @@ export default {
},
},
methods
:
{
methods
:
{
selectChange
(
val
,
item
)
{
selectChange
(
val
,
item
)
{
//console.log(
item)
console
.
log
(
val
,
item
)
if
(
item
.
selectChange
){
if
(
item
.
selectChange
){
item
.
selectChange
(
val
,
item
);
item
.
selectChange
(
val
,
item
);
}
}
...
...
src/components/search-form/index.vue
View file @
b36a4e4
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
v-for=
"(item, index) in formList"
v-for=
"(item, index) in formList"
:key=
"index"
:key=
"index"
:label=
"item.label || ''"
:label=
"item.label || ''"
:class=
"item.class||''"
>
>
<template>
<template>
<template
v-if=
"item.type === 'input'"
>
<template
v-if=
"item.type === 'input'"
>
...
...
src/views/reportManage/outStore.vue
View file @
b36a4e4
...
@@ -162,7 +162,7 @@ export default {
...
@@ -162,7 +162,7 @@ export default {
url
:
`
${
store
.
state
.
baseURL
}${
REPORT_API
.
REPORT_EXPORT
}
`
,
url
:
`
${
store
.
state
.
baseURL
}${
REPORT_API
.
REPORT_EXPORT
}
`
,
method
:
'GET'
,
method
:
'GET'
,
data
:
this
.
searchDataForm
,
data
:
this
.
searchDataForm
,
fileName
:
'无在店统计报表'
+
this
.
statDate
fileName
:
'无在店统计报表'
+
moment
().
format
(
'YYYY.MM.DD'
)
})
})
},
},
tableDataFinished
(
data
)
{
tableDataFinished
(
data
)
{
...
...
src/views/specialShop/addShop/index.vue
View file @
b36a4e4
...
@@ -33,12 +33,26 @@
...
@@ -33,12 +33,26 @@
placement=
"bottom-start"
placement=
"bottom-start"
width=
"400"
width=
"400"
@
show=
"selectStore"
@
show=
"selectStore"
trigger=
"click"
>
trigger=
"click"
>
<div
v-loading=
"loading"
>
<div
v-loading=
"loading"
>
<el-input
placeholder=
"输入关键字进行过滤"
v-model=
"filterText"
size=
"small"
>
<el-input
placeholder=
"输入关键字进行过滤"
v-model=
"filterText"
size=
"small"
>
</el-input>
</el-input>
<el-tree
style=
"max-height:50vh;overflow:auto"
class=
"filter-tree"
:data=
"filterTextData"
:filter-node-method=
"filterNode"
highlight-current
ref=
"tree"
node-key=
"id"
check-on-click-node
>
<el-tree
style=
"max-height:50vh;overflow:auto"
class=
"filter-tree"
:data=
"filterTextData"
:filter-node-method=
"filterNode"
highlight-current
ref=
"tree"
node-key=
"id"
check-on-click-node
>
</el-tree>
</el-tree>
<p
style=
"text-align: right; margin-top: 10px"
>
<p
style=
"text-align: right; margin-top: 10px"
>
<el-button
@
click=
"filterConfirm"
type=
"primary"
>
确定
</el-button>
<el-button
@
click=
"filterConfirm"
type=
"primary"
>
确定
</el-button>
...
@@ -64,22 +78,13 @@
...
@@ -64,22 +78,13 @@
</el-form-item>
</el-form-item>
<el-form-item
label=
"特约店级别:"
>
<el-form-item
label=
"特约店级别:"
>
<el-radio-group
v-model=
"form.shopLevel"
>
<el-radio-group
v-model=
"form.shopLevel"
>
<el-radio
<el-radio
label=
"一级店"
:disabled=
"readonlyStatus"
>
一级店
</el-radio>
label=
"一级店"
<el-radio
label=
"二级店"
:disabled=
"readonlyStatus"
>
二级店
</el-radio>
:disabled=
"readonlyStatus"
>
一级店
</el-radio>
<el-radio
label=
"二级店"
:disabled=
"readonlyStatus"
>
二级店
</el-radio>
</el-radio-group>
</el-radio-group>
</el-form-item>
</el-form-item>
<h2>
特约店围栏配置
</h2>
<h2>
特约店围栏配置
</h2>
<el-divider></el-divider>
<el-divider></el-divider>
<el-form-item
<el-form-item
label=
"特约店线路名称:"
prop=
"fenceName"
>
label=
"特约店线路名称:"
prop=
"fenceName"
>
<el-input
<el-input
v-model
.
trim=
"form.fenceName"
v-model
.
trim=
"form.fenceName"
:size=
"btn_size"
:size=
"btn_size"
...
@@ -88,10 +93,7 @@
...
@@ -88,10 +93,7 @@
:disabled=
"readonlyStatus"
:disabled=
"readonlyStatus"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
<el-form-item
label=
"监控范围:"
prop=
"radius"
>
label=
"监控范围:"
prop=
"radius"
>
<el-input
<el-input
v-model=
"form.radius"
v-model=
"form.radius"
:size=
"btn_size"
:size=
"btn_size"
...
@@ -109,33 +111,25 @@
...
@@ -109,33 +111,25 @@
:size=
"btn_size"
:size=
"btn_size"
@
click=
"updateFence"
@
click=
"updateFence"
:disabled=
"readonlyStatus"
:disabled=
"readonlyStatus"
>
更新线路
</el-button>
>
更新线路
</el-button
>
</el-form-item>
</el-form-item>
<div>
<div>
<el-form-item
<el-form-item
label=
"经度:"
prop=
"lng"
>
label=
"经度:"
prop=
"lng"
>
<el-input
<el-input
v-model=
"form.lng"
v-model=
"form.lng"
size=
"small"
size=
"small"
:disabled=
"readonlyStatus"
:disabled=
"readonlyStatus"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
<el-form-item
label=
"纬度:"
prop=
"lat"
>
label=
"纬度:"
prop=
"lat"
>
<el-input
<el-input
v-model=
"form.lat"
v-model=
"form.lat"
size=
"small"
size=
"small"
:disabled=
"readonlyStatus"
:disabled=
"readonlyStatus"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
<el-form-item
label=
"特约店详细地址:"
prop=
"analysisAddress"
>
label=
"特约店详细地址:"
prop=
"analysisAddress"
>
<el-input
<el-input
v-model=
"form.analysisAddress"
v-model=
"form.analysisAddress"
size=
"medium"
size=
"medium"
...
@@ -165,152 +159,159 @@
...
@@ -165,152 +159,159 @@
@
click=
"saveFence"
@
click=
"saveFence"
size=
"small"
size=
"small"
:loading=
"submitting"
:loading=
"submitting"
>
{{btnText}}
</el-button>
>
{{ btnText }}
</el-button
<el-button
>
@
click=
"cancel"
<el-button
@
click=
"cancel"
size=
"small"
>
取消
</el-button>
size=
"small"
>
取消
</el-button>
</div>
</div>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
getSpecialShopList
}
from
'services/vehicle'
import
{
getSpecialShopList
}
from
"services/vehicle"
;
import
{
getOrgTree
}
from
"services/common"
;
import
{
import
{
getOrgTree
,
getFenceDetailById
,
}
from
"services/common"
;
saveFence
,
import
{
getFenceDetailById
,
saveFence
,
updateFence
}
from
'services/specialshop'
updateFence
,
import
fenceMap
from
'components/map/fenceMap.vue'
}
from
"services/specialshop"
;
import
mapService
from
'utils/mapService.js'
import
fenceMap
from
"components/map/fenceMap.vue"
;
import
mapService
from
"utils/mapService.js"
;
export
default
{
export
default
{
components
:
{
fenceMap
},
components
:
{
fenceMap
},
data
()
{
data
()
{
let
checkSpecialShop
=
(
rule
,
value
,
cb
)
=>
{
let
checkSpecialShop
=
(
rule
,
value
,
cb
)
=>
{
if
(
!
this
.
form
.
specialShopName
)
{
if
(
!
this
.
form
.
specialShopName
)
{
cb
(
new
Error
(
'请选择特约店'
))
cb
(
new
Error
(
"请选择特约店"
));
}
else
{
}
else
{
cb
();
cb
();
}
}
}
}
;
let
checkLng
=
(
rule
,
vaule
,
cb
)
=>
{
let
checkLng
=
(
rule
,
vaule
,
cb
)
=>
{
if
(
this
.
form
.
shapeType
==
1
&&
!
/^
(\+
|-
)?(?:
180
(?:(?:\.
0
{1,6})?)
|
(?:[
0-9
]
|
[
1-9
][
0-9
]
|1
[
0-7
][
0-9
])(?:(?:\.[
0-9
]{1,6})?))
$/
.
test
(
this
.
form
.
lng
))
{
if
(
cb
(
new
Error
(
'请输入正确的格式'
))
this
.
form
.
shapeType
==
1
&&
!
/^
(\+
|-
)?(?:
180
(?:(?:\.
0
{1,6})?)
|
(?:[
0-9
]
|
[
1-9
][
0-9
]
|1
[
0-7
][
0-9
])(?:(?:\.[
0-9
]{1,6})?))
$/
.
test
(
this
.
form
.
lng
)
)
{
cb
(
new
Error
(
"请输入正确的格式"
));
}
else
{
}
else
{
cb
();
cb
();
}
}
}
}
;
let
checkLat
=
(
rule
,
vaule
,
cb
)
=>
{
let
checkLat
=
(
rule
,
vaule
,
cb
)
=>
{
if
(
this
.
form
.
shapeType
==
1
&&
!
/^
(\+
|-
)?(?:
90
(?:(?:\.
0
{1,6})?)
|
(?:[
0-9
]
|
[
1-8
][
0-9
])(?:(?:\.[
0-9
]{1,6})?))
$/
.
test
(
this
.
form
.
lat
))
{
if
(
cb
(
new
Error
(
'请输入正确的格式'
))
this
.
form
.
shapeType
==
1
&&
!
/^
(\+
|-
)?(?:
90
(?:(?:\.
0
{1,6})?)
|
(?:[
0-9
]
|
[
1-8
][
0-9
])(?:(?:\.[
0-9
]{1,6})?))
$/
.
test
(
this
.
form
.
lat
)
)
{
cb
(
new
Error
(
"请输入正确的格式"
));
}
else
{
}
else
{
cb
();
cb
();
}
}
}
}
;
let
checkRadius
=
(
rule
,
vaule
,
cb
)
=>
{
let
checkRadius
=
(
rule
,
vaule
,
cb
)
=>
{
if
(
this
.
form
.
shapeType
==
1
&&
!
/^
\d
+$/
.
test
(
this
.
form
.
radius
))
{
console
.
log
(
this
.
form
.
radius
)
if
(
this
.
form
.
shapeType
==
1
&&
!
/^
\d
+$/
.
test
(
this
.
form
.
radius
))
{
cb
(
new
Error
(
'请输入正确的格式,不能输入小数点'
))
console
.
log
(
this
.
form
.
radius
);
cb
(
new
Error
(
"请输入正确的格式,不能输入小数点"
));
}
else
{
}
else
{
cb
();
cb
();
}
}
}
}
;
let
checkTransferAddr
=
(
rule
,
vaule
,
cb
)
=>
{
let
checkTransferAddr
=
(
rule
,
vaule
,
cb
)
=>
{
if
(
this
.
form
.
shapeType
==
1
)
{
if
(
this
.
form
.
shapeType
==
1
)
{
if
(
this
.
transferError
)
{
if
(
this
.
transferError
)
{
cb
(
new
Error
(
'所填经纬度不能正确解析地址,请重新输入'
));
cb
(
new
Error
(
"所填经纬度不能正确解析地址,请重新输入"
));
}
else
{
}
else
{
cb
();
cb
();
}
}
}
else
{
}
else
{
cb
()
cb
();
}
}
}
};
return
{
return
{
refresh
:
new
Date
().
getTime
(),
refresh
:
new
Date
().
getTime
(),
btn_size
:
'small'
,
btn_size
:
"small"
,
configForm
:
{},
configForm
:
{},
mapData
:
[],
mapData
:
[],
submitting
:
false
,
submitting
:
false
,
btnText
:
'保存'
,
btnText
:
"保存"
,
restainFenceName
:
''
,
restainFenceName
:
""
,
specialShopOptions
:
[],
specialShopOptions
:
[],
specialShopDefaultProps
:
{
specialShopDefaultProps
:
{
children
:
'children'
,
children
:
"children"
,
label
:
'label'
,
label
:
"label"
,
value
:
'code'
,
value
:
"code"
,
},
},
readonlyStatus
:
false
,
readonlyStatus
:
false
,
form
:
{
form
:
{
shopName
:
''
,
shopName
:
""
,
shopCode
:
''
,
shopCode
:
""
,
shopLevel
:
'一级店'
,
shopLevel
:
"一级店"
,
fenceName
:
''
,
fenceName
:
""
,
lng
:
''
,
lng
:
""
,
lat
:
''
,
lat
:
""
,
radius
:
150
,
radius
:
150
,
bizFenceType
:
'12'
,
bizFenceType
:
"12"
,
shapeType
:
1
,
shapeType
:
1
,
specialShopId
:
''
,
specialShopId
:
""
,
specialShopName
:
''
,
specialShopName
:
""
,
// fenceNo: '',
// fenceNo: '',
electricFenceType
:
1
,
electricFenceType
:
1
,
startTime
:
''
,
startTime
:
""
,
endTime
:
''
,
endTime
:
""
,
des
:
''
,
des
:
""
,
areaCode
:
''
,
areaCode
:
""
,
analysisAddress
:
''
,
analysisAddress
:
""
,
status
:
1
,
status
:
1
,
transferError
:
false
,
transferError
:
false
,
timeType
:
2
,
timeType
:
2
,
electricTimeFenceType
:
''
,
electricTimeFenceType
:
""
,
electricTimeFenceTypes
:
[
electricTimeFenceTypes
:
[
{
{
value
:
1
,
value
:
1
,
label
:
'1个月'
label
:
"1个月"
,
},
{
},
{
value
:
2
,
value
:
2
,
label
:
'2个月'
label
:
"2个月"
,
},
{
},
{
value
:
3
,
value
:
3
,
label
:
'3个月'
label
:
"3个月"
,
},
{
},
{
value
:
4
,
value
:
4
,
label
:
'4个月'
label
:
"4个月"
,
},
{
},
{
value
:
5
,
value
:
5
,
label
:
'5个月'
label
:
"5个月"
,
},
{
},
{
value
:
6
,
value
:
6
,
label
:
'6个月'
label
:
"6个月"
,
}
}
,
],
],
dateRange
:
[],
dateRange
:
[],
msgtel
:
''
msgtel
:
""
,
},
},
rules
:
{
rules
:
{
specialShopName
:
[
specialShopName
:
[
{
required
:
true
,
validator
:
checkSpecialShop
,
trigger
:
'change'
}
{
required
:
true
,
validator
:
checkSpecialShop
,
trigger
:
"change"
},
],
],
fenceName
:
[
fenceName
:
[
{
required
:
true
,
message
:
'请输入特约店线路名称'
,
trigger
:
'blur'
},
{
required
:
true
,
message
:
"请输入特约店线路名称"
,
trigger
:
"blur"
},
{
pattern
:
/^
\S{2,200}
$/
,
message
:
'至少2字'
,
trigger
:
'blur'
},
{
pattern
:
/^
\S{2,200}
$/
,
message
:
"至少2字"
,
trigger
:
"blur"
},
],
radius
:
[
{
validator
:
checkRadius
,
trigger
:
'blur'
}
],
lng
:
[
{
required
:
true
,
validator
:
checkLng
,
trigger
:
'blur'
}
],
lat
:
[
{
required
:
true
,
validator
:
checkLat
,
trigger
:
'blur'
}
],
analysisAddress
:
[
{
validator
:
checkTransferAddr
,
trigger
:
'change'
}
],
],
radius
:
[{
validator
:
checkRadius
,
trigger
:
"blur"
}],
lng
:
[{
required
:
true
,
validator
:
checkLng
,
trigger
:
"blur"
}],
lat
:
[{
required
:
true
,
validator
:
checkLat
,
trigger
:
"blur"
}],
analysisAddress
:
[{
validator
:
checkTransferAddr
,
trigger
:
"change"
}],
},
},
loading
:
true
,
loading
:
true
,
...
@@ -318,21 +319,31 @@ export default {
...
@@ -318,21 +319,31 @@ export default {
filterText
:
""
,
filterText
:
""
,
filterTextData
:
[],
filterTextData
:
[],
isOpen
:
true
,
isOpen
:
true
,
shopNameId
:
''
,
shopNameId
:
""
,
}
}
;
},
},
created
()
{
created
()
{
this
.
getSpecialShopList
();
//
this.getSpecialShopList();
},
},
mounted
()
{
mounted
()
{
this
.
init
();
this
.
init
();
},
},
watch
:
{
filterText
(
val
)
{
this
.
_timeout
&&
clearTimeout
(
this
.
_timeout
)
this
.
_timeout
=
setTimeout
(()
=>
{
this
.
$refs
.
tree
.
filter
(
val
)
},
500
)
}
},
methods
:
{
methods
:
{
selectStore
()
{
selectStore
()
{
if
(
this
.
isReadonly
)
return
;
if
(
this
.
isReadonly
)
return
;
this
.
filterText
=
""
;
this
.
filterText
=
""
;
this
.
filterDialogTitle
=
"选择所属组织"
;
this
.
filterDialogTitle
=
"选择所属组织"
;
if
(
!
this
.
filterTextData
.
length
)
{
if
(
!
this
.
filterTextData
.
length
)
{
this
.
getStoreList
();
this
.
getStoreList
();
}
}
...
@@ -345,7 +356,7 @@ export default {
...
@@ -345,7 +356,7 @@ export default {
getStoreList
()
{
getStoreList
()
{
let
_this
=
this
;
let
_this
=
this
;
_this
.
loading
=
true
;
_this
.
loading
=
true
;
getOrgTree
({
hasUserLeaf
:
true
}).
then
((
res
)
=>
{
getOrgTree
({
hasUserLeaf
:
true
}).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
const
{
code
,
data
}
=
res
;
_this
.
loading
=
false
;
_this
.
loading
=
false
;
if
(
code
==
200
)
{
if
(
code
==
200
)
{
...
@@ -355,43 +366,44 @@ export default {
...
@@ -355,43 +366,44 @@ export default {
},
},
filterConfirm
()
{
filterConfirm
()
{
const
{
label
,
id
,
origin
}
=
this
.
$refs
.
tree
.
getCurrentNode
();
const
{
label
,
id
,
origin
}
=
this
.
$refs
.
tree
.
getCurrentNode
();
if
(
origin
.
type
!=
'u'
)
{
if
(
origin
.
type
!=
"u"
)
{
this
.
$message
({
this
.
$message
({
message
:
"请选择下级所属组织"
,
message
:
"请选择下级所属组织"
,
type
:
"error"
,
type
:
"error"
,
});
});
return
;
return
;
}
}
this
.
form
.
specialShopName
=
label
.
split
(
'/'
)[
1
]
this
.
form
.
specialShopName
=
label
.
split
(
"/"
)[
1
];
this
.
form
.
specialShopCode
=
label
.
split
(
'/'
)[
0
]
this
.
form
.
specialShopCode
=
label
.
split
(
"/"
)[
0
];
//this.$set(this, "form.specialShopName", label);
//this.$set(this, "form.specialShopName", label);
this
.
form
.
specialShopId
=
id
;
this
.
form
.
specialShopId
=
id
;
this
.
closeFilter
();
this
.
closeFilter
();
},
},
filterNode
(
value
,
data
)
{
filterNode
(
value
,
data
)
{
console
.
log
(
value
,
data
);
console
.
log
(
value
,
data
);
this
.
loading
=
false
if
(
!
value
)
return
true
;
if
(
!
value
)
return
true
;
return
data
.
label
.
indexOf
(
value
)
!==
-
1
;
return
data
.
label
.
indexOf
(
value
)
!==
-
1
;
},
},
init
()
{
init
()
{
const
{
id
,
readonlyStatus
}
=
this
.
$route
.
query
;
const
{
id
,
readonlyStatus
}
=
this
.
$route
.
query
;
this
.
readonlyStatus
=
readonlyStatus
||
false
;
this
.
readonlyStatus
=
readonlyStatus
||
false
;
if
(
typeof
id
!=
'undefined'
)
{
if
(
typeof
id
!=
"undefined"
)
{
this
.
getFenceDetail
(
id
);
this
.
getFenceDetail
(
id
);
}
else
{
}
else
{
this
.
$refs
.
fenceMap
.
initFence
({
this
.
$refs
.
fenceMap
.
initFence
({
fenceType
:
'circle'
fenceType
:
"circle"
,
});
});
this
.
restainFenceName
=
undefined
;
this
.
restainFenceName
=
undefined
;
}
}
},
},
getSpecialShopList
()
{
getSpecialShopList
()
{
getSpecialShopList
().
then
(
res
=>
{
getSpecialShopList
().
then
(
(
res
)
=>
{
const
{
code
,
data
}
=
res
;
const
{
code
,
data
}
=
res
;
if
(
code
==
200
)
{
if
(
code
==
200
)
{
this
.
specialShopOptions
=
data
;
this
.
specialShopOptions
=
data
;
}
}
})
})
;
},
},
getFenceDetail
(
id
)
{
getFenceDetail
(
id
)
{
getFenceDetailById
({
shopId
:
id
}).
then
((
res
)
=>
{
getFenceDetailById
({
shopId
:
id
}).
then
((
res
)
=>
{
...
@@ -402,12 +414,12 @@ export default {
...
@@ -402,12 +414,12 @@ export default {
return
;
return
;
}
}
for
(
let
key
in
data
)
{
for
(
let
key
in
data
)
{
form
[
key
]
=
data
[
key
]
form
[
key
]
=
data
[
key
]
;
}
}
this
.
form
.
shapeType
=
1
;
this
.
form
.
shapeType
=
1
;
this
.
shopId
=
data
.
id
;
this
.
shopId
=
data
.
id
;
this
.
form
.
dateRange
=
[
form
.
startTime
,
form
.
endTime
];
this
.
form
.
dateRange
=
[
form
.
startTime
,
form
.
endTime
];
this
.
areaCode
=
form
.
areaCode
this
.
areaCode
=
form
.
areaCode
;
this
.
restainFenceName
=
form
.
fenceName
;
this
.
restainFenceName
=
form
.
fenceName
;
this
.
form
.
fenceName
=
form
.
fenceName
;
this
.
form
.
fenceName
=
form
.
fenceName
;
this
.
form
.
msgtel
=
data
.
telNumbers
;
this
.
form
.
msgtel
=
data
.
telNumbers
;
...
@@ -419,28 +431,28 @@ export default {
...
@@ -419,28 +431,28 @@ export default {
if
(
form
.
shapeType
===
1
)
{
if
(
form
.
shapeType
===
1
)
{
this
.
mapData
=
{
this
.
mapData
=
{
fenceType
:
'circle'
,
fenceType
:
"circle"
,
lng
:
form
.
lng
,
lng
:
form
.
lng
,
lat
:
form
.
lat
,
lat
:
form
.
lat
,
radius
:
form
.
radius
,
radius
:
form
.
radius
,
}
}
;
}
else
if
(
form
.
shapeType
===
4
)
{
}
else
if
(
form
.
shapeType
===
4
)
{
this
.
mapData
=
{
this
.
mapData
=
{
fenceType
:
'area'
,
fenceType
:
"area"
,
areaCode
:
this
.
form
.
areaCode
areaCode
:
this
.
form
.
areaCode
,
}
}
;
}
else
if
(
form
.
shapeType
===
3
)
{
}
else
if
(
form
.
shapeType
===
3
)
{
if
(
data
.
lnglat
)
{
if
(
data
.
lnglat
)
{
this
.
polygonPath
=
data
.
lnglat
.
split
(
'|'
).
map
((
item
)
=>
{
this
.
polygonPath
=
data
.
lnglat
.
split
(
"|"
).
map
((
item
)
=>
{
return
[
item
.
split
(
','
)[
0
],
item
.
split
(
','
)[
1
]]
return
[
item
.
split
(
","
)[
0
],
item
.
split
(
","
)[
1
]];
})
})
;
}
}
console
.
log
(
this
.
polygonPath
)
console
.
log
(
this
.
polygonPath
)
;
this
.
mapData
=
{
this
.
mapData
=
{
fenceType
:
'polygon'
,
fenceType
:
"polygon"
,
polygonPath
:
this
.
polygonPath
polygonPath
:
this
.
polygonPath
,
}
}
;
}
}
this
.
$refs
.
fenceMap
.
initFence
(
this
.
mapData
);
this
.
$refs
.
fenceMap
.
initFence
(
this
.
mapData
);
...
@@ -454,11 +466,11 @@ export default {
...
@@ -454,11 +466,11 @@ export default {
if
(
data
.
lng
&&
data
.
lat
)
{
if
(
data
.
lng
&&
data
.
lat
)
{
this
.
form
.
lng
=
data
.
lng
;
this
.
form
.
lng
=
data
.
lng
;
this
.
form
.
lat
=
data
.
lat
;
this
.
form
.
lat
=
data
.
lat
;
this
.
transfer
()
this
.
transfer
()
;
}
}
if
(
data
.
polygonPath
&&
data
.
polygonPath
.
length
)
{
if
(
data
.
polygonPath
&&
data
.
polygonPath
.
length
)
{
this
.
polygonPath
=
data
.
polygonPath
this
.
polygonPath
=
data
.
polygonPath
;
}
}
},
},
handleSpecialShopChange
(
val
)
{
handleSpecialShopChange
(
val
)
{
...
@@ -467,38 +479,40 @@ export default {
...
@@ -467,38 +479,40 @@ export default {
if
(
val
&&
val
.
length
>
1
)
{
if
(
val
&&
val
.
length
>
1
)
{
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
refresh
=
new
Date
().
getTime
();
this
.
refresh
=
new
Date
().
getTime
();
const
thisNodes
=
this
.
$refs
[
'specialShopCascader'
].
getCheckedNodes
()[
0
];
const
thisNodes
=
this
.
$refs
[
"specialShopCascader"
].
getCheckedNodes
()[
0
];
if
(
thisNodes
&&
thisNodes
.
data
)
{
if
(
thisNodes
&&
thisNodes
.
data
)
{
const
{
data
}
=
thisNodes
;
const
{
data
}
=
thisNodes
;
this
.
form
.
specialShopId
=
data
.
id
;
this
.
form
.
specialShopId
=
data
.
id
;
this
.
form
.
specialShopCode
=
data
.
code
;
this
.
form
.
specialShopCode
=
data
.
code
;
this
.
form
.
specialShopName
=
data
.
label
;
this
.
form
.
specialShopName
=
data
.
label
;
}
}
})
})
;
}
}
},
},
updateFence
()
{
updateFence
()
{
this
.
$refs
.
fenceMap
.
updateFence
({
this
.
$refs
.
fenceMap
.
updateFence
({
fenceType
:
'circle'
,
fenceType
:
"circle"
,
lng
:
this
.
form
.
lng
,
lng
:
this
.
form
.
lng
,
lat
:
this
.
form
.
lat
,
lat
:
this
.
form
.
lat
,
radius
:
this
.
form
.
radius
radius
:
this
.
form
.
radius
,
});
});
this
.
transfer
()
this
.
transfer
()
;
},
},
validateLngLat
()
{
validateLngLat
()
{
let
pass
=
true
;
let
pass
=
true
;
this
.
$refs
.
shopForm
.
validateField
(
'lng'
,
(
error
)
=>
{
this
.
$refs
.
shopForm
.
validateField
(
"lng"
,
(
error
)
=>
{
if
(
error
)
{
if
(
error
)
{
pass
=
false
;
pass
=
false
;
}
}
});
});
this
.
$refs
.
shopForm
.
validateField
(
'lat'
,
(
error
)
=>
{
this
.
$refs
.
shopForm
.
validateField
(
"lat"
,
(
error
)
=>
{
if
(
error
)
{
if
(
error
)
{
pass
=
false
;
pass
=
false
;
}
}
});
});
this
.
$refs
.
shopForm
.
validateField
(
'radius'
,
(
error
)
=>
{
this
.
$refs
.
shopForm
.
validateField
(
"radius"
,
(
error
)
=>
{
if
(
error
)
{
if
(
error
)
{
pass
=
false
;
pass
=
false
;
}
}
...
@@ -518,25 +532,25 @@ export default {
...
@@ -518,25 +532,25 @@ export default {
});
});
}
else
{
}
else
{
this
.
getAddress
(
flag
);
this
.
getAddress
(
flag
);
}
}
},
500
)
},
500
)
;
}
}
},
},
getAddress
(
flag
)
{
getAddress
(
flag
)
{
const
lnglatXY
=
[
this
.
form
.
lng
,
this
.
form
.
lat
];
const
lnglatXY
=
[
this
.
form
.
lng
,
this
.
form
.
lat
];
this
.
form
.
analysisAddress
=
''
this
.
form
.
analysisAddress
=
""
;
this
.
geocoder
.
getAddress
(
lnglatXY
,
(
status
,
result
)
=>
{
this
.
geocoder
.
getAddress
(
lnglatXY
,
(
status
,
result
)
=>
{
if
(
flag
==
this
.
transferFlag
)
{
if
(
flag
==
this
.
transferFlag
)
{
if
(
status
===
'complete'
&&
result
.
info
===
'OK'
)
{
//获取地址成功
if
(
status
===
"complete"
&&
result
.
info
===
"OK"
)
{
//获取地址成功
//console.log(result.regeocode.formattedAddress)
//console.log(result.regeocode.formattedAddress)
this
.
form
.
analysisAddress
=
result
.
regeocode
.
formattedAddress
;
this
.
form
.
analysisAddress
=
result
.
regeocode
.
formattedAddress
;
this
.
transferError
=
false
;
this
.
transferError
=
false
;
this
.
$refs
.
shopForm
.
validateField
(
'analysisAddress'
);
this
.
$refs
.
shopForm
.
validateField
(
"analysisAddress"
);
//this.$refs.fenceMap.updateMap(this.form)
//this.$refs.fenceMap.updateMap(this.form)
}
else
{
}
else
{
this
.
transferError
=
true
;
this
.
transferError
=
true
;
this
.
$refs
.
shopForm
.
validateField
(
'analysisAddress'
);
this
.
$refs
.
shopForm
.
validateField
(
"analysisAddress"
);
}
}
}
}
});
});
...
@@ -565,7 +579,7 @@ export default {
...
@@ -565,7 +579,7 @@ export default {
params
.
radius
=
form
.
radius
;
params
.
radius
=
form
.
radius
;
params
.
address
=
form
.
analysisAddress
;
params
.
address
=
form
.
analysisAddress
;
}
else
if
(
form
.
shapeType
==
3
)
{
}
else
if
(
form
.
shapeType
==
3
)
{
params
.
lnglat
=
this
.
polygonPath
.
join
(
'|'
)
params
.
lnglat
=
this
.
polygonPath
.
join
(
"|"
);
}
}
// params.bizFenceType = form.bizFenceType
// params.bizFenceType = form.bizFenceType
// params.status = form.status;
// params.status = form.status;
...
@@ -587,23 +601,21 @@ export default {
...
@@ -587,23 +601,21 @@ export default {
// }
// }
return
params
;
return
params
;
},
},
saveFence
()
{
saveFence
()
{
if
(
this
.
form
.
shapeType
==
3
)
{
if
(
this
.
form
.
shapeType
==
3
)
{
if
(
this
.
polygonPath
.
length
===
0
)
{
if
(
this
.
polygonPath
.
length
===
0
)
{
this
.
$message
({
this
.
$message
({
message
:
'请绘制线路'
,
message
:
"请绘制线路"
,
type
:
'error'
type
:
"error"
,
});
});
return
;
return
;
}
}
}
}
this
.
$refs
.
shopForm
.
validate
((
valid
)
=>
{
this
.
$refs
.
shopForm
.
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
this
.
submitting
=
true
;
this
.
submitting
=
true
;
if
(
typeof
this
.
shopId
!=
'undefined'
)
{
if
(
typeof
this
.
shopId
!=
"undefined"
)
{
const
params
=
this
.
getParams
();
const
params
=
this
.
getParams
();
params
.
id
=
this
.
shopId
;
params
.
id
=
this
.
shopId
;
...
@@ -611,14 +623,14 @@ export default {
...
@@ -611,14 +623,14 @@ export default {
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
//this.closeDialog();
//this.closeDialog();
this
.
$message
({
this
.
$message
({
message
:
'提交成功'
,
message
:
"提交成功"
,
type
:
'success'
type
:
"success"
,
});
});
history
.
go
(
-
1
)
history
.
go
(
-
1
)
;
}
else
{
}
else
{
this
.
$message
({
this
.
$message
({
message
:
res
.
message
,
message
:
res
.
message
,
type
:
'error'
type
:
"error"
,
});
});
}
}
this
.
submitting
=
false
;
this
.
submitting
=
false
;
...
@@ -628,31 +640,29 @@ export default {
...
@@ -628,31 +640,29 @@ export default {
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
//this.closeDialog();
//this.closeDialog();
this
.
$message
({
this
.
$message
({
message
:
'提交成功'
,
message
:
"提交成功"
,
type
:
'success'
type
:
"success"
,
});
});
history
.
go
(
-
1
)
history
.
go
(
-
1
)
;
}
else
{
}
else
{
this
.
$message
({
this
.
$message
({
message
:
res
.
message
,
message
:
res
.
message
,
type
:
'error'
type
:
"error"
,
});
});
}
}
this
.
submitting
=
false
;
this
.
submitting
=
false
;
});
});
}
}
}
else
{
}
else
{
return
false
;
return
false
;
}
}
});
});
},
},
cancel
()
{
cancel
()
{
history
.
go
(
-
1
)
history
.
go
(
-
1
)
;
},
},
}
}
,
}
}
;
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
...
...
src/views/vehicleManage/index.vue
View file @
b36a4e4
...
@@ -407,8 +407,13 @@ export default {
...
@@ -407,8 +407,13 @@ export default {
},
},
watch
:
{
watch
:
{
filterText
(
val
)
{
filterText
(
val
)
{
this
.
$refs
.
tree
.
filter
(
val
);
},
this
.
_timeout
&&
clearTimeout
(
this
.
_timeout
)
this
.
_timeout
=
setTimeout
(()
=>
{
this
.
$refs
.
tree
.
filter
(
val
)
},
500
)
}
},
},
mounted
()
{
mounted
()
{
this
.
getModels
();
this
.
getModels
();
...
...
src/views/vehicleManage/userList.vue
View file @
b36a4e4
...
@@ -195,7 +195,7 @@
...
@@ -195,7 +195,7 @@
class=
"choose-list-checkbox"
class=
"choose-list-checkbox"
>
>
<div
class=
"choose-list-content"
>
<div
class=
"choose-list-content"
>
<p>
{{
item
.
n
ame
}}
/
{{
item
.
vin
}}
</p>
<p>
{{
item
.
ownerN
ame
}}
/
{{
item
.
vin
}}
</p>
<p
class=
"choose-list-group"
>
<p
class=
"choose-list-group"
>
<el-tag
<el-tag
type=
"info"
type=
"info"
...
@@ -218,7 +218,7 @@
...
@@ -218,7 +218,7 @@
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"sure"
size=
"small"
>
确认
</el-button>
<el-button
type=
"primary"
@
click=
"sure"
size=
"small"
>
确认
</el-button>
<el-button
@
click=
"
$emit('onUserListModalChange', false)
"
size=
"small"
<el-button
@
click=
"
closeDialog
"
size=
"small"
>
取消
</el-button
>
取消
</el-button
>
>
</div>
</div>
...
@@ -246,6 +246,9 @@ import {
...
@@ -246,6 +246,9 @@ import {
listtestdrive
,
listtestdrive
,
getSpecialShopList
,
getSpecialShopList
,
}
from
"services/vehicle"
;
}
from
"services/vehicle"
;
import
{
getOrgTree
,
}
from
"services/common"
;
export
default
{
export
default
{
props
:
[
"userListModalVisible"
,
"userData"
,
"init"
],
props
:
[
"userListModalVisible"
,
"userData"
,
"init"
],
data
()
{
data
()
{
...
@@ -374,7 +377,10 @@ export default {
...
@@ -374,7 +377,10 @@ export default {
}
}
},
},
filterText
(
val
)
{
filterText
(
val
)
{
this
.
$refs
.
tree
.
filter
(
val
);
this
.
_timeout
&&
clearTimeout
(
this
.
_timeout
)
this
.
_timeout
=
setTimeout
(()
=>
{
this
.
$refs
.
tree
.
filter
(
val
)
},
500
)
},
},
},
},
methods
:
{
methods
:
{
...
@@ -396,7 +402,7 @@ export default {
...
@@ -396,7 +402,7 @@ export default {
console
.
log
(
obj
)
console
.
log
(
obj
)
});
});
this
.
$emit
(
"onUpdateUserData"
,
userdata
);
this
.
$emit
(
"onUpdateUserData"
,
userdata
);
this
.
$emit
(
"onUserListModalChange"
,
false
);
this
.
closeDialog
()
this
.
checkedCancel
=
true
this
.
checkedCancel
=
true
},
},
search
()
{
search
()
{
...
@@ -641,7 +647,7 @@ export default {
...
@@ -641,7 +647,7 @@ export default {
getStoreList
()
{
getStoreList
()
{
let
_this
=
this
;
let
_this
=
this
;
_this
.
loading
=
true
;
_this
.
loading
=
true
;
get
SpecialShopList
(
).
then
((
res
)
=>
{
get
OrgTree
({
hasUserLeaf
:
true
}
).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
const
{
code
,
data
}
=
res
;
_this
.
loading
=
false
;
_this
.
loading
=
false
;
if
(
code
==
200
)
{
if
(
code
==
200
)
{
...
...
src/views/vehicleManage/vehicleList.vue
View file @
b36a4e4
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
<el-col
:span=
"20"
>
<el-col
:span=
"20"
>
<el-row
v-for=
"(item, index) in snForm.deviceArr"
:key=
"index"
>
<el-row
v-for=
"(item, index) in snForm.deviceArr"
:key=
"index"
>
<i
@
click=
"removeDevice(index)"
class=
"el-icon-remove-outline"
style=
"position: absolute;font-size: 20px; margin-left:20px; line-height:30px;"
></i>
<i
v-show=
"!isViewMode"
@
click=
"removeDevice(index)"
class=
"el-icon-remove-outline"
style=
"position: absolute;font-size: 20px; margin-left:20px; line-height:30px;"
></i>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
<el-form-item
label=
"设备SN号"
label=
"设备SN号"
...
@@ -54,17 +54,17 @@
...
@@ -54,17 +54,17 @@
</el-row>
</el-row>
</el-col>
</el-col>
<el-col
:span=
"4"
>
<el-col
:span=
"4"
>
<i
@
click=
"addDevice"
class=
"el-icon-circle-plus-outline"
style=
"font-size: 20px; margin-left:20px; line-height:30px;"
></i>
<i
v-show=
"!isViewMode"
@
click=
"addDevice"
class=
"el-icon-circle-plus-outline"
style=
"font-size: 20px; margin-left:20px; line-height:30px;"
></i>
</el-col>
</el-col>
</el-row>
</el-row>
</el-form>
</el-form>
<rule-form
:ruleForm=
"vehicleForm"
:rules=
"vehicleRules"
:ruleData=
"vehicleData"
:labelWidth=
"'140px'"
ref=
'vehicleRuleForm'
></rule-form>
<rule-form
:ruleForm=
"vehicleForm"
:rules=
"vehicleRules"
:ruleData=
"vehicleData"
:labelWidth=
"'140px'"
ref=
'vehicleRuleForm'
></rule-form>
<el-row>
<el-row>
<el-col
:span=
"24"
>
<el-col
:span=
"24"
>
<el-form
label-width=
"120px"
style=
"min-height:20px"
v-loading=
"freqLoading"
>
<el-form
label-width=
"120px"
>
<el-form-item
label=
"操作日志"
v-show=
"
freqTableData.length
"
>
<el-form-item
label=
"操作日志"
v-show=
"
isViewMode
"
>
<table
class=
"freq_table"
>
<table
class=
"freq_table"
v-loading=
"freqLoading"
style=
"min-height: 40px"
>
<tr>
<tr
v-show=
"freqTableData.length"
>
<th
width=
"80"
>
调频时间
</th>
<th
width=
"80"
>
调频时间
</th>
<th
width=
"80"
>
调频模式
</th>
<th
width=
"80"
>
调频模式
</th>
<th
width=
"100"
>
上点频次
</th>
<th
width=
"100"
>
上点频次
</th>
...
@@ -89,6 +89,9 @@
...
@@ -89,6 +89,9 @@
</el-row>
</el-row>
</div>
</div>
</slot>
</slot>
<!-- <template v-slot:btn-front>
<el-button type="primary" @click="gotoMonitor()" size="small">监控</el-button>
</template> -->
</basic-dialog>
</basic-dialog>
<!-- 导入 -->
<!-- 导入 -->
<basic-dialog
:title=
"importTitle"
:isVisible=
"vehicleImport"
@
confirmDialog=
"handleConfirm('import')"
@
closeDialog=
"handleClose('import')"
>
<basic-dialog
:title=
"importTitle"
:isVisible=
"vehicleImport"
@
confirmDialog=
"handleConfirm('import')"
@
closeDialog=
"handleClose('import')"
>
...
@@ -231,11 +234,12 @@ export default {
...
@@ -231,11 +234,12 @@ export default {
value
:
'0'
value
:
'0'
}]
}]
},
},
{
/*
{
label: "设备状态",
label: "设备状态",
type: 'select',
type: 'select',
prop: 'deviceState',
prop: 'deviceState',
placeholder: '请选择',
placeholder: '请选择',
class: 'unvisible',
options: [{
options: [{
label: '全部',
label: '全部',
value: ''
value: ''
...
@@ -252,7 +256,7 @@ export default {
...
@@ -252,7 +256,7 @@ export default {
label: '在线',
label: '在线',
value: '3'
value: '3'
}]
}]
},
},
*/
{
{
label
:
'激活时间'
,
label
:
'激活时间'
,
type
:
'daterange'
,
type
:
'daterange'
,
...
@@ -722,12 +726,19 @@ export default {
...
@@ -722,12 +726,19 @@ export default {
vehicleListPromise
:
null
,
vehicleListPromise
:
null
,
isCreateMode
:
false
,
isCreateMode
:
false
,
freqLoading
:
false
,
freqLoading
:
false
,
isViewMode
:
false
,
};
};
},
},
watch
:
{
watch
:
{
filterText
(
val
)
{
filterText
(
val
)
{
this
.
$refs
.
tree
.
filter
(
val
);
},
this
.
_timeout
&&
clearTimeout
(
this
.
_timeout
)
this
.
_timeout
=
setTimeout
(()
=>
{
this
.
$refs
.
tree
.
filter
(
val
)
},
500
)
}
},
},
created
()
{
created
()
{
this
.
vehicleListPromise
=
new
Promise
((
resolve
,
reject
)
=>
{
this
.
vehicleListPromise
=
new
Promise
((
resolve
,
reject
)
=>
{
...
@@ -780,6 +791,7 @@ export default {
...
@@ -780,6 +791,7 @@ export default {
this
.
isReadonly
=
false
;
this
.
isReadonly
=
false
;
this
.
isCreateMode
=
true
this
.
isCreateMode
=
true
this
.
freqLoading
=
false
this
.
freqLoading
=
false
this
.
isViewMode
=
false
this
.
vehicleListPromise
.
then
(()
=>
{
this
.
vehicleListPromise
.
then
(()
=>
{
if
(
this
.
vehicleVisible
)
{
if
(
this
.
vehicleVisible
)
{
let
_list
=
_
.
cloneDeep
(
this
.
vehicleDefalutData
);
let
_list
=
_
.
cloneDeep
(
this
.
vehicleDefalutData
);
...
@@ -815,6 +827,7 @@ export default {
...
@@ -815,6 +827,7 @@ export default {
this
.
formLoading
=
true
this
.
formLoading
=
true
this
.
isCreateMode
=
false
this
.
isCreateMode
=
false
this
.
freqLoading
=
false
this
.
freqLoading
=
false
this
.
isViewMode
=
false
this
.
vehicleListPromise
.
then
(()
=>
{
this
.
vehicleListPromise
.
then
(()
=>
{
if
(
this
.
vehicleVisible
)
{
if
(
this
.
vehicleVisible
)
{
//let _list = this.vehicleDefalutData;
//let _list = this.vehicleDefalutData;
...
@@ -824,10 +837,13 @@ export default {
...
@@ -824,10 +837,13 @@ export default {
getVehicleInfo
({
id
:
scope
.
id
}).
then
((
res
)
=>
{
getVehicleInfo
({
id
:
scope
.
id
}).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
const
{
code
,
data
}
=
res
;
if
(
code
==
200
)
{
if
(
code
==
200
)
{
//动态创建车系、车型选择框
//动态创建车系、车型选择框
let
_list
=
this
.
creatSelect
(
data
);
let
_list
=
this
.
creatSelect
(
data
);
_list
.
map
((
k
)
=>
{
console
.
log
(
k
.
prop
)
_list
.
map
((
k
)
=>
{
console
.
log
(
k
.
prop
)
if
(
k
.
prop
===
"vin"
||
k
.
prop
==
"organizationName"
)
{
if
(
k
.
prop
===
"vin"
||
k
.
prop
==
"organizationName"
||
k
.
prop
==
"licensePlate"
)
{
this
.
$set
(
k
,
"disabled"
,
true
);
this
.
$set
(
k
,
"disabled"
,
true
);
}
else
{
}
else
{
if
(
k
.
prop
==
'brandId'
)
{
if
(
k
.
prop
==
'brandId'
)
{
...
@@ -840,10 +856,16 @@ export default {
...
@@ -840,10 +856,16 @@ export default {
this
.
vehicleData
=
_
.
cloneDeep
(
_list
);
this
.
vehicleData
=
_
.
cloneDeep
(
_list
);
this
.
vehicleArr
.
forEach
((
item
)
=>
{
this
.
vehicleArr
.
forEach
((
item
)
=>
{
if
(
item
==
"serveType"
)
if
(
item
==
"serveType"
)
{
this
.
$set
(
this
.
vehicleForm
,
item
,
data
[
item
]
+
""
);
this
.
$set
(
this
.
vehicleForm
,
item
,
data
[
item
]
+
""
);
else
this
.
$set
(
this
.
vehicleForm
,
item
,
data
[
item
]);
}
else
{
this
.
$set
(
this
.
vehicleForm
,
item
,
data
[
item
]);
if
(
item
==
'brandId'
)
{
this
.
changeCarBrand
(
data
.
brandId
,
true
)
}
}
});
});
this
.
vehicleForm
.
id
=
scope
.
id
;
this
.
vehicleForm
.
id
=
scope
.
id
;
this
.
snForm
.
deviceArr
=
data
.
deviceInfoDtos
.
map
((
item
,
i
)
=>
{
this
.
snForm
.
deviceArr
=
data
.
deviceInfoDtos
.
map
((
item
,
i
)
=>
{
//this.snRules['device'+i] = this.snRules['device0']
//this.snRules['device'+i] = this.snRules['device0']
...
@@ -866,14 +888,17 @@ export default {
...
@@ -866,14 +888,17 @@ export default {
this
.
vehicleVisible
=
!
this
.
vehicleVisible
;
this
.
vehicleVisible
=
!
this
.
vehicleVisible
;
this
.
isReadonly
=
true
;
this
.
isReadonly
=
true
;
this
.
isCreateMode
=
false
this
.
isCreateMode
=
false
this
.
isViewMode
=
true
this
.
vehicleListPromise
.
then
(()
=>
{
this
.
vehicleListPromise
.
then
(()
=>
{
if
(
this
.
vehicleVisible
)
{
if
(
this
.
vehicleVisible
)
{
getVehicleInfo
({
id
:
scope
.
id
}).
then
((
res
)
=>
{
getVehicleInfo
({
id
:
scope
.
id
}).
then
((
res
)
=>
{
const
{
code
,
data
}
=
res
;
const
{
code
,
data
}
=
res
;
if
(
code
==
200
)
{
if
(
code
==
200
)
{
//动态创建车系、车型选择框
//动态创建车系、车型选择框
let
_list
=
this
.
creatSelect
(
data
);
let
_list
=
this
.
creatSelect
(
data
);
_list
.
map
((
k
)
=>
{
_list
.
map
((
k
)
=>
{
this
.
$set
(
k
,
"disabled"
,
true
);
this
.
$set
(
k
,
"disabled"
,
true
);
if
(
k
.
prop
==
'brandId'
)
{
if
(
k
.
prop
==
'brandId'
)
{
...
@@ -883,9 +908,14 @@ export default {
...
@@ -883,9 +908,14 @@ export default {
this
.
vehicleData
=
_
.
cloneDeep
(
_list
);
this
.
vehicleData
=
_
.
cloneDeep
(
_list
);
this
.
vehicleArr
.
forEach
((
item
)
=>
{
this
.
vehicleArr
.
forEach
((
item
)
=>
{
if
(
item
==
"serveType"
)
if
(
item
==
"serveType"
)
{
this
.
$set
(
this
.
vehicleForm
,
item
,
data
[
item
]
+
""
);
this
.
$set
(
this
.
vehicleForm
,
item
,
data
[
item
]
+
""
);
else
this
.
$set
(
this
.
vehicleForm
,
item
,
data
[
item
]);
}
else
{
this
.
$set
(
this
.
vehicleForm
,
item
,
data
[
item
]);
if
(
item
==
'brandId'
)
{
this
.
changeCarBrand
(
data
.
brandId
,
'view'
)
}
}
});
});
this
.
snForm
.
deviceArr
=
data
.
deviceInfoDtos
.
map
((
item
,
i
)
=>
{
this
.
snForm
.
deviceArr
=
data
.
deviceInfoDtos
.
map
((
item
,
i
)
=>
{
...
@@ -1249,7 +1279,7 @@ export default {
...
@@ -1249,7 +1279,7 @@ export default {
},
},
// 监听车型选择
// 监听车型选择
changeCarBrand
(
e
)
{
changeCarBrand
(
e
,
flag
)
{
let
list
=
this
.
vehicleDefalutData
;
let
list
=
this
.
vehicleDefalutData
;
let
m
=
this
.
vehicleList
;
let
m
=
this
.
vehicleList
;
let
o
=
m
.
find
((
k
)
=>
k
.
id
==
e
);
let
o
=
m
.
find
((
k
)
=>
k
.
id
==
e
);
...
@@ -1274,8 +1304,35 @@ export default {
...
@@ -1274,8 +1304,35 @@ export default {
}
else
{
}
else
{
list
.
splice
(
idx
+
1
,
0
,
n
);
list
.
splice
(
idx
+
1
,
0
,
n
);
}
}
if
(
flag
)
{
let
row
=
list
.
find
((
item
)
=>
item
.
prop
===
'seriesId'
)
setTimeout
(()
=>
{
let
id
=
this
.
vehicleForm
.
typeId
this
.
changeCarModel
(
this
.
vehicleForm
.
seriesId
,
row
)
this
.
vehicleForm
.
typeId
=
id
},
500
)
}
list
.
map
((
k
)
=>
{
if
(
flag
==
'view'
)
{
this
.
$set
(
k
,
"disabled"
,
true
);
}
else
if
(
!
this
.
isCreateMode
){
if
(
k
.
prop
===
"vin"
||
k
.
prop
==
"organizationName"
||
k
.
prop
==
"licensePlate"
)
{
this
.
$set
(
k
,
"disabled"
,
true
);
}
else
{
this
.
$set
(
k
,
"disabled"
,
false
);
}
}
else
{
this
.
$set
(
k
,
"disabled"
,
false
);
}
});
this
.
$set
(
this
,
"vehicleDefalutData"
,
list
);
this
.
$set
(
this
,
"vehicleDefalutData"
,
list
);
this
.
vehicleData
=
_
.
cloneDeep
(
list
);
this
.
vehicleData
=
_
.
cloneDeep
(
list
);
delete
this
.
vehicleForm
.
seriesId
;
delete
this
.
vehicleForm
.
seriesId
;
delete
this
.
vehicleForm
.
typeId
;
delete
this
.
vehicleForm
.
typeId
;
},
},
...
@@ -1315,13 +1372,24 @@ export default {
...
@@ -1315,13 +1372,24 @@ export default {
}
else
{
}
else
{
list
.
splice
(
idx
+
1
,
0
,
n
);
list
.
splice
(
idx
+
1
,
0
,
n
);
}
}
list
.
map
((
k
)
=>
{
if
(
k
.
prop
===
'typeId'
)
{
if
(
this
.
isViewMode
){
this
.
$set
(
k
,
'disabled'
,
true
)
}
else
{
this
.
$set
(
k
,
'disabled'
,
false
)
}
}
});
this
.
$set
(
this
,
"vehicleDefalutData"
,
list
);
this
.
$set
(
this
,
"vehicleDefalutData"
,
list
);
this
.
vehicleData
=
_
.
cloneDeep
(
list
);
this
.
vehicleData
=
_
.
cloneDeep
(
list
);
delete
this
.
vehicleForm
.
typeId
;
delete
this
.
vehicleForm
.
typeId
;
},
},
// 动态创建选择框
// 动态创建选择框
creatSelect
(
data
)
{
creatSelect
(
data
)
{
console
.
log
(
data
)
let
nList
=
this
.
vehicleList
;
let
nList
=
this
.
vehicleList
;
let
_list
=
_
.
cloneDeep
(
this
.
vehicleDefalutData
);
let
_list
=
_
.
cloneDeep
(
this
.
vehicleDefalutData
);
//动态创建车系、车型选择框
//动态创建车系、车型选择框
...
@@ -1381,6 +1449,9 @@ export default {
...
@@ -1381,6 +1449,9 @@ export default {
}
else
{
}
else
{
_list
.
splice
(
idx
+
2
,
0
,
_models
);
_list
.
splice
(
idx
+
2
,
0
,
_models
);
}
}
//this.changeCarBrand(data.brandId)
//this.changeCarModel(data.seriesId, _series)
}
}
return
_list
;
return
_list
;
...
@@ -1405,6 +1476,21 @@ export default {
...
@@ -1405,6 +1476,21 @@ export default {
FreqModalChange
(
isOpen
){
FreqModalChange
(
isOpen
){
this
.
freqVisible
=
isOpen
;
this
.
freqVisible
=
isOpen
;
},
},
gotoMonitor
()
{
console
.
log
(
this
.
vehicleForm
)
/* let snO = {
name: this.vehicleForm.name,
standNo: this.vehicleForm.vin,
sn: this.vehicleForm.trackInfo.sn,
sourceType: this.vehicleForm.trackInfo.source === 0?'无线':'有线',
source: this.vehicleForm.trackInfo.source
}
//this.$router.push({ name: 'monitor', params: { snArr: [snO], mode: 'monitor' }})
let routeData = this.$router.resolve({ path: 'oEshield#/monitor/monitor', query: { snArr: JSON.stringify([snO]), mode: 'monitor' }});
// window.open(routeData.href, '_blank');
location.href = routeData.href */
}
},
},
components
:
{
components
:
{
...
@@ -1442,4 +1528,7 @@ export default {
...
@@ -1442,4 +1528,7 @@ export default {
padding
:
2px
;
padding
:
2px
;
text-align
:
center
;
text-align
:
center
;
}
}
.unvisible
{
visibility
:
hidden
;
}
</
style
>
</
style
>
\ No newline at end of file
\ No newline at end of file
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