|
@@ -77,7 +77,7 @@
|
|
<el-collapse-item v-for="(item,index) in xunLinListOne">
|
|
<el-collapse-item v-for="(item,index) in xunLinListOne">
|
|
<template slot="title">
|
|
<template slot="title">
|
|
<div class="d-l-con sj-collapse"
|
|
<div class="d-l-con sj-collapse"
|
|
- @click="getRecordList(item.id)">
|
|
|
|
|
|
+ @click="getRecordList(item.id, item.patrolTrajectory)">
|
|
<div class="d-l-l-text">
|
|
<div class="d-l-l-text">
|
|
<el-tooltip class="item" effect="dark" placement="left"
|
|
<el-tooltip class="item" effect="dark" placement="left"
|
|
style="width:10rem ;" :disabled="(item.taskName.length <= 20)">
|
|
style="width:10rem ;" :disabled="(item.taskName.length <= 20)">
|
|
@@ -288,25 +288,34 @@
|
|
this.peopleList = res.data
|
|
this.peopleList = res.data
|
|
})
|
|
})
|
|
this.connectList = []
|
|
this.connectList = []
|
|
|
|
+ this.personId = null;
|
|
|
|
+ this.xunLinListOne = [];
|
|
|
|
+ this.patrolTrajectory = null;
|
|
this.$refs.supermap.clearC()
|
|
this.$refs.supermap.clearC()
|
|
},
|
|
},
|
|
//点击左侧人员列表获取 巡林计划
|
|
//点击左侧人员列表获取 巡林计划
|
|
getPlanList(personId) {
|
|
getPlanList(personId) {
|
|
|
|
+ if(this.personId == personId){//当前人员已经被点击一次 不再重复加载
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ this.personId = personId;
|
|
this.showNothing = false;
|
|
this.showNothing = false;
|
|
this.recordList = [];
|
|
this.recordList = [];
|
|
getPlanList(personId).then(res => {
|
|
getPlanList(personId).then(res => {
|
|
this.xunLinListOne = res.data;
|
|
this.xunLinListOne = res.data;
|
|
})
|
|
})
|
|
- this.$refs.supermap.clearC()
|
|
|
|
|
|
+ this.patrolTrajectory = null;
|
|
|
|
+ this.$refs.supermap.clearC();
|
|
},
|
|
},
|
|
//点击右侧巡林计划获取 巡查记录
|
|
//点击右侧巡林计划获取 巡查记录
|
|
- getRecordList(id) {
|
|
|
|
|
|
+ getRecordList(id, patrolTrajectory) {
|
|
this.showNothing = false;
|
|
this.showNothing = false;
|
|
this.recordList = [];
|
|
this.recordList = [];
|
|
getRecordList(id).then(res => {
|
|
getRecordList(id).then(res => {
|
|
this.recordList = res.data;
|
|
this.recordList = res.data;
|
|
})
|
|
})
|
|
- this.$refs.supermap.clearC()
|
|
|
|
|
|
+ this.$refs.supermap.clearC();
|
|
|
|
+ this.setTaskPointList(patrolTrajectory);
|
|
},
|
|
},
|
|
//点击右侧巡查记录获取 巡查轨迹
|
|
//点击右侧巡查记录获取 巡查轨迹
|
|
getPointList(id) {
|
|
getPointList(id) {
|
|
@@ -315,6 +324,23 @@
|
|
this.setPointList(res);
|
|
this.setPointList(res);
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ //点击巡查人员 巡查任务落点
|
|
|
|
+ setTaskPointList(patrolTrajectory) {
|
|
|
|
+ console.log("巡查任务落点", typeof JSON.parse(patrolTrajectory));
|
|
|
|
+ if(this.patrolTrajectory){
|
|
|
|
+ this.patrolTrajectory = null;
|
|
|
|
+ }else {
|
|
|
|
+ this.patrolTrajectory = patrolTrajectory;
|
|
|
|
+ this.drawTaskPoint(this.patrolTrajectory);
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ // 巡查任务落点
|
|
|
|
+ drawTaskPoint(patrolTrajectory) {
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ this.$refs.supermap.clearC();
|
|
|
|
+ this.$refs.supermap.setConnectList(JSON.parse(patrolTrajectory), '#04f');
|
|
|
|
+ }, 1000)
|
|
|
|
+ },
|
|
//点击巡查轨迹时段 巡查轨迹落点
|
|
//点击巡查轨迹时段 巡查轨迹落点
|
|
setPointList(res) {
|
|
setPointList(res) {
|
|
let that = this;
|
|
let that = this;
|
|
@@ -329,8 +355,8 @@
|
|
this.connectList.push(latlng)
|
|
this.connectList.push(latlng)
|
|
}
|
|
}
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
- that.$refs.supermap.clearC()
|
|
|
|
- that.$refs.supermap.setConnectList(this.connectList, 'red')
|
|
|
|
|
|
+ // that.$refs.supermap.clearC()
|
|
|
|
+ that.$refs.supermap.setConnectList(this.connectList, '#f40')
|
|
}, 1000)
|
|
}, 1000)
|
|
} else {
|
|
} else {
|
|
that.$refs.supermap.clearC()
|
|
that.$refs.supermap.clearC()
|