Browse Source

耕地总览+图例

maxiaoxiao 6 months ago
parent
commit
bc03aef804

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

@@ -205,8 +205,9 @@ export default {
     computed_vectorData(newVal) {
       console.log(newVal, "newVal");
       newVal.forEach((res) => {
-        if (res.name == "id") {
-          this.handleView({ id: res.value }, ""); //this.$refs.list.getType()
+        if (res.name == "res") {
+          if ((res.value.entity = "整治图斑"))
+            this.handleView({ id: res.value }, "整治图斑"); //this.$refs.list.getType()
         }
       });
     },

+ 1 - 1
src/views/farmlandProtection/gdzl/index.vue

@@ -88,7 +88,7 @@
 import pie from "@/components/echartsTemplate/pie.vue";
 import { overview, district, reason } from "@/api/Idleland.js";
 import { QueryOne, QueryList } from "@/api/cockpitNew";
-import { legends } from "./config.js";
+import { legends } from "../config.js";
 import { loadGeoJSON } from "@/utils/MapHelper/help.js";
 export default {
   props: {},

+ 11 - 0
src/views/farmlandProtection/indexNew.vue

@@ -41,6 +41,15 @@
       </div>
     </div>
     <Fzyp v-show="activeIndex == 3"></Fzyp>
+    <div class="innerContainer legendPane" v-drag>
+      <div class="xz_box">
+        图例
+        <div v-for="(litem, li) in legends" :key="litem.label">
+          <span :class="`legend${li}`" class="lcolor"></span>
+          <span class="legLabel">{{ litem.label }}</span>
+        </div>
+      </div>
+    </div>
   </div>
 </template>
 
@@ -54,6 +63,7 @@ import Gdzl from "./gdzl/index.vue";
 // import Details from "./components/details.vue";
 // import Contrast from "./components/contrast.vue";
 import Fzyp from "./index.vue";
+import { legends } from "./config.js";
 import * as pick_cockpit_vector from "@/components/Query/clickQuery/pick_cockpit_vector.js";
 export default {
   name: "farmlandProtectionNew",
@@ -82,6 +92,7 @@ export default {
       ],
       activeIndex: 0,
       iscontrast: false,
+      legends: legends,
     };
   },
   computed: {