Parcourir la source

查看前后影像触发位置更改

lkk il y a 7 mois
Parent
commit
cdf254bacf

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

@@ -1,7 +1,7 @@
 <template>
   <div>
     <div class="detailList">
-      <div class="dbBtn">查看前后影像对比</div>
+      <div class="dbBtn" @click="clickOpen">查看前后影像对比</div>
       <el-descriptions :column="1" border>
         <el-descriptions-item
           label="图斑编号"
@@ -67,6 +67,10 @@ export default {
     changeData(name, updata) {
       this[name] = updata;
     },
+    clickOpen(){
+      this.$emit('updateParent','splitScreen',true)
+      // this.$refs.tbDetails.onClick(val);
+    }
   },
   watch: {},
   watch: {},

+ 5 - 2
src/views/farmlandProtection/components/tbDetails.vue

@@ -8,7 +8,7 @@
       <div class="ServiceCon">
         <el-tabs type="border-card" class="xz_box" v-model="activeTabs" stretch>
           <el-tab-pane label="基本信息" name="jbxx">
-            <Jbxx :detailObj="detailObj" @updateParent="changeData"></Jbxx>
+            <Jbxx :detailObj="detailObj" @updateParent="changeData" ref="jbxx"></Jbxx>
           </el-tab-pane>
           <el-tab-pane label="核查信息" name="hcxx">
             <Hcxx @updateParent="changeData" v-if="activeTabs == 'hcxx'"></Hcxx>
@@ -54,6 +54,7 @@ export default {
       emitImgIndex: -1,
       emitImgList: [],
       imagelayers: [],
+      splitScreen:false
     };
   },
   computed: {},
@@ -111,12 +112,14 @@ export default {
       // viewer.flyTo(this.imagelayers[obj.year]);
     },
   },
-  watch: {},
   watch: {
     emitImgIndex(val) {
       this.$emit("updateParent", "imgIndex", val);
       this.$emit("updateParent", "imgList", this.emitImgList);
     },
+    splitScreen(val){
+      this.onClick(val);
+    },
   },
   beforeDestroy() {},
 };

+ 5 - 5
src/views/farmlandProtection/jctb/index.vue

@@ -168,7 +168,6 @@ export default {
       updateObj: {
         region: "4602",
         tab: 1,
-
         val0: "",
         val1: "",
         val2: "",
@@ -188,7 +187,8 @@ export default {
       this.isShowTb = false;
       this.imgIndex = -1;
       if (this.activeTabs == "tbqd") {
-        this.$refs.tbqd.init();
+        // this.$refs.tbqd.init();
+        // this.$refs.tbqd.initNew();
       }
     },
     closeBox() {
@@ -277,9 +277,9 @@ export default {
     imgIndex(val) {
       this.$refs.carousel.setActiveItem(val);
     },
-    isShowTb(val) {
-      this.$refs.tbDetails.onClick(val);
-    },
+    // isShowTb(val) {
+    //   this.$refs.tbDetails.onClick(val);
+    // },
   },
 };
 </script>