|
@@ -85,6 +85,7 @@ export default {
|
|
xzmj: "",
|
|
xzmj: "",
|
|
fileList: [],
|
|
fileList: [],
|
|
},
|
|
},
|
|
|
|
+ tempdataSourcesId: null,
|
|
fileid: 1,
|
|
fileid: 1,
|
|
reflist: {},
|
|
reflist: {},
|
|
};
|
|
};
|
|
@@ -148,7 +149,7 @@ export default {
|
|
if (child.dataList) {
|
|
if (child.dataList) {
|
|
child.dataList.forEach((ld, li) => {
|
|
child.dataList.forEach((ld, li) => {
|
|
if (fun == "sources")
|
|
if (fun == "sources")
|
|
- this.changeDataSources({ ...ld, iseyes }, colors[li]);
|
|
|
|
|
|
+ this.changeDataSources({ ...ld, iseyes }, "#62ADED");
|
|
else {
|
|
else {
|
|
ld.name = ld.yslx_name;
|
|
ld.name = ld.yslx_name;
|
|
ld.value = ld.mj;
|
|
ld.value = ld.mj;
|
|
@@ -173,15 +174,17 @@ export default {
|
|
},
|
|
},
|
|
changeDataSources({ geom, id, iseyes, iszoom }, color) {
|
|
changeDataSources({ geom, id, iseyes, iszoom }, color) {
|
|
if (iszoom) {
|
|
if (iszoom) {
|
|
- this.zoomTo(id);
|
|
|
|
|
|
+ this.zoomTo(id, geom);
|
|
} else if (dataSourceList[id]) {
|
|
} else if (dataSourceList[id]) {
|
|
dataSourceList[id].show = iseyes;
|
|
dataSourceList[id].show = iseyes;
|
|
} else if (geom) {
|
|
} else if (geom) {
|
|
this.addPolygon(geom, id, color);
|
|
this.addPolygon(geom, id, color);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- zoomTo(id) {
|
|
|
|
- if (dataSourceList[id]) viewer.zoomTo(dataSourceList[id]);
|
|
|
|
|
|
+ zoomTo(id, geom) {
|
|
|
|
+ // if (dataSourceList[id]) viewer.zoomTo(dataSourceList[id]);
|
|
|
|
+ this.tempdataSourcesId = id;
|
|
|
|
+ this.addPolygon(geom, id, "#ff0000");
|
|
},
|
|
},
|
|
setEchart(data, id, childid) {
|
|
setEchart(data, id, childid) {
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
@@ -249,6 +252,12 @@ export default {
|
|
// scjgObj(newValue) {
|
|
// scjgObj(newValue) {
|
|
// this.initData();
|
|
// this.initData();
|
|
// },
|
|
// },
|
|
|
|
+ //监听区域id的变化,用于删除上一次点击生成的geojson区域面
|
|
|
|
+ tempdataSourcesId(newVal, oldVal) {
|
|
|
|
+ if (oldVal) {
|
|
|
|
+ viewer.dataSources.remove(dataSourceList[oldVal]);
|
|
|
|
+ }
|
|
|
|
+ },
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|