Browse Source

核查图斑列表切换

maxiaoxiao 1 month ago
parent
commit
f6143255a8

BIN
src/assets/images/pointlist.png


BIN
src/assets/images/returnlist.png


+ 17 - 4
src/views/pageCode/checkLand/index.vue

@@ -58,10 +58,11 @@
           >导出</el-button
         >
       </el-col>
-      <right-toolbar
+      <!-- <right-toolbar
         :showSearch="showSearch"
         @queryTable="getList"
-      ></right-toolbar>
+      ></right-toolbar> -->
+      <div class="pointlist" @click="handleBrowse({})"></div>
     </el-row>
     <numCard :sdlist="sdlist"></numCard>
     <el-table
@@ -319,9 +320,21 @@ function handleExport() {
   );
 }
 function handleBrowse(row) {
-  router.push({ path: "/remote/gdjc", query: { id: row.id } });
+  router.push({
+    path: "/remote/gdjc",
+    query: { id: row.id, form: "checkLand" },
+  });
 }
 getcount();
 getList();
 </script>
-  
+  <style lang="css" scoped>
+.pointlist {
+  width: 32px;
+  height: 32px;
+  margin-left: auto;
+  background: url("@/assets/images/pointlist.png") no-repeat center;
+  background-size: 100% 100%;
+  cursor: pointer;
+}
+</style>

+ 1 - 1
src/views/pageCode/dataEntry/index.vue

@@ -238,7 +238,7 @@ function handleExport() {
 function handleBrowse(row) {
   router.push({
     path: "/remote/gdjc",
-    query: { id: row.id, form: "dataEntry" },
+    query: { id: row.id, form: "dataEntry", dataType: row.dataType },
   });
 }
 

+ 10 - 10
src/views/remote/farmland/config.js

@@ -5,16 +5,16 @@ export const TableHeader = [
   { label: "操作", slot: "action", width: 100, align: 'center' },
 ]
 export const jbxx = [
-  { name: "行政区代码", prop: "" },
-  { name: "行政区名称", prop: "" },
-  { name: "图斑编号", prop: "" },
-  { name: "前类型", prop: "" },
-  { name: "后类型", prop: "" },
-  { name: "中心点经度", prop: "" },
-  { name: "中心点纬度", prop: "" },
-  { name: "监测面积(亩)", prop: "" },
-  { name: "前时相", prop: "" },
-  { name: "后时相", prop: "" },
+  { name: "行政区代码", prop: "xzqdm" },
+  { name: "行政区名称", prop: "xzqmc" },
+  { name: "图斑编号", prop: "dkbh" },
+  { name: "前类型", prop: "qlx" },
+  { name: "后类型", prop: "hlx" },
+  { name: "中心点经度", prop: "lzb" },
+  { name: "中心点纬度", prop: "bzb" },
+  { name: "监测面积(亩)", prop: "dkmj" },
+  { name: "前时相", prop: "qsx" },
+  { name: "后时相", prop: "hsx" },
 ]
 export const tdxzTable = [
   { label: "地类编码", prop: "dkbh", align: 'center' },

+ 2 - 2
src/views/remote/farmland/details.vue

@@ -4,7 +4,7 @@
       <el-tab-pane
         label="基本信息"
         name="jbxx"
-        v-if="!form || infoObj.type != 1"
+        v-if="!form || route.query.dataType != '2'"
       >
         <el-descriptions class="margin-top" :column="1">
           <el-descriptions-item
@@ -18,7 +18,7 @@
       <el-tab-pane
         label="业务研判"
         name="ywyp"
-        v-if="!form || infoObj.type != 2"
+        v-if="!form || route.query.dataType != '1'"
       >
         <el-tabs v-model="ywyptab">
           <el-tab-pane label="土地利用现状" name="tdxz">

+ 50 - 30
src/views/remote/farmland/index.vue

@@ -42,6 +42,11 @@
           >
           </el-option>
         </el-select>
+        <div
+          v-if="$route.query.form != 'dataEntry'"
+          class="returnlist"
+          @click="returnlist"
+        ></div>
       </div>
       <numCard :sdlist="sdlist"></numCard>
       <tablePage
@@ -54,14 +59,14 @@
         @selectChange="handleSelectionChange"
         @currentChange="getTemplate"
       >
-        <template #action="{ row, index }">
+        <template #action="{ row, $index }">
           <el-button size="mini" type="text" @click.stop="flyto(row)"
             >定位</el-button
           >
           <el-button
             size="mini"
             type="text"
-            @click.stop="tableClick(row, index)"
+            @click.stop="tableClick(row, $index)"
             >详情</el-button
           >
         </template>
@@ -70,10 +75,10 @@
       <el-button @click="handleDownload">下载</el-button>
     </div>
     <div class="jctbCon" v-if="dialogVisible">
-      <el-button @click="returnlist()">返回列表</el-button>
+      <el-button size="mini" @click="returnto()">返回列表</el-button>
       图斑编号:{{ nowObj.dkbh }}
-      <el-button @click="next(false)">上一个</el-button>
-      <el-button @click="next(true)">下一个</el-button>
+      <el-button size="mini" @click="next(false)">上一个</el-button>
+      <el-button size="mini" @click="next(true)">下一个</el-button>
       <Details ref="detailsRef"></Details>
     </div>
     <!-- <CustomDetails :model="infoObj" :config="detailInfos"></CustomDetails> -->
@@ -89,6 +94,7 @@ import parse from "wellknown";
 // import { pinyin } from "pinyin-pro";
 
 import { getDkdbList } from "@/api/rsmonitoring/dataEntry";
+import { listDkjbxx } from "@/api/rsmonitoring/dkjbxx";
 import { TableHeader } from "./config";
 import "ol/ol.css";
 // import { get as getProjection, transform } from "ol/proj.js";
@@ -135,7 +141,7 @@ export default {
         { name: "已审核", pronum: "155", promj: "151.12" },
         { name: "已提交", pronum: "155", promj: "151.12" },
       ],
-      domains: [], //存储动态搜索列表
+      domains: 0, //存储动态搜索列表
       // value: ["监测编号"], //下拉框选中的值
       maptype: "normal",
       total: 0,
@@ -166,10 +172,12 @@ export default {
     // 绑定事件,编写回调函数
     this.$nextTick(() => {
       this.newObj = { id: this.$route.query.id };
+
+      this.getTemplate();
+
       // getPcsj(this.$route.query.id).then((response) => {
       //   this.newObj = response.data;
       // });
-      this.getTemplate();
     });
   },
 
@@ -204,18 +212,27 @@ export default {
     getTemplate(query) {
       if (query) this.queryParams.pageNum = query.pageNum;
       this.handleDelete();
-
-      getDkdbList(this.queryParams).then((res) => {
-        this.tableData = res.rows;
-        this.total = res.total;
-        this.initVectorLayer("mapDiv");
-        this.initVectorLayer("mapCon1");
-        this.initVectorLayer("mapCon2");
-        this.addGeoJson("mapDiv", true);
-        this.addGeoJson("mapCon1");
-        this.addGeoJson("mapCon2");
-      });
+      if (this.$route.query.form == "checkLand") {
+        listDkjbxx(this.queryParams).then((res) => {
+          this.setList(res);
+        });
+      } else {
+        getDkdbList(this.queryParams).then((res) => {
+          this.setList(res);
+        });
+      }
     },
+    setList(res) {
+      this.tableData = res.rows;
+      this.total = res.total;
+      this.initVectorLayer("mapDiv");
+      this.initVectorLayer("mapCon1");
+      this.initVectorLayer("mapCon2");
+      this.addGeoJson("mapDiv", true);
+      this.addGeoJson("mapCon1");
+      this.addGeoJson("mapCon2");
+    },
+
     // 多选框选中数据
     handleSelectionChange(selection) {
       this.ids = selection.map((item) => item.id);
@@ -247,9 +264,10 @@ export default {
       }
     },
     next(add) {
-      let index = this.nowObj.index + add ? 1 : -1;
+      let index = this.nowObj.index + (add ? 1 : -1);
+      console.log(index, this.nowObj.index, add ? 1 : -1, "index");
       if (index == -1 || index == this.tableData.length) {
-        proxy.$modal.msgError(`当前为${add ? "最后" : "第"}一个`);
+        this.$modal.msgError(`当前为${add ? "最后" : "第"}一个`);
       } else {
         let row = this.tableData[index];
         this.tableClick(row, index);
@@ -384,8 +402,11 @@ export default {
         window.map[name].addLayer(this.curPageResultLayer[name]);
       }
     },
-    returnlist() {
+    returnto() {
       this.dialogVisible = false;
+      // this.$router.back();
+    },
+    returnlist() {
       this.$router.back();
     },
   },
@@ -456,17 +477,16 @@ export default {
     justify-content: space-around;
     justify-content: flex-start;
     flex-wrap: wrap;
-
-    ::v-deep .el-input {
-      // width: 28%;
-      width: 55%;
-    }
-
-    ::v-deep .el-input--suffix {
-      width: 100% !important;
-    }
   }
 }
+.returnlist {
+  width: 32px;
+  height: 32px;
+  margin-left: auto;
+  background: url("@/assets/images/returnlist.png") no-repeat center;
+  background-size: 100% 100%;
+  cursor: pointer;
+}
 </style>
 <style scoped>
 #mapApp {