|
@@ -48,6 +48,7 @@
|
|
|
import pie from "@/components/echartsTemplate/pie.vue";
|
|
|
import { GetFxjg } from "@/api/ghss/hgxfx.js";
|
|
|
import parse from "wellknown";
|
|
|
+let dataSourceList = {};
|
|
|
let colors = [
|
|
|
"#62ADED",
|
|
|
"#DFE15A",
|
|
@@ -75,7 +76,6 @@ export default {
|
|
|
xzmj: "",
|
|
|
fileList: [],
|
|
|
},
|
|
|
- dataSources: {},
|
|
|
fileid: 1,
|
|
|
};
|
|
|
},
|
|
@@ -124,8 +124,8 @@ export default {
|
|
|
// emit("eyesChaneg");
|
|
|
},
|
|
|
changeDataSources({ geom, id, iseyes }, color) {
|
|
|
- if (this.dataSources[id]) {
|
|
|
- this.dataSources[id].show = iseyes;
|
|
|
+ if (dataSourceList[id]) {
|
|
|
+ dataSourceList[id].show = iseyes;
|
|
|
} else if (geom) {
|
|
|
this.addPolygon(geom, id, color);
|
|
|
}
|
|
@@ -170,7 +170,7 @@ export default {
|
|
|
// 将数据源添加到Cesium Viewer
|
|
|
viewer.dataSources.add(dataSource);
|
|
|
viewer.zoomTo(dataSource);
|
|
|
- _this.dataSources[id] = dataSource;
|
|
|
+ dataSourceList[id] = dataSource;
|
|
|
// 可以获取实体并进行操作
|
|
|
// dataSource.entities.values.forEach((entity) => {
|
|
|
// // 你可以在这里设置实体的属性,例如位置、颜色等
|
|
@@ -186,8 +186,8 @@ export default {
|
|
|
window.open(this.$props.scjgObj.fxbg.replace(".docx", ".pdf"), "_blank");
|
|
|
},
|
|
|
reset() {
|
|
|
- if (Object.keys(this.dataSources).length) viewer.dataSources.removeAll();
|
|
|
- this.dataSources = {};
|
|
|
+ if (Object.keys(dataSourceList).length) viewer.dataSources.removeAll();
|
|
|
+ dataSourceList = {};
|
|
|
},
|
|
|
},
|
|
|
|
|
@@ -221,7 +221,7 @@ export default {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.export {
|
|
|
- width:110px;
|
|
|
+ width: 110px;
|
|
|
height: 32px;
|
|
|
background: #0f7ac8;
|
|
|
text-align: center;
|