|
@@ -125,6 +125,9 @@ export default {
|
|
|
scjgObj: {
|
|
|
type: Object,
|
|
|
},
|
|
|
+ rwBsm: {
|
|
|
+ type: String,
|
|
|
+ },
|
|
|
},
|
|
|
|
|
|
data() {
|
|
@@ -160,19 +163,24 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.bus.$on("xzjgBSM", (val) => {
|
|
|
- GetXzjg({ bsm: val }).then((res) => {
|
|
|
- this.xzjgObj = JSON.parse(JSON.stringify(res.data));
|
|
|
- this.copyData = JSON.parse(JSON.stringify(res.data));
|
|
|
- this.tempObj = JSON.parse(JSON.stringify(res.data));
|
|
|
- this.xzjgObj.dks.forEach((item) => {
|
|
|
- this.drawWktPloygon(item.geom, "#0000ff"); //item.dkbm
|
|
|
- });
|
|
|
- this.drawWktPloygon(res.data.geom, "#ff0000"); //res.data.bsm
|
|
|
- });
|
|
|
- });
|
|
|
+ this.GetXzjg()
|
|
|
},
|
|
|
methods: {
|
|
|
+ GetXzjg() {
|
|
|
+ GetXzjg({ bsm: this.$props.rwBsm }).then((res) => {
|
|
|
+ if (res.success) {
|
|
|
+ this.xzjgObj = JSON.parse(JSON.stringify(res.data));
|
|
|
+ this.copyData = JSON.parse(JSON.stringify(res.data));
|
|
|
+ this.tempObj = JSON.parse(JSON.stringify(res.data));
|
|
|
+ this.xzjgObj.dks.forEach((item) => {
|
|
|
+ this.drawWktPloygon(item.geom, "#0000ff"); //item.dkbm
|
|
|
+ });
|
|
|
+ this.drawWktPloygon(res.data.geom, "#ff0000"); //res.data.bsm
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.message);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
download() {
|
|
|
window.open(this.$props.scjgObj.task.fxbg);
|
|
|
},
|
|
@@ -350,7 +358,6 @@ export default {
|
|
|
beforeDestroy() {
|
|
|
viewer.entities.removeAll();
|
|
|
viewer.dataSources.removeAll();
|
|
|
- this.bus.$off("xzjgBSM"); //清除全局事件总线
|
|
|
},
|
|
|
};
|
|
|
</script>
|