maxiaoxiao 6 месяцев назад
Родитель
Сommit
e7b355ce49

+ 1 - 1
src/views/LandConsolidation/components/config.js

@@ -8,7 +8,7 @@ export const zzForm = [
     },
     {
       label: '',
-      prop: 'key',
+      prop: 'val0',
       span: 10,
       component: 'ElInput',
       componentProps: {

+ 48 - 49
src/views/LandConsolidation/components/list.vue

@@ -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) {

+ 2 - 4
src/views/LandConsolidation/components/organize.vue

@@ -123,7 +123,6 @@
   
   <script>
 import pie from "@/components/echartsTemplate/pie.vue";
-import { overview, reason } from "@/api/Idleland.js";
 import { QueryOne, QueryList } from "@/api/cockpitNew";
 export default {
   props: {},
@@ -204,12 +203,11 @@ export default {
       });
     },
     Getjxyd() {
-      QueryList({
+      QueryOne({
         jscType: "qytuzz_sdzl_ydzlqk_jxydxq",
         id: this.region,
       }).then((res) => {
-        console.log("--", res);
-        this.jxyddata = res.data.length ? res.data[0] : {};
+        this.jxyddata = res.data || {};
         this.$emit("updateParent", "loading", false);
       });
     },

+ 1 - 1
src/views/LandConsolidation/index.vue

@@ -185,7 +185,7 @@ export default {
         this.$refs.qhdb.regionChange(this.xzqh);
         this.$refs.organize.regionChange(this.xzqh);
       }
-      if (val == 1) this.$refs.list.searchFun();
+      if (val == 1) this.$refs.list.regionChange(this.xzqh);
       if (val == 2) this.$refs.xzgd.getData();
     },
   },