|
@@ -7,7 +7,7 @@
|
|
|
</span>
|
|
|
<custom-form ref="formRef" :model="pageObj" :config="formConfig">
|
|
|
<template #type>
|
|
|
- <el-select v-model="pageObj.idleReason" placeholder="项目类型">
|
|
|
+ <el-select v-model="pageObj.val1" placeholder="项目类型">
|
|
|
<el-option
|
|
|
v-for="item in reasonList"
|
|
|
:key="item.code"
|
|
@@ -50,7 +50,7 @@
|
|
|
<script>
|
|
|
import tablePage from "@/components/mapView/tablePage.vue";
|
|
|
import customForm from "@/components/mapView/custom-form.vue";
|
|
|
-
|
|
|
+import { QueryOne, QueryList } from "@/api/cockpitNew";
|
|
|
import { GetList } from "@/api/Idleland.js";
|
|
|
import { zzForm, TableHeader, reasonList } from "./config";
|
|
|
import { loadGeoJSON } from "@/utils/MapHelper/help.js";
|
|
@@ -71,17 +71,13 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
pageObj: {
|
|
|
- key: "",
|
|
|
- xzqh: "",
|
|
|
- idleReason: "",
|
|
|
- isConfirm: true,
|
|
|
+ id: "",
|
|
|
+ val0: "",
|
|
|
+ val1: "",
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
- isDisposal: false,
|
|
|
- startTime: "",
|
|
|
- endTime: "",
|
|
|
},
|
|
|
- datalist: [{}],
|
|
|
+ region: "",
|
|
|
formConfig: zzForm,
|
|
|
cloumn: TableHeader,
|
|
|
reasonList: reasonList,
|
|
@@ -100,6 +96,11 @@ export default {
|
|
|
cockpit() {
|
|
|
this.$emit("cockpit");
|
|
|
},
|
|
|
+ regionChange(region) {
|
|
|
+ this.region = region;
|
|
|
+ this.pageObj.id = region;
|
|
|
+ this.searchFun();
|
|
|
+ },
|
|
|
searchFun(page = {}) {
|
|
|
this.getTableData({
|
|
|
...this.pageObj,
|
|
@@ -110,14 +111,26 @@ export default {
|
|
|
getTableData() {
|
|
|
this.$emit("updateParent", "loading", true);
|
|
|
this.removeGeoJSON();
|
|
|
- GetList(this.pageObj).then((res) => {
|
|
|
+ QueryList({ jscType: "qytuzz_zzxm_xmlb", ...this.pageObj }).then(
|
|
|
+ (res) => {
|
|
|
+ this.$emit("updateParent", "loading", false);
|
|
|
+ this.table = {
|
|
|
+ ...res.data,
|
|
|
+ total: res.data.length,
|
|
|
+ data: res.data,
|
|
|
+ };
|
|
|
+ this.active_tableData(res.data);
|
|
|
+ }
|
|
|
+ );
|
|
|
+ },
|
|
|
+
|
|
|
+ Getjxyd() {
|
|
|
+ QueryOne({
|
|
|
+ jscType: "qytuzz_zzxm_xmxq",
|
|
|
+ id: this.region,
|
|
|
+ }).then((res) => {
|
|
|
+ this.jxyddata = res.data || {};
|
|
|
this.$emit("updateParent", "loading", false);
|
|
|
- this.table = {
|
|
|
- ...res.data,
|
|
|
- total: res.data.count,
|
|
|
- data: res.data.list,
|
|
|
- };
|
|
|
- this.active_tableData(res.data.list);
|
|
|
});
|
|
|
},
|
|
|
tableRowClassName({ row, rowIndex }) {
|
|
@@ -128,37 +141,27 @@ export default {
|
|
|
},
|
|
|
active_tableData(newVal) {
|
|
|
newVal.forEach((res, index) => {
|
|
|
- if (res.geom || res.st_asewkt)
|
|
|
- loadGeoJSON(
|
|
|
- res.geom || res.st_asewkt,
|
|
|
- "#55A1E3",
|
|
|
- { isfly: false },
|
|
|
- (data) => {
|
|
|
- geoSources[res.id] = data;
|
|
|
- data.name = "Idleland";
|
|
|
- data.entities.values.forEach((entity) => {
|
|
|
- entity.properties = { type: "图斑上图", id: res.id };
|
|
|
- });
|
|
|
- }
|
|
|
- );
|
|
|
+ if (res.geom)
|
|
|
+ loadGeoJSON(res.geom, "#55A1E3", { isfly: false }, (data) => {
|
|
|
+ geoSources[res.id] = data;
|
|
|
+ data.name = "Idleland";
|
|
|
+ data.entities.values.forEach((entity) => {
|
|
|
+ entity.properties = { type: "图斑上图", id: res.id };
|
|
|
+ });
|
|
|
+ });
|
|
|
});
|
|
|
},
|
|
|
flyTo(item) {
|
|
|
let id = "h_" + item.id;
|
|
|
this.tempdataLayerId = id;
|
|
|
if (geoSources[id]) return;
|
|
|
- loadGeoJSON(
|
|
|
- item.geom || item.st_asewkt,
|
|
|
- "#ff0000",
|
|
|
- { isfly: true },
|
|
|
- (data) => {
|
|
|
- data.name = "Idleland";
|
|
|
- geoSources[id] = data;
|
|
|
- data.entities.values.forEach((entity) => {
|
|
|
- entity.properties = { type: "图斑上图", id: item.id };
|
|
|
- });
|
|
|
- }
|
|
|
- );
|
|
|
+ loadGeoJSON(item.geom, "#ff0000", { isfly: true }, (data) => {
|
|
|
+ data.name = "Idleland";
|
|
|
+ geoSources[id] = data;
|
|
|
+ data.entities.values.forEach((entity) => {
|
|
|
+ entity.properties = { type: "图斑上图", id: item.id };
|
|
|
+ });
|
|
|
+ });
|
|
|
},
|
|
|
removeGeoJSON() {
|
|
|
if (!window.viewer) return;
|
|
@@ -171,15 +174,11 @@ export default {
|
|
|
|
|
|
reset(xzqh) {
|
|
|
this.pageObj = {
|
|
|
- key: "",
|
|
|
- xzqh,
|
|
|
- idleReason: "",
|
|
|
- isConfirm: this.$props.type != 0,
|
|
|
+ id: this.region,
|
|
|
+ val0: "",
|
|
|
+ val1: "",
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
- isDisposal: this.$props.type == 2,
|
|
|
- // startTime: store.state.cockpit_date[0],
|
|
|
- // endTime: store.state.cockpit_date[1],
|
|
|
};
|
|
|
},
|
|
|
detail(row) {
|