Ver código fonte

合规性分析检查结果与图表图例颜色一致

Maxx 1 ano atrás
pai
commit
beac29f147

+ 2 - 3
src/components/echartsTemplate/pie.vue

@@ -214,13 +214,12 @@ export default {
       option.series[0].data = cartData.data;
       this.myChart.resize();
       this.myChart.setOption(option);
-      if (cartData.isclick) {
+      // if (cartData.isclick) {
         //  legendselectchanged
         this.myChart.on("legendselectchanged", function (params) {
-          console.log("----");
           _this.$emit("echartClick", params.name, params.selected[params.name]);
         });
-      }
+      // }
     },
   },
   mounted() {

+ 34 - 15
src/views/complianceAnalysis/components/scjg.vue

@@ -32,7 +32,7 @@
         v-show="eitem.isshow"
         class="echart"
         :class="`echart${i}`"
-        @echartClick="echartClick"
+        @echartClick="(name, iseyes)=>echartClick(name, iseyes,i)"
         :ref="`echartRef`"
       ></pie>
     </div>
@@ -46,7 +46,18 @@
 <script>
 import pie from "@/components/echartsTemplate/pie.vue";
 import hgxfx from "../../../../static/data/ghss/data.js";
-let colors = ["#62ADED", "#DFE15A", "#6EDC8D"];
+let colors = [  
+  "#62ADED",
+  "#DFE15A",
+  "#6EDC8D",
+  "#00A42E",
+  "#F9B447",
+  "#7F4FE5",
+  "#FF6969",
+  "#27CED9",
+  "#DF56F5",
+  "#DCFFAF",
+];
 export default {
   components: { pie },
   props: {
@@ -63,29 +74,33 @@ export default {
         fileList: [],
       },
       dataSources: {},
+      fileid: 1,
     };
   },
   mounted() {
-    hgxfx.treeData.forEach((e) => {
-      if (e.label == "控制性详细规划") e.label = "详细规划分析";
+  },
+  methods: {
+    initData(){
+      this.fileid = this.$props.scjgObj.xmmc == '东岸卓越城项目合规性分析'? 1 : 2
+    hgxfx.jgtreeData.forEach((e) => {
+      // if (e.label == "控制性详细规划") e.label = "详细规划分析";
       this.echarts.push({ ...e, iseyes: false, isshow: false });
     });
     this.setEchart1();
     this.setEchart2();
     // this.setEchart3();
     this.setEchart4();
-  },
-  methods: {
+    },
     eyesChaneg(i) {
       this.echarts[i].iseyes = !this.echarts[i].iseyes;
-      if (i == 0 || i == 2) {
-        this.changeDataSources(this.echarts[i]);
-      } else {
+      // if (i == 0 || i == 2) {
+      //   this.changeDataSources(this.echarts[i]);
+      // } else {
         let iseyes = this.echarts[i].iseyes;
         this.echarts[i].children.forEach((child, ci) => {
           this.changeDataSources({ ...child, iseyes }, colors[ci]);
         });
-      }
+      // }
       // emit("eyesChaneg");
     },
     changeDataSources({ label, id, iseyes }, color) {
@@ -93,9 +108,9 @@ export default {
         this.dataSources[id].show = iseyes;
       } else this.addPolygon(label, id, color);
     },
-    echartClick(name, iseyes) {
-      if (this.echarts[1].iseyes) {
-        let click = this.echarts[1].children.filter((c) => c.label == name);
+    echartClick(name, iseyes,index) {
+      if (this.echarts[index].iseyes) {
+        let click = this.echarts[index].children.filter((c) => c.label == name);
         if (click.length > 0)
           this.changeDataSources({
             label: click[0].label,
@@ -147,7 +162,7 @@ export default {
         : Cesium.Color.WHITE;
 
       let polygon = Cesium.GeoJsonDataSource.load(
-        `/static/data/ghss/${label}.geojson`,
+        `/static/data/ghss/${ this.fileid}/${id + label}.geojson`,
         {
           clampToGround: true,
           stroke: scolor,
@@ -190,7 +205,11 @@ export default {
   //       });
   //     }
   //   );
-  watch: {},
+  watch: {
+    scjgObj(newValue){
+      this.initData()
+    }
+  },
 };
 </script>
 

+ 7 - 7
src/views/siteselection/components/fzxz.vue

@@ -443,8 +443,8 @@ export default {
       console.log(value);
     },
     submitData() {
-      this.$refs.ruleForm.validate((valid) => {
-        if (valid) {
+      // this.$refs.ruleForm.validate((valid) => {
+      //   if (valid) {
           // this.activeTabs = 'lsju'
           // this.$emit('updateParent','activeTabs','lsju')
           this.$emit("updateParent", "loading", true);
@@ -455,11 +455,11 @@ export default {
             this.$emit("updateParent", "loading", false);
             this.reset();
           }, 500);
-        } else {
-          console.log("error submit!!");
-          return false;
-        }
-      });
+      //   } else {
+      //     console.log("error submit!!");
+      //     return false;
+      //   }
+      // });
     },
     reset() {
       (this.ruleForm = {

+ 0 - 0
static/data/ghss/城镇开发边界.geojson → static/data/ghss/1/CZKFBJ城镇开发边界.geojson


+ 0 - 0
static/data/ghss/生态保护红线.geojson → static/data/ghss/1/STBHHX生态保护红线.geojson


+ 0 - 0
static/data/ghss/详细规划分析.geojson → static/data/ghss/1/XXGH04商业服务业用地.geojson


+ 0 - 0
static/data/ghss/现状分析.geojson → static/data/ghss/1/XZFX01种植园用地.geojson


+ 0 - 0
static/data/ghss/永久基本农田.geojson → static/data/ghss/1/XZFX02林地.geojson


+ 4 - 0
static/data/ghss/1/XZFX03商业服务业用地.geojson

@@ -0,0 +1,4 @@
+{
+    "type": "MultiPolygon",
+    "coordinates": []
+}

+ 4 - 0
static/data/ghss/1/XZFX04住宅用地.geojson

@@ -0,0 +1,4 @@
+{
+    "type": "MultiPolygon",
+    "coordinates": []
+}

+ 4 - 0
static/data/ghss/1/XZFX05交通运输用地.geojson

@@ -0,0 +1,4 @@
+{
+    "type": "MultiPolygon",
+    "coordinates": []
+}

+ 4 - 0
static/data/ghss/1/YJJBNT永久基本农田.geojson

@@ -0,0 +1,4 @@
+{
+    "type": "MultiPolygon",
+    "coordinates": []
+}

+ 33 - 0
static/data/ghss/data.js

@@ -27,6 +27,39 @@ var data = {
         { rzsj: "2024-06-19 10:51:18", rzlr: "检查要素" },
         { rzsj: "2024-06-19 10:51:15", rzlr: "开始分析" },
     ],
+    jgtreeData: [
+        {   id: "XZFX", 
+            label: "现状分析" ,
+            children: [
+                { id: "XZFX01", label: "种植园用地" },
+                { id: "XZFX02", label: "林地" },
+                { id: "XZFX03", label: "商业服务业用地" },
+                { id: "XZFX04", label: "住宅用地" },
+                { id: "XZFX05", label: "交通运输用地" },
+            ],
+        },
+        {
+            id: 'SXFX',
+            label: "三线分析",
+            children: [
+                { id: "YJJBNT", label: "永久基本农田" },
+                { id: "CZKFBJ", label: "城镇开发边界" },
+                { id: "STBHHX", label: "生态保护红线" },
+            ],
+        },
+        {   id: "XXGH", 
+            label: "详细规划分析" ,
+            children: [
+                { id: "XXGH01", label: "耕地" },
+                { id: "XXGH02", label: "居住用地" },
+                { id: "XXGH03", label: "公共管理与公共服务用地" },
+                { id: "XXGH04", label: "商业服务业用地" },
+                { id: "XXGH05", label: "交通运输用地" },
+                { id: "XXGH06", label: "绿地与开敞空间用地" },
+                { id: "XXGH07", label: "留白用地" },
+            ],
+        },
+    ],
     // 现状分析
     xzfxlist: [
         { name: "种植园用地", value: 0.4901 },

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
static/data/ghss/三线分析.geojson


Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff