maxiaoxiao 7 месяцев назад
Родитель
Сommit
b23bd3099b

+ 36 - 8
src/views/farmlandProtection/components/hcxx.vue

@@ -60,17 +60,12 @@
       <div class="imgList">
         <div
           class="imgDiv"
-          v-for="(item, i) in monitorList"
+          v-for="(item, i) in xsxList"
           :key="i"
-          @click="clickImg(i)"
-          @mouseenter="handleMouseEnter(item, i)"
-          @mouseleave="handleMouseLeave(item, i)"
+          @click="clickxsx(i)"
         >
           <span>{{ i + 1 }}</span>
-          <!-- <img :src="imgUrl" /> -->
           <img :src="item.imagerPath" />
-          <!-- <img :src="imgUrl + item.imagerPath" /> -->
-          <p>{{ item.imagerSj }}</p>
         </div>
       </div>
     </div>
@@ -103,6 +98,7 @@ export default {
       handler: {},
       hiindex: "",
       hiid: "",
+      xsxList: [],
     };
   },
   computed: {},
@@ -139,7 +135,7 @@ export default {
             this.clickImg(this.hiindex);
           }
         }
-      }, Cesium.ScreenSpaceEventType.MOUSE_MOVE); 
+      }, Cesium.ScreenSpaceEventType.MOUSE_MOVE);
     },
     handleMouseEnter(a, b) {
       this.ceshi(a.id, "yr");
@@ -154,6 +150,10 @@ export default {
       this.$emit("updateParent", "emitImgList", this.monitorList);
       this.$emit("updateParent", "emitImgIndex", val);
     },
+    clickxsx(val) {
+      this.$emit("updateParent", "emitImgList", this.xsxList);
+      this.$emit("updateParent", "emitImgIndex", val);
+    },
     // aaa() {
     //   var redLine = viewer.entities.add({
     //     // 贴在地面上 两点之间的直线距离
@@ -372,6 +372,34 @@ export default {
       deep: true,
       immediate: true,
     },
+    detailObj: {
+      handler(newVal, oldVal) {
+        if (newVal.xsxtif) {
+          this.xsxList = [];
+          getTiffPath(this.detailObj.xsxtif).then((res) => {
+            if (res.data.pngenvelope) {
+              this.xsxList = [
+                {
+                  imagerPath:
+                    window.axiosURI +
+                    "/file/upload/attachment" +
+                    res.data.pngpath,
+                },
+              ];
+              console.log(this.xsxList);
+              this.getEntities(
+                this.detailObj.jcbh,
+                res.data.pngpath,
+                res.data.pngenvelope,
+                2
+              );
+            }
+          });
+        }
+      },
+      deep: true,
+      immediate: true,
+    },
   },
   beforeDestroy() {
     this.delatePoi("jt");

+ 12 - 1
src/views/farmlandProtection/components/tbDetails.vue

@@ -29,6 +29,7 @@
               ref="hcxx"
               @updateParent="changeData"
               :jcbh="detailObj.jcbh"
+              :detailObj="detailObj"
               v-if="activeTabs == 'hcxx'"
             ></Hcxx>
           </el-tab-pane>
@@ -198,13 +199,23 @@ export default {
           );
         }
       });
+      getTiffPath(this.detailObj.xsxtif).then((res) => {
+        if (res.data.pngenvelope) {
+          this.getEntities(
+            this.detailObj.jcbh,
+            res.data.pngpath,
+            res.data.pngenvelope,
+            2
+          );
+        }
+      });
 
       this.$emit("updateParent", "allShow", false);
       this.splitScreen = true;
     },
 
     getEntities(id, url, position, type) {
-      let mul = "HORIZONTAL";
+      let mul = "VerticalTrisection";
       scene.multiViewportMode = Cesium.MultiViewportMode[mul];
       let imageUrl = "";
       let posArr = position;