Bläddra i källkod

详情和列表切换处理

maxiaoxiao 1 månad sedan
förälder
incheckning
229727c66c
2 ändrade filer med 12 tillägg och 12 borttagningar
  1. 2 2
      src/components/tablePage.vue
  2. 10 10
      src/views/remote/farmland/index.vue

+ 2 - 2
src/components/tablePage.vue

@@ -18,7 +18,7 @@
       <el-table-column v-if="indexed" label="序号" width="70px" align="center">
         <template #default="scope">{{ scope.$index + 1 }}</template>
       </el-table-column>
-      <el-table-column type="selection" width="55" align="center">
+      <el-table-column v-if="check" type="selection" width="55" align="center">
       </el-table-column>
       <el-table-column
         v-for="(item, index) in cloumn"
@@ -87,7 +87,7 @@ export default {
     },
     check: {
       type: Boolean,
-      default: false,
+      default: true,
     },
   },
   data() {

+ 10 - 10
src/views/remote/farmland/index.vue

@@ -78,9 +78,9 @@
     </div>
     <div class="jctbCon" v-if="dialogVisible">
       <el-button size="mini" @click="returnto()">返回列表</el-button>
-      图斑编号:{{ nowObj.dkbh }}
       <el-button size="mini" @click="next(false)">上一个</el-button>
       <el-button size="mini" @click="next(true)">下一个</el-button>
+      <!-- <div>图斑编号:{{ nowObj.dkbh }}</div> -->
       <Details ref="detailsRef"></Details>
     </div>
     <!-- <CustomDetails :model="infoObj" :config="detailInfos"></CustomDetails> -->
@@ -96,7 +96,7 @@ import parse from "wellknown";
 // import { pinyin } from "pinyin-pro";
 
 import { getDkdbList } from "@/api/rsmonitoring/dataEntry";
-import { listDkjbxx } from "@/api/rsmonitoring/dkjbxx";
+import { listDkjbxx, getDkjbxx } from "@/api/rsmonitoring/dkjbxx";
 import { TableHeader } from "./config";
 import "ol/ol.css";
 // import { get as getProjection, transform } from "ol/proj.js";
@@ -163,9 +163,7 @@ export default {
       nowObj: {},
       itemObj: {}, //用于存储分屏高亮的实体
       dialogVisible: false,
-
       TableHeader: TableHeader,
-
       envelopegeomObj: {}, //用于存储进入页面飞入视角的对象
       ids: [],
     };
@@ -174,12 +172,9 @@ export default {
     // 绑定事件,编写回调函数
     this.$nextTick(() => {
       this.newObj = { id: this.$route.query.id };
-
+      if (this.$route.params.queryParams)
+        this.queryParams = this.$route.params.queryParams;
       this.getTemplate();
-
-      // getPcsj(this.$route.query.id).then((response) => {
-      //   this.newObj = response.data;
-      // });
     });
   },
 
@@ -208,7 +203,6 @@ export default {
         this.domains.splice(this.domains.indexOf(val), 1);
         this.$delete(this.queryParams, item);
       }
-      console.log(this.queryParams, ";this.queryParams", this.domains);
     },
     //动态获取设置的模版字段
     getTemplate() {
@@ -216,6 +210,12 @@ export default {
       if (this.$route.query.form == "checkLand") {
         listDkjbxx(this.queryParams).then((res) => {
           this.setList(res);
+          if (this.$route.query.index) {
+            getDkjbxx(this.$route.query.id).then((res) => {
+              this.newObj = res.data;
+              this.tableClick(this.newObj, this.$route.query.index || 0);
+            });
+          }
         });
       } else {
         getDkdbList(this.queryParams).then((res) => {