瀏覽代碼

1. 法律法规弹窗只显示对应资源数据,支持排序,增加跳转功能,调整样式; 2. 仅预设模型图层支持疑点审计; 3. 自定义模型查看接口及相关逻辑调整

Bella 2 年之前
父節點
當前提交
aa85fad11d

+ 6 - 4
src/api/url.js

@@ -25,12 +25,14 @@ export default {
   // 插入数据
   addContent: "/dms/content/addContent",
   // 修改数据
-  updateContent:"/dms/content/updateContent",
+  updateContent: "/dms/content/updateContent",
   // 删除数据
   updateAudit: "/dms/content/updateAudit",
-  // 叠置分析接口 - get
-  overlayAnalysis: "/audit/audit/overlayAnalysis",
   // 频发问题排序
   // 参数 field = c_wtfl,columnId = 24
-  selectGroupByCountOrderBy:"/dms/content/selectGroupByCountOrderBy"
+  selectGroupByCountOrderBy: "/dms/content/selectGroupByCountOrderBy",
+  // 叠置分析接口 - get
+  overlayAnalysis: "/audit/audit/overlayAnalysis",
+  // 我的模型查看按钮
+  getModelCoverAgeInfo: "/audit/audit/getModelCoverAgeInfo",
 };

+ 44 - 41
src/components/common/BottomForm/CustomModelDialog.vue

@@ -297,7 +297,6 @@ export default {
           res.content.forEach((v) => {
             this.classTextToIndex[keyName].set(v.name, v.index + "");
           });
-          // console.log(this.classTextToIndex[keyName], keyName);
         }
       });
     },
@@ -464,19 +463,56 @@ export default {
         }
       }
     },
-    transferCheckChange1(data,checked){
-      if(data.mainType === "所有图层"){
-        if(checked){
+    transferCheckChange1(data, checked) {
+      if (data.mainType === "所有图层") {
+        if (checked) {
           // if
         }
       }
     },
     // 添加模型
     addModel() {
-      // 设置需要添加的参数
-      this.createModelParams.title = this.inputName;
-      this.createModelParams.content = this.inputName;
-      this.createModelParams.c_user_id = localStorage.getItem("USER_ID") || 4;
+      if (customModelIdMap.has(this.inputName)) {
+        this.$message.info("该模型名称已存在");
+      } else {
+        // 设置需要添加的参数
+        this.createModelParams.title = this.inputName;
+        this.createModelParams.content = this.inputName;
+        this.createModelParams.c_user_id = localStorage.getItem("USER_ID") || 4;
+        let newData = [
+          {
+            columnName: "公益林",
+            columnId: 60,
+          },
+          {
+            columnName: "建设用地",
+            columnId: 51,
+          },
+        ];
+
+        this.createModelParams.c_bind_layer = JSON.stringify(newData);
+        let params = new FormData();
+        params = {
+          columnId: 49,
+          modelId: 53,
+          content: JSON.stringify(this.createModelParams),
+        };
+        this.$Post(this.urlsCollection.addContent, params)
+          .then((res) => {
+            // console.log(res, "保存自定义模型的res");
+            if (res.code === 200) {
+              this.$message.success("模型已保存");
+              this.$store.state.customModelsArr.push({
+                name: this.inputName,
+                data: this.checkedList,
+              });
+              this.clearDialogVisible();
+            }
+          })
+          .catch(() => {
+            this.$message.info("模型保存失败");
+          });
+      }
 
       // let newData = this.checkedList.filter((v) => {
       //   if (layerAuthorityMap.has(v) && layerAuthorityMap.get(v) === "有权限") {
@@ -484,39 +520,6 @@ export default {
       //   }
       // });
       // console.log(newData, "可以进行叠置分析的图层");
-      let newData = [
-        {
-          columnName: "公益林",
-          columnId: 60,
-        },
-        {
-          columnName: "建设用地",
-          columnId: 51,
-        },
-      ];
-
-      this.createModelParams.c_bind_layer = JSON.stringify(newData);
-      let params = new FormData();
-      params = {
-        columnId: 49,
-        modelId: 53,
-        content: JSON.stringify(this.createModelParams),
-      };
-      this.$Post(this.urlsCollection.addContent, params)
-        .then((res) => {
-          // console.log(res, "保存自定义模型的res");
-          if (res.code === 200) {
-            this.$message.success("模型已保存");
-            this.$store.state.customModelsArr.push({
-              name: this.inputName,
-              data: this.checkedList,
-            });
-            this.clearDialogVisible();
-          }
-        })
-        .catch(() => {
-          this.$message.info("模型保存失败");
-        });
     },
     // 修改模型 -- 直接调用修改模型接口
     modifyModel(type, bindData) {

+ 112 - 38
src/components/map/MapHolder.vue

@@ -1,6 +1,9 @@
 <template>
   <div id="map2DViewer">
+    <!-- 特殊地图属性弹窗 -- 有审计功能 -->
     <CaseAuditPopup v-show="auditPopupShow" ref="auditRef" />
+    <!-- 通用地图属性弹窗 -- 无审计功能 -->
+    <NormalAttrPopup v-show="normalAttrPopupShow" ref="normalRef" />
     <LabelCasePopup v-show="labelDetailsPopupShow" ref="labelRef" />
     <BasemapChange />
   </div>
@@ -11,23 +14,32 @@ import transformCoord from "@/utils/coordinate";
 import { get } from "@/utils/request";
 import { streetLocation, townData } from "@/config/common";
 import CaseAuditPopup from "@/components/popup/CaseAuditPopup.vue";
+import NormalAttrPopup from "@/components/popup/NormalAttrPopup.vue";
 import LabelCasePopup from "@/components/popup/LabelCasePopup.vue";
 import BasemapChange from "@/components/map/BasemapChange.vue";
 export default {
   name: "MapHolder",
-  components: { CaseAuditPopup, LabelCasePopup, BasemapChange },
+  components: {
+    CaseAuditPopup,
+    NormalAttrPopup,
+    LabelCasePopup,
+    BasemapChange,
+  },
   data() {
     return {
       town: "祝桥镇,南汇新城镇,川沙新镇,老港镇,惠南镇,航头镇,泥城镇,书院镇,新场镇,大团镇,唐镇,曹路镇,宣桥镇,张江镇,合庆镇,周浦镇,康桥镇,三林镇,高桥镇,高东镇,金桥镇,北蔡镇,万祥镇,高行镇",
       auditPopupShow: false,
+      normalAttrPopupShow: false,
       labelDetailsPopupShow: false,
       auditPopupStatus: "normal",
       popup: null,
       labelPopup: null,
+      normalPopup: null,
       // 疑点审计
       currentCid: null,
       currentHtml: null,
       currentProperties: null,
+      currentSourceType: null,
       // 标记疑点
       currentLabelCid: null,
       currentLabelHtml: null,
@@ -150,11 +162,54 @@ export default {
 
       this.initDraw();
     },
-    // 常规图层弹窗
-    createAuditDiv(str, properties) {
+    /**
+     * 无审计功能的地图弹窗
+     * @str
+     * @properties
+     * @sourceType
+     */
+    createNormalDiv(str, geojsonData, sourceType) {
+      // debugger;
+      let currentInnerHtml = this.$refs.normalRef.$el.innerHTML;
+      // 搜索geojson数据中的固定字段 -- 镇域名称,面积,土地类型,图斑编号
+      // this.$refs.normalRef.tableObj = geojsonData;
+      if (currentInnerHtml) {
+        let div = document.createElement("div");
+        div.id = str + "_id";
+        div.className = "case-audit";
+        // 动态创建div后赋值模板样式
+        div.innerHTML = currentInnerHtml;
+        $(() => {
+          // 法律法规点击事件
+          if ($(`#${str}_id a`)) {
+            $(`#${str}_id a`)
+              .eq(0)
+              .click((e) => {
+                this.$store.state.lawPopupShow = true;
+                this.$store.state.lawSourceType = sourceType;
+              });
+            $(`#${str}_id a`)
+              .eq(1)
+              .click((e) => {
+                // 触发综合分析右侧面板点击事件
+                this.$bus.$emit("viewDetailsPopup", geojsonData);
+              });
+          }
+        });
+        return div;
+      }
+    },
+    /**
+     * 有审计功能的地图弹窗
+     * @str
+     * @properties
+     * @sourceType
+     */
+    createAuditDiv(str, geojsonData, sourceType) {
       // 根据ref获取组件的dom元素
       this.currentHtml = this.$refs.auditRef.$el.innerHTML;
-      this.$refs.auditRef.tableObj = properties;
+      // 搜索geojson数据中的固定字段 -- 镇域名称,面积,土地类型,图斑编号
+      // this.$refs.auditRef.tableObj = JSON.parse(geojsonData).properties;
       if (this.currentHtml) {
         let div = document.createElement("div");
         div.id = str + "_id";
@@ -162,15 +217,6 @@ export default {
         // 动态创建div后赋值模板样式
         div.innerHTML = this.currentHtml;
         $(() => {
-          // if (properties) {
-          //   $(`#${str}_id .center-table-item-normal .leftcell`).each((index, domEle) => {
-          //     $(`#${str}_id .center-table-item-normal .leftcell`).eq(index).text(Object.keys(properties)[index]);
-          //   });
-          //   $(`#${str}_id .center-table-item-normal .rightcell`).each((index, domEle) => {
-          //     $(`#${str}_id .center-table-item-normal .rightcell`).eq(index).text(Object.values(properties)[index]);
-          //   });
-          // }
-
           if ($(`#${str}_id .center-table-item-special select`)) {
             if (this.caseStatusMap.has(str)) {
               $(`#${str}_id .center-table-item-special select`).val(
@@ -181,10 +227,19 @@ export default {
 
           // 法律法规点击事件
           if ($(`#${str}_id a`)) {
-            $(`#${str}_id a`).click((e) => {
-              console.log(e, "显示疑点相关的弹窗");
-              this.$store.state.lawPopupShow = true;
-            });
+            $(`#${str}_id a`)
+              .eq(0)
+              .click((e) => {
+                this.$store.state.lawPopupShow = true;
+                this.$store.state.lawSourceType = sourceType;
+              });
+            $(`#${str}_id a`)
+              .eq(1)
+              .click((e) => {
+                // 触发综合分析右侧面板点击事件
+
+                this.$bus.$emit("viewDetailsPopup", geojsonData);
+              });
           }
           // input添加点击事件
           if ($(`#${str}_id input`)[1]) {
@@ -232,7 +287,7 @@ export default {
                 break;
               case "保存":
                 this.saveBtnEvent(str, data, geoType);
-                // console.log(str, coord, data);
+
                 break;
             }
           });
@@ -313,7 +368,8 @@ export default {
           this.$Post(this.urlsCollection.addConllection, params).then(
             (res) => {
               if (res.code == 200) {
-                console.log(res, "添加标记成功");
+                // 标记成功后删除保存的原有名称
+                myLabelNameMap.delete(geoName);
                 map2DViewer.map.closePopup();
                 // 根据用户获取标记
                 let paramData = new FormData();
@@ -326,7 +382,6 @@ export default {
                 this.$Post(this.urlsCollection.selectByUser, paramData).then(
                   (userRes) => {
                     if (userRes.code === 200) {
-                      // console.log(userRes, "获取我的标记疑点数据");
                       if (userRes.content.length > 0) {
                         this.$store.state.myLabelPointsArr = [];
                         this.$store.state.myLabelPointsArr =
@@ -390,7 +445,11 @@ export default {
       if (this.currentHtml && this.currentCid) {
         setTimeout(() => {
           this.popup.setContent(
-            this.createAuditDiv(this.currentCid, this.currentProperties)
+            this.createAuditDiv(
+              this.currentCid,
+              this.currentProperties,
+              this.currentSourceType
+            )
           );
           // .openOn(map2DViewer.map);
         }, 300);
@@ -502,7 +561,6 @@ export default {
       // 请求并渲染新的区域图层
       get("./static/json/simplified_pdgeojson.json", "").then((geoJson) => {
         // 存放所有的面数据
-        console.log(this.$store.state.homeSpecialTown, "当前镇");
         map2DViewer.groups["浦东新区_polygon"] = L.featureGroup();
         map2DViewer.groups["浦东新区_label"] = L.featureGroup();
         map2DViewer.groups["浦东新区_polygon"].addTo(map2DViewer.map);
@@ -618,7 +676,16 @@ export default {
         return "#00ffd5";
       }
     },
-    addSinglePolygon(geometry, cid, color, uniqueId) {
+    /**
+     * 获取图层信息 -- 所有模型和预设模型
+     * @geometry 字符串格式的geojson数据
+     * @cid columnId
+     * @color 随机色
+     * @uniqueId label_columnId
+     * @mainType  所有图层/预设模型
+     * @sourceType 土地资源/林地资源/生态资源/水资源/全部
+     */
+    addSinglePolygon(geometry, cid, color, uniqueId, mainType, sourceType) {
       let uniqueIdList = [];
       if (this.$store.state.selectSelectDataMap["singlePolygon"][uniqueId]) {
         uniqueIdList =
@@ -648,10 +715,6 @@ export default {
           return data;
         });
       }
-      // if(){
-
-      // }
-      let properties = JSON.parse(geometry).properties;
       // 纬经度
       // [22474.568725585938, -16689.47381591797]
       // x,y转换
@@ -664,14 +727,28 @@ export default {
       }).addTo(map2DViewer.analysisGroups[uniqueId]);
 
       polygon.on("click", (e) => {
-        this.auditPopupShow = true;
-        this.popup = L.popup({ maxWidth: 700, maxHeight: 600 })
-          .setLatLng(e.latlng)
-          .setContent(this.createAuditDiv(cid, properties));
-        this.auditPopupShow = false;
-        this.popup.openOn(map2DViewer.map);
-        this.currentCid = cid;
-        this.currentProperties = properties;
+        let geojsonData = geometry;
+        // 所有图层下的疑点图层 -- 常规展示
+        if (mainType === "所有图层") {
+          this.normalAttrPopupShow = true;
+          this.normalPopup = L.popup({ maxWidth: 700, maxHeight: 600 })
+            .setLatLng(e.latlng)
+            .setContent(this.createNormalDiv(cid, geojsonData, sourceType));
+          this.normalAttrPopupShow = false;
+          this.normalPopup.openOn(map2DViewer.map);
+        }
+        // 预设模型下图层 -- 需要考虑审计功能
+        if (mainType === "预设模型") {
+          this.auditPopupShow = true;
+          this.popup = L.popup({ maxWidth: 700, maxHeight: 600 })
+            .setLatLng(e.latlng)
+            .setContent(this.createAuditDiv(cid, geojsonData, sourceType));
+          this.auditPopupShow = false;
+          this.popup.openOn(map2DViewer.map);
+          this.currentCid = cid;
+          this.currentProperties = geojsonData;
+          this.currentSourceType = sourceType;
+        }
       });
     },
     // 综合分析 - 图层绘制面
@@ -731,7 +808,6 @@ export default {
     },
     drawLine(data, color) {
       if (!map2DViewer.myLabels[`label_${data.id}`]) {
-        // console.log("开始绘制线", data);
         let coordinates = JSON.parse(data.geojson).geometry.coordinates[0];
         let polyline = L.polyline(coordinates, {
           color: color,
@@ -761,7 +837,6 @@ export default {
 
     drawCircle(data, color) {
       if (!map2DViewer.myLabels[`label_${data.id}`]) {
-        console.log("开始绘制圆", data);
         let coordinates = JSON.parse(data.geojson).geometry.coordinates[0];
 
         if ((coordinates.length = 2)) {
@@ -805,7 +880,6 @@ export default {
     },
     deleteGeometry(geometry) {
       if (geometry) {
-        // console.log(geometry, "移除");
         geometry.removeFrom(map2DViewer.map);
       }
     },

+ 22 - 6
src/components/popup/AttributePopup.vue

@@ -6,6 +6,7 @@
     }"
   >
     <div class="close-btn" @click="closeEvent"></div>
+    <!-- 所有图层或预设模型详细信息 -->
     <div class="attribute-table" v-if="tableType === 'normal'">
       <div class="attribute-table-top">详细信息</div>
       <div class="attribute-table-bottom">
@@ -26,12 +27,27 @@
         </div>
       </div>
     </div>
-
-    <el-table height="100%" v-if="tableType === 'personal'" :data="tableData">
-      <el-table-column label="名称" prop="name"></el-table-column>
-      <el-table-column label="类别" prop="type"></el-table-column>
-      <el-table-column label="描述" prop="des"></el-table-column>
-    </el-table>
+    <!-- 我的标记详细信息 -->
+    <div class="attribute-table" v-if="tableType === 'personal'">
+      <div class="attribute-table-top">疑点属性</div>
+      <div class="attribute-table-bottom">
+        <div
+          class="attribute-table-bottom-inner"
+          :style="{
+            maxHeight: boxHeight + 'px',
+          }"
+        >
+          <div
+            class="attribute-table-bottom-inner-item"
+            v-for="(key, value) in tableData[0]"
+            :key="value"
+          >
+            <div class="left">{{ value }}</div>
+            <div class="right">{{ key }}</div>
+          </div>
+        </div>
+      </div>
+    </div>
   </div>
 </template>
 <script>

+ 5 - 5
src/components/popup/CaseAuditPopup.vue

@@ -4,8 +4,11 @@
       <div class="top-law">
         <a style="cursor: pointer">》点此查看相关法律法规&nbsp;&nbsp;</a>
       </div>
+      <div class="top-law">
+        <a style="cursor: pointer"> 》更多详细内容</a>
+      </div>
       <!-- 未激活疑点审计 -->
-      <div v-if="status === 'normal'" class="center-table" style="height: 91%">
+      <div v-if="status === 'normal'" class="center-table" style="height: 75%">
         <div
           class="center-table-item-normal"
           v-for="(value, key) in tableObj"
@@ -96,15 +99,12 @@ export default {
   watch: {
     getPopupStatus(val) {
       if (val.index === 1 && val.subIndex === 0) {
-        // console.log("激活疑点审计按钮");
         this.status = "special";
       }
 
       if (val.index === -1 && val.subIndex === -1) {
-        // console.log("未激活疑点审计按钮");
         this.status = "normal";
       }
-      // console.log(val, "疑点审计当前的状态");
     },
   },
   methods: {
@@ -139,7 +139,7 @@ export default {
     }
     .center-table {
       width: 100%;
-      height: 70%;
+      height: 60%;
       overflow-y: auto;
       overflow-x: hidden;
       // border: 1px solid #818ca4;

+ 154 - 101
src/components/popup/LawPopup.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="law-related" v-if="lawPopupShow" v-drag>
+  <div class="law-related" v-if="lawPopupShow">
     <LawDetailsPopup
       ref="lawDetailsRef"
       class="law-details-popup"
@@ -25,16 +25,9 @@
         </el-input>
       </div>
       <div class="option-right">
-        <!-- <NewSelect
-          class="option-right-item"
-          :placeholder="'排序方式'"
-          style="left: 10px; top: 3px"
-        /> -->
-        <!-- <NewSelect class="option-right-item" :placeholder="'搜索范围'" /> -->
         <NewSelect
-          class="option-right-item"
+          class="option-right-select"
           :placeholder="'年份'"
-          style="right: 100px; top: 2px"
           v-model="timeSelectVal"
           :options="timeOptions"
           :value="timeSelectVal"
@@ -42,6 +35,7 @@
         <div class="option-right-search" @click="getTableData(1)">查询</div>
       </div>
     </div>
+    <div class="more-details" @click="goToLawView"><a>》更多相关内容</a></div>
     <div class="table">
       <el-table
         ref="singleTable"
@@ -49,11 +43,12 @@
         style="width: 100%"
         max-height="300"
         :data="tableData"
+        :default-sort="{ prop: 'date', order: 'descending' }"
         @current-change="handleRowChange"
       >
-        <el-table-column prop="title" label="名称" align="center">
+        <el-table-column prop="title" label="名称" align="center" sortable>
         </el-table-column>
-        <el-table-column prop="date" label="日期" align="center">
+        <el-table-column prop="date" label="日期" align="center" sortable>
         </el-table-column>
       </el-table>
     </div>
@@ -78,26 +73,16 @@ export default {
   components: { NewSelect, Pagination, LawDetailsPopup, FilePreView },
   data() {
     return {
+      // 数据字典暂存对象
+      classDictMap: {},
       lawBaseUrl: "/dms",
       searchInput: "",
-      // lawDetailsPopupShow: false,
-      sortSelectVal: "土地资源",
-      sortOptions: [
-        {
-          value: "土地资源",
-          label: "土地资源",
-        },
-      ],
-      scopeSelectVal: "浦东新区",
-      scopeOptions: [
-        {
-          value: "浦东新区",
-          label: "浦东新区",
-        },
-      ],
       timeSelectVal: "",
       timeOptions: [],
       tableData: [],
+      dateSortArr: [],
+      currentPageSize: 10,
+      currentPage: 1,
       paginationData: {
         pageSize: 10,
         pagerCount: 5,
@@ -112,7 +97,6 @@ export default {
         },
       },
       currentRow: null,
-      title: "",
     };
   },
   computed: {
@@ -122,24 +106,51 @@ export default {
   },
   watch: {
     lawPopupShow(val) {
-      console.log("选中了一个具体的疑点");
-      if (val) {
-        this.title = this.$store.state.lawPopupTitle;
-      }
+      val && this.getTableData(1);
     },
   },
   created() {
     this.timeOptions = [];
     // 时间选择
-    for (let i = 1980; i < 2023; i++) {
+    for (let i = 1980; i <= parseInt(this.$dayjs().format("YYYY")); i++) {
       this.timeOptions.unshift({
         value: i,
         label: i,
       });
     }
-    this.getTableData(1);
+    // this.getTableData(1);
+  },
+  mounted() {
+    // 审计类别
+    // 1-土地资源;2-水资源;农业资源;3-林业资源;4-生态资源;
+    this.classDictQuery("0", "sh_law_type", "审计法律类别");
   },
   methods: {
+    // 获取数字字典
+    classDictQuery(type, cName, keyName) {
+      let params = new FormData();
+      params = {
+        type: type,
+        cName: cName,
+      };
+      this.$Post(this.urlsCollection.selectByCNameAType, params).then((res) => {
+        if (res.code === 200 && res.content.length > 0) {
+          this.classDictMap[keyName] = new Map();
+          res.content.forEach((v) => {
+            this.classDictMap[keyName].set(v.name, v.index + "");
+          });
+          console.log(this.classDictMap[keyName]);
+        }
+      });
+    },
+    // 跳转至法律法规页面
+    goToLawView() {
+      this.$store.commit("changeNavSelect", {
+        index: "5",
+        subIndex: "1",
+        name: "法律法规",
+      });
+    },
     queryEvent() {
       console.log("查询");
     },
@@ -148,72 +159,96 @@ export default {
     },
     // 切换页
     getTableData(val) {
-      // console.log(`当前页: ${val}`);
-      this.tableData = [];
+      // console.log(`当前页: ${val}`)
+      if (this.$store.state.lawSourceType) {
+        this.tableData = [];
+        let searchParam = [];
+        // 根据类型筛选
+        if (
+          this.classDictMap["审计法律类别"] &&
+          this.classDictMap["审计法律类别"].has(this.$store.state.lawSourceType)
+        ) {
+          let paramType = {
+            field: "sh_law_type",
+            // 等值查询
+            searchType: "1",
+            content: {
+              value: this.classDictMap["审计法律类别"].get(
+                this.$store.state.lawSourceType
+              ),
+            },
+          };
+          searchParam.push(paramType);
+        }
 
-      let searchParam = [];
+        if (this.searchInput) {
+          let paramSearch = {
+            field: "c_name",
+            // 模糊查询
+            searchType: "2",
+            content: {
+              value: this.searchInput,
+            },
+          };
+          searchParam.push(paramSearch);
+        }
 
-      if (this.searchInput) {
-        let paramSearch = {
-          field: "c_name",
-          // 模糊查询
-          searchType: "2",
-          content: {
-            value: this.searchInput,
-          },
+        // 年份查询
+        if (this.timeSelectVal) {
+          let paramTime = {
+            field: "c_new_date",
+            // field: "c_date_time",
+            // 模糊查询
+            searchType: "2",
+            content: {
+              value: this.timeSelectVal + "",
+            },
+          };
+          searchParam.push(paramTime);
+        }
+        let params = new FormData();
+        params = {
+          columnId: 23,
+          states: 3,
+          pageSize: this.currentPageSize,
+          page: val - 1,
+          search: JSON.stringify(searchParam),
         };
-        searchParam.push(paramSearch);
-      }
 
-      // 年份查询
-      if (this.timeSelectVal) {
-        let paramTime = {
-          field: "c_new_date",
-          // field: "c_date_time",
-          // 模糊查询
-          searchType: "2",
-          content: {
-            value: this.timeSelectVal + "",
+        this.$Post(this.urlsCollection.selectContentList, params).then(
+          (res) => {
+            // console.log(res, "当前的法律法规");
+            if (res.code === 200 && res.content.data.length > 0) {
+              // console.log(res.content, "查询到的法律法规相关的数据");
+              this.paginationData.currentPage = val;
+              this.paginationData.total = res.content.count;
+              this.tableData = res.content.data.map((v) => {
+                return {
+                  id: v.id || "",
+                  title: v.c_name || "--",
+                  date: this.$dayjs(v.c_date_time).format("YYYY-MM-DD") || "--",
+                  address: v.c_pdf || "",
+                };
+              });
+              this.dateSortArr = res.content.data.map((v) => {
+                return {
+                  text: v.c_new_date,
+                  value: v.c_date_time,
+                };
+              });
+            }
           },
-        };
-        searchParam.push(paramTime);
-      }
-
-      let params = new FormData();
-      params = {
-        columnId: 23,
-        states: 3,
-        pageSize: this.currentPageSize,
-        page: val - 1,
-        search: JSON.stringify(searchParam),
-      };
-
-      this.$Post(this.urlsCollection.selectContentList, params).then(
-        (res) => {
-          // console.log(res, "当前的法律法规");
-          if (res.code === 200 && res.content.data.length > 0) {
-            // console.log(res.content, "查询到的法律法规相关的数据");
-            this.paginationData.currentPage = val;
-            this.paginationData.total = res.content.count;
-            this.tableData = res.content.data.map((v) => {
-              return {
-                id: v.id || "",
-                title: v.c_name || "--",
-                date: v.c_new_date || "--",
-                // date: v.c_date || "--",
-                address: v.c_pdf || "",
-              };
-            });
+          (error) => {
+            console.log(error);
           }
-        },
-        (error) => {
-          console.log(error);
-        }
-      );
+        );
+      }
     },
     // 切换条数
     handleSizeChange(val) {
       console.log(`每页 ${val} 条`);
+      this.currentPageSize = val;
+      this.getTableData(this.currentPage);
     },
     closeEvent() {
       this.$store.state.lawPopupShow = false;
@@ -241,8 +276,8 @@ export default {
 </script>
 <style lang="less" scoped>
 .law-related {
-  width: 700px;
-  height: 500px;
+  width: 650px;
+  height: 530px;
   background: rgba(0, 39, 77, 0.95);
   border: 1px solid #2fb8ff;
   pointer-events: auto;
@@ -302,19 +337,21 @@ export default {
       cursor: pointer;
     }
   }
+
   .option {
     width: 100%;
     height: 11%;
     position: relative;
     &-left {
       position: absolute;
-      left: 0;
-      width: 35%;
+      left: 10px;
+      width: 45%;
+      height: 100%;
       .search-input {
         position: absolute;
-        top: 7px;
+        top: 12px;
         left: 5px;
-        width: 225px;
+        width: 300px;
       }
       /deep/.el-input-group__append,
       .el-input-group__prepend {
@@ -354,13 +391,15 @@ export default {
       justify-content: space-around;
       position: absolute;
       right: 0;
-      width: 65%;
-      &-item {
+      width: 55%;
+      height: 100%;
+      &-select {
         width: 200px;
         height: 40px;
         line-height: 50px;
         position: absolute;
-        left: 0;
+        left: 50px;
+        top: 3.5px;
       }
       &-search {
         width: 60px;
@@ -377,14 +416,28 @@ export default {
         align-items: center;
         justify-content: center;
         position: absolute;
-        top: 12px;
-        right: 15px;
+        top: 13px;
+        right: 20px;
       }
     }
   }
+  .more-details {
+    width: 97.5%;
+    height: 7%;
+    font-size: 18px;
+    font-family: PingFang SC;
+    font-weight: 300;
+    font-style: italic;
+    text-decoration: underline;
+    color: #4dc3ff;
+    cursor: pointer;
+    display: flex;
+    align-items: top;
+    justify-content: flex-end;
+  }
   .table {
     width: 100%;
-    height: 70%;
+    height: 60%;
     /deep/.el-table {
       background: rgba(0, 39, 77, 0.6);
       // font-size: 0.95rem;

+ 51 - 0
src/components/popup/NormalAttrPopup.vue

@@ -0,0 +1,51 @@
+<template>
+  <MenuCard class="case-audit" :menuData="menuData">
+    <div class="case-audit-inner">
+      <div class="top-law">
+        <a style="cursor: pointer">》点此查看相关法律法规&nbsp;&nbsp;</a>
+      </div>
+      <div class="top-law">
+        <a style="cursor: pointer"> 》更多详细内容</a>
+      </div>
+      <div class="center-table" style="height: 75%">
+        <div
+          class="center-table-item-normal"
+          v-for="(value, key) in tableObj"
+          :key="key"
+        >
+          <div class="leftcell">{{ key }}</div>
+          <div class="rightcell">{{ value }}</div>
+        </div>
+      </div>
+    </div>
+  </MenuCard>
+</template>
+<script>
+import MenuCard from "@/components/layout/MenuCard.vue";
+import NewSelect from "@/components/common/NewSelect.vue";
+/**
+ * 常规疑点图层弹窗 -- 不支持审计功能
+ *
+ * 点击地图上的疑点板块时 - 会出现疑点性质一栏
+ */
+export default {
+  name: "NormalAttrPopup",
+  components: { MenuCard, NewSelect },
+  data() {
+    return {
+      menuData: {
+        type: "chart",
+        title: "属性",
+        boxWidth: "300",
+        boxHeight: "320",
+      },
+      tableObj: {
+        镇域名称: "--",
+        面积: "--",
+        土地类型: "--",
+        图斑编号: "--",
+      },
+    };
+  },
+};
+</script>

+ 5 - 4
src/store/index.js

@@ -32,7 +32,8 @@ export default new Vuex.Store({
     modelStatus: "create",
     // 法律法规弹窗
     lawPopupShow: false,
-    lawPopupTitle:"--",
+    // 法规法规弹窗资源类型
+    lawSourceType: "",
     // 底图切换距离右侧的位置
     baseMapRight: 23,
     // 我的标记中的疑点数据
@@ -43,11 +44,11 @@ export default new Vuex.Store({
     // 综合分析疑点属性弹窗
     attrTableShow: false,
     // 综合分析修改标记弹窗
-    updateCasePopupShow:false,
+    updateCasePopupShow: false,
     // 首页所属街道全局暂存变量
     homeSpecialTown: "全部",
     // 全局类型变量
-    selectSelectDataMap: {}
+    selectSelectDataMap: {},
   },
   getters: {
     customModelsArr: (state) => state.customModelsArr,
@@ -55,7 +56,7 @@ export default new Vuex.Store({
     treeDataCollection: (state) => state.treeDataCollection,
   },
   mutations: {
-    changeHomeSpecialTown(state, homeSpecialTown){
+    changeHomeSpecialTown(state, homeSpecialTown) {
       state.homeSpecialTown = homeSpecialTown;
     },
     changeBackMenu(state, backMenu) {

+ 248 - 126
src/views/ComprehensiveAnalysis.vue

@@ -29,7 +29,6 @@
     </div>
     <!-- 属性弹窗 -->
     <AttributePopup
-      v-drag
       class="comprehensive-analysis-popup"
       v-if="attrTableShow"
       :boxWidth="boxWidth"
@@ -282,6 +281,8 @@ export default {
       townOptions: [],
       enteredPanelId: "",
       enteredColumnId: "",
+      enteredMainType: "",
+      enteredSourceType: "",
       uploadBaseUrl: "/dms",
       classTextToIndex: {},
       addressInput: "",
@@ -327,7 +328,9 @@ export default {
         currentChange: (val) => {
           let columnId = this.enteredColumnId;
           let panelId = this.enteredPanelId;
-          this.changeSingleLayer(columnId, panelId, val);
+          let mainType = this.enteredMainType;
+          let sourceType = this.enteredSourceType;
+          this.changeSingleLayer(val, columnId, panelId, mainType, sourceType);
         },
         handleSizeChange: (val) => {
           this.handleSizeChange(val);
@@ -369,6 +372,52 @@ export default {
     },
   },
   watch: {
+    // 控制全选的显示或隐藏
+    labelAllVisibleChecked(val) {
+      if (this.rightLabelData.length > 0) {
+        this.rightLabelData.forEach((item) => {
+          this.controlLabel(item);
+        });
+        if (val) {
+          this.labelAllLocate();
+        }
+
+        // if (map2DViewer.groups["我的标记图层组"]) {
+        //   map2DViewer.map.fitBounds(
+        //     map2DViewer.groups["我的标记图层组"].getBounds()
+        //   );
+        // }
+      }
+    },
+    "$store.state.navSelect": {
+      handler(val) {
+        if (val.index === "1" || val.index === "2") {
+          this.clearAllData();
+          this.labelAllVisibleChecked = false;
+        }
+
+        if (val.index === "3") {
+          // 如果没有初始化设置
+          if (!map2DViewer.groups["我的标记图层组"]) {
+            this.getUserMarkers();
+          }
+          this.labelAllVisibleChecked = true;
+          // 进入该页面后监听地图移动事件
+          map2DViewer.map.on("move", (e) => {
+            if (!this.isLeftLock) {
+              this.showLeftBox = false;
+              this.leftBoxBtn = true;
+            }
+
+            if (!this.isRightLock) {
+              this.showRightBox = false;
+              this.rightBoxBtn = true;
+            }
+          });
+        }
+      },
+      deep: true,
+    },
     uploadDataArr: {
       handler(val) {
         if (val.length > 0) {
@@ -487,53 +536,56 @@ export default {
   },
 
   mounted() {
-    //获取我的标记数据
-    this.getUserMarkers();
-    map2DViewer.map.on("move", (e) => {
-      if (!this.isLeftLock) {
-        this.showLeftBox = false;
-        this.leftBoxBtn = true;
-      }
+    // 获取我的标记数据
+    if (this.$store.state.navSelect.index === "3") {
+      this.getUserMarkers();
+      map2DViewer.map.on("move", (e) => {
+        if (!this.isLeftLock) {
+          this.showLeftBox = false;
+          this.leftBoxBtn = true;
+        }
 
-      if (!this.isRightLock) {
-        this.showRightBox = false;
-        this.rightBoxBtn = true;
-      }
-    });
-  },
-  beforeDestroy() {
-    this.clearAllData();
+        if (!this.isRightLock) {
+          this.showRightBox = false;
+          this.rightBoxBtn = true;
+        }
+      });
+
+      this.$bus.$off("viewDetailsPopup");
+      this.$bus.$on("viewDetailsPopup", (data) => {
+        this.viewDetailsPopup(data);
+      });
+    }
   },
+  // beforeDestroy() {
+  //   this.clearAllData();
+  // },
   methods: {
     // 清除页面所有数据
     clearAllData() {
-      treeIdMap.clear();
-      uploadDataIdArr = [];
-      this.treeCoordMap.clear();
+      // treeIdMap.clear();
+      // uploadDataIdArr = [];
+      // this.treeCoordMap.clear();
       map2DViewer.map.off("move");
+      // 所有图层或预设模型全部删除
       if (Object.getOwnPropertyNames(map2DViewer.analysisGroups).length > 0) {
         for (let group in map2DViewer.analysisGroups) {
+          // 仅从地图上删除对应图层组
           this.$store.state.mapMethodsCollection
             .get("RENDER")
             .deleteGroupFromMap(group);
           map2DViewer.analysisGroups[group].remove();
         }
+        this.$refs.tree.setCheckedKeys([]);
       }
 
-      if (Object.getOwnPropertyNames(map2DViewer.myLabels).length > 0) {
-        for (let label in map2DViewer.myLabels) {
-          this.$store.state.mapMethodsCollection
-            .get("RENDER")
-            .deleteGeometry(map2DViewer.myLabels[label]);
-        }
-      }
       map2DViewer.analysisGroups = {};
       map2DViewer.polygons = {};
-      map2DViewer.myLabels = {};
       this.attrTableShow = false;
       this.updateCasePopupShow = false;
       map2DViewer.map.closePopup();
     },
+
     labelAllLocate() {
       if (map2DViewer.groups["我的标记图层组"]) {
         map2DViewer.map.fitBounds(
@@ -543,41 +595,36 @@ export default {
     },
     labelAllVisible() {
       this.labelAllVisibleChecked = !this.labelAllVisibleChecked;
-      console.log("labelAllVisible");
-      if (this.rightLabelData.length > 0) {
-        this.rightLabelData.forEach((item) => {
-          this.controlLabel(item);
-        });
-        if (map2DViewer.groups["我的标记图层组"]) {
-          map2DViewer.map.fitBounds(
-            map2DViewer.groups["我的标记图层组"].getBounds()
-          );
-        }
-      }
     },
     mouseenter(val) {
       if (this.rightPanelDataMap.has(val)) {
         // 方便获取
         this.enteredPanelId = val;
-        this.enteredColumnId = this.rightPanelDataMap.get(val);
-        // console.log("当前的columnId", this.enteredColumnId);
+        this.enteredColumnId = this.rightPanelDataMap.get(val).id;
+        this.enteredMainType = this.rightPanelDataMap.get(val).mainType;
+        this.enteredSourceType = this.rightPanelDataMap.get(val).sourceType;
       }
     },
     handleSizeChange(val) {
       console.log(`每页 ${val} 条`);
       this.currentPageSize = val;
       this.changeSingleLayer(
+        this.currentPage,
         this.enteredColumnId,
         this.enteredPanelId,
-        this.currentPage
+        this.enteredMainType,
+        this.enteredColumnId
       );
-      // this.getTableData(this.currentPage);
     },
     getTableData() {},
     /**
      * 获取图层信息 -- 所有模型和预设模型
+     * @columnId
+     * @id label_columnId
+     * @mainType  所有图层/预设模型
+     * @sourceType 土地资源/林地资源/生态资源/水资源/全部
      */
-    displaySingleLayer(columnId, id) {
+    displaySingleLayer(columnId, id, mainType, sourceType) {
       if (id !== "永久基本农田_50") {
         // console.log(columnId, "columnId");
         let layerParams = new FormData();
@@ -610,11 +657,11 @@ export default {
               if (!this.$store.state.selectSelectDataMap["singlePolygon"]) {
                 this.$store.state.selectSelectDataMap["singlePolygon"] = [];
               }
-
+              this.layerIdMap.set(uniqueId, uniqueId);
               this.originalData[uniqueId] = res.content.data.map((ele) => {
                 let cid = ele.id;
                 let geometry = ele.c_content;
-                this.layerIdMap.set(uniqueId, uniqueId);
+
                 // 激活当前展开面板
                 this.activeNames = ["myLabel", uniqueId];
                 this.$store.state.mapMethodsCollection
@@ -623,7 +670,9 @@ export default {
                     geometry,
                     cid,
                     this.randomColor.get(uniqueId),
-                    uniqueId
+                    uniqueId,
+                    mainType,
+                    sourceType
                   );
 
                 return {
@@ -654,8 +703,13 @@ export default {
     },
     /**
      * 切换页时改变图层数据
+     * @val 当前页
+     * @columnId
+     * @id label_columnId
+     * @mainType 所有图层/预设模型
+     * @sourceType 土地资源,水资源,林地资源,全部
      */
-    changeSingleLayer(columnId, id, val) {
+    changeSingleLayer(val, columnId, id, mainType, sourceType) {
       let layerParams = new FormData();
       layerParams = {
         columnId: columnId,
@@ -671,13 +725,12 @@ export default {
             this.paginationData.total = res.content.count;
             let uniqueId = id;
             if (map2DViewer.analysisGroups[uniqueId]) {
-              // console.log("当前的analysisGroups有数据");
-              // map2DViewer.analysisGroups[uniqueId].remove()
+              this.layerIdMap.set(uniqueId, uniqueId);
               map2DViewer.analysisGroups[uniqueId].clearLayers();
               this.originalData[uniqueId] = res.content.data.map((ele) => {
                 let cid = ele.id;
                 let geometry = ele.c_content;
-                this.layerIdMap.set(uniqueId, uniqueId);
+
                 this.activeNames = ["myLabel", uniqueId];
                 this.$store.state.mapMethodsCollection
                   .get("RENDER")
@@ -685,7 +738,9 @@ export default {
                     geometry,
                     cid,
                     this.randomColor.get(uniqueId),
-                    uniqueId
+                    uniqueId,
+                    mainType,
+                    sourceType
                   );
                 return {
                   id: ele.id,
@@ -789,7 +844,12 @@ export default {
                                             );
                                             this.rightPanelDataMap.set(
                                               `${item4.title}_${item4.id}`,
-                                              item4.id
+
+                                              {
+                                                id: item4.id,
+                                                mainType: item1.title,
+                                                sourceType: item3.title,
+                                              }
                                             );
 
                                             this.randomColor.set(
@@ -805,7 +865,7 @@ export default {
                                               modelName: item4.modelName,
                                               modelId: item4.modelId,
                                               tag: item4.tag,
-                                              type: item3.title,
+                                              sourceType: item3.title,
                                               town: item2.title,
                                               mainType: item1.title,
                                               color: publicFun.getRandomColor(),
@@ -847,7 +907,11 @@ export default {
                                   );
                                   this.rightPanelDataMap.set(
                                     `${item3.title}_${item3.id}`,
-                                    item3.id
+                                    {
+                                      id: item3.id,
+                                      mainType: item1.title,
+                                      sourceType: item2.title,
+                                    }
                                   );
                                   this.randomColor.set(
                                     `${item3.title}_${item3.id}`,
@@ -857,6 +921,7 @@ export default {
                                     id: `${item3.title}_${item3.id}`,
                                     label: item3.title,
                                     children: [],
+                                    sourceType: item2.title,
                                     mainType: item1.title,
                                     columnId: item3.id,
                                   };
@@ -896,23 +961,6 @@ export default {
       });
     },
     getMyModelData() {
-      // 我的模型栏目信息
-      // {
-      //       "level": 0,
-      //       "modelId": 94,
-      //       "updateTime": 1671432804228,
-      //       "authorId": 4,
-      //       "title": "我的模型",
-      //       "type": 1,
-      //       "content": "浦东审计-我的模型",
-      //       "parentId": -1,
-      //       "modelName": "pdsj_wdmx_m_ysmx_wdmx",
-      //       "createTime": 1671432804228,
-      //       "authorName": "user001",
-      //       "id": 89,
-      //       "state": 0,
-      //       "tag": "pdsj_wdmx"
-      //   },
       let params = new FormData();
       params = {
         columnId: 49,
@@ -925,7 +973,6 @@ export default {
         .then((res) => {
           // console.log(res, "判断是否有");
           if (res.code === 200 && res.content.data.length > 0) {
-            // console.log(res.content.data, "我的模型 - 最终数据");
             let children = res.content.data.map((ele) => {
               customModelIdMap.set(ele.title, {
                 column_id: ele.column_id,
@@ -947,7 +994,6 @@ export default {
             if (this.modelData.length > 0) {
               this.modelData.forEach((ele) => {
                 if (ele.label == "我的模型") {
-                  // console.log(ele, "我的模型");
                   ele.children = children;
                 }
               });
@@ -1091,7 +1137,9 @@ export default {
               data.town
             );
 
-            let targetType = this.classTextToIndex["任务类型"].get(data.type);
+            let targetType = this.classTextToIndex["任务类型"].get(
+              data.sourceType
+            );
 
             let paramUser = {
               field: "c_user_id",
@@ -1139,7 +1187,12 @@ export default {
                   this.$store.state.treeDataCollection.set(data.id, {
                     mainType: data.mainType,
                   });
-                  this.displaySingleLayer(data.columnId, data.id);
+                  this.displaySingleLayer(
+                    data.columnId,
+                    data.id,
+                    data.mainType,
+                    data.sourceType
+                  );
                 }
               }
             );
@@ -1153,7 +1206,12 @@ export default {
               // town: data.town,
               // type: data.type,
             });
-            this.displaySingleLayer(data.columnId, data.id);
+            this.displaySingleLayer(
+              data.columnId,
+              data.id,
+              data.mainType,
+              data.sourceType
+            );
           }
         } else {
           if (this.$store.state.selectSelectDataMap["singlePolygon"][data.id]) {
@@ -1189,11 +1247,13 @@ export default {
       // 第一级菜单是我的模型
       if (data.mainType && data.mainType === "我的模型") {
         // 显示叠置分析的数据
-        checked ? this.displayOverlayData(data) : this.deleteOverlayData(data);
+        checked ? this.displayMyModelData(data) : this.deleteMyModelData(data);
       }
     },
-    displayOverlayData(data) {
+    displayMyModelData(data) {
+      // 如果有叠置分析文件 -- 呈现叠置分析内容
       if (data.c_dzfx_file) {
+        debugger;
         this.$Get(this.uploadBaseUrl + data.c_dzfx_file, "").then(
           (response) => {
             if (response.features.length > 0) {
@@ -1205,6 +1265,44 @@ export default {
             }
           }
         );
+      } else {
+        let params = new FormData();
+        params = {
+          modelId: data.id,
+          userId: localStorage.getItem("USER_ID"),
+        };
+        // 调用我的模型查看接口读取所有图层数据
+        this.$Post(this.urlsCollection.getModelCoverAgeInfo, params).then(
+          (res) => {
+            if (res.code === 200 && res.content.length > 0) {
+              debugger;
+              console.log(res.content, "查看我的模型图层数据");
+              let uniqueId = `${data.label}_${data.id}`;
+              map2DViewer.analysisGroups[uniqueId] = L.featureGroup();
+              map2DViewer.analysisGroups[uniqueId].addTo(map2DViewer.map);
+              this.layerIdMap.set(uniqueId, uniqueId);
+              // 判断能用的数据
+              // 根据column_name或 column_id判断有几个图层
+              res.content.forEach((ele, index) => {
+                let cid = ele.id;
+                let geometry = ele.c_content;
+                // this.$store.state.mapMethodsCollection
+                //   .get("RENDER")
+                //   .addSinglePolygon(
+                //     geometry,
+                //     cid,
+                //     // this.randomColor.get(uniqueId),
+                //     uniqueId,
+                //     mainType,
+                //     sourceType
+                //   );
+                // let legendTitle = this.legendTitle.push({});
+                // map2DViewer.analysisGroups[uniqueId] = L.featureGroup();
+                // map2DViewer.analysisGroups[uniqueId].addTo(map2DViewer.map);
+              });
+            }
+          }
+        );
       }
     },
     readGeojson(geojson, id) {
@@ -1218,11 +1316,29 @@ export default {
       }).addTo(map2DViewer.map);
       map2DViewer.overlay[id] = geojsonData;
     },
-    deleteOverlayData(data) {
-      if (map2DViewer.overlay[data.id]) {
-        map2DViewer.map.removeLayer(map2DViewer.overlay[data.id]);
+    deleteMyModelData(data) {
+      // 如果有叠置分析文件,删除叠置分析图层
+      if (data.c_dzfx_file) {
+        if (map2DViewer.overlay[data.id]) {
+          map2DViewer.map.removeLayer(map2DViewer.overlay[data.id]);
+        }
+      } else {
+        // 删除绘制的图层数据
       }
     },
+    //显示详细信息
+    viewDetailsPopup(data) {
+      this.$store.state.bottomMenuIndexs.index = -1;
+      this.$store.state.bottomMenuIndexs.subIndex = -1;
+      this.updateCasePopupShow = false;
+      this.tableType = "normal";
+      this.boxWidth = "600";
+      this.boxHeight = "600";
+      this.tableData = [];
+      let obj = JSON.parse(data).properties;
+      this.tableData.push(obj);
+      this.attrTableShow = true;
+    },
     // 右侧面板项点击事件
     listItemClick(type, data) {
       this.$store.state.bottomMenuIndexs.index = -1;
@@ -1266,9 +1382,9 @@ export default {
         this.boxWidth = "300";
         this.boxHeight = "300";
         this.tableData.push({
-          name: data.name,
-          type: data.type,
-          des: data.des,
+          名称: data.name,
+          类别: data.type,
+          描述: data.des,
         });
       }
 
@@ -1285,36 +1401,45 @@ export default {
       this.$nextTick(() => {
         let selectType = this.$refs.updateLabelRef.selectVal;
         let desContent = this.$refs.updateLabelRef.textContent;
-        let nameInput = this.$refs.updateLabelRef.nameInput;
-        let id = this.$refs.updateLabelRef.id;
-        let params = new FormData();
+        let currentNameInput = this.$refs.updateLabelRef.nameInput;
         let geojson = JSON.parse(this.$refs.updateLabelRef.geojson);
         let geometryType = geojson.properties.featureTypeIndex;
-        // 修改标题和描述
-        geojson.properties.title = selectType;
-        geojson.properties.desc = desContent;
-        geojson.properties.name = nameInput;
-        console.log(geojson, "修改后的geojson数据");
-        params = {
-          userId: Number(localStorage.getItem("USER_ID")),
-          sourceId: 0,
-          type: geometryType,
-          geojson: JSON.stringify(geojson),
-          id: id,
-        };
-        this.$Post(this.urlsCollection.updateConllection, params).then(
-          (res) => {
-            if (res.code === 200) {
-              // console.log("修改成功", res);
-              this.updateCasePopupShow = false;
-              this.getUserMarkers();
+        if (
+          myLabelNameMap.has(currentNameInput) &&
+          currentNameInput !== geojson.properties.name
+        ) {
+          this.$message.info("该名称已存在,请重新输入!");
+        } else {
+          let id = this.$refs.updateLabelRef.id;
+          let params = new FormData();
+          let nameInput = this.$refs.updateLabelRef.nameInput;
+          // 修改标题和描述
+          geojson.properties.title = selectType;
+          geojson.properties.desc = desContent;
+          geojson.properties.name = nameInput;
+          console.log(geojson, "修改后的geojson数据");
+          params = {
+            userId: Number(localStorage.getItem("USER_ID")),
+            sourceId: 0,
+            type: geometryType,
+            geojson: JSON.stringify(geojson),
+            id: id,
+          };
+          this.$Post(this.urlsCollection.updateConllection, params).then(
+            (res) => {
+              if (res.code === 200) {
+                // console.log("修改成功", res);
+                this.updateCasePopupShow = false;
+                this.getUserMarkers();
+                this.$message.success("修改成功!");
+              }
+            },
+            (error) => {
+              this.$message.error("保存失败");
+              console.log(error);
             }
-          },
-          (error) => {
-            this.$message.error("保存失败");
-            console.log(error);
-          }
-        );
+          );
+        }
       });
     },
     // 修改标记 -- 仅支持修改类型和描述
@@ -1326,7 +1451,8 @@ export default {
       this.attrTableShow = false;
       if (this.updateCasePopupShow) {
         this.$nextTick(() => {
-          // console.log(this.$refs.updateLabelRef, "updateLabelRef");
+          this.$refs.updateLabelRef.menuData.title = "修改标记";
+          this.$refs.updateLabelRef.nameInput = val.name;
           this.$refs.updateLabelRef.selectVal = val.type;
           this.$refs.updateLabelRef.textContent = val.des;
           this.$refs.updateLabelRef.id = val.id;
@@ -1401,9 +1527,10 @@ export default {
 @commonBorderColor: rgb(0, 170, 255);
 .comprehensive-analysis {
   &-law-popup {
-    position: absolute;
-    top: 15%;
-    left: 33%;
+    position: fixed;
+    left: 0;
+    right: 0;
+    margin: 100px auto;
     pointer-events: auto;
     z-index: 99;
   }
@@ -1510,10 +1637,10 @@ export default {
   }
   /* 弹窗 */
   &-popup {
-    // background: red;
-    position: absolute;
-    top: 10%;
-    left: 35%;
+    position: fixed;
+    left: 0;
+    right: 0;
+    margin: 100px auto;
     pointer-events: auto;
     z-index: 99;
   }
@@ -1781,12 +1908,7 @@ export default {
             }
           }
         }
-        // /deep/.el-icon-arrow-right:before {
-        //   content: "";
-        // }
-        // /deep/.el-icon-arrow-right:after {
-        //   content: "";
-        // }
+
         .panel-list-item {
           position: relative;
           margin: 0 auto;

+ 1 - 1
src/views/FrequencyView.vue

@@ -120,7 +120,7 @@ export default {
     this.typeOptions = [];
 
     // 时间选择
-    for (let i = 1980; i < 2023; i++) {
+    for (let i = 1980; i <= parseInt(this.$dayjs().format("YYYY")); i++) {
       this.timeOptions.unshift({
         value: i,
         label: i,

+ 1 - 1
src/views/HomeView.vue

@@ -37,7 +37,7 @@
     </div>
 
     <!-- 综合分析 -->
-    <ComprehensiveAnalysis id="ComprehensiveContainer" v-if="$ifMenu('3', '')" />
+    <ComprehensiveAnalysis id="ComprehensiveContainer" v-show="$ifMenu('3', '')" />
 
     <!-- 法律法规 -->
     <LawView id="LawContainer" v-if="$ifMenu('5', '1')" />

+ 11 - 22
src/views/LawView.vue

@@ -5,7 +5,8 @@
         ref="lawRef"
         class="law-container-inner-details"
         @lawDetailsClose="lawDetailsClose"
-        ><FilePreview ref="lawFilePreview" style="width: 100%; height: 100%;"/></LawDetailsPopup>
+        ><FilePreview ref="lawFilePreview" style="width: 100%; height: 100%"
+      /></LawDetailsPopup>
       <div class="header">
         <div class="header-title">法律法规</div>
         <div class="header-select">
@@ -36,21 +37,6 @@
               <i class="el-icon-search" slot="append"></i>
             </el-input>
           </div>
-          <!-- <div style="position: relative">
-            <el-button
-              size="big"
-              type="text"
-              icon="el-icon-search"
-              style="
-                position: absolute;
-                bottom: 4px;
-                right: 10px;
-                z-index: 99;
-                color: #fff;
-              "
-            ></el-button>
-            <el-input class="search-input" v-model="searchInput" clearable> </el-input>
-          </div> -->
         </div>
         <div class="query-btn" @click="getTableData(1)">查询</div>
         <div class="reset-btn" @click="resetEvent">重置</div>
@@ -60,6 +46,7 @@
           :data="tableData"
           style="width: 100%"
           max-height="600"
+          :default-sort="{ prop: 'date', order: 'descending' }"
           @current-change="handleClick"
         >
           <el-table-column type="index" width="150" label="序号" align="center">
@@ -71,11 +58,12 @@
             label="文件名称"
             align="center"
             width="250"
+            sortable
           >
           </el-table-column>
           <el-table-column prop="class" label="等级" align="center">
           </el-table-column>
-          <el-table-column prop="date" label="日期" align="center">
+          <el-table-column prop="date" label="日期" align="center" sortable>
           </el-table-column>
         </el-table>
       </div>
@@ -133,7 +121,7 @@ export default {
     this.timeOptions = [];
     this.typeOptions = [];
     // 时间选择
-    for (let i = 1980; i < 2023; i++) {
+    for (let i = 1980; i <= parseInt(this.$dayjs().format("YYYY")); i++) {
       this.timeOptions.unshift({
         value: i,
         label: i,
@@ -251,10 +239,11 @@ export default {
               return {
                 id: v.id || "",
                 title: v.c_name || "--",
-                type: this.classDictMap["审计法律类别"].get(v.sh_law_type) || "--",
+                type:
+                  this.classDictMap["审计法律类别"].get(v.sh_law_type) || "--",
                 class: this.classDictMap["审计等级"].get(v.sj_class) || "--",
-                date: v.c_new_date || "--",
-                // date: this.$dayjs(v.c_date_time).format("YYYY-MM-DD") || "--",
+                // date: v.c_new_date || "--",
+                date: this.$dayjs(v.c_date_time).format("YYYY-MM-DD") || "--",
                 address: v.c_pdf || "",
               };
             });
@@ -370,7 +359,7 @@ export default {
             /deep/ .el-input__inner {
               border-color: #fff !important;
               color: #fff;
-              border-right:none ;
+              border-right: none;
             }
           }
         }