|
@@ -28,7 +28,7 @@
|
|
|
<el-table-column
|
|
|
show-overflow-tooltip="true"
|
|
|
prop="siweiarea"
|
|
|
- label="图斑面积"
|
|
|
+ label="图斑面积(㎡)"
|
|
|
>
|
|
|
</el-table-column>
|
|
|
<el-table-column width="100" label="操作">
|
|
@@ -141,8 +141,9 @@
|
|
|
|
|
|
<script>
|
|
|
import { name } from "file-loader";
|
|
|
-import { getYZ, getOneDetail } from "../../../api/ghss/gdbh.js";
|
|
|
-
|
|
|
+import { getYZ, getgeoms, getOneDetail } from "../../../api/ghss/gdbh.js";
|
|
|
+import { loadGeoJSON } from "@/utils/MapHelper/help.js";
|
|
|
+let layerSources = {};
|
|
|
export default {
|
|
|
props: {
|
|
|
interObj: {
|
|
@@ -157,6 +158,7 @@ export default {
|
|
|
isShallow: false,
|
|
|
jbxxData: null,
|
|
|
yzjgData: [],
|
|
|
+ tempdataLayerId: null,
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -166,11 +168,20 @@ export default {
|
|
|
//关闭套合结果详情
|
|
|
closeInster() {
|
|
|
this.$emit("updateParent", "showInter", false);
|
|
|
- this.isShallow = false
|
|
|
+ this.isShallow = false;
|
|
|
+ viewer.entities.removeAll();
|
|
|
+ viewer.dataSources.removeAll();
|
|
|
+ },
|
|
|
+ flyTo(item) {
|
|
|
+ let id = "h_" + item.id;
|
|
|
+ this.tempdataLayerId = id;
|
|
|
+ loadGeoJSON(item.geom, "#ff0000", { isfly: true }, (data) => {
|
|
|
+ console.log("--sx;,ksc");
|
|
|
+ layerSources[id] = data;
|
|
|
+ });
|
|
|
},
|
|
|
- flyTo(val) {},
|
|
|
handleView(val) {
|
|
|
- this.isShallow = true
|
|
|
+ this.isShallow = true;
|
|
|
getOneDetail({
|
|
|
bsm: this.interObj.bsm,
|
|
|
id: val.id,
|
|
@@ -189,14 +200,42 @@ export default {
|
|
|
this.isShallow = true;
|
|
|
},
|
|
|
init() {
|
|
|
+ if (!this.interObj.mxbsm) {
|
|
|
+ this.getAll();
|
|
|
+ } else {
|
|
|
+ this.getYZ();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ getYZ() {
|
|
|
getYZ(this.interObj).then((res) => {
|
|
|
if (res.statuscode == 200) {
|
|
|
this.tableData = res.data;
|
|
|
+ this.active_tableData(this.tableData);
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.message);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ getAll() {
|
|
|
+ getgeoms(this.interObj).then((res) => {
|
|
|
+ if (res.statuscode == 200) {
|
|
|
+ this.tableData = res.data.dataListMap;
|
|
|
+ console.log(this.tableData, "---xo-sx");
|
|
|
+ this.active_tableData(res.data.dataListMap);
|
|
|
} else {
|
|
|
this.$message.error(res.message);
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ active_tableData(newVal) {
|
|
|
+ newVal.forEach((res, index) => {
|
|
|
+ res.type = "图斑上图";
|
|
|
+ if (res.geom)
|
|
|
+ loadGeoJSON(res.geom, "#55A1E3", { isfly: false }, (data) => {
|
|
|
+ layerSources[res.id] = data;
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
},
|
|
|
mounted() {},
|
|
|
watch: {
|
|
@@ -210,6 +249,12 @@ export default {
|
|
|
deep: true,
|
|
|
immediate: true,
|
|
|
},
|
|
|
+ tempdataLayerId(newVal, oldVal) {
|
|
|
+ if (oldVal && layerSources[oldVal]) {
|
|
|
+ viewer.dataSources.remove(layerSources[oldVal]);
|
|
|
+ layerSources[oldVal] = null;
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
@@ -266,7 +311,7 @@ export default {
|
|
|
color: aqua;
|
|
|
}
|
|
|
}
|
|
|
-/deep/ .el-carousel--horizontal{
|
|
|
+/deep/ .el-carousel--horizontal {
|
|
|
margin-top: 15px;
|
|
|
}
|
|
|
/deep/ .el-carousel__item h3 {
|
|
@@ -350,7 +395,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-.sm-function-module-query{
|
|
|
+.sm-function-module-query {
|
|
|
max-height: 800px !important;
|
|
|
top: 28px !important;
|
|
|
}
|