maxiaoxiao 7 miesięcy temu
rodzic
commit
b33f487e66

+ 5 - 2
src/views/LandConsolidation/components/AsideBottom.vue

@@ -8,7 +8,6 @@
     ></div>
     <el-steps :active="activeVal" align-center class="stepClass">
       <!-- <el-step /> -->
-      {{ activeVal }}----
       <el-step
         :title="item.year"
         v-for="(item, i) in dataArray"
@@ -87,7 +86,7 @@ export default {
   display: flex;
   align-items: center;
   background: #103451;
-  border-radius: 5px;
+  border-radius: 10px;
   // background-image: url("/static/images/ghzc/内容框.png");
   // background-size: 100% 100%;
   z-index: 100;
@@ -97,6 +96,7 @@ export default {
     width: 40px;
     height: 40px;
     margin-left: 20px;
+    z-index: 100;
     // margin: 0px 46px;
   }
 
@@ -178,6 +178,9 @@ export default {
             rgba(255, 168, 50, 0.52)
           );
         }
+        .el-step__titl {
+          color: #fff;
+        }
       }
     }
 

+ 24 - 9
src/views/LandConsolidation/components/contrast.vue

@@ -73,7 +73,6 @@ export default {
       list: ["卷帘对比", "分屏对比", "影像对比", "重置"],
       active: 0,
       dbdata: { id: "", fp: {} },
-
       checkdata: [[], []],
       imagelayers: {},
       nolayer: "",
@@ -132,6 +131,10 @@ export default {
 
     clickml() {},
     async onClick(i) {
+      if (i == 3) {
+        this.reset();
+        return;
+      }
       this.active = i;
       if (!this.layersData.length) {
         await this.Getlayers();
@@ -166,16 +169,28 @@ export default {
         this.$refs.aside.activeVal == 0;
         this.$refs.aside.clickHandler();
       } else {
-        this.$refs.aside.clearTimer();
+        this.reset();
       }
-      if (this.active == 1 || this.active == -1) {
-        this.nolayer = this.layersData[0].year;
-        this.setImager(this.layersData[0], true);
+      if (this.active != 0) {
         this.setImager({ year: "qian" }, false);
         this.setImager({ year: "hou" }, false);
-        // this.layersData.forEach((img) => {
-        //   this.setImager(img, false);
-        // });
+      }
+    },
+    reset() {
+      this.$emit("fly");
+      if (this.active == 1)
+        this.checkdata[1].forEach((mc, i) => {
+          if (this.checkdata[0].indexOf(mc) == -1) {
+            this.checkdata[0].push(mc);
+            this.clickcheck(i, mc, true);
+          }
+        });
+      else if (this.active == 2) {
+        this.$refs.aside.activeVal == 1;
+        this.$refs.aside.clearTimer();
+        this.layersData.forEach((img) => {
+          this.setImager(img, false);
+        });
       }
     },
     async Getlayers() {
@@ -221,7 +236,7 @@ export default {
       this.checkdata = [[], []];
       newVal.forEach((res, index) => {
         this.checkdata[0].push(res.dlbmmc);
-        // this.checkdata[1].push(res.dlbmmc);
+        this.checkdata[1].push(res.dlbmmc);
         let adata = { isfly: true, fill_a: 0.8 };
         if (res.qgeom)
           loadGeoJSON(res.qgeom, res.dict_color, adata, (data) => {

+ 10 - 4
src/views/LandConsolidation/components/sdgk.vue

@@ -199,8 +199,8 @@ export default {
       });
       if (jxres.data && jxres.data.length)
         loadGeoJSON(jxres.data[0].geom, "#ffffff", { isfly: true }, (data) => {
-          // geoSources[ri] = data;
-          data.name = "sdqy";
+          geoSources["zlfly"] = data;
+          data.name = "zlfly";
           data.show = false;
         });
       let res = await QueryList({
@@ -208,7 +208,6 @@ export default {
         id: this.region,
       });
       this.zlgeom = res.data;
-
       this.active_tableData(res.data);
     },
     active_tableData(newVal) {
@@ -235,6 +234,11 @@ export default {
           );
       });
     },
+    fly() {
+      viewer.flyTo(geoSources["zlfly"], {
+        offset: new Cesium.HeadingPitchRange(0, -45),
+      });
+    },
     flyTo(type) {
       removeGeoJSON("zlhig");
       this.zlgeom.forEach((res) => {
@@ -249,9 +253,11 @@ export default {
       else removeGeoJSON("zlhig");
       Object.keys(geoSources).forEach((name) => {
         // console.log(name, geoSources[name]);
-        geoSources[name].show = isshow;
+        if (name != "zlfly") geoSources[name].show = isshow;
       });
+      this.fly(); //重置定位
     },
+
     reset() {
       // if (!window.viewer) return;
       // viewer.entities.removeAll();

+ 4 - 0
src/views/LandConsolidation/index.vue

@@ -113,6 +113,7 @@
     <Contrast
       ref="contrastModal"
       v-show="iscontrast"
+      @fly="fly"
       @close="contrastClose"
     ></Contrast>
     <RzDtails
@@ -219,6 +220,9 @@ export default {
       this.iscontrast = true;
       this.$refs.contrastModal.show(dbdata);
     },
+    fly(){
+      this.$refs.sdgk.fly();
+    },
     contrastClose() {
       this.iscontrast = false;
       this.$refs.sdgk.sourcesshow(true);