瀏覽代碼

影像对比正叙历年、耕地保护目标单位切换、公顷单位切换

maxiaoxiao 5 月之前
父節點
當前提交
032d3561ba

+ 4 - 4
src/views/LandConsolidation/components/contrast.vue

@@ -320,10 +320,10 @@ export default {
     },
     reset() {
       this.$emit("fly");
-      if (this.$props.ptaye == "gdbh") {
-        let dalist = this.gdjlcheck[0];
-        viewer.flyTo(this.imagelayers[dalist[dalist.length - 1]]);
-      }
+      // if (this.$props.ptaye == "gdbh") { 
+      //   let dalist = this.gdjlcheck[0];
+      //   viewer.flyTo(this.imagelayers[dalist[dalist.length - 1]]);
+      // }
       if (this.active == 1)
         this.checkdata[1].forEach((mc, i) => {
           if (this.checkdata[0].indexOf(mc) == -1) {

+ 14 - 12
src/views/farmlandProtection/gdzl/index.vue

@@ -42,16 +42,10 @@
               <div class="icon">
                 <div class="iicon"></div>
               </div>
-              <!-- <div class="text" v-if="dlbm == '01' && pageType">
-                <p>{{ zl.ntname }}</p>
-                <span class="cvalue">
-                  {{ (zldata[zl.prop || uprops[nowunit]] || 0).toFixed(2) }}
-                  {{ zl.ntunit || unitList[nowunit].unit }}</span>
-              </div> -->
               <div class="text">
                 <p>{{ zl.name }}</p>
                 <span class="cvalue">
-                  {{ (zldata[zl.prop || uprops[nowunit]] || 0).toFixed(2) }}
+                  {{ (zldata[zl.prop || ((zl.p || '') + uprops[nowunit])] || 0).toFixed(2) }}
                   {{ zl.unit || unitList[nowunit].unit }}</span>
               </div>
             </div>
@@ -88,7 +82,7 @@
             <div class="item item50" v-for="(bh, index) in bhlist" :key="index">
               <div class="text">
                 <p>{{ bh.name }}</p>
-                <span class="cvalue">
+                <span class="cvalue" :class="bhdata.mjbh > 0 ? 'posNum' : 'negNum'">
                   {{ (bhdata[bh.prop || uprops[nowunit]] || 0).toFixed(2) }}
                 </span>
                 <span class="unit">{{ bh.unit || unitList[nowunit].unit }}</span>
@@ -164,7 +158,7 @@ export default {
         { name: "占现状耕地比", prop: "zb", unit: "%", }],
         耕地: [
           { name: "耕地保有量", },
-          { name: "耕地保护目标", prop: "zb", unit: "km²", },
+          { name: "耕地保护目标", p: "bh_" },
         ],
         水田: [
           { name: "水田现状" },
@@ -180,8 +174,8 @@ export default {
         ],
       },
       bhlist: [
-        { name: "变化幅度", prop: "mjbh", unit: "%" },
         { name: "变化面积" },
+        { name: "变化幅度", prop: "mjbh", unit: "%" },
       ],
 
       zldata: {},
@@ -327,7 +321,7 @@ export default {
     },
     async regionChange(region) {
       // this.region = region;
-      if (this.pageType && this.dlbm == "01") this.gtype = "永久基本农田"
+      if (this.dlbm == "01") this.gtype = this.pageType ? "永久基本农田" : '耕地'
       if (region) this.nowyear = "";
       if (!this.nowyear) await this.GetDate();
       this.getData();
@@ -443,7 +437,7 @@ export default {
       });
     },
     contrast() {
-      let dbdata = { id: this.region, fp: this.yearList, type: "gdbh" }; //+ this.$props.pageType,
+      let dbdata = { id: this.region, fp: this.yearList.reverse(), type: "gdbh" }; //+ this.$props.pageType,
       console.log("contrast", dbdata);
       this.$emit("contrast", dbdata);
     },
@@ -589,6 +583,14 @@ export default {
     padding-top: 10px;
     margin-top: 5px;
     display: flex;
+
+    .posNum {
+      color: #ec808d !important;
+    }
+
+    .negNum {
+      color: #00cc3a !important;
+    }
   }
 
   .echars {

+ 3 - 1
src/views/farmlandProtection/indexNew.vue

@@ -121,7 +121,9 @@ export default {
     },
     contrastClose() {
       this.iscontrast = false;
-      this.$refs.gdzl.sourcesshow(true);
+      this.$nextTick(() => {
+        this.$refs.gdzl.sourcesshow(true);
+      })
     },
     handleView(row, type) {
       this.$refs.detailModal.handleView(row, type);