|
@@ -76,10 +76,10 @@
|
|
|
<div class="h-19 overflow-y">
|
|
|
<div class="d-l-con" :class="{on:listCurrentIndex2==item.planName}"
|
|
|
v-for="(item,index) in xunLinListOne"
|
|
|
- @click="setConnectList(item.planLine,item.planName)">
|
|
|
+ @click="getPointList(item.id)">
|
|
|
<div class="d-l-l-text">
|
|
|
<i class="i-small"></i>
|
|
|
- <h4>{{ item.planName }}</h4>
|
|
|
+ <h4>{{ item.timeBegin }} - {{ item.timeEnd }}</h4>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -105,6 +105,8 @@
|
|
|
import {
|
|
|
getForestLeader,
|
|
|
getLeaderTrack,
|
|
|
+ getTrackList,
|
|
|
+ getPointList,
|
|
|
getPlanList,
|
|
|
getRy
|
|
|
} from '@/api/leader'
|
|
@@ -232,13 +234,18 @@ export default {
|
|
|
// getPlanList().then(res => {
|
|
|
// this.xunLinListOne = res.data
|
|
|
// })
|
|
|
+ // // 获取轨迹列表
|
|
|
+ // getTrackList().then(res => {
|
|
|
+ // this.xunLinListOne = res.data
|
|
|
+ // })
|
|
|
// 获取人员列表
|
|
|
// getForestLeader(linJob, linType).then(res => {
|
|
|
getForestLeader().then(res => {
|
|
|
this.peopleList = res.data;
|
|
|
+ console.log("人员",res.data)
|
|
|
})
|
|
|
this.connectList = []
|
|
|
- this.$refs.supermap.clearC()
|
|
|
+ // this.$refs.supermap.clearC() //clearC undefined
|
|
|
},
|
|
|
//获取左侧人员列表
|
|
|
getForestLeader(linJob, linType) {
|
|
@@ -253,7 +260,19 @@ export default {
|
|
|
this.$refs.supermap.clearC()
|
|
|
},
|
|
|
//点击左侧人员列表获取轨迹
|
|
|
- getLeaderTrack(userId) {
|
|
|
+ getLeaderTrack(personId) {
|
|
|
+ getTrackList(personId).then(res => {
|
|
|
+ console.log("轨迹",res.data);
|
|
|
+ if(res.data.length > 0){// 当前资源人员有巡查轨迹 获取最新一条轨迹
|
|
|
+ this.xunLinListOne = res.data;
|
|
|
+ this.getPointList(res.data[0].id);
|
|
|
+ }else {// 清空上一用户落点
|
|
|
+ this.xunLinListOne = [{"timeBegin": "当前资源人员", "timeEnd": "暂无巡查轨迹"}];
|
|
|
+ this.$refs.supermap.clearC()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getLeaderTrack_original(userId) {
|
|
|
this.listCurrentIndex1 = userId
|
|
|
let that = this
|
|
|
this.connectList = []
|
|
@@ -282,6 +301,28 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
|
|
|
+ getPointList(trackId) {
|
|
|
+ let that = this;
|
|
|
+ this.connectList = [];
|
|
|
+ getPointList(trackId).then(res => {
|
|
|
+ console.log("落点",res.data)
|
|
|
+ if (res.data != null && res.data.length > 0) {
|
|
|
+ for (let i = 0; i < res.data.length; i++) {
|
|
|
+ let latlng = {
|
|
|
+ lat: res.data[i].latitude,
|
|
|
+ lng: res.data[i].longitude
|
|
|
+ }
|
|
|
+ this.connectList.push(latlng)
|
|
|
+ }
|
|
|
+ setTimeout(() => {
|
|
|
+ that.$refs.supermap.clearC()
|
|
|
+ that.$refs.supermap.setConnectList(this.connectList, 'red')
|
|
|
+ }, 1000)
|
|
|
+ } else {
|
|
|
+ that.$refs.supermap.clearC()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
setConnectList(points, planName) {
|
|
|
this.listCurrentIndex2 = planName
|
|
|
this.connectList = []
|