maxiaoxiao il y a 9 mois
Parent
commit
af0a148505

+ 8 - 2
src/api/stxf/tdzz.js

@@ -1,8 +1,14 @@
 import request from '@/utils/request'
-export function QueryOne(params) {
+export function getXmList(params) {
     return request({
-        url: '/apply/jsc/QueryOne',
+        url: '/apply/qytdzz/tdzzxm/list',
         method: 'get',
         params
     })
+}
+export function getXm(id) {
+    return request({
+        url: `/apply/qytdzz/tdzzxm/${id}`,
+        method: 'get',
+    })
 }

+ 3 - 5
src/views/Idleland/components/list.vue

@@ -140,11 +140,9 @@ export default {
   },
   methods: {
     searchFun(page = {}) {
-      this.getTableData({
-        ...this.pageObj,
-        pageNum: page.pageIndex || 1,
-        pageSize: page.size || 10,
-      });
+      this.pageObj.pageNum = page.pageIndex || 1;
+      this.pageObj.pageSize = page.size || 10;
+      this.getTableData();
     },
     getTableData() {
       this.$emit("updateParent", "loading", true);

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

@@ -8,7 +8,7 @@ export const zzForm = [
     },
     {
       label: '',
-      prop: 'val0',
+      prop: 'xmmc',
       span: 10,
       component: 'ElInput',
       componentProps: {
@@ -36,8 +36,8 @@ export const reasonList = [
 ]
 export const TableHeader = [
   { label: "项目名称", prop: "xmmc" },
-  { label: "主管部门", prop: "crmj", width: '80px', slot: "mj" },
-  { label: "建设规模", prop: "ydkgsj", },
+  { label: "主管部门", prop: "zgbm", width: '80px' },// slot: "mj"
+  { label: "建设规模", prop: "tygm", },
   { label: "操作", slot: "action" },
 ]
 

+ 24 - 31
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.val1" placeholder="项目类型">
+        <el-select v-model="pageObj.lxfl" placeholder="项目类型" clearable>
           <el-option
             v-for="item in reasonList"
             :key="item.code"
@@ -51,6 +51,7 @@
 import tablePage from "@/components/mapView/tablePage.vue";
 import customForm from "@/components/mapView/custom-form.vue";
 import { QueryOne, QueryList } from "@/api/cockpitNew";
+import { getXmList, getXm } from "@/api/stxf/tdzz.js";
 import { GetList } from "@/api/Idleland.js";
 import { zzForm, TableHeader, reasonList } from "./config";
 import { loadGeoJSON } from "@/utils/MapHelper/help.js";
@@ -71,9 +72,9 @@ export default {
   data() {
     return {
       pageObj: {
-        id: "",
-        val0: "",
-        val1: "",
+        xzqdm: "",
+        xmmc: "",
+        lxfl: "",
         pageNum: 1,
         pageSize: 10,
       },
@@ -98,37 +99,28 @@ export default {
     },
     regionChange(region) {
       this.region = region;
-      this.pageObj.id = region;
+      this.pageObj.xzqdm = region;
       this.searchFun();
     },
     searchFun(page = {}) {
-      this.getTableData({
-        ...this.pageObj,
-        pageNum: page.pageIndex || 1,
-        pageSize: page.size || 10,
-      });
+      this.pageObj.pageNum = page.pageIndex || 1;
+      this.pageObj.pageSize = page.size || 10;
+      this.getTableData();
     },
     getTableData() {
       this.$emit("updateParent", "loading", true);
       this.removeGeoJSON();
-      QueryList({ jscType: "qytuzz_zzxm_xmlb", ...this.pageObj }).then(
+      getXmList({ 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.table = { total: res.total, data: res.rows };
           this.active_tableData(res.data);
         }
       );
     },
 
-    Getjxyd() {
-      QueryOne({
-        jscType: "qytuzz_zzxm_xmxq",
-        id: this.region,
-      }).then((res) => {
+    Getjxyd(row) {
+      getXm(row.id).then((res) => {
         this.jxyddata = res.data || {};
         this.$emit("updateParent", "loading", false);
       });
@@ -143,23 +135,23 @@ export default {
       newVal.forEach((res, index) => {
         if (res.geom)
           loadGeoJSON(res.geom, "#55A1E3", { isfly: false }, (data) => {
-            geoSources[res.id] = data;
+            geoSources[res.xzqdm] = data;
             data.name = "Idleland";
             data.entities.values.forEach((entity) => {
-              entity.properties = { type: "图斑上图", id: res.id };
+              entity.properties = { type: "图斑上图", xzqdm: res.xzqdm };
             });
           });
       });
     },
     flyTo(item) {
-      let id = "h_" + item.id;
-      this.tempdataLayerId = id;
-      if (geoSources[id]) return;
+      let xzqdm = "h_" + item.xzqdm;
+      this.tempdataLayerId = xzqdm;
+      if (geoSources[xzqdm]) return;
       loadGeoJSON(item.geom, "#ff0000", { isfly: true }, (data) => {
         data.name = "Idleland";
-        geoSources[id] = data;
+        geoSources[xzqdm] = data;
         data.entities.values.forEach((entity) => {
-          entity.properties = { type: "图斑上图", id: item.id };
+          entity.properties = { type: "图斑上图", xzqdm: item.xzqdm };
         });
       });
     },
@@ -174,14 +166,15 @@ export default {
 
     reset(xzqh) {
       this.pageObj = {
-        id: this.region,
-        val0: "",
-        val1: "",
+        xzqdm: this.region,
+        xmmc: "",
+        lxfl: "",
         pageNum: 1,
         pageSize: 10,
       };
     },
     detail(row) {
+      this.Getjxyd(row);
       this.flyTo(row);
       this.bus.$emit("handleView", row, "整治项目");
     },

+ 3 - 5
src/views/LandConsolidation/components/xzlist.vue

@@ -83,11 +83,9 @@ export default {
       this.$emit("cockpit");
     },
     searchFun(page = {}) {
-      this.getTableData({
-        ...this.pageObj,
-        pageNum: page.pageIndex || 1,
-        pageSize: page.size || 10,
-      });
+      this.pageObj.pageNum = page.pageIndex || 1;
+      this.pageObj.pageSize = page.size || 10;
+      this.getTableData();
     },
     getTableData() {
       this.$emit("updateParent", "loading", true);