Просмотр исходного кода

耕地保护2022,2021 图斑上图错误修改

maxiaoxiao 4 месяцев назад
Родитель
Сommit
0b1ea791eb

+ 3 - 1
src/views/LandConsolidation/index.vue

@@ -229,7 +229,9 @@ export default {
     },
     contrastClose() {
       this.iscontrast = false;
-      this.$refs.sdgk.sourcesshow(true);
+      this.$nextTick(() => {
+        this.$refs.sdgk.sourcesshow(true);
+      });
     },
 
     rzClose() {

+ 4 - 3
src/views/farmlandProtection/gdzl/index.vue

@@ -323,7 +323,7 @@ export default {
       }
       if (obj.top) viewer.imageryLayers.raiseToTop(this.imagelayers[lkey]);
       fun && fun(this.imagelayers[lkey]);
-      viewer.flyTo(this.imagelayers[lkey]);
+      if (this.imagelayers[lkey]) viewer.flyTo(this.imagelayers[lkey]);
     },
     async regionChange(region) {
       // this.region = region;
@@ -445,6 +445,7 @@ export default {
     contrast() {
       let dbdata = { id: this.region, fp: this.yearList.sort((a, b) => a.year - b.year), type: "gdbh" }; //+ this.$props.pageType,
       console.log("contrast", dbdata);
+      this.setImager({ year: this.nowlayer }, false);
       this.$emit("contrast", dbdata);
     },
     fly() {
@@ -475,8 +476,8 @@ export default {
       console.log(newValue, "---");
     },
     nowlayer(newValue, oldVal) {
-      this.setImager({ year: oldVal }, false);
-      this.setImager({ year: newValue }, true);
+      // this.setImager({ year: oldVal }, false);
+      // this.setImager({ year: newValue }, true);
     },
   },
   beforeDestroy() {