瀏覽代碼

水利更换巡查轨迹接口

wang_xy 2 年之前
父節點
當前提交
fe1382119a
共有 2 個文件被更改,包括 30 次插入35 次删除
  1. 12 9
      src/api/leader.js
  2. 18 26
      src/views/leader.vue

+ 12 - 9
src/api/leader.js

@@ -23,24 +23,27 @@ export function getLeaderTrack(trackById) {
     method: 'get',
   })
 }
-// 点击左侧人员列表获取 巡查监测点计划
-export function getWaterPlan(reiverLengthId) {
+// 巡林任务
+export function getWaterPlan(userId) {
   return request({
-    url: '/center-water/VisuForestLeaderController/getWaterPlan?reiverLengthId='+reiverLengthId,
-    method: 'get',
+    url: '/center-data/task/getPlanList',
+    method: 'post',
+    data: {userId:userId,type:'1'}
   })
 }
-// 点击右巡查监测点计划 巡查监测记录
-export function getWaterRecord(id, reiverLengthId) {
+
+// 巡林记录
+export function getWaterRecord(taskId) {
   return request({
-    url: '/center-water/VisuForestLeaderController/getWaterRecord?planId='+id+'&reiverLengthId='+reiverLengthId,
+    url: '/center-data/record/list?taskId='+taskId,
     method: 'get',
   })
 }
-// 点击右巡查监测点记录获取 巡查轨迹落点
+
+// 巡林轨迹
 export function getWaterPoint(recordId) {
   return request({
-    url: '/center-water/VisuForestLeaderController/getWaterPoint?id='+recordId,
+    url: '/center-data/track/getTrack/'+recordId.toString(),
     method: 'get',
   })
 }

+ 18 - 26
src/views/leader.vue

@@ -73,44 +73,41 @@
               <dv-decoration-3 style="width:150px;height:15px;margin-right: 1rem;"/>
             </div>
             <div class="i-list-con h-73">
-
               <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="getWaterRecord(item.id)">
                         <div class="d-l-l-text">
-                          <el-tooltip class="item" effect="dark" placement="left" style="width:10rem ;" :disabled="(item.name.length <= 20)">
+                          <el-tooltip class="item" effect="dark" placement="left"
+                                      style="width:10rem ;" :disabled="(item.taskName.length <= 20)">
                             <div slot="content">
-                              <h4 class="collapse-title" style="width: 200px;">{{ item.name}}</h4>
+                              <h4 class="collapse-title" style="width: 200px;">
+                                {{ item.taskName}}</h4>
                             </div>
-                            <h4 class="collapse-title" style="width: 100px;">{{ item.name | ellipsis20}}</h4>
+                            <h4 class="collapse-title" style="width: 100px;">
+                              {{ item.taskName | ellipsis20}}</h4>
                           </el-tooltip>
                         </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)" v-for="(child,index) in recordList" >
-                      <div class="d-l-l-text" >
+                    <div class="d-l-con this-child sj-collapse" @click="getWaterPoint(child.id)"
+                         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="showNothing && (recordList == null || recordList == '' || recordList == [])">
-                      <div class="d-l-l-text" >
+                    <div class="d-l-con this-child sj-collapse"
+                         v-if="showNothing && (recordList == null || recordList == '' || recordList == [])">
+                      <div class="d-l-l-text">
                         <h4 class="text-gray">暂无信息</h4>
                       </div>
                     </div>
                   </el-collapse-item>
                 </el-collapse>
-                <!--<div class="d-l-con" :class="{on:listCurrentIndex2==item.planName}"-->
-                     <!--v-for="(item,index) in xunLinListOne"-->
-                     <!--@click="getWaterRecord(item.id, item.reiverLengthId)">-->
-                  <!--<div class="d-l-l-text">-->
-                    <!--<i class="i-small"></i>-->
-                    <!--<h4>{{ item.name }} ({{ item.recordCount }}-{{ item.planCount }})</h4>-->
-                  <!--</div>-->
-                <!--</div>-->
               </div>
             </div>
           </dv-border-box-13>
@@ -299,22 +296,17 @@ export default {
       this.$refs.supermap.clearC()
     },
     //点击左侧巡查监测点计划获取 巡查记录
-    getWaterRecord(id, reiverLengthId) {
+    getWaterRecord(id) {
       this.showNothing = true;
-      getWaterRecord(id, reiverLengthId).then(res => {
-        console.log(id+"=id, 记录 reiverLengthId="+reiverLengthId);
-        console.log("记录",res.data);
+      getWaterRecord(id).then(res => {
         this.recordList = res.data;
       })
       this.$refs.supermap.clearC()
     },
     //点击左侧巡查监测点计划获取 轨迹落点
     getWaterPoint(id) {
-      // console.log(id+"=id, 落点");
       getWaterPoint(id).then(res => {
-        // console.log("落点",res.data);
         this.getPointList(res);
-        // this.pointList = res.data;
       })
     },
     getPointList(res) {