|
@@ -36,7 +36,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { QueryList } from '@/api/cockpitNew'
|
|
|
+import { QueryOne, QueryList } from '@/api/cockpitNew'
|
|
|
import * as tdsy from "@/views/cockpit/js/tdsy";
|
|
|
|
|
|
import * as wellknown from "wellknown";
|
|
@@ -54,6 +54,10 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
+ async draw_vector_server(jscType){
|
|
|
+ let res = await QueryOne({ jscType, id: "4602" });
|
|
|
+ tdsy.addLayer({ ...res.data, title: this.title });
|
|
|
+ },
|
|
|
multiPolygonToPolygons(multiPolygon) {
|
|
|
const polygons = [];
|
|
|
multiPolygon.coordinates.forEach(polygonCoordinates => {
|
|
@@ -428,6 +432,7 @@ export default {
|
|
|
this.state = ''
|
|
|
if (newVal.tableData && newVal.tableData.length > 0) {
|
|
|
|
|
|
+ this.active_dableData = []//防止重复点击tableData不刷新
|
|
|
this.active_dableData = newVal.tableData
|
|
|
this.tableData = newVal.tableData
|
|
|
// this.init_vector()
|
|
@@ -440,7 +445,8 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
active_dableData(newVal, oldVal) {
|
|
|
- this.draw_vector_tdgy_gy_jd(newVal);
|
|
|
+ if(this.cockpit_vector.mapType) this.draw_vector_server(this.cockpit_vector.mapType)
|
|
|
+ else this.draw_vector_tdgy_gy_jd(newVal);
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|