Browse Source

Merge remote-tracking branch 'origin/visu_forest_0_1' into visu_forest_0_1

wang_xy 2 years ago
parent
commit
76fa0e2ec5
2 changed files with 33 additions and 8 deletions
  1. 16 0
      src/api/leader.js
  2. 17 8
      src/views/leader.vue

+ 16 - 0
src/api/leader.js

@@ -38,3 +38,19 @@ export function getPlanList(personId) {
     method: 'get',
   })
 }
+
+// 巡林记录
+export function getRecordList(planId, personId) {
+  return request({
+    url: '/center-fire/VisuForestLeaderController/getRecordList?planId='+planId+'&personId='+personId,
+    method: 'get',
+  })
+}
+
+// 巡林轨迹
+export function getPointList(recordId) {
+  return request({
+    url: '/center-fire/VisuForestLeaderController/getPointList?recordId='+recordId,
+    method: 'get',
+  })
+}

+ 17 - 8
src/views/leader.vue

@@ -73,18 +73,18 @@
             </div>
             <div class="i-list-con h-73">
 
-              <div class="h-19 overflow-y">
+              <div class="h-73 overflow-y">
                 <el-collapse accordion>
                   <el-collapse-item v-for="(item,index) in xunLinListOne">
                     <template slot="title">
-                      <div class="d-l-con sj-collapse" @click="getWaterRecord(item.id, item.reiverLengthId)">
+                      <div class="d-l-con sj-collapse" @click="getRecordList(item.id, item.personId)">
                         <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>
                     </template>
-                    <div class="d-l-con this-child sj-collapse" @click="getWaterPoint(child.id)" v-for="(child,index) in recordList" >
+                    <div class="d-l-con this-child sj-collapse" @click="getPointList(child.id)" v-for="(child,index) in recordList" >
                       <div class="d-l-l-text" >
                         <h4>{{child.beginTime}} - {{child.endTime}}</h4>
                       </div>
@@ -129,6 +129,8 @@ import {
   getForestLeader,
   getLeaderTrack,
   getPlanList,
+  getRecordList,
+  getPointList,
   getRy,
   getRemotelist
 } from '@/api/leader'
@@ -313,16 +315,23 @@ export default {
         }
       })
     },
-    //点击右巡林计划获取 巡查记录
-    getRecordList(userId) {
+    //点击右巡林计划获取 巡查记录
+    getRecordList(id, personId) {
       this.showNothing = false;
       this.recordList = [];
-      getRecordList(reiverLengthId).then(res => {
+      getRecordList(id, personId).then(res => {
         console.log("记录",res.data);
-        this.xunLinListOne = res.data;
+        this.recordList = res.data;
       })
       this.$refs.supermap.clearC()
     },
+    //点击右侧巡查记录获取 巡查轨迹
+    getPointList(id,) {
+      getPointList(id).then(res => {
+        // console.log("落点",res.data);
+        this.setPointList(res);
+      })
+    },
     //点击左侧人员获取人员的巡林计划列表
     getRemotelist(){
       getRemotelist().then(res => {
@@ -330,7 +339,7 @@ export default {
       })
     },
     //点击巡查轨迹时段 巡查轨迹落点
-    getPointList(res) {
+    setPointList(res) {
       let that = this;
       this.connectList = [];
       console.log("落点",res.data)