|
@@ -50,10 +50,10 @@
|
|
<script>
|
|
<script>
|
|
import tablePage from "@/components/mapView/tablePage.vue";
|
|
import tablePage from "@/components/mapView/tablePage.vue";
|
|
import customForm from "@/components/mapView/custom-form.vue";
|
|
import customForm from "@/components/mapView/custom-form.vue";
|
|
-// import { QueryOne, QueryList } from "@/api/cockpitNew";
|
|
|
|
|
|
+import { QueryList } from "@/api/cockpitNew";
|
|
import { getXmList } from "@/api/stxf/tdzz.js";
|
|
import { getXmList } from "@/api/stxf/tdzz.js";
|
|
import { zzForm, TableHeader, reasonList } from "./config";
|
|
import { zzForm, TableHeader, reasonList } from "./config";
|
|
-import { loadGeoJSON } from "@/utils/MapHelper/help.js";
|
|
|
|
|
|
+import { loadGeoJSON, removeGeoJSON } from "@/utils/MapHelper/help.js";
|
|
let geoSources = {};
|
|
let geoSources = {};
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
@@ -108,7 +108,7 @@ export default {
|
|
},
|
|
},
|
|
getTableData() {
|
|
getTableData() {
|
|
this.$emit("updateParent", "loading", true);
|
|
this.$emit("updateParent", "loading", true);
|
|
- this.removeGeoJSON("zzxm");
|
|
|
|
|
|
+ removeGeoJSON("zzxm");
|
|
getXmList(this.pageObj).then((res) => {
|
|
getXmList(this.pageObj).then((res) => {
|
|
this.$emit("updateParent", "loading", false);
|
|
this.$emit("updateParent", "loading", false);
|
|
this.table = { total: res.total, data: res.rows };
|
|
this.table = { total: res.total, data: res.rows };
|
|
@@ -141,12 +141,12 @@ export default {
|
|
// let xzqdm = "h_" + item.xzqdm;
|
|
// let xzqdm = "h_" + item.xzqdm;
|
|
// this.tempdataLayerId = xzqdm;
|
|
// this.tempdataLayerId = xzqdm;
|
|
// if (geoSources[xzqdm]) return;
|
|
// if (geoSources[xzqdm]) return;
|
|
- this.removeGeoJSON("zzxmhig");
|
|
|
|
|
|
+ removeGeoJSON("zzxmhig");
|
|
item.tQytdzzZzxm.forEach((res) => {
|
|
item.tQytdzzZzxm.forEach((res) => {
|
|
if (res.geom)
|
|
if (res.geom)
|
|
loadGeoJSON(res.geom, "#ff0000", { isfly: true }, (data) => {
|
|
loadGeoJSON(res.geom, "#ff0000", { isfly: true }, (data) => {
|
|
data.name = "zzxmhig";
|
|
data.name = "zzxmhig";
|
|
- geoSources[res.pid + res.id] = data;
|
|
|
|
|
|
+ geoSources[res.pid + res.id + "h"] = data;
|
|
res.entity = "整治图斑";
|
|
res.entity = "整治图斑";
|
|
data.entities.values.forEach((entity) => {
|
|
data.entities.values.forEach((entity) => {
|
|
entity.properties = { type: "图斑上图", res };
|
|
entity.properties = { type: "图斑上图", res };
|
|
@@ -154,15 +154,6 @@ export default {
|
|
});
|
|
});
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- removeGeoJSON(name) {
|
|
|
|
- if (!window.viewer) return;
|
|
|
|
- // viewer.entities.removeAll();
|
|
|
|
- // viewer.dataSources.removeAll();
|
|
|
|
- for (var i = viewer.dataSources._dataSources.length - 1; i >= 0; i--) {
|
|
|
|
- var das = viewer.dataSources._dataSources[i];
|
|
|
|
- if (das.name == name) viewer.dataSources.remove(das);
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
|
|
|
|
reset(xzqh) {
|
|
reset(xzqh) {
|
|
this.pageObj = {
|
|
this.pageObj = {
|
|
@@ -172,15 +163,24 @@ export default {
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
};
|
|
};
|
|
- this.removeGeoJSON();
|
|
|
|
|
|
+ removeGeoJSON("zzxm");
|
|
|
|
+ removeGeoJSON("zzxmhig");
|
|
},
|
|
},
|
|
detail(row) {
|
|
detail(row) {
|
|
this.flyTo(row);
|
|
this.flyTo(row);
|
|
this.bus.$emit("handleView", row, "整治项目");
|
|
this.bus.$emit("handleView", row, "整治项目");
|
|
},
|
|
},
|
|
- handle(row) {
|
|
|
|
- this.$emit("contrast", row);
|
|
|
|
|
|
+ async handle(row) {
|
|
|
|
+ removeGeoJSON("zzxm");
|
|
|
|
+ this.flyTo(row);
|
|
|
|
+ let res = await QueryList({
|
|
|
|
+ jscType: "qytuzz_zzxm_qhdb",
|
|
|
|
+ id: row.id,
|
|
|
|
+ });
|
|
|
|
+ console.log("----", res);
|
|
|
|
+ this.$emit("contrast", { id: this.region, fp: res.data });
|
|
},
|
|
},
|
|
|
|
+
|
|
changerdxz() {
|
|
changerdxz() {
|
|
this.pageObj.isConfirm = !this.pageObj.isConfirm;
|
|
this.pageObj.isConfirm = !this.pageObj.isConfirm;
|
|
this.searchFun();
|
|
this.searchFun();
|