Parcourir la source

Merge branch 'master' of http://114.244.114.158:8802/siwei/real3d-portalsite

gushoubang il y a 6 mois
Parent
commit
d8249a0d00

+ 15 - 7
src/views/farmlandProtection/components/hcxx.vue

@@ -55,14 +55,16 @@
     </div>
     <div class="imgCon">
       <div class="echartTitle">
-        <div class="block-title">无人机取证</div>
+        <div class="block-title">无人机取证
+          <el-checkbox v-model="showwrj" @change="clickxsx(xsxList[0])"></el-checkbox>
+        </div>
       </div>
       <div class="imgList">
         <div
           class="imgDiv"
           v-for="(item, i) in xsxList"
           :key="i"
-          @click="clickxsx(item)"
+          @click="clickxsx(item,true)"
         >
           <span>{{ i + 1 }}</span>
           <img :src="item.imagerPath" />
@@ -74,7 +76,7 @@
 
 <script>
 import { getJctbhcInfo, getTiffPath } from "@/api/ghss/jctb.js";
-import { loadGeoJSON } from "@/utils/MapHelper/help.js";
+import { loadGeoJSON, removeGeoJSON } from "@/utils/MapHelper/help.js";
 export default {
   props: {
     detailObj: {
@@ -100,6 +102,7 @@ export default {
       hiindex: "",
       hiid: "",
       xsxList: [],
+      showwrj: false,
     };
   },
   computed: {},
@@ -152,9 +155,14 @@ export default {
       this.$emit("updateParent", "emitImgIndex", val);
     },
     //getEntities(id, url, position, type) {
-    clickxsx(item) {
-      let posArr = item.pngenvelope;
+    clickxsx(item,change) {
+      if(change)this.showwrj = !this.showwrj;
+      if (this.showwrj) {
+        removeGeoJSON("wrj");
+        return;
+      }
 
+      let posArr = item.pngenvelope;
       // 创建Cesium的ImageMaterialProperty
       const imageMaterial = new Cesium.ImageMaterialProperty({
         image: item.imagerPath,
@@ -175,7 +183,7 @@ export default {
             material: imageMaterial,
           },
         });
-        layerSources["wrj"] = data;
+        data.name = "wrj";
       });
     },
     // aaa() {
@@ -424,7 +432,7 @@ export default {
     this.delatePoi("dw");
     this.handler.destroy();
     this.handler = null;
-    viewer.dataSources.remove(layerSources["wrj"]);
+    removeGeoJSON("wrj");
   },
 };
 </script>

+ 1 - 1
src/views/farmlandProtection/components/jbxx.vue

@@ -12,7 +12,7 @@
           label="监测面积"
           label-class-name="my-label"
           content-class-name="my-content"
-          >{{ detailObj.jcmj }}</el-descriptions-item
+          >{{ detailObj.jcmj }}</el-descriptions-item
         >
         <el-descriptions-item
           label="行政名称"

+ 9 - 1
src/views/farmlandProtection/jctb/index.vue

@@ -117,6 +117,7 @@
           :autoplay="false"
           :initial-index="imgIndex"
           ref="carousel"
+          @change="carouselChange"
         >
           <el-carousel-item v-for="(item, i) in imgList" :key="i">
             <img
@@ -183,6 +184,7 @@ export default {
       // isShowImg: false,
       imgList: [],
       imgIndex: -1,
+      imgi: -1,
 
       xzqTreeData: [], //申请范围
 
@@ -220,13 +222,19 @@ export default {
         // this.$refs.tbqd.initNew();
       }
     },
+    carouselChange(i) {
+      if (this.imgi != -1)
+        this.handleMouseLeave(this.imgList[this.imgi], this.imgi);
+      this.handleMouseEnter(this.imgList[i], i);
+      this.imgi = i;
+    },
     handleMouseEnter(a, b) {
       if (this.$refs.tbDetails && this.$refs.tbDetails.$refs.hcxx)
         this.$refs.tbDetails.$refs.hcxx.handleMouseEnter(a, b);
     },
     handleMouseLeave(a, b) {
       if (this.$refs.tbDetails && this.$refs.tbDetails.$refs.hcxx)
-        this.$refs.tbDetails.$refs.hcxx.handleMouseEnter(a, b);
+        this.$refs.tbDetails.$refs.hcxx.handleMouseLeave(a, b);
     },
     exportFile() {
       this.dialogVisible = true;