ソースを参照

图斑清单调整,数据图斑清除

lkk 7 ヶ月 前
コミット
271396ce22
1 ファイル変更12 行追加6 行削除
  1. 12 6
      src/views/farmlandProtection/components/tbqd.vue

+ 12 - 6
src/views/farmlandProtection/components/tbqd.vue

@@ -2,8 +2,12 @@
   <div class="tbqd">
     <div>
       <div class="headerInput">
-        <el-input v-model="input" placeholder="请输入监测编号搜索" @keyup.enter.native="initNew"></el-input>
-        <span>共{{total}}条</span>
+        <el-input
+          v-model="input"
+          placeholder="请输入监测编号搜索"
+          @keyup.enter.native="initNew"
+        ></el-input>
+        <span>共{{ total }}条</span>
       </div>
       <div class="pagination">
         <!-- <el-table :data="tableData" style="width: 100%" height="560">
@@ -134,7 +138,7 @@ import * as wellknown from "wellknown";
 import * as turf from "@turf/turf";
 import { QueryOne, QueryList } from "@/api/cockpitNew";
 import { loadGeoJSON } from "@/utils/MapHelper/help.js";
-import { JctbList,getJctbInfo } from "@/api/ghss/jctb.js";
+import { JctbList, getJctbInfo } from "@/api/ghss/jctb.js";
 let layerSources = {};
 export default {
   props: {
@@ -183,7 +187,7 @@ export default {
       };
       JctbList(obj).then((res) => {
         this.active_dableData = res.rows;
-        this.total = res.total
+        this.total = res.total;
       });
     },
     handleClick(item) {
@@ -207,11 +211,11 @@ export default {
     },
     handleDetails(row) {
       this.$emit("updateParent", "isShowTb", true);
-      getJctbInfo(row.id).then((res)=> {
+      getJctbInfo(row.id).then((res) => {
         if (res.code == 200) {
           this.$emit("updateParent", "detailObj", res.data);
         }
-      })
+      });
     },
     handleSizeChange(val) {
       this.pageSize = val;
@@ -264,6 +268,8 @@ export default {
     //   this.initNew();
     // },
     active_dableData(newVal, oldVal) {
+      viewer.dataSources.removeAll();
+      viewer.entities.removeAll();
       newVal.forEach((res, index) => {
         res.type = "图斑上图";
         res.index = index;