zpf hai 1 ano
pai
achega
1091ea4851

+ 4 - 24
src/views/cockpit/common/VectorSpace/BoxCommonVector.vue

@@ -57,26 +57,8 @@ export default {
         draw_vector_tdgy_gy_jd(data) {
             // tdsy.remove();
             data.forEach((res) => {
-
                 res.type = this.title
-
-                if (res.geom.type == "MultiPolygon") {
-                    console.log("多面");
-
-                    res.geom.coordinates.forEach((res_coordinates) => {
-                        let arrayt = [];
-                        if (res_coordinates.length == 1) {
-                            arrayt = res_coordinates[0]
-                        } else {
-                            arrayt = res_coordinates
-                        }
-
-                        const twoDArray = arrayt;
-                        const oneDArray = twoDArray.reduce((accumulator, currentValue) => accumulator.concat(currentValue), []);
-                        tdsy.add(res, oneDArray);
-                    })
-                } else {
-                    console.log("单面");
+                if (res.geom) {
                     res.geom.coordinates.forEach((res_coordinates) => {
                         let arrayt = [];
                         if (res_coordinates.length == 1) {
@@ -90,7 +72,6 @@ export default {
                         tdsy.add(res, oneDArray);
                     })
                 }
-
             })
         },
 
@@ -325,7 +306,6 @@ export default {
                 obj.endTime = undefined
             }
             let data = await QueryList(obj);
-            console.log('data: ', data);
             data.data.map((res) => {
                 if (res.geom) {
                     res.geom = wellknown.parse(res.geom.split(";")[1]);
@@ -345,12 +325,12 @@ export default {
     watch: {
         cockpit_vector(newVal, oldVal) {
             this.title = newVal.title
-            if (newVal.tableData.length <= 0) {
-                this.tableData = []
-            }
             if (newVal.tableData.length > 0) {
+
                 this.active_dableData = newVal.tableData
                 this.tableData = newVal.tableData
+                this.init_vector()
+
             } else {
                 this.init_vector()
             }

+ 0 - 2
src/views/cockpit/gdbh.vue

@@ -667,8 +667,6 @@ export default {
         }
       });
       this.vector_data = data.data;
-      console.log('this.vector_data: ', this.vector_data);
-
     },
     async init_jcpg_hz(params) {
 

+ 3 - 4
src/views/cockpit/tdsy.vue

@@ -1153,7 +1153,6 @@ export default {
       //     columns:["项目名称","土地用途","出让面积(公顷)","土地使用权","土地座落","批准文号","批准机关"],
       //   })
       // }
-
       store.setCockpit_vector({
         title: "土地供应完成项目",
         tableData: this.vector_data,
@@ -1183,7 +1182,7 @@ export default {
       });
       this.vector_data = data.data;
     },
-    draw_vector_hysyq(){
+    draw_vector_hysyq() {
 
     }
   },
@@ -1612,6 +1611,6 @@ export default {
 }
 
 .cursor {
-      cursor: pointer;
-  }
+  cursor: pointer;
+}
 </style>