Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-customization-system
/
oEshield
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 5d8202d7
authored
May 27, 2021
by
冒粤蓉
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
add fence
1 parent
8cc5ee82
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
304 additions
and
220 deletions
config/webpack.config.js
src/api/services/monitor.js
src/pages/monitor/editFence.vue
src/pages/monitor/fenceManagement.vue
src/pages/monitor/fenceMap.vue
src/pages/monitor/userList.vue
config/webpack.config.js
View file @
5d8202d
var
path
=
require
(
'path'
)
var
path
=
require
(
'path'
)
var
webpack
=
require
(
'webpack'
)
var
webpack
=
require
(
'webpack'
)
const
{
port
}
=
require
(
"../package"
);
const
MiniCssExtractPlugin
=
require
(
"mini-css-extract-plugin"
);
const
MiniCssExtractPlugin
=
require
(
"mini-css-extract-plugin"
);
const
OptimizeCSSAssetsPlugin
=
require
(
"optimize-css-assets-webpack-plugin"
);
const
OptimizeCSSAssetsPlugin
=
require
(
"optimize-css-assets-webpack-plugin"
);
...
@@ -13,6 +14,7 @@ const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPl
...
@@ -13,6 +14,7 @@ const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPl
//localhost:10500
//localhost:10500
const
IS_DEV_MODE
=
process
.
env
.
NODE_ENV
!==
'production'
const
IS_DEV_MODE
=
process
.
env
.
NODE_ENV
!==
'production'
const
getPublicPath
=
IS_DEV_MODE
?
''
:
'/ots/vue/build/'
;
const
getPublicPath
=
IS_DEV_MODE
?
''
:
'/ots/vue/build/'
;
const
resourcesPath
=
IS_DEV_MODE
?
`//localhost:
${
port
}
`
:
'http://eshield-perm.test.glsx.com.cn'
;
module
.
exports
=
{
module
.
exports
=
{
mode
:
IS_DEV_MODE
?
'development'
:
'production'
,
mode
:
IS_DEV_MODE
?
'development'
:
'production'
,
...
@@ -87,15 +89,16 @@ module.exports = {
...
@@ -87,15 +89,16 @@ module.exports = {
test
:
/
\.(
png|jpg|gif|svg
)
$/
,
test
:
/
\.(
png|jpg|gif|svg
)
$/
,
loader
:
'file-loader'
,
loader
:
'file-loader'
,
options
:
{
options
:
{
name
:
'images/[name].[ext]?[hash]'
name
:
'images/[name].[ext]?[hash]'
,
publicPath
:
resourcesPath
}
}
},
},
{
{
test
:
/
\.(
woff2
?
|eot|ttf|otf
)(\?
.*
)?
$/
,
test
:
/
\.(
woff2
?
|eot|ttf|otf
)(\?
.*
)?
$/
,
loader
:
'url-loader'
,
loader
:
'url-loader'
,
query
:
{
options
:
{
limit
:
10000
,
limit
:
10000
,
publicPath
:
'../'
,
publicPath
:
resourcesPath
,
name
:
'fonts/[name].[hash:7].[ext]'
name
:
'fonts/[name].[hash:7].[ext]'
}
}
}
}
...
...
src/api/services/monitor.js
View file @
5d8202d
import
request
from
'./request'
import
request
from
'./request'
export
default
{
export
default
{
/*新虎哥围栏管理*/
getFenceList
(
params
=
{})
{
return
request
(
params
,
'/trialdrive/fence/search'
,
'get'
)
},
deleteFence
(
params
=
{})
{
return
request
(
params
,
'/trialdrive/fence/delete'
,
'get'
)
},
saveFence
(
params
=
{})
{
return
request
(
params
,
'/trialdrive/fence/add'
,
'post'
)
},
updateFence
(
params
=
{})
{
return
request
(
params
,
'/trialdrive/fence/edit'
,
'post'
)
},
getFenceDetailById
(
params
=
{})
{
return
request
(
params
,
'/trialdrive/fence/info'
,
'get'
)
},
getVehicleSnList
(
params
=
{})
{
return
request
(
params
,
'/trialdrive/vehicle/linksns/search'
,
'get'
)
},
/*新虎哥特约店列表*/
getSpecialShopList
(
params
=
{})
{
return
request
(
params
,
'/trialdrive/specialshop/shopusers'
,
'get'
)
},
// 旧虎哥
// 旧虎哥
/*车辆监控*/
/*车辆监控*/
// getCriteriaTreeList (request = {}) {
// getCriteriaTreeList (request = {}) {
...
@@ -77,12 +101,4 @@ export default {
...
@@ -77,12 +101,4 @@ export default {
// getFenceSnsList(request = {}) {
// getFenceSnsList(request = {}) {
// return api.get('ecFence/getFenceSnsList', request)
// return api.get('ecFence/getFenceSnsList', request)
// },
// },
/*新虎哥围栏管理*/
getFenceList
(
params
=
{})
{
return
request
(
params
,
'/trialdrive/fence/search'
,
'get'
)
},
deleteFence
(
params
=
{})
{
return
request
(
params
,
'/trialdrive/fence/delete'
,
'get'
)
}
}
}
src/pages/monitor/editFence.vue
View file @
5d8202d
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
<fence-map
<fence-map
:mapData=
"mapData"
:mapData=
"mapData"
@
onUpdateMapData=
"updateMapData"
@
onUpdateMapData=
"updateMapData"
:readonlyStatus=
"readonlyStatus"
ref=
"fenceMap"
ref=
"fenceMap"
>
>
</fence-map>
</fence-map>
...
@@ -29,36 +30,40 @@
...
@@ -29,36 +30,40 @@
</el-form-item>
</el-form-item>
</el-col>
-->
</el-col>
-->
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"围栏名称"
prop=
"
electricF
enceName"
>
<el-form-item
label=
"围栏名称"
prop=
"
f
enceName"
>
<el-input
v-model
.
trim=
"form.
electricFenceName"
maxlength=
"200
"
></el-input>
<el-input
v-model
.
trim=
"form.
fenceName"
maxlength=
"200"
:disabled=
"readonlyStatus
"
></el-input>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"围栏类型"
>
<el-form-item
label=
"围栏类型"
prop=
"bizFenceType"
>
<el-radio
v-model=
"form.bizFenceType"
:label=
"0"
:disabled=
"isEditMode"
>
报警型
</el-radio>
<el-radio
v-model=
"form.bizFenceType"
label=
"12"
:disabled=
"readonlyStatus"
>
试驾围栏
</el-radio>
<
el-radio
v-model=
"form.bizFenceType"
:label=
"1"
:disabled=
"isEditMode"
>
试乘试驾型
</el-radio
>
<
!--
<el-radio
v-model=
"form.bizFenceType"
:label=
"1"
:disabled=
"isEditMode"
>
试乘试驾型
</el-radio>
--
>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row>
<el-row>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"区域类型"
class=
"is-required
"
>
<el-form-item
label=
"区域类型"
prop=
"shapeType
"
>
<el-radio-group
v-model=
"form.shapeType"
@
change=
"shapeTypeChange"
>
<el-radio-group
v-model=
"form.shapeType"
@
change=
"shapeTypeChange"
>
<!--
<el-radio-button
label=
"
3"
value=
"3
"
>
行政区域
</el-radio-button>
-->
<!--
<el-radio-button
label=
"
4"
value=
"4
"
>
行政区域
</el-radio-button>
-->
<el-radio-button
label=
"
2"
value=
"2
"
>
圆形
</el-radio-button>
<el-radio-button
label=
"
1"
value=
"1"
:disabled=
"readonlyStatus
"
>
圆形
</el-radio-button>
<el-radio-button
label=
"
5"
value=
"5
"
>
多边形
</el-radio-button>
<el-radio-button
label=
"
3"
value=
"3"
:disabled=
"readonlyStatus
"
>
多边形
</el-radio-button>
</el-radio-group>
</el-radio-group>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
class=
"special-shop-input"
label=
"特约店"
prop=
"specialShopVal"
>
<el-form-item
class=
"special-shop-input"
label=
"特约店"
prop=
"specialShop"
>
<el-select
v-model=
"form.specialShopVal"
filterable
placeholder=
"请选择"
size=
"small"
style=
"width:100px;"
>
<el-cascader
<el-option
v-model=
"form.specialShopId"
v-for=
"item in specialShopOptions"
:value=
"form.specialShopName"
:key=
"item.departmentName"
placeholder=
"请选择"
:value=
"item.departmentName"
>
:options=
"specialShopOptions"
</el-option>
:props=
"specialShopDefaultProps"
</el-select>
filterable
@
change=
"handleSpecialShopChange"
size=
"small"
:disabled=
"readonlyStatus"
></el-cascader>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -174,7 +179,7 @@
...
@@ -174,7 +179,7 @@
</el-col>
-->
</el-col>
-->
<!-- </div> -->
<!-- </div> -->
<
!-- <div class="tab-content shape_tip" v-show="form.shapeType==5">*注:地图任意位置,单击新增双击结束绘制。</div> --
>
<
div
class=
"tab-content shape_tip"
v-show=
"form.shapeType==3"
>
*注:地图任意位置,单击新增双击结束绘制。
</div
>
<!-- </el-col> -->
<!-- </el-col> -->
<!-- <el-col :span="12">
<!-- <el-col :span="12">
<el-form-item label="短信通知" prop="msgtel">
<el-form-item label="短信通知" prop="msgtel">
...
@@ -188,9 +193,9 @@
...
@@ -188,9 +193,9 @@
</el-form>
</el-form>
</div>
</div>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
label=
"
监控
对象"
v-loadmore=
'loadMore'
>
<el-tab-pane
label=
"
关联
对象"
v-loadmore=
'loadMore'
>
<div
style=
"float: right;"
>
<div
style=
"float: right;"
>
<el-button
type=
"primary"
@
click=
"userDate"
size=
"small"
:loading=
"submitting"
>
关联用户
</el-button>
<el-button
v-if=
"!readonlyStatus"
type=
"primary"
@
click=
"userDate"
size=
"small"
:loading=
"submitting"
>
关联用户
</el-button>
<!-- <el-button size="small" @click="deleteFenceModel">批量删除</el-button> -->
<!-- <el-button size="small" @click="deleteFenceModel">批量删除</el-button> -->
</div>
</div>
<el-table
<el-table
...
@@ -202,17 +207,17 @@
...
@@ -202,17 +207,17 @@
@
selection-change=
"selectChange"
@
selection-change=
"selectChange"
style=
"width: 100%;margin-bottom:40px"
>
style=
"width: 100%;margin-bottom:40px"
>
<el-table-column
type=
"selection"
width=
"40"
align=
"center"
></el-table-column>
<el-table-column
:disabled=
"readonlyStatus"
type=
"selection"
width=
"40"
align=
"center"
></el-table-column>
<el-table-column
fixed
type=
"index"
label=
"序号"
:index=
"getIndex"
align=
"center"
width=
"70"
></el-table-column>
<el-table-column
fixed
type=
"index"
label=
"序号"
:index=
"getIndex"
align=
"center"
width=
"70"
></el-table-column>
<el-table-column
fixed
prop=
"name"
label=
"姓名"
min-width=
"80"
align=
"center"
></el-table-column>
<el-table-column
fixed
prop=
"name"
label=
"姓名"
min-width=
"80"
align=
"center"
></el-table-column>
<el-table-column
fixed
prop=
"
standno
"
label=
"车架号"
min-width=
"160"
align=
"center"
></el-table-column>
<el-table-column
fixed
prop=
"
vin
"
label=
"车架号"
min-width=
"160"
align=
"center"
></el-table-column>
<el-table-column
prop=
"sn"
label=
"设备号"
min-width=
"160"
align=
"center"
>
<el-table-column
prop=
"sn"
label=
"设备号"
min-width=
"160"
align=
"center"
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"
t
ime"
label=
"GPS时间"
min-width=
"100"
align=
"center"
>
<el-table-column
prop=
"
gpsT
ime"
label=
"GPS时间"
min-width=
"100"
align=
"center"
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"address"
label=
"位置"
min-width=
"200"
align=
"center"
></el-table-column>
<el-table-column
prop=
"address"
label=
"位置"
min-width=
"200"
align=
"center"
></el-table-column>
...
@@ -223,13 +228,13 @@
...
@@ -223,13 +228,13 @@
</el-table>
</el-table>
</el-tab-pane>
</el-tab-pane>
</el-tabs>
</el-tabs>
<div
class=
"tab_ctrl"
>
<
!-- <
div class="tab_ctrl">
<el-button size="small" type="primary" :fenceMapModalVisible="fenceMapModalVisible" @click="changeStatus" style="width: 65px;">展开</el-button>
<el-button size="small" type="primary" :fenceMapModalVisible="fenceMapModalVisible" @click="changeStatus" style="width: 65px;">展开</el-button>
<i :class="!hideTab?'fa fa-angle-double-up':'fa fa-angle-double-down'" style="position: absolute;top:9px;left:5px;color:#fff;"></i>
<i :class="!hideTab?'fa fa-angle-double-up':'fa fa-angle-double-down'" style="position: absolute;top:9px;left:5px;color:#fff;"></i>
</div>
</div>
-->
</div>
</div>
<div
class=
"fenceModalfooter"
>
<div
class=
"fenceModalfooter"
>
<el-button
type=
"primary"
@
click=
"saveFence"
size=
"small"
:loading=
"submitting"
>
{{btnText}}
</el-button>
<el-button
v-if=
"!readonlyStatus"
type=
"primary"
@
click=
"saveFence"
size=
"small"
:loading=
"submitting"
>
{{btnText}}
</el-button>
<el-button
@
click=
"cancel"
size=
"small"
>
取消
</el-button>
<el-button
@
click=
"cancel"
size=
"small"
>
取消
</el-button>
</div>
</div>
<user-list
<user-list
...
@@ -259,18 +264,18 @@ export default{
...
@@ -259,18 +264,18 @@ export default{
props
:
[
'fenceModalVisible'
,
'fenceId'
],
props
:
[
'fenceModalVisible'
,
'fenceId'
],
data
(){
data
(){
let
checkFenceName
=
(
rule
,
vaule
,
cb
)
=>
{
let
checkFenceName
=
(
rule
,
vaule
,
cb
)
=>
{
if
(
typeof
this
.
restainFenceName
!=
'undefined'
&&
this
.
form
.
electricFenceName
===
this
.
restainFenceName
){
if
(
typeof
this
.
restainFenceName
!=
'undefined'
&&
this
.
form
.
fenceName
===
this
.
restainFenceName
){
cb
();
}
MONITOR_SERVICE
.
checkFenceName
({
name
:
this
.
form
.
electricFenceName
}).
then
((
res
)
=>
{
if
(
res
.
returnCode
==
0
){
if
(
res
.
data
.
isExist
==
1
){
cb
(
new
Error
(
'该围栏名已存在,请重新输入!'
))
}
else
{
cb
();
cb
();
}
}
}
// MONITOR_SERVICE.checkFenceName({name: this.form.fenceName}).then((res)=>{
})
// if(res.returnCode == 0){
// if(res.data.isExist == 1){
// cb(new Error('该围栏名已存在,请重新输入!'))
// }else{
// cb();
// }
// }
// })
}
}
let
checkMonitorTime
=
(
rule
,
vaule
,
cb
)
=>
{
let
checkMonitorTime
=
(
rule
,
vaule
,
cb
)
=>
{
if
(
this
.
form
.
electricTimeFenceType
==
""
){
if
(
this
.
form
.
electricTimeFenceType
==
""
){
...
@@ -280,8 +285,16 @@ export default{
...
@@ -280,8 +285,16 @@ export default{
}
}
}
}
let
checkSpecialShop
=
(
rule
,
vaule
,
cb
)
=>
{
if
(
this
.
form
.
specialShopId
==
""
){
cb
(
new
Error
(
'请选择特约店'
))
}
else
{
cb
();
}
}
let
checkArea
=
(
rule
,
vaule
,
cb
)
=>
{
let
checkArea
=
(
rule
,
vaule
,
cb
)
=>
{
if
(
this
.
form
.
shapeType
==
3
&&
!
this
.
form
.
areaCode
){
if
(
this
.
form
.
shapeType
==
1
&&
!
this
.
form
.
areaCode
){
cb
(
new
Error
(
'请选择行政区域'
))
cb
(
new
Error
(
'请选择行政区域'
))
}
else
{
}
else
{
cb
();
cb
();
...
@@ -385,99 +398,109 @@ export default{
...
@@ -385,99 +398,109 @@ export default{
areaCode
:
null
,
areaCode
:
null
,
btnText
:
'保存'
,
btnText
:
'保存'
,
specialShopOptions
:
[],
specialShopOptions
:
[],
specialShopDefaultProps
:
{
children
:
'children'
,
label
:
'label'
,
value
:
'id'
},
readonlyStatus
:
false
,
form
:
{
form
:
{
electricFenceName
:
''
,
fenceName
:
''
,
bizFenceType
:
'12'
,
shapeType
:
1
,
specialShopId
:
''
,
specialShopName
:
''
,
// fenceNo: '',
electricFenceType
:
1
,
electricFenceType
:
1
,
startTime
:
''
,
endTime
:
''
,
des
:
''
,
areaCode
:
''
,
areaCode
:
''
,
specialShopVal
:
''
analysisAddress
:
''
,
// fenceNo: '',
lng
:
''
,
// electricFenceName: '',
lat
:
''
,
// electricFenceType: 1,
radius
:
1000
,
// startTime: '',
status
:
1
,
// endTime: '',
transferError
:
false
,
// des: '',
timeType
:
2
,
// shapeType: 2,
electricTimeFenceType
:
''
,
// areaCode: '',
electricTimeFenceTypes
:
[
// analysisAddress: '',
{
// lng: '',
value
:
1
,
// lat: '',
label
:
'1个月'
// radius: 1000,
},
{
// status: 1,
value
:
2
,
// bizFenceType: 0,
label
:
'2个月'
// transferError: false,
},
{
// timeType:2,
value
:
3
,
// electricTimeFenceType:'',
label
:
'3个月'
// electricTimeFenceTypes: [
},
{
// {
value
:
4
,
// value: 1,
label
:
'4个月'
// label: '1个月'
},
{
// }, {
value
:
5
,
// value: 2,
label
:
'5个月'
// label: '2个月'
},
{
// }, {
value
:
6
,
// value: 3,
label
:
'6个月'
// label: '3个月'
}
// }, {
],
// value: 4,
dateRange
:
[],
// label: '4个月'
msgtel
:
''
// }, {
// value: 5,
// label: '5个月'
// }, {
// value: 6,
// label: '6个月'
// }
// ],
// dateRange: [],
// msgtel: ''
},
},
restainFenceName
:
''
,
restainFenceName
:
''
,
rules
:
{
rules
:
{
fenceNo
:
[
//
fenceNo: [
{
required
:
true
,
message
:
'围栏编号不能为空'
,
trigger
:
'blur'
},
//
{required: true, message: '围栏编号不能为空', trigger: 'blur'},
],
//
],
electricF
enceName
:
[
f
enceName
:
[
{
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'
},
{
validator
:
checkFenceName
,
trigger
:
'blur'
}
//
{validator: checkFenceName, trigger: 'blur'}
],
],
electric
FenceType
:
[
biz
FenceType
:
[
{
required
:
true
,
message
:
'
'
,
trigger
:
'blur
'
}
{
required
:
true
,
message
:
'
请选择围栏类型'
,
trigger
:
'change
'
}
],
],
electricTimeFenceType
:[
specialShop
:
[
{
required
:
true
,
validator
:
checkMonitorTime
,
trigger
:
'change'
}
{
required
:
true
,
validator
:
checkSpecialShop
,
trigger
:
'change'
}
],
specialShopVal
:
[
{
required
:
true
,
message
:
'请选择特约店'
}
],
],
shapeType
:
[
{
required
:
true
}
]
// electricFenceType: [
// {required: true, message: '', trigger: 'blur'}
// ],
// electricTimeFenceType:[
// {required: true, validator: checkMonitorTime, trigger: 'change'}
// ],
/*dateRange: [
/*dateRange: [
{validator: checkMonitorTime, trigger: 'change'}
{validator: checkMonitorTime, trigger: 'change'}
],*/
],*/
area
:
[
//
area: [
{
validator
:
checkArea
,
trigger
:
'change'
}
//
{validator: checkArea, trigger: 'change'}
],
//
],
lng
:
[
//
lng: [
{
validator
:
checkLng
,
trigger
:
'blur'
}
//
{validator: checkLng, trigger: 'blur'}
],
//
],
lat
:
[
//
lat: [
{
validator
:
checkLat
,
trigger
:
'blur'
}
//
{validator: checkLat, trigger: 'blur'}
],
//
],
analysisAddress
:
[
//
analysisAddress: [
{
validator
:
checkTransferAddr
,
trigger
:
'change'
}
//
{validator: checkTransferAddr, trigger: 'change'}
],
//
],
radius
:
[
//
radius: [
{
validator
:
checkRadius
,
trigger
:
'blur'
}
//
{validator: checkRadius, trigger: 'blur'}
],
//
],
daterange
:
[{
validator
:
checkDaterange
}],
//
daterange: [{validator: checkDaterange}],
timeType
:[{
required
:
true
,
message
:
'请选择监控时间'
,
trigger
:
'change'
}],
//
timeType:[{required: true, message: '请选择监控时间', trigger: 'change'}],
msgtel
:
[
//
msgtel: [
{
validator
:
checkMsgtel
,
trigger
:
'blur'
}
//
{validator: checkMsgtel, trigger: 'blur'}
],
//
],
/*map: [
/*map: [
{validator: checkMap, trigger: 'blur'}
{validator: checkMap, trigger: 'blur'}
]*/
]*/
},
},
transferTimeoutId
:
undefined
,
transferTimeoutId
:
undefined
,
geocoder
:
null
,
geocoder
:
null
,
transferFlag
:
null
,
transferFlag
:
null
,
...
@@ -518,6 +541,7 @@ export default{
...
@@ -518,6 +541,7 @@ export default{
created
(){
created
(){
let
_this
=
this
;
let
_this
=
this
;
//this.getFenceSnsList();
//this.getFenceSnsList();
this
.
getSpecialShopList
();
window
.
Vue
.
directive
(
'loadmore'
,
{
window
.
Vue
.
directive
(
'loadmore'
,
{
bind
(
el
,
binding
)
{
bind
(
el
,
binding
)
{
const
selectWrap
=
el
.
querySelector
(
'.el-table__body-wrapper'
)
const
selectWrap
=
el
.
querySelector
(
'.el-table__body-wrapper'
)
...
@@ -527,18 +551,31 @@ export default{
...
@@ -527,18 +551,31 @@ export default{
if
(
scrollDistance
==
sign
)
{
if
(
scrollDistance
==
sign
)
{
//binding.value()
//binding.value()
//console.log(sign)
//console.log(sign)
_this
.
currentPage
++
;
//
_this.currentPage++;
_this
.
getFenceSnsList
(
_this
.
fenceId
);
//
_this.getFenceSnsList(_this.fenceId);
}
}
})
})
}
}
})
})
},
},
mounted
()
{
mounted
()
{
this
.
init
();
this
.
listener
();
},
},
methods
:
{
methods
:
{
listener
()
{
const
state
=
history
.
state
;
if
(
!
state
)
{
this
.
init
();
return
;
}
const
{
fenceId
,
readonlyStatus
}
=
state
;
if
(
readonlyStatus
)
{
this
.
readonlyStatus
=
readonlyStatus
;
this
.
fenceId
=
fenceId
;
}
this
.
init
();
},
init
(){
init
(){
const
{
id
,
btnText
}
=
this
.
$route
.
query
;
const
{
id
,
btnText
}
=
this
.
$route
.
query
;
if
(
id
)
{
if
(
id
)
{
...
@@ -547,7 +584,6 @@ export default{
...
@@ -547,7 +584,6 @@ export default{
}
}
if
(
typeof
this
.
fenceId
!=
'undefined'
){
if
(
typeof
this
.
fenceId
!=
'undefined'
){
this
.
getFenceDetail
(
this
.
fenceId
);
this
.
getFenceDetail
(
this
.
fenceId
);
this
.
getFenceSnsList
(
this
.
fenceId
);
}
else
{
}
else
{
// 围栏编号无意义 屏蔽
// 围栏编号无意义 屏蔽
// MONITOR_SERVICE.getNewFenceId().then((res)=>{
// MONITOR_SERVICE.getNewFenceId().then((res)=>{
...
@@ -567,9 +603,17 @@ export default{
...
@@ -567,9 +603,17 @@ export default{
this
.
restainFenceName
=
undefined
;
this
.
restainFenceName
=
undefined
;
}
}
},
},
getSpecialShopList
()
{
MONITOR_SERVICE
.
getSpecialShopList
().
then
(
res
=>
{
const
{
code
,
data
}
=
res
;
if
(
code
==
200
)
{
this
.
specialShopOptions
=
data
;
}
})
},
getFenceDetail
(
id
){
getFenceDetail
(
id
){
MONITOR_SERVICE
.
getFenceDetailById
({
i
d
:
id
}).
then
((
res
)
=>
{
MONITOR_SERVICE
.
getFenceDetailById
({
fenceI
d
:
id
}).
then
((
res
)
=>
{
if
(
res
.
returnCode
==
0
){
if
(
res
.
code
==
20
0
){
const
form
=
this
.
form
;
const
form
=
this
.
form
;
const
data
=
res
.
data
;
const
data
=
res
.
data
;
for
(
let
key
in
data
){
for
(
let
key
in
data
){
...
@@ -577,8 +621,12 @@ export default{
...
@@ -577,8 +621,12 @@ export default{
}
}
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
.
electricFenceName
;
this
.
restainFenceName
=
form
.
fenceName
;
this
.
form
.
msgtel
=
data
.
telNumbers
this
.
form
.
fenceName
=
form
.
fenceName
;
this
.
form
.
msgtel
=
data
.
telNumbers
;
this
.
form
.
specialShopId
=
data
.
shopId
;
this
.
form
.
specialShopName
=
data
.
shopName
;
this
.
getFenceSnsList
(
id
,
''
,
data
.
snList
)
if
(
form
.
shapeType
===
2
){
if
(
form
.
shapeType
===
2
){
this
.
mapData
=
{
this
.
mapData
=
{
...
@@ -587,12 +635,12 @@ export default{
...
@@ -587,12 +635,12 @@ export default{
lat
:
form
.
lat
,
lat
:
form
.
lat
,
radius
:
form
.
radius
,
radius
:
form
.
radius
,
}
}
}
else
if
(
form
.
shapeType
===
3
){
}
else
if
(
form
.
shapeType
===
1
){
this
.
mapData
=
{
this
.
mapData
=
{
fenceType
:
'area'
,
fenceType
:
'area'
,
areaCode
:
this
.
form
.
areaCode
areaCode
:
this
.
form
.
areaCode
}
}
}
else
if
(
form
.
shapeType
===
5
){
}
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
]]
...
@@ -610,47 +658,50 @@ export default{
...
@@ -610,47 +658,50 @@ export default{
}
}
});
});
},
},
getFenceSnsList
(
id
,
cur
){
getFenceSnsList
(
id
,
cur
,
resData
){
let
params
=
{};
let
params
=
{};
if
(
this
.
currentPage
>
this
.
maxPage
){
params
.
id
=
id
;
return
;
this
.
tableData
=
this
.
tableData
.
concat
(
resData
);
}
this
.
$refs
.
userList
.
reset
(
resData
);
if
(
cur
){
// if(this.currentPage>this.maxPage){
// return;
// }
// if(cur){
params
.
currentPage
=
cur
;
//
params.currentPage =cur;
params
.
pageSize
=
this
.
pageSize
;
//
params.pageSize = this.pageSize;
}
else
{
//
}else{
params
.
currentPage
=
this
.
currentPage
;
//
params.currentPage =this.currentPage;
params
.
pageSize
=
this
.
pageSize
;
//
params.pageSize = this.pageSize;
}
//
}
params
.
id
=
id
;
//
params.id=id;
MONITOR_SERVICE
.
getFenceSnsList
(
params
).
then
((
res
)
=>
{
//
MONITOR_SERVICE.getFenceSnsList(params).then((res)=>{
if
(
res
.
draw
==
0
){
// if(res.c
== 0){
this
.
tableData
=
this
.
tableData
.
concat
(
res
.
d
ata
);
// this.tableData = this.tableData.concat(resD
ata);
this
.
maxPage
=
Math
.
ceil
(
res
.
recordsTotal
/
this
.
pageSize
);
// this.maxPage = Math.ceil(resData
.recordsTotal/this.pageSize);
this
.
$refs
.
userList
.
reset
(
res
.
d
ata
);
// this.$refs.userList.reset(resD
ata);
}
//
}
});
//
});
},
},
shapeTypeChange
(){
shapeTypeChange
(){
//console.log(this.form.shapeType)
//console.log(this.form.shapeType)
if
(
this
.
form
.
shapeType
==
3
){
if
(
this
.
form
.
shapeType
==
4
){
//this.$refs.clearArea.rest();
//this.$refs.clearArea.rest();
this
.
$refs
.
fenceForm
.
clearValidate
();
this
.
$refs
.
fenceForm
.
clearValidate
();
//this.$refs.fenceMap.updateSeach(this.form.areaCode);
//this.$refs.fenceMap.updateSeach(this.form.areaCode);
this
.
$refs
.
fenceMap
.
updateFence
({
this
.
$refs
.
fenceMap
.
updateFence
({
fenceType
:
'area'
fenceType
:
'area'
});
});
}
else
if
(
this
.
form
.
shapeType
==
2
){
}
else
if
(
this
.
form
.
shapeType
==
1
){
this
.
$refs
.
fenceMap
.
updateFence
({
this
.
$refs
.
fenceMap
.
updateFence
({
fenceType
:
'circle'
fenceType
:
'circle'
});
});
}
else
if
(
this
.
form
.
shapeType
==
5
){
}
else
if
(
this
.
form
.
shapeType
==
3
){
this
.
$refs
.
fenceMap
.
updateFence
({
this
.
$refs
.
fenceMap
.
updateFence
({
fenceType
:
'polygon'
fenceType
:
'polygon'
});
});
...
@@ -736,7 +787,7 @@ export default{
...
@@ -736,7 +787,7 @@ export default{
}
}
},
},
saveFence
(){
saveFence
(){
if
(
this
.
form
.
shapeType
==
5
){
if
(
this
.
form
.
shapeType
==
3
){
if
(
this
.
polygonPath
.
length
===
0
){
if
(
this
.
polygonPath
.
length
===
0
){
this
.
$message
({
this
.
$message
({
message
:
'请绘制围栏'
,
message
:
'请绘制围栏'
,
...
@@ -749,17 +800,16 @@ export default{
...
@@ -749,17 +800,16 @@ export default{
if
(
valid
){
if
(
valid
){
this
.
submitting
=
true
;
this
.
submitting
=
true
;
if
(
typeof
this
.
fenceId
!=
'undefined'
){
if
(
typeof
this
.
fenceId
!=
'undefined'
){
const
params
=
this
.
getParams
();
const
params
=
this
.
getParams
();
params
.
id
=
this
.
fenceId
;
params
.
id
=
this
.
fenceId
;
MONITOR_SERVICE
.
updateFence
(
JSON
.
stringify
(
params
)).
then
((
res
)
=>
{
MONITOR_SERVICE
.
updateFence
(
JSON
.
stringify
(
params
)).
then
((
res
)
=>
{
if
(
res
.
returnCode
==
0
){
if
(
res
.
code
==
20
0
){
//this.closeDialog();
//this.closeDialog();
this
.
$message
({
this
.
$message
({
message
:
res
.
message
,
message
:
'提交成功'
,
type
:
'success'
type
:
'success'
});
});
}
}
...
@@ -767,12 +817,12 @@ export default{
...
@@ -767,12 +817,12 @@ export default{
this
.
$router
.
push
({
path
:
"fenceManagement"
})
this
.
$router
.
push
({
path
:
"fenceManagement"
})
});
});
}
else
{
}
else
{
MONITOR_SERVICE
.
saveFence
(
JSON
.
stringify
(
this
.
getParams
()
)).
then
((
res
)
=>
{
MONITOR_SERVICE
.
saveFence
(
this
.
getParams
(
)).
then
((
res
)
=>
{
if
(
res
.
returnCode
==
0
){
if
(
res
.
code
==
20
0
){
//this.closeDialog();
//this.closeDialog();
this
.
$message
({
this
.
$message
({
message
:
res
.
message
,
message
:
'提交成功'
,
type
:
'success'
type
:
'success'
});
});
}
}
...
@@ -794,28 +844,28 @@ export default{
...
@@ -794,28 +844,28 @@ export default{
const
form
=
this
.
form
;
const
form
=
this
.
form
;
const
params
=
{};
const
params
=
{};
params
.
fenceNo
=
form
.
fenceNo
;
//
params.fenceNo = form.fenceNo;
params
.
electricFenceName
=
form
.
electricF
enceName
;
params
.
fenceName
=
form
.
f
enceName
;
params
.
electricFenceType
=
form
.
electricFenceType
;
//
params.electricFenceType = form.electricFenceType;
//params.electricTimeFenceType = form.electricTimeFenceType
//params.electricTimeFenceType = form.electricTimeFenceType
//params.startTime = form.startTime;
//params.startTime = form.startTime;
//params.endTime = form.endTime;
//params.endTime = form.endTime;
params
.
des
=
form
.
des
;
params
.
shopId
=
form
.
specialShopId
;
// params.des = form.des;
params
.
shapeType
=
form
.
shapeType
;
params
.
shapeType
=
form
.
shapeType
;
params
.
timeType
=
form
.
timeType
;
params
.
timeType
=
form
.
timeType
;
if
(
params
.
shapeType
==
3
){
if
(
params
.
shapeType
==
3
){
params
.
areaCode
=
form
.
areaCode
;
params
.
areaCode
=
form
.
areaCode
;
params
.
areaString
=
form
.
areaString
;
params
.
areaString
=
form
.
areaString
;
}
else
if
(
params
.
shapeType
==
2
){
}
else
if
(
params
.
shapeType
==
2
){
params
.
lng
=
form
.
lng
;
params
.
lnglat
=
`
${
form
.
lng
}
,
${
form
.
lat
}
`
;
params
.
lat
=
form
.
lat
;
params
.
radius
=
form
.
radius
;
params
.
radius
=
form
.
radius
;
params
.
analysisAddress
=
form
.
analysisAddress
;
params
.
analysisAddress
=
form
.
analysisAddress
;
}
else
if
(
params
.
shapeType
==
5
){
}
else
if
(
params
.
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;
if
(
this
.
tableData
){
if
(
this
.
tableData
){
params
.
snList
=
this
.
tableData
params
.
snList
=
this
.
tableData
}
else
{
}
else
{
...
@@ -944,6 +994,13 @@ export default{
...
@@ -944,6 +994,13 @@ export default{
radius
:
this
.
form
.
radius
radius
:
this
.
form
.
radius
});
});
this
.
transfer
()
this
.
transfer
()
},
handleSpecialShopChange
(
val
)
{
// 特约店级联选项
if
(
val
&&
val
.
length
>
1
)
{
this
.
form
.
specialShopId
=
val
[
1
];
console
.
log
(
this
.
form
.
specialShopId
)
}
}
}
},
},
components
:{
components
:{
...
...
src/pages/monitor/fenceManagement.vue
View file @
5d8202d
...
@@ -390,7 +390,7 @@ export default{
...
@@ -390,7 +390,7 @@ export default{
type
:
'warning'
type
:
'warning'
}).
then
(()
=>
{
}).
then
(()
=>
{
MONITOR_SERVICE
.
deleteFence
({
fenceId
:
id
}).
then
((
res
)
=>
{
MONITOR_SERVICE
.
deleteFence
({
fenceId
:
id
}).
then
((
res
)
=>
{
if
(
res
.
returnCode
==
0
){
if
(
res
.
code
==
20
0
){
this
.
$message
({
this
.
$message
({
message
:
res
.
message
,
message
:
res
.
message
,
type
:
'success'
type
:
'success'
...
...
src/pages/monitor/fenceMap.vue
View file @
5d8202d
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
<div
class=
"map-seacrh-wrap"
>
<div
class=
"map-seacrh-wrap"
>
<!-- <input type="text" id="fenceMapSearch"> -->
<!-- <input type="text" id="fenceMapSearch"> -->
<el-input
placeholder=
"请输入位置"
id=
"fenceMapSearch"
size=
"small"
v-model=
"fenceMapSearch"
>
<el-input
placeholder=
"请输入位置"
id=
"fenceMapSearch"
size=
"small"
v-model=
"fenceMapSearch"
:disabled=
"readonlyStatus"
>
<
template
slot=
"prepend"
>
搜索
</
template
>
<
template
slot=
"prepend"
>
搜索
</
template
>
<!-- <el-button slot="append" icon="el-icon-search" @click="search"></el-button> -->
<!-- <el-button slot="append" icon="el-icon-search" @click="search"></el-button> -->
</el-input>
</el-input>
...
@@ -57,7 +57,7 @@ const BUSINESS_SERVICE = services.business;
...
@@ -57,7 +57,7 @@ const BUSINESS_SERVICE = services.business;
import
{
CONSTANT
}
from
'../../constant'
import
{
CONSTANT
}
from
'../../constant'
export
default
{
export
default
{
props
:
[
'fenceMapModalVisible'
,
'init'
],
props
:
[
'fenceMapModalVisible'
,
'init'
,
'readonlyStatus'
],
data
(){
data
(){
return
{
return
{
fenceMapSearch
:
''
,
fenceMapSearch
:
''
,
...
...
src/pages/monitor/userList.vue
View file @
5d8202d
...
@@ -7,17 +7,17 @@
...
@@ -7,17 +7,17 @@
<el-form
:model=
"form"
:inline=
"false"
size=
"mini"
class=
"main-form"
label-width=
"80px"
>
<el-form
:model=
"form"
:inline=
"false"
size=
"mini"
class=
"main-form"
label-width=
"80px"
>
<el-row>
<el-row>
<el-form-item
label=
"用户查询"
class=
"pull-left"
>
<el-form-item
label=
"用户查询"
class=
"pull-left"
>
<el-input
placeholder=
"请输入对应条件值"
v-model=
"form.
queryT
erm"
size=
"small"
class=
"input-with-select"
style=
"width:340px"
maxlength=
"50"
clearable
>
<el-input
placeholder=
"请输入对应条件值"
v-model=
"form.
t
erm"
size=
"small"
class=
"input-with-select"
style=
"width:340px"
maxlength=
"50"
clearable
>
<el-select
v-model=
"form.
query
Type"
slot=
"prepend"
style=
"width:100px;"
placeholder=
"请选择"
size=
"small"
>
<el-select
v-model=
"form.
term
Type"
slot=
"prepend"
style=
"width:100px;"
placeholder=
"请选择"
size=
"small"
>
<el-option
label=
"设备号"
value=
"1"
></el-option>
<el-option
label=
"设备号"
value=
"1"
></el-option>
<el-option
label=
"车架号"
value=
"2"
></el-option>
<el-option
label=
"车架号"
value=
"2"
></el-option>
<el-option
label=
"姓名"
value=
"3"
></el-option>
<el-option
label=
"姓名"
value=
"3"
></el-option>
<
el-option
label=
"工单号"
value=
"4"
></el-option
>
<
!--
<el-option
label=
"工单号"
value=
"4"
></el-option>
--
>
</el-select>
</el-select>
</el-input>
</el-input>
<el-button
type=
"primary"
plain
size=
"small"
v-popover:popover
>
更多条件
<
!--
<
el-button
type=
"primary"
plain
size=
"small"
v-popover:popover
>
更多条件
<i
class=
" el-icon--right"
:class=
"highSearchVisible?'el-icon-arrow-up':'el-icon-arrow-down'"
></i>
<i
class=
" el-icon--right"
:class=
"highSearchVisible?'el-icon-arrow-up':'el-icon-arrow-down'"
></i>
</el-button>
</el-button>
-->
<el-button
type=
"primary"
size=
"small"
@
click=
"search"
>
查询
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"search"
>
查询
</el-button>
</el-form-item>
</el-form-item>
...
@@ -98,10 +98,11 @@
...
@@ -98,10 +98,11 @@
<el-col
:span=
"12"
class=
"choose-list-wrap"
>
<el-col
:span=
"12"
class=
"choose-list-wrap"
>
<p>
结果列表
</p>
<p>
结果列表
</p>
<ul
class=
"choose-list"
>
<ul
class=
"choose-list"
>
<li
v-for=
"item in resultList"
:key=
"item.
standno
"
>
<li
v-for=
"item in resultList"
:key=
"item.
vin
"
>
<el-checkbox
v-model=
"item.checked"
@
change=
"checkedChange(item)"
class=
"choose-list-checkbox"
>
<el-checkbox
v-model=
"item.checked"
@
change=
"checkedChange(item)"
class=
"choose-list-checkbox"
>
<div
class=
"choose-list-content"
>
<div
class=
"choose-list-content"
>
<p>
{{
item
.
name
}}
/
{{
item
.
standno
}}
</p>
<!--
{{
item
.
name
}}
/ -->
<p>
{{
item
.
vin
}}
</p>
<p
class=
"choose-list-group"
>
<p
class=
"choose-list-group"
>
<el-tag
type=
"info"
size=
"small"
v-for=
"snItem in item.sns"
:key=
"snItem"
>
{{
snItem
}}
</el-tag>
<el-tag
type=
"info"
size=
"small"
v-for=
"snItem in item.sns"
:key=
"snItem"
>
{{
snItem
}}
</el-tag>
</p>
</p>
...
@@ -119,10 +120,10 @@
...
@@ -119,10 +120,10 @@
<el-col
:span=
"12"
class=
"choose-list-wrap"
>
<el-col
:span=
"12"
class=
"choose-list-wrap"
>
<p>
已选列表
</p>
<p>
已选列表
</p>
<ul
class=
"choose-list"
>
<ul
class=
"choose-list"
>
<li
v-for=
"item in chosenList"
:key=
"item.
standno
"
>
<li
v-for=
"item in chosenList"
:key=
"item.
vin
"
>
<el-checkbox
v-model=
"item.checked"
@
change=
"checkedChange(item)"
class=
"choose-list-checkbox"
>
<el-checkbox
v-model=
"item.checked"
@
change=
"checkedChange(item)"
class=
"choose-list-checkbox"
>
<div
class=
"choose-list-content"
>
<div
class=
"choose-list-content"
>
<p>
{{
item
.
name
}}
/
{{
item
.
standno
}}
</p>
<p>
{{
item
.
name
}}
/
{{
item
.
vin
}}
</p>
<p
class=
"choose-list-group"
>
<p
class=
"choose-list-group"
>
<el-tag
type=
"info"
size=
"small"
v-for=
"snItem in item.sns"
:key=
"snItem"
>
{{
snItem
}}
</el-tag>
<el-tag
type=
"info"
size=
"small"
v-for=
"snItem in item.sns"
:key=
"snItem"
>
{{
snItem
}}
</el-tag>
</p>
</p>
...
@@ -162,8 +163,8 @@ export default{
...
@@ -162,8 +163,8 @@ export default{
data
(){
data
(){
return
{
return
{
form
:
{
form
:
{
queryT
erm
:
''
,
t
erm
:
''
,
query
Type
:
'1'
,
term
Type
:
'1'
,
sTime
:
''
,
sTime
:
''
,
eTime
:
''
eTime
:
''
},
},
...
@@ -197,7 +198,7 @@ export default{
...
@@ -197,7 +198,7 @@ export default{
resultItem
:
''
,
resultItem
:
''
,
highSearchVisible
:
false
,
highSearchVisible
:
false
,
userImportModalVisible
:
false
,
userImportModalVisible
:
false
,
currentPage
:
1
,
pageNumber
:
1
,
pageSize
:
10
,
pageSize
:
10
,
total
:
0
,
total
:
0
,
maxPage
:
1
,
maxPage
:
1
,
...
@@ -250,7 +251,7 @@ export default{
...
@@ -250,7 +251,7 @@ export default{
if
(
newVal
){
if
(
newVal
){
this
.
resultList
.
forEach
((
item
)
=>
{
this
.
resultList
.
forEach
((
item
)
=>
{
item
.
checked
=
true
;
item
.
checked
=
true
;
const
findItem
=
this
.
chosenList
.
find
((
o
)
=>
o
.
standno
===
item
.
standno
)
const
findItem
=
this
.
chosenList
.
find
((
o
)
=>
o
.
vin
===
item
.
vin
)
if
(
!
findItem
){
if
(
!
findItem
){
this
.
chosenList
.
push
(
item
)
this
.
chosenList
.
push
(
item
)
}
}
...
@@ -259,7 +260,7 @@ export default{
...
@@ -259,7 +260,7 @@ export default{
}
else
{
}
else
{
this
.
resultList
.
forEach
((
item
)
=>
{
this
.
resultList
.
forEach
((
item
)
=>
{
item
.
checked
=
false
;
item
.
checked
=
false
;
const
findItem
=
this
.
chosenList
.
find
((
o
)
=>
o
.
standno
===
item
.
standno
)
const
findItem
=
this
.
chosenList
.
find
((
o
)
=>
o
.
vin
===
item
.
vin
)
if
(
findItem
){
if
(
findItem
){
this
.
chosenList
.
splice
(
this
.
chosenList
.
indexOf
(
findItem
),
1
);
this
.
chosenList
.
splice
(
this
.
chosenList
.
indexOf
(
findItem
),
1
);
}
}
...
@@ -290,7 +291,7 @@ export default{
...
@@ -290,7 +291,7 @@ export default{
userdata
.
push
({
userdata
.
push
({
sn
:
obj
.
sn
,
sn
:
obj
.
sn
,
name
:
obj
.
name
,
name
:
obj
.
name
,
standno
:
obj
.
standno
,
vin
:
obj
.
vin
,
userTel
:
obj
.
userTel
,
userTel
:
obj
.
userTel
,
time
:
obj
.
time
,
time
:
obj
.
time
,
address
:
obj
.
address
address
:
obj
.
address
...
@@ -302,7 +303,7 @@ export default{
...
@@ -302,7 +303,7 @@ export default{
search
(){
search
(){
this
.
resultList
=
[];
this
.
resultList
=
[];
//this.chosenList = [];
//this.chosenList = [];
this
.
currentPage
=
1
;
this
.
pageNumber
=
1
;
this
.
needInfinite
=
false
;
this
.
needInfinite
=
false
;
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
infiniteLoading
&&
this
.
$refs
.
infiniteLoading
.
$emit
(
'$InfiniteLoading:reset'
);
this
.
$refs
.
infiniteLoading
&&
this
.
$refs
.
infiniteLoading
.
$emit
(
'$InfiniteLoading:reset'
);
...
@@ -310,27 +311,30 @@ export default{
...
@@ -310,27 +311,30 @@ export default{
const
params
=
this
.
params
;
const
params
=
this
.
params
;
delete
params
.
sn
;
delete
params
.
sn
;
delete
params
.
standNo
;
delete
params
.
vin
;
delete
params
.
name
;
delete
params
.
name
;
delete
params
.
workOrderNo
;
delete
params
.
workOrderNo
;
const
queryTerm
=
this
.
form
.
queryTerm
.
trim
();
let
{
term
,
termType
}
=
this
.
form
;
if
(
queryTerm
){
term
=
term
.
trim
();
switch
(
this
.
form
.
queryType
){
params
.
term
=
term
;
case
'1'
:
params
.
termType
=
termType
;
params
.
sn
=
queryTerm
;
// if(term){
break
;
// switch(termType){
case
'2'
:
// case '1':
params
.
standNo
=
queryTerm
;
// params.sn = term;
break
;
// break;
case
'3'
:
// case '2':
params
.
name
=
queryTerm
;
// params.vin = term;
break
;
// break;
case
'4'
:
// case '3':
params
.
workOrderNo
=
queryTerm
;
// params.name = term;
break
;
// break;
}
// case '4':
}
// params.workOrderNo = term;
// break;
// }
// }
this
.
needInfinite
=
true
;
this
.
needInfinite
=
true
;
},
},
...
@@ -353,7 +357,7 @@ export default{
...
@@ -353,7 +357,7 @@ export default{
if
(
item
.
checked
){
if
(
item
.
checked
){
this
.
resultcheck
=
item
.
checked
;
this
.
resultcheck
=
item
.
checked
;
this
.
resultItem
=
item
;
this
.
resultItem
=
item
;
const
findItem
=
this
.
chosenList
.
find
((
o
)
=>
o
.
standno
===
item
.
standno
);
const
findItem
=
this
.
chosenList
.
find
((
o
)
=>
o
.
vin
===
item
.
vin
);
if
(
findItem
)
return
;
if
(
findItem
)
return
;
this
.
chosenList
.
push
(
item
);
this
.
chosenList
.
push
(
item
);
this
.
checkedCancel
=
false
;
this
.
checkedCancel
=
false
;
...
@@ -445,38 +449,42 @@ export default{
...
@@ -445,38 +449,42 @@ export default{
},
},
infiniteHandler
(
$state
){
infiniteHandler
(
$state
){
if
(
this
.
currentPage
>
this
.
maxPage
){
if
(
this
.
pageNumber
>
this
.
maxPage
){
$state
.
complete
();
$state
.
complete
();
return
;
return
;
}
}
this
.
params
.
currentPage
=
this
.
currentPage
;
this
.
params
.
pageNumber
=
this
.
pageNumber
;
this
.
params
.
pageSize
=
this
.
pageSize
;
this
.
params
.
pageSize
=
this
.
pageSize
;
MONITOR_SERVICE
.
getVehicleSnList
(
this
.
params
).
then
((
res
)
=>
{
MONITOR_SERVICE
.
getVehicleSnList
(
this
.
params
).
then
((
res
)
=>
{
const
data
=
res
.
data
;
const
{
code
,
data
,
message
}
=
res
;
if
(
!
res
.
error
&&
data
&&
data
.
length
){
if
(
code
==
200
)
{
data
.
map
((
obj
)
=>
{
const
{
list
}
=
data
;
if
(
list
&&
list
.
length
>
0
)
{
list
.
map
((
obj
)
=>
{
if
(
obj
.
sn
){
if
(
obj
.
sn
){
obj
.
sns
=
obj
.
sn
.
split
(
','
)
obj
.
sns
=
obj
.
sn
.
split
(
','
)
}
else
{
}
else
{
obj
.
sns
=
[];
obj
.
sns
=
[];
}
}
});
});
this
.
resultList
=
this
.
resultList
.
concat
(
data
);
this
.
resultList
=
this
.
resultList
.
concat
(
list
);
this
.
total
=
res
.
recordsTotal
;
this
.
total
=
res
.
recordsTotal
;
this
.
maxPage
=
Math
.
ceil
(
this
.
total
/
this
.
pageSize
);
this
.
maxPage
=
Math
.
ceil
(
this
.
total
/
this
.
pageSize
);
this
.
currentPage
++
;
this
.
pageNumber
++
;
$state
.
loaded
()
$state
.
loaded
()
}
else
{
}
else
{
$state
.
complete
();
}
}
else
{
$state
.
complete
();
$state
.
complete
();
}
}
})
})
},
},
getData
(
curr
=
this
.
currentPage
,
size
=
this
.
pageSize
){
getData
(
curr
=
this
.
pageNumber
,
size
=
this
.
pageSize
){
this
.
loading
=
true
;
this
.
loading
=
true
;
let
params
=
this
.
getParams
();
let
params
=
this
.
getParams
();
params
.
currentPage
=
curr
;
params
.
pageNumber
=
curr
;
params
.
pageSize
=
size
;
params
.
pageSize
=
size
;
BUSINESS_SERVICE
.
getWorkOrderList
(
params
).
then
((
response
)
=>
{
BUSINESS_SERVICE
.
getWorkOrderList
(
params
).
then
((
response
)
=>
{
...
...
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