Bläddra i källkod

图斑列表和详情

maxiaoxiao 1 månad sedan
förälder
incheckning
f6457466f2

+ 1 - 0
src/components/numCard.vue

@@ -5,6 +5,7 @@
       v-for="(item, i) in sdlist"
       :key="i"
       :class="`card${i}`"
+      style="width: 30%;"
     >
       <span>{{ item.name }}</span>
       <span>{{ sddata[""] || 0 }}个</span>

+ 1 - 0
src/components/tablePage.vue

@@ -45,6 +45,7 @@
       :total="table.total"
       :page="pageNum"
       :limit="pageSize"
+      :layout="layout"
       @pagination="searchFun"
     />
   </div>

+ 50 - 46
src/views/remote/farmland/config.js

@@ -1,52 +1,56 @@
 
-// 详情字段
-export const detailInfos = [
-
-  [[
-    { flag: 'label', value: '监测编号', span: 8 },
-    { flag: 'value', value: 'jcbh', span: 16 }
-  ]],
-  [[
-    { flag: 'label', value: '监测面积(亩)', span: 8 },
-    { flag: 'value', value: 'jcmj', span: 16 }
-  ]],
-  // [[
-  //   { flag: 'label', value: '行政区代码', span: 8 },
-  //   { flag: 'value', value: 'xzqhdm', span: 16 }
-  // ]],
-  [[
-    { flag: 'label', value: '行政区名称', span: 8 },
-    { flag: 'value', value: 'xmc', span: 16 }
-  ]],
-
-  [[
-    { flag: 'label', value: '前类型', span: 8 },
-    { flag: 'value', value: 'qlxmc', span: 16 }
-  ]],
-  [[
-    { flag: 'label', value: '后类型', span: 8 },
-    { flag: 'value', value: 'hlxmc', span: 16 }
-  ]],
-  [[
-    { flag: 'label', value: '前时相', span: 8 },
-    { flag: 'value', value: 'qsx', span: 16 }
-  ]],
-  [[
-    { flag: 'label', value: '后时相', span: 8 },
-    { flag: 'value', value: 'hsx', span: 16, }// isslot: true
-  ]],
-  [[
-    { flag: 'label', value: '中心点经度', span: 8 },
-    { flag: 'value', value: 'lzb', span: 16 }
-  ]],
-  [[
-    { flag: 'label', value: '中心点纬度', span: 8 },
-    { flag: 'value', value: 'bzb', span: 16 }//unit: '人',
-  ]],
-]
 export const TableHeader = [
   { label: "图斑编号", prop: "dkbh", align: 'center' },
-  { label: "监测面积(亩)", prop: "dkmj", align: 'center',width: 110, },
+  { label: "监测面积(亩)", prop: "dkmj", align: 'center', width: 110, },
   { 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: "" },
+]
+export const tdxzTable = [
+  { label: "地类编码", prop: "dkbh", align: 'center' },
+  { label: "地类名称", prop: "dkmj", align: 'center', width: 110, },
+  { label: "压盖面积(m²)", prop: "dkbh", align: 'center' },
+  { label: "占图斑面积比", prop: "dkbh", align: 'center' },
+]
+
+export const gtkjTable = [
+  { label: "规划地类编码", prop: "dkbh", align: 'center' },
+  { label: "规划地类名称", prop: "dkmj", align: 'center', width: 110, },
+  { label: "压占规划地类面积(m²)", prop: "dkbh", align: 'center' },
+  { label: "占图斑面积比", prop: "dkbh", align: 'center' },
+]
+export const gdTable = [
+  { label: "耕地编码", prop: "dkbh", align: 'center' },
+  { label: "压盖重叠面积(m²)", prop: "dkbh", align: 'center' },
+  { label: "占图斑面积比", prop: "dkbh", align: 'center' },
+]
+export const yjjbntTable = [
+  { label: "生态永久基本农田编码", prop: "dkbh", align: 'center' },
+  { label: "压盖重叠面积(m²)", prop: "dkbh", align: 'center' },
+  { label: "占图斑面积比", prop: "dkbh", align: 'center' },
+]
+export const stbhTable = [
+  { label: "生态保护红线编码", prop: "dkbh", align: 'center' },
+  { label: "压盖重叠面积(m²)", prop: "dkbh", align: 'center' },
+  { label: "占图斑面积比", prop: "dkbh", align: 'center' },
+]
+
+
+
+
+
+
+
+
+
 

+ 187 - 0
src/views/remote/farmland/details.vue

@@ -0,0 +1,187 @@
+<template>
+  <div class="details">
+    <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
+      <el-tab-pane label="基本信息" name="jbxx">
+        <el-descriptions class="margin-top" :column="1">
+          <el-descriptions-item
+            v-for="(item, i) in jbxx"
+            :label="item.name"
+            :key="i"
+            >{{ infoObj[item.prop] }}
+          </el-descriptions-item>
+        </el-descriptions>
+      </el-tab-pane>
+      <el-tab-pane label="业务研判" name="ywyp">
+        <el-tabs v-model="ywyptab">
+          <el-tab-pane label="土地利用现状" name="tdxz">
+            <el-row>
+              <el-col :span="5">
+                <el-button :plain="true" @click="open">2024年</el-button>
+                <el-button :plain="true" @click="open">2024年</el-button>
+                <el-button :plain="true" @click="open">2024年</el-button>
+                <el-button :plain="true" @click="open">2024年</el-button>
+              </el-col>
+              <el-col :span="19">
+                <el-table :data="dkjbxxList">
+                  <el-table-column
+                    v-for="(item, i) in tdxzTable"
+                    :key="i"
+                    :label="item.label"
+                    :prop="item.prop"
+                    align="center"
+                  />
+                </el-table>
+              </el-col>
+            </el-row>
+          </el-tab-pane>
+          <el-tab-pane label="国土空间规划" name="gtkj">
+            <el-table :data="dkjbxxList">
+              <el-table-column
+                v-for="(item, i) in gtkjTable"
+                :key="i"
+                :label="item.label"
+                :prop="item.prop"
+                align="center"
+              />
+            </el-table>
+          </el-tab-pane>
+          <!-- v-for="(li, lindex) in ['耕地', '永久基本农田', '生态保护红线']"
+            :label="li"
+            :key="lindex"
+            name="third" -->
+          <el-tab-pane label="耕地" name="gd">
+            压盖耕地面积共XX平方米,占图斑面积比为23.24%。
+            <el-table :data="dkjbxxList">
+              <el-table-column
+                v-for="(item, i) in gdTable"
+                :key="i"
+                :label="item.label"
+                :prop="item.prop"
+                align="center"
+              />
+            </el-table>
+          </el-tab-pane>
+          <el-tab-pane label="永久基本农田" name="yjjbnt">
+            压盖永久基本农田面积共XX平方米,占图斑面积比为23.24%。
+            <el-table :data="dkjbxxList">
+              <el-table-column
+                v-for="(item, i) in yjjbntTable"
+                :key="i"
+                :label="item.label"
+                :prop="item.prop"
+                align="center"
+              />
+            </el-table>
+          </el-tab-pane>
+          <el-tab-pane label="生态保护红线" name="stbhhx">
+            压盖生态保护红线面积共XX平方米,占图斑面积比为23.24%。
+            <el-table :data="dkjbxxList">
+              <el-table-column
+                v-for="(item, i) in stbhTable"
+                :key="i"
+                :label="item.label"
+                :prop="item.prop"
+                align="center"
+              />
+            </el-table>
+          </el-tab-pane>
+        </el-tabs>
+      </el-tab-pane>
+      <el-tab-pane label="核查信息" name="hcxx"
+        >共3次外业核查
+        <el-collapse v-model="hcxxtab" @change="handleChange">
+          <el-collapse-item v-for="(hcit, hi) in hcxxList" :key="hi" name="1">
+            <template #title>
+              核查时间:{{ hcit.time }} 核查人员:{{ hcit.name }}
+            </template>
+            <div>
+              Consistent with real life: in line with the process and logic of
+              real life, and comply with languages and habits that the users are
+              used to;
+            </div>
+            <div>
+             <Hcxx></Hcxx>
+            </div>
+          </el-collapse-item>
+        </el-collapse>
+      </el-tab-pane>
+      <el-tab-pane label="业务记录" name="ywjl">
+        <el-timeline>
+          <el-timeline-item
+            v-for="(activity, index) in activities"
+            :key="index"
+            :icon="activity.icon"
+            :type="activity.type"
+            :color="activity.color"
+            :size="activity.size"
+            :hollow="activity.hollow"
+            :timestamp="activity.timestamp"
+          >
+            {{ activity.content }}
+          </el-timeline-item>
+        </el-timeline>
+      </el-tab-pane>
+    </el-tabs>
+  </div>
+</template>
+  
+  <script setup name="details">
+  import Hcxx from "./hcxx.vue";
+import { listDkdb, adddb } from "@/api/rsmonitoring/dataEntry";
+import {
+  jbxx,
+  tdxzTable,
+  gtkjTable,
+  gdTable,
+  yjjbntTable,
+  stbhTable,
+} from "./config";
+
+const { proxy } = getCurrentInstance();
+
+const router = useRouter();
+
+const data = reactive({
+  activeName: "jbxx",
+  ywyptab: "tdxz",
+  infoObj: { name: "swed" },
+  hcxxList: [{}],
+  activities: [
+    {
+      content: "Custom icon",
+      timestamp: "2018-04-12 20:46",
+      size: "large",
+      type: "primary",
+    },
+    {
+      content: "Custom color",
+      timestamp: "2018-04-03 20:46",
+      color: "#0bbd87",
+    },
+    {
+      content: "Custom size",
+      timestamp: "2018-04-03 20:46",
+      size: "large",
+    },
+    {
+      content: "Custom hollow",
+      timestamp: "2018-04-03 20:46",
+      type: "primary",
+      hollow: true,
+    },
+    {
+      content: "Default node",
+      timestamp: "2018-04-03 20:46",
+    },
+  ],
+});
+
+const { activeName, ywyptab, infoObj, hcxxList, activities } = toRefs(data);
+</script>
+<style scoped>
+.el-button {
+  margin: 0px !important;
+  margin-bottom: 12px !important;
+}
+</style>
+  

+ 59 - 194
src/views/remote/farmland/index.vue

@@ -1,5 +1,10 @@
 <template>
   <div id="mapApp">
+    <el-button @click="dialogVisible = false">返回列表</el-button>
+    图斑编号:6401812024070108270002
+    <el-button @click="dialogVisible = false">上一个</el-button>
+    <el-button @click="dialogVisible = false">下一个</el-button>
+
     <div class="btn" v-if="nowObj['前时相']">
       <!-- <el-button @click="drawer = true">打开抽屉</el-button> -->
       <span class="sx qsx">前时相:{{ nowObj["前时相"] }}</span>
@@ -15,64 +20,34 @@
       modal-class="mask-layer"
       size="28vw"
     > -->
-    <div class="jctbCon">
+    <div class="jctbCon" v-if="!dialogVisible">
       <div class="tbTitle">
-        <span>图斑列表{{ newObj.name }}</span>
+        <span>图斑列表 </span>
         <el-select
           v-model="domains"
-          multiple
-          collapse-tags
           placeholder="请选择其它搜索条件"
           @change="handleChange"
+          style="width: 150px; padding-left: 20px"
         >
           <el-option
             v-for="item in options"
             :key="item.value"
             :label="item.label"
             :value="item.value"
-            :disabled="item.value == '监测编号' ? true : false"
           >
           </el-option>
         </el-select>
-        <el-button @click="handleDownload">下载</el-button>
-        <!-- <el-input
-            placeholder="请输入监测编号查询"
-            prefix-icon="el-icon-search"
-            v-model="queryParams['监测编号']"
-            @change="getTemplate()"
-          >
-          </el-input> -->
-        <!-- <div class="demo-input-suffix">
-          监测编号:
-          <el-input
-            placeholder="请输入监测编号查询"
-            prefix-icon="el-icon-search"
-            v-model="queryParams['监测编号']"
-            @change="getTemplate()"
-          >
-          </el-input>
-        </div> -->
-        <div class="demo-input-suffix" v-for="(ditem, i) in domains" :key="i">
-          {{ ditem + ":" }}
-          <el-input
-            :placeholder="'请输入' + ditem + '查询'"
-            prefix-icon="el-icon-search"
-            v-model="queryParams[ditem]"
-            @change="getTemplate()"
-          >
-          </el-input>
-          <el-button @click.prevent="removeDomain(ditem)">删除</el-button>
-        </div>
       </div>
+      <numCard :sdlist="sdlist"></numCard>
       <tablePage
         :cloumn="TableHeader"
         :table="{ total, data: tableData }"
         :indexed="false"
         :check="true"
+        layout="total, prev, pager, next"
         ref="tableDialogRef"
         @selectChange="handleSelectionChange"
         @currentChange="getTemplate"
-        @row-click="tableClick"
       >
         <template slot-scope="scope">
           <el-button
@@ -81,47 +56,36 @@
             @click.stop="handleDetails(scope.row)"
             >定位</el-button
           >
-          <el-button
-            size="mini"
-            type="text"
-            @click.stop="handleDetails(scope.row)"
+          <el-button size="mini" type="text" @click.stop="tableClick(scope.row)"
             >对比</el-button
           >
-      
         </template>
       </tablePage>
+      已选{{ ids.length }}条
+      <el-button @click="handleDownload">下载</el-button>
     </div>
-    <!-- </el-drawer> -->
-    <el-dialog title="详细信息" :visible.sync="dialogVisible" width="30%">
-      <!-- <CustomDetails :model="infoObj" :config="detailInfos"></CustomDetails> -->
-      <el-descriptions class="margin-top" :column="1">
-        <el-descriptions-item
-          :label="item"
-          v-for="(item, i) in descriptionsList"
-          :key="i"
-          >{{ infoObj[item] }}</el-descriptions-item
-        >
-      </el-descriptions>
-    </el-dialog>
+    <div class="jctbCon" v-if="dialogVisible">
+      <Details></Details>
+    </div>
+    <!-- <CustomDetails :model="infoObj" :config="detailInfos"></CustomDetails> -->
   </div>
 </template>
 
 <script>
 import MapView from "../MapView.vue";
+import numCard from "@/components/numCard.vue";
 import CustomDetails from "@/components/custom-detailsInfo.vue";
+import Details from "./details.vue";
 import parse from "wellknown";
 // import { pinyin } from "pinyin-pro";
 import {
   getPcsj,
   listPcsjXQList,
-  getPcsjXQ,
-  getXqListMap,
-  getXqListKey,
   getXqIdMap,
   getXqIdKey,
 } from "@/api/supervise/pcsj";
 import { getDkdbList } from "@/api/rsmonitoring/dataEntry";
-import { TableHeader, detailInfos } from "./config";
+import { TableHeader } from "./config";
 import "ol/ol.css";
 // import { get as getProjection, transform } from "ol/proj.js";
 import Map from "ol/Map";
@@ -152,6 +116,8 @@ export default {
   components: {
     MapView,
     CustomDetails,
+    numCard,
+    Details,
   },
   data() {
     return {
@@ -160,6 +126,11 @@ export default {
         { label: "监测面积", value: 1 },
         { label: "外业时间", value: 2 },
       ],
+      sdlist: [
+        { name: "待审核", pronum: "155", promj: "151.12" },
+        { name: "已审核", pronum: "155", promj: "151.12" },
+        { name: "已提交", pronum: "155", promj: "151.12" },
+      ],
       domains: [], //存储动态搜索列表
       // value: ["监测编号"], //下拉框选中的值
       maptype: "normal",
@@ -183,50 +154,21 @@ export default {
       vectorLayer: {},
       nowObj: {},
       itemObj: {}, //用于存储分屏高亮的实体
-      dialogVisible: false,
-      infoObj: {},
-      detailInfos: detailInfos,
-      TableHeader:TableHeader,
+      dialogVisible: true,
 
-      descriptionsList: [], //详情描述列表存储字段
+      TableHeader: TableHeader,
+
+      descriptionsList: ["name"], //详情描述列表存储字段
       envelopegeomObj: {}, //用于存储进入页面飞入视角的对象
+      ids: [],
     };
   },
   mounted() {
     // 绑定事件,编写回调函数
     this.$nextTick(() => {
-      getPcsj(this.$route.query.id).then((response) => {
-        this.newObj = response.data;
-
-        // if (this.newObj.envelopegeom && this.newObj.envelopegeom != "") {
-        //   if (typeof this.newObj.envelopegeom === "string") {
-        //     let geom = this.newObj.envelopegeom;
-        //     this.newObj.envelopegeom = parse(geom);
-        //   }
-        //   let features = new GeoJSON().readFeatures(this.newObj.envelopegeom);
-        //   this.envelopegeomObj = new VectorLayer({
-        //     source: new VectorSource({
-        //       features: features,
-        //     }),
-        //     style: function (feature) {
-        //       return new Style({
-        //         stroke: new Stroke({
-        //           //边界样式
-        //           color: "rgba(255, 0, 0, 1)",
-        //           width: 2,
-        //         }),
-        //       });
-        //     },
-        //     zIndex: 9999,
-        //   });
-        //   let fullExtent = this.envelopegeomObj.getSource().getExtent();
-
-        //   window.map["mapDiv"]
-        //     .getView()
-        //     .fit(fullExtent, window.map["mapDiv"].getSize());
-        //   window.map["mapDiv"].addLayer(this.envelopegeomObj);
-        // }
-      });
+      // getPcsj(this.$route.query.id).then((response) => {
+      //   this.newObj = response.data;
+      // });
       this.getTemplate();
     });
   },
@@ -262,10 +204,7 @@ export default {
     getTemplate() {
       this.handleDelete();
 
-      this.options = [];
-
       getDkdbList(this.queryParams).then((res) => {
-        console.log(res, "======");
         this.tableData = res.rows;
         this.total = res.total;
         this.initVectorLayer("mapDiv");
@@ -276,7 +215,10 @@ export default {
         this.addGeoJson("mapCon2");
       });
     },
-
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map((item) => item.id);
+    },
     handleDownload() {
       const zipfile = this.newObj.proxypath + ".zip";
       window.open(`${zipfile}`);
@@ -299,29 +241,27 @@ export default {
     },
 
     getList() {
-      listPcsjXQList(this.queryParams).then((response) => {
-        this.tableData = response.rows;
-        this.total = response.total;
-        this.initVectorLayer("mapDiv");
-        this.initVectorLayer("mapCon1");
-        this.initVectorLayer("mapCon2");
-        this.addGeoJson("mapDiv");
-        this.addGeoJson("mapCon1");
-        this.addGeoJson("mapCon2");
-      });
+      // listPcsjXQList(this.queryParams).then((response) => {
+      //   this.tableData = response.rows;
+      //   this.total = response.total;
+      //   this.initVectorLayer("mapDiv");
+      //   this.initVectorLayer("mapCon1");
+      //   this.initVectorLayer("mapCon2");
+      //   this.addGeoJson("mapDiv");
+      //   this.addGeoJson("mapCon1");
+      //   this.addGeoJson("mapCon2");
+      // });
     },
     handleDetails(row) {
-      getXqIdMap({ pcsjid: this.$route.query.id, id: row.id }).then((res) => {
-        this.infoObj = res.data;
-      });
-      getXqIdKey({ pcsjid: this.$route.query.id }).then((res) => {
-        this.descriptionsList = res.data;
-      });
-      this.dialogVisible = true;
-    },
-    handleClose() {
-      this.drawer = false;
+      // getXqIdMap({ pcsjid: this.$route.query.id, id: row.id }).then((res) => {
+      //   this.infoObj = res.data;
+      // });
+      // getXqIdKey({ pcsjid: this.$route.query.id }).then((res) => {
+      //   this.descriptionsList = res.data;
+      // });
+      // this.dialogVisible = true;
     },
+
     test(item) {
       window.map["mapCon1"].removeLayer(this.itemObj);
       window.map["mapCon2"].removeLayer(this.itemObj);
@@ -457,27 +397,13 @@ export default {
   }
 }
 
-// .mask-layer{
-//   width: 264px !important;
-// }
-// ::v-deep .el-drawer__wrapper {
-//   position: static !important;
-// }
-
-// ::v-deep .el-drawer__container {
-//   position: static !important;
-// }
-
-// ::v-deep .el-drawer__body {
-//   width: 28vw;
-// }
-
 .jctbCon {
   position: absolute;
   right: 20px;
   top: 0px;
-  width: 26vw;
+  width: 28vw;
   padding: 20px;
+  height: 100%;
   .tbTitle {
     display: flex;
     justify-content: space-around;
@@ -493,70 +419,9 @@ export default {
       width: 100% !important;
     }
   }
-
-  .numCard {
-    width: 100%;
-    height: 120px;
-    display: flex;
-    // background-color: rgba(255, 192, 203, 0.272);
-    flex-direction: row;
-    align-items: center;
-    justify-content: space-between;
-
-    .cardItem {
-      // width: 230px;
-      width: 200px;
-      height: 85px;
-      background: linear-gradient(
-        180deg,
-        rgba(30, 198, 149, 1) 0%,
-        rgba(30, 198, 149, 1) 0%,
-        rgba(51, 204, 204, 1) 100%,
-        rgba(51, 204, 204, 1) 100%
-      );
-      border: none;
-      border-radius: 4px;
-      -moz-box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.349019607843137);
-      -webkit-box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.349019607843137);
-      box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.349019607843137);
-      font-family: "Arial Negreta", "Arial Normal", "Arial";
-      font-weight: 700;
-      font-style: normal;
-      font-size: 14px;
-      color: #ffffff;
-      display: flex;
-      flex-direction: column;
-      justify-content: center;
-
-      span {
-        display: inline-block;
-        width: 100%;
-        height: 39%;
-        // background: #faebd78c;
-        text-align: center;
-      }
-    }
-
-    .jc {
-      background: linear-gradient(
-        90deg,
-        rgba(244, 174, 149, 1) 0%,
-        rgba(244, 174, 149, 1) 0%,
-        rgba(226, 113, 140, 1) 100%,
-        rgba(226, 113, 140, 1) 100%
-      );
-    }
-  }
 }
 </style>
 <style scoped>
-html,
-body {
-  padding: 0;
-  margin: 0;
-  height: 100%;
-}
-
 #mapApp {
   width: 100%;
   height: 100%;