|
@@ -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()
|
|
|
}
|