wangzhe пре 2 година
родитељ
комит
fdcbbd8d3f
2 измењених фајлова са 59 додато и 11 уклоњено
  1. 9 2
      src/api/leader.js
  2. 50 9
      src/views/leader.vue

+ 9 - 2
src/api/leader.js

@@ -30,10 +30,17 @@ export function getWaterPlan(reiverLengthId) {
     method: 'get',
   })
 }
-// 点击左侧人员列表获取 巡查监测点计划
+// 点击右巡查监测点计划 巡查监测记录
 export function getWaterRecord(id, reiverLengthId) {
   return request({
-    url: '/center-water/VisuForestLeaderController/getWaterRecord?id='+id+'&reiverLengthId='+reiverLengthId,
+    url: '/center-water/VisuForestLeaderController/getWaterRecord?planId='+id+'&reiverLengthId='+reiverLengthId,
+    method: 'get',
+  })
+}
+// 点击右巡查监测点记录获取 巡查轨迹落点
+export function getWaterPoint(planId, reiverLengthId) {
+  return request({
+    url: '/center-water/VisuForestLeaderController/getWaterPoint?planId='+planId+'&reiverLengthId='+reiverLengthId,
     method: 'get',
   })
 }

+ 50 - 9
src/views/leader.vue

@@ -75,23 +75,29 @@
             <div class="i-list-con h-73">
 
               <div class="h-19 overflow-y">
-                <dv-border-box-13 backgroundColor="rgba(12, 19, 38, .90)" style="padding-bottom: 1rem;">
-                  <img src="../assets/images/integrated/light.png" style="width: 100%; margin-top: .4rem;"/>
-                  <div class="i-list-con h-80" style="padding-left: 1rem;">
                 <el-collapse accordion>
-                  <el-collapse-item v-for="(item,index) in xunLinListOne" :key="index">
+                  <el-collapse-item v-for="(item,index) in xunLinListOne">
                     <template slot="title">
-                      <div class="d-l-con sj-collapse" v-on:click="getWaterRecord(item.id, item.reiverLengthId)">
+                      <div class="d-l-con sj-collapse" @click="getWaterRecord(item.id, item.reiverLengthId)">
                         <div class="d-l-l-text">
                           <h4 class="collapse-title">{{ item.name }}</h4>
                         </div>
-                        <div class="d-l-l-count">({{ item.recordCount }} / {{ item.planCount }})</div>
+                        <div class="d-l-l-count">({{ item.recordCount }}-{{ item.planCount }})</div>
                       </div>
                     </template>
+                    <div class="d-l-con this-child sj-collapse" @click="getWaterPoint(child.id, child.reiverLengthId)" v-for="(child,index) in recordList" >
+                      <div class="d-l-l-text" >
+                        <h4>{{child.beginTime}} - {{child.endTime}}</h4>
+                      </div>
+                      <!--<div class="d-l-l-count">{{index}}</div>-->
+                    </div>
+                    <div class="d-l-con this-child sj-collapse" v-if="recordList == null || recordList == '' || recordList == []">
+                      <div class="d-l-l-text" >
+                        <h4 class="text-gray">暂无信息</h4>
+                      </div>
+                    </div>
                   </el-collapse-item>
                 </el-collapse>
-                  </div>
-                </dv-border-box-13>
                 <!--<div class="d-l-con" :class="{on:listCurrentIndex2==item.planName}"-->
                      <!--v-for="(item,index) in xunLinListOne"-->
                      <!--@click="getWaterRecord(item.id, item.reiverLengthId)">-->
@@ -125,6 +131,7 @@ import {
   getLeaderTrack,
   getWaterPlan,
   getWaterRecord,
+  getWaterPoint,
   getRy
 } from '@/api/leader'
 
@@ -158,6 +165,7 @@ export default {
       peopleList: [], //人员列表
       connectList: [], //画线
       xunLinListOne: [], //巡林计划
+      recordList: [], //巡林记录
       zrs: 0, //总人数
       zxrs: 0 //在线人数
     }
@@ -260,6 +268,8 @@ export default {
       this.peopleList = []
       getForestLeader(linJob, linType).then(res => {
         this.peopleList = res.data
+        this.xunLinListOne = [];//初始化右侧计划
+        this.recordList = [];//初始化右侧记录
         console.log("人员", res.data)
       })
       this.connectList = []
@@ -267,6 +277,7 @@ export default {
     },
     //点击左侧人员列表获取 巡查监测点计划
     getWaterPlan(reiverLengthId) {
+      this.recordList = [];
       getWaterPlan(reiverLengthId).then(res => {
         console.log("计划",res.data);
         this.xunLinListOne = res.data;
@@ -275,10 +286,40 @@ export default {
     //点击左侧巡查监测点计划获取 巡查记录
     getWaterRecord(id, reiverLengthId) {
       getWaterRecord(id, reiverLengthId).then(res => {
+        console.log(id+"=id, 记录 reiverLengthId="+reiverLengthId);
         console.log("记录",res.data);
-        // this.xunLinListOne = res.data;
+        this.recordList = res.data;
+      })
+    },
+    //点击左侧巡查监测点计划获取 巡查记录
+    getWaterPoint(id, reiverLengthId) {
+      console.log(id+"=id, 落点 reiverLengthId="+reiverLengthId);
+      getWaterPoint(id, reiverLengthId).then(res => {
+        console.log("落点",res.data);
+        this.getPointList(res);
+        // this.pointList = res.data;
       })
     },
+    getPointList(res) {
+      let that = this;
+      this.connectList = [];
+      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()
+      }
+    },
     //点击左侧人员列表获取计划
     getLeaderTrack(userId) {//String reiverLengthId;
       this.listCurrentIndex1 = userId