Jelajahi Sumber

疑点审计

Bella 2 tahun lalu
induk
melakukan
fc700c8865

+ 56 - 20
src/components/common/BottomForm/CustomModelDialog.vue

@@ -256,7 +256,9 @@ export default {
       this.checkedList = [];
       this.outerDialogVisible = true;
       if (node.data.c_bind_layer) {
-        let bindLayerArr = JSON.parse(node.data.c_bind_layer);
+        let bindLayerArr = JSON.parse(node.data.c_bind_layer).map((v) => {
+          return `${v.columnName}_${v.columnId}`;
+        });
         // console.log(bindLayerArr, "c_bind_layer");
         if (bindLayerArr.length > 0) {
           this.checkArr = bindLayerArr;
@@ -469,12 +471,22 @@ export default {
       this.createModelParams.content = this.inputName;
       this.createModelParams.c_user_id = localStorage.getItem("USER_ID") || 4;
 
-      let newData = this.checkedList.filter((v) => {
-        if (layerAuthorityMap.has(v) && layerAuthorityMap.get(v) === "有权限") {
-          return v;
-        }
-      });
+      // let newData = this.checkedList.filter((v) => {
+      //   if (layerAuthorityMap.has(v) && layerAuthorityMap.get(v) === "有权限") {
+      //     return v;
+      //   }
+      // });
       // console.log(newData, "可以进行叠置分析的图层");
+      let newData = [
+        {
+          columnName: "公益林",
+          columnId: 60,
+        },
+        {
+          columnName: "建设用地",
+          columnId: 51,
+        },
+      ];
 
       this.createModelParams.c_bind_layer = JSON.stringify(newData);
       let params = new FormData();
@@ -624,7 +636,10 @@ export default {
               layerAuthorityMap.has(v) &&
               layerAuthorityMap.get(v) === "有权限"
             ) {
-              return v;
+              return {
+                columnName:v.split("_")[0],
+                columnId:v.split("_")[1]
+              };
             }
           });
           this.modifyModel("notOverlay", newData);
@@ -646,27 +661,48 @@ export default {
     },
     // 执行叠置分析
     executeOverlay() {
+      debugger;
       this.overlayBtnChecked = !this.overlayBtnChecked;
       if (this.overlayBtnChecked && !this.forbidOverlayBtn) {
         // 进行叠置分析后,叠置分析结果会自动保存
         // 当前勾选的图层并未自动保存,需要重新调用一次保存接口
-        let newData = this.checkedList.filter((v) => {
-          if (
-            layerAuthorityMap.has(v) &&
-            layerAuthorityMap.get(v) === "有权限"
-          ) {
-            return v;
-          }
+        // let newData = this.checkedList.filter((v) => {
+        //   if (
+        //     layerAuthorityMap.has(v) &&
+        //     layerAuthorityMap.get(v) === "有权限"
+        //   ) {
+        //     return v;
+        //   }
+        // });
+        let bindLayer = this.checkedList.map((v) => {
+          return {
+            columnName: v.split("_")[0],
+            columnId: v.split("_")[1],
+          };
         });
-        let bindLayer = newData.join(",");
-        let tagretUrl = `${this.urlsCollection.overlayAnalysis}?modelId=${this.currentModifiedModelId}&bindLayer=${bindLayer}`;
-        this.$Get(tagretUrl).then((res) => {
-          if (res.code === 200) {
+        let params = new FormData()
+        params = {
+          modelId:this.currentModifiedModelId,
+          bindLayer:JSON.stringify(bindLayer)
+        }
+        this.$Post(this.urlsCollection.overlayAnalysis,params).then((res)=>{
+          console.log(res,"res");
+          if(res.code === 200){
             let address = this.uploadBaseUrl + res.content;
             this.displayOverlayGeometry(address);
-            this.modifyModel("alreadyOverlay", newData);
+            this.modifyModel("alreadyOverlay", bindLayer);
           }
-        });
+        })
+        // let bindLayer = newData.join(",");
+        // let tagretUrl = `${this.urlsCollection.overlayAnalysis}?modelId=${this.currentModifiedModelId}&bindLayer=${bindLayer}`;
+        // this.$Get(tagretUrl).then((res) => {
+        //   debugger
+        //   if (res.code === 200) {
+        //     let address = this.uploadBaseUrl + res.content;
+        //     this.displayOverlayGeometry(address);
+        //     this.modifyModel("alreadyOverlay", newData);
+        //   }
+        // });
       }
     },
   },

+ 88 - 30
src/components/layout/Header.vue

@@ -1,14 +1,30 @@
 <template>
   <div id="layoutHeader">
     <el-row>
-      <el-col :span="8" v-if="$store.state.windowsSize.width >= 1300" class="logoBox">
+      <el-col
+        :span="8"
+        v-if="$store.state.windowsSize.width >= 1300"
+        class="logoBox"
+      >
         <div class="logo"></div>
         <div class="title">
-          {{ systemInfo.system_name ? systemInfo.system_name : "浦东新区资源环境智慧审计平台" }}
-          <span class="title_version">Version:{{ systemInfo.version ? systemInfo.version : "版本信息获取失败!" }}</span>
+          {{
+            systemInfo.system_name
+              ? systemInfo.system_name
+              : "浦东新区资源环境智慧审计平台"
+          }}
+          <span class="title_version"
+            >Version:{{
+              systemInfo.version ? systemInfo.version : "版本信息获取失败!"
+            }}</span
+          >
         </div>
       </el-col>
-      <el-col :span="2" v-if="$store.state.windowsSize.width < 1300" class="logoBox">
+      <el-col
+        :span="2"
+        v-if="$store.state.windowsSize.width < 1300"
+        class="logoBox"
+      >
         <div class="logo"></div>
       </el-col>
       <el-col :span="$store.state.windowsSize.width < 1300 ? 18 : 13">
@@ -21,13 +37,23 @@
           @select="select"
         >
           <el-menu-item index="1"
-            ><i class="el-icon-s-home" v-show="$store.state.windowsSize.width <= 1700"></i
-            ><span v-show="$store.state.windowsSize.width > 1700">首页</span></el-menu-item
+            ><i
+              class="el-icon-s-home"
+              v-show="$store.state.windowsSize.width <= 1700"
+            ></i
+            ><span v-show="$store.state.windowsSize.width > 1700"
+              >首页</span
+            ></el-menu-item
           >
           <el-submenu index="2">
             <template slot="title" class="submenu"
-              ><i class="el-icon-s-order" v-show="$store.state.windowsSize.width <= 1700"></i
-              ><span v-show="$store.state.windowsSize.width > 1700">疑点筛查</span></template
+              ><i
+                class="el-icon-s-order"
+                v-show="$store.state.windowsSize.width <= 1700"
+              ></i
+              ><span v-show="$store.state.windowsSize.width > 1700"
+                >疑点筛查</span
+              ></template
             >
             <el-menu-item index="2-1">土地资源</el-menu-item>
             <el-menu-item index="2-2">水资源</el-menu-item>
@@ -36,17 +62,32 @@
             <el-menu-item index="2-5">镇域专题</el-menu-item>
           </el-submenu>
           <el-menu-item index="3"
-            ><i class="el-icon-s-order" v-show="$store.state.windowsSize.width <= 1700"></i
-            ><span v-show="$store.state.windowsSize.width > 1700">综合分析</span></el-menu-item
+            ><i
+              class="el-icon-s-order"
+              v-show="$store.state.windowsSize.width <= 1700"
+            ></i
+            ><span v-show="$store.state.windowsSize.width > 1700"
+              >综合分析</span
+            ></el-menu-item
           >
           <el-menu-item index="4"
-            ><i class="el-icon-s-management" v-show="$store.state.windowsSize.width <= 1700"></i
-            ><span v-show="$store.state.windowsSize.width > 1700">全流程管理</span></el-menu-item
+            ><i
+              class="el-icon-s-management"
+              v-show="$store.state.windowsSize.width <= 1700"
+            ></i
+            ><span v-show="$store.state.windowsSize.width > 1700"
+              >全流程管理</span
+            ></el-menu-item
           >
           <el-submenu index="5">
             <template slot="title"
-              ><i class="el-icon-s-finance" v-show="$store.state.windowsSize.width <= 1700"></i
-              ><span v-show="$store.state.windowsSize.width > 1700">智能辅助</span></template
+              ><i
+                class="el-icon-s-finance"
+                v-show="$store.state.windowsSize.width <= 1700"
+              ></i
+              ><span v-show="$store.state.windowsSize.width > 1700"
+                >智能辅助</span
+              ></template
             >
             <el-menu-item index="5-1">法律法规</el-menu-item>
             <el-menu-item index="5-2">频发问题</el-menu-item>
@@ -74,7 +115,11 @@
                 ></el-avatar>
                 <!-- <div class="inner-user-icon"></div> -->
                 <div class="inner-user-text">
-                  {{ $store.state.userInfo && $store.state.userInfo.username ? $store.state.userInfo.username : userName }}
+                  {{
+                    $store.state.userInfo && $store.state.userInfo.username
+                      ? $store.state.userInfo.username
+                      : userName
+                  }}
                 </div>
               </span>
               <el-dropdown-menu slot="dropdown">
@@ -93,7 +138,9 @@ export default {
   data() {
     return {
       systemInfo: {},
-      userName: localStorage.getItem("_USER_NAME") ? localStorage.getItem("_USER_NAME") : "未登录",
+      userName: localStorage.getItem("_USER_NAME")
+        ? localStorage.getItem("_USER_NAME")
+        : "未登录",
       ActiveIndex: "0",
       navData: {
         1: "首页",
@@ -107,8 +154,8 @@ export default {
         4: "全流程管理",
         "5-1": "法律法规",
         "5-2": "频发问题",
-        "5-3": "指标体系"
-      }
+        "5-3": "指标体系",
+      },
     };
   },
   mounted() {
@@ -127,21 +174,24 @@ export default {
       let sortparam = [{ field: "c_publish_time", orderByType: 2 }];
       params.append("orderBy", JSON.stringify(sortparam));
       this.$Post(this.urlsCollection.selectContentList, params).then(
-        res => {
+        (res) => {
           if (res.code === 200 && res.content.data.length > 0) {
             let tableData = res.content.data;
             if (tableData.length > 0) {
               this.systemInfo = tableData[0];
               let systemVersion = localStorage.getItem("SYSTEM_VERSION");
               if (this.systemInfo.c_menus_list) {
-                let menus = eval('('+this.systemInfo.c_menus_list+')');
+                let menus = eval("(" + this.systemInfo.c_menus_list + ")");
                 this.$emit("initMenu", menus);
               }
 
               if (systemVersion) {
                 if (systemVersion != this.systemInfo.version) {
                   this.$message.success("新版本已发布!自动更新中!");
-                  localStorage.setItem("SYSTEM_VERSION", this.systemInfo.version);
+                  localStorage.setItem(
+                    "SYSTEM_VERSION",
+                    this.systemInfo.version
+                  );
                   window.location.reload();
                 }
               } else {
@@ -153,7 +203,7 @@ export default {
             this.$message.error(res.message);
           }
         },
-        error => {
+        (error) => {
           this.systemInfo = {};
           this.$message.error(error);
         }
@@ -164,7 +214,10 @@ export default {
       let _ActiveIndex = "";
       if (this.$store.state.navSelect) {
         if (this.$store.state.navSelect.subIndex) {
-          _ActiveIndex = this.$store.state.navSelect.index + "-" + this.$store.state.navSelect.subIndex;
+          _ActiveIndex =
+            this.$store.state.navSelect.index +
+            "-" +
+            this.$store.state.navSelect.subIndex;
         } else {
           _ActiveIndex = this.$store.state.navSelect.index;
         }
@@ -194,7 +247,7 @@ export default {
       that.$emit("navSelect", {
         index: index[0],
         subIndex: index[1],
-        name: name
+        name: name,
       });
       // let notFound = ["2-2", "2-3", "2-4", "5-3"];
       // let notFoundState = true;
@@ -225,22 +278,23 @@ export default {
       this.$store.commit("changeUserInfo", {});
       localStorage.removeItem("TOKEN");
       localStorage.removeItem("USER_ID");
+      localStorage.removeItem("USER_NAME");
       this.$router.push("/login");
       const h = this.$createElement;
       this.$notify({
         title: "登出成功",
-        message: h("i", { style: "color: teal" }, "用户退出!感谢使用!")
+        message: h("i", { style: "color: teal" }, "用户退出!感谢使用!"),
       });
-    }
+    },
   },
   watch: {
     "$store.state.navSelect": {
       handler() {
         this.getActiveIndex(false);
       },
-      deep: true
-    }
-  }
+      deep: true,
+    },
+  },
 };
 </script>
 <style lang="less" scoped>
@@ -342,7 +396,11 @@ export default {
   color: #ffffff !important;
   font-size: 24px !important;
 }
-#layoutHeader /deep/ .el-menu--horizontal > .el-submenu .el-submenu__title:hover {
+#layoutHeader
+  /deep/
+  .el-menu--horizontal
+  > .el-submenu
+  .el-submenu__title:hover {
   background: none;
 }
 #layoutHeader /deep/ .el-submenu__title i {

+ 146 - 77
src/components/map/MapHolder.vue

@@ -31,7 +31,7 @@ export default {
       // 标记疑点
       currentLabelCid: null,
       currentLabelHtml: null,
-      tableObj: {}
+      tableObj: {},
     };
   },
   created() {},
@@ -62,7 +62,7 @@ export default {
       deleteSinglePolygon: this.deleteSinglePolygon,
       deleteGroupFromMap: this.deleteGroupFromMap,
       drawGeometry: this.drawGeometry,
-      deleteGeometry: this.deleteGeometry
+      deleteGeometry: this.deleteGeometry,
     });
   },
   beforeDestroyed() {
@@ -83,7 +83,7 @@ export default {
     // 监听当前菜单
     getCurrentMenu() {
       return this.$store.state.navSelect;
-    }
+    },
   },
   watch: {
     getLabelCaseBtnStatus(val) {
@@ -120,15 +120,15 @@ export default {
           }
           this.$store.state.bottomMenuIndexs.index = -1;
           this.$store.state.bottomMenuIndexs.subIndex = -1;
-          this.$store.commit("changeJlActiveState",false);
+          this.$store.commit("changeJlActiveState", false);
         }
         // 切换页面时判断是否需要显示区域图
         this.$nextTick(() => {
           this.getJSonData();
         });
-      }
+      },
       // immediate: true
-    }
+    },
   },
   methods: {
     // 开始标记疑点事件
@@ -139,7 +139,7 @@ export default {
     stopLabelCase() {
       if (map2DViewer.measureTool) {
         map2DViewer.setDrawTool({
-          action: "remove"
+          action: "remove",
         });
       }
     },
@@ -150,6 +150,7 @@ export default {
     },
     // 常规图层弹窗
     createAuditDiv(str, properties) {
+      debugger
       // 根据ref获取组件的dom元素
       this.currentHtml = this.$refs.auditRef.$el.innerHTML;
       this.$refs.auditRef.tableObj = properties;
@@ -161,30 +162,38 @@ export default {
         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]);
-            });
+            $(`#${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 a`)) {
-            $(`#${str}_id a`).click(e => {
+            $(`#${str}_id a`).click((e) => {
               console.log(e, "显示疑点相关的弹窗");
               this.$store.state.lawPopupShow = true;
             });
           }
           // input添加点击事件
           if ($(`#${str}_id input`)[1]) {
-            $(`#${str}_id input`).click(e => {
+            $(`#${str}_id input`).click((e) => {
               switch (e.target.defaultValue) {
-                case "修改":
-                  this.modifyBtnEvent();
+                case "取消":
+                  this.cancelBtnEvent();
                   break;
                 case "确认":
-                  this.confirmBtnEvent();
+                  this.confirmBtnEvent(str);
                   break;
               }
             });
@@ -213,7 +222,7 @@ export default {
         $(() => {
           console.log($(`#${str}_id textarea`).val(), "textarea");
           $(`#${str}_id`).css("height", "100%");
-          $(`#${str}_id input`).click(e => {
+          $(`#${str}_id input`).click((e) => {
             console.log(e.target.defaultValue);
             switch (e.target.defaultValue) {
               case "取消":
@@ -232,12 +241,36 @@ export default {
     modifyBtnEvent() {
       console.log("用户点击了地图中的修改按钮!");
     },
-    confirmBtnEvent() {
+    confirmBtnEvent(str) {
+      debugger;
       console.log("用户点击地图中的确认按钮");
+      // isTrue
+      let selectVal = $(`#${str}_id .center-table-item-special select`).val();
+      let obj = {
+        c_date_time: this.$dayjs().valueOf(),
+        c_boolean: selectVal === "isTrue" ? true : false,
+        // 修改人员名称
+        c_editor_name: localStorage.getItem("USER_NAME"),
+        // 修改人员ID
+        c_editorid: localStorage.getItem("USER_ID"),
+      };
+      let modifyParams = new FormData();
+      modifyParams = {
+        columnId: 47,
+        modelId: 49,
+        content: JSON.stringify(obj),
+      };
+      this.$Post(this.urlsCollection.updateContent,modifyParams).then((res)=>{
+        if(res.code === 200 ){
+          this.$message.success("数据修改成功")
+          map2DViewer.map.closePopup()
+        }
+      });
     },
     cancelBtnEvent() {
       map2DViewer.map.closePopup();
       this.labelPopup = null;
+      this.popup = null;
     },
 
     /**
@@ -251,7 +284,12 @@ export default {
         let title = $(`#${str}_id select`).val();
         let des = $(`#${str}_id textarea`).val();
         let coordinates = [data.points];
-        let geometry = publicFun.generateGeoJSON(title, des, geoType, coordinates);
+        let geometry = publicFun.generateGeoJSON(
+          title,
+          des,
+          geoType,
+          coordinates
+        );
 
         let params = new FormData();
 
@@ -259,10 +297,10 @@ export default {
           geojson: JSON.stringify(geometry),
           type: geoType,
           userId: Number(localStorage.getItem("USER_ID")),
-          sourceId: 0
+          sourceId: 0,
         };
         this.$Post(this.urlsCollection.addConllection, params).then(
-          res => {
+          (res) => {
             if (res.code == 200) {
               console.log(res, "添加标记成功");
               map2DViewer.map.closePopup();
@@ -271,30 +309,34 @@ export default {
               paramData = {
                 userId: Number(localStorage.getItem("USER_ID")),
                 sourceId: 0,
-                pageSize: 10
+                pageSize: 10,
               };
-              this.$Post(this.urlsCollection.selectByUser, paramData).then(userRes => {
-                if (userRes.code === 200) {
-                  // console.log(userRes, "获取我的标记疑点数据");
+              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 = userRes.content.map(v => {
-                      return {
-                        id: v.id,
-                        geojson: v.geojson,
-                        type: v.type
-                      };
-                    });
+                    if (userRes.content.length > 0) {
+                      this.$store.state.myLabelPointsArr = [];
+                      this.$store.state.myLabelPointsArr = userRes.content.map(
+                        (v) => {
+                          return {
+                            id: v.id,
+                            geojson: v.geojson,
+                            type: v.type,
+                          };
+                        }
+                      );
+                    }
                   }
+                  // 更新时调用一次搜索接口
                 }
-                // 更新时调用一次搜索接口
-              });
+              );
             }
             // 保存后需要删除地图上的标记
             this.reStartLabelCase();
           },
-          error => {
+          (error) => {
             console.log("标记疑点保存失败!", error);
             this.reStartLabelCase();
           }
@@ -307,7 +349,9 @@ export default {
         map2DViewer.jlMap = L.tileLayer(
           "http://t0.tianditu.gov.cn/DataServer?T=img_w&X={x}&Y={y}&L={z}&tk=f331ba0b9ab96fb21c56d91de868935d"
         ).addTo(map2DViewer.map);
-        map2DViewer.jlControl = L.control.sideBySide(map2DViewer.map, map2DViewer.jlMap).addTo(map2DViewer.map);
+        map2DViewer.jlControl = L.control
+          .sideBySide(map2DViewer.map, map2DViewer.jlMap)
+          .addTo(map2DViewer.map);
       } else if (map2DViewer.map.hasLayer(map2DViewer.jlMap)) {
         map2DViewer.map.removeControl(map2DViewer.jlControl);
         map2DViewer.map.removeLayer(map2DViewer.jlMap);
@@ -330,7 +374,10 @@ export default {
       // 每次点击按钮后重绘弹窗
       if (this.currentHtml && this.currentCid) {
         setTimeout(() => {
-          this.popup.setContent(this.createAuditDiv(this.currentCid, this.currentProperties)).openOn(map2DViewer.map);
+          this.popup.setContent(
+            this.createAuditDiv(this.currentCid, this.currentProperties)
+          );
+          // .openOn(map2DViewer.map);
         }, 300);
       }
     },
@@ -338,7 +385,7 @@ export default {
     initDraw() {
       if (!map2DViewer.measureTool) {
         // 引入疑点标记绘制方法
-        map2DViewer.drawToolFire = data => {
+        map2DViewer.drawToolFire = (data) => {
           // 纬经度
           if (data && data.points.length >= 1) {
             let geoType = null;
@@ -377,7 +424,7 @@ export default {
           color: "red",
           font_size: "14px",
           closeButton: true,
-          iconUrl: "../../static/plugins/draw-plugin/images/marker-icon.png"
+          iconUrl: "../../static/plugins/draw-plugin/images/marker-icon.png",
         });
       }
     },
@@ -406,7 +453,7 @@ export default {
         attributionControl: false,
         zoomControl: false,
         minZoom: 10,
-        maxZoom: 16
+        maxZoom: 16,
       }).setView(systemConfig.mapViewer.center, systemConfig.mapViewer.zoom);
 
       //添加默认图层
@@ -420,7 +467,7 @@ export default {
 
             // url: "http://aimap.pudong.sh:5236/maps/rest/services/basemap-shanghai-gem-blue-sh2000/mapserver",
             // tileSize: 512
-            systemConfig.blueBlackMap
+            systemConfig.blueBlackMap,
         })
         .addTo(map2DViewer.map);
       // layer.setStyle({opacity:0,fillOpacity:0})
@@ -438,14 +485,16 @@ export default {
         map2DViewer.groups["浦东新区_polygon"].remove();
       }
       // 请求并渲染新的区域图层
-      get("./static/json/simplified_pdgeojson.json", "").then(geoJson => {
+      get("./static/json/simplified_pdgeojson.json", "").then((geoJson) => {
         // 存放所有的面数据
         map2DViewer.groups["浦东新区_polygon"] = L.featureGroup();
         map2DViewer.groups["浦东新区_label"] = L.featureGroup();
         map2DViewer.groups["浦东新区_polygon"].addTo(map2DViewer.map);
         map2DViewer.groups["浦东新区_label"].addTo(map2DViewer.map);
-        geoJson.features.map(feature => {
-          if (this.town.indexOf(feature.properties.NAME.replace("镇", "")) > -1) {
+        geoJson.features.map((feature) => {
+          if (
+            this.town.indexOf(feature.properties.NAME.replace("镇", "")) > -1
+          ) {
             this.renderPolygon(feature);
           }
         });
@@ -490,7 +539,7 @@ export default {
         weight: 3,
         fillColor: this.getColor(name),
         opacity: 1,
-        fillOpacity: 0.4
+        fillOpacity: 0.4,
       }).addTo(map2DViewer.groups["浦东新区_polygon"]);
 
       center = JSON.parse(JSON.stringify(center)).geometry.coordinates;
@@ -502,25 +551,25 @@ export default {
         radius: 10,
         weight: 1,
         fillOpacity: 0,
-        color: "#e6d273"
+        color: "#e6d273",
       });
       wmarker.bindLabel(feature.properties.NAME, {
         noHide: true,
         clickable: true,
-        offset: [-25, 10]
+        offset: [-25, 10],
       });
       wmarker.addTo(map2DViewer.groups["浦东新区_label"]);
       let circle1 = L.circleMarker(center, {
         radius: 8,
         weight: 1,
         fillOpacity: 0,
-        color: "#e6d273"
+        color: "#e6d273",
       }).addTo(map2DViewer.groups["浦东新区_polygon"]);
       let circle2 = L.circleMarker(center, {
         radius: 5,
         weight: 1,
         fillOpacity: 1,
-        color: "#e6d273"
+        color: "#e6d273",
       }).addTo(map2DViewer.groups["浦东新区_polygon"]);
     },
     latLngsToReverse: function (latlngsAry) {
@@ -545,26 +594,37 @@ export default {
     },
     addSinglePolygon(geometry, cid, color, uniqueId) {
       // debugger;
-      // console.log(geometry[2], "打印出第一个");
-      let coordinates = JSON.parse(geometry).geometry.coordinates[0];
+      let coordinates = "";
+
+      if (uniqueId === "一般耕地_47") {
+        let coord = JSON.parse(geometry).geometry.coordinates[0];
+        coordinates = coord.map((v) => {
+          return [v[1], v[0]];
+        });
+      } else {
+        coordinates = JSON.parse(geometry).geometry.coordinates[0];
+        coordinates = coordinates.map((v) => {
+          let data = transformCoord.shcj_to_wgs84(v[1], [v[0]]);
+          data = [data[1], data[0]];
+          return data;
+        });
+      }
+      // if(){
+
+      // }
       let properties = JSON.parse(geometry).properties;
       // 纬经度
       // [22474.568725585938, -16689.47381591797]
       // x,y转换
-      coordinates = coordinates.map(v => {
-        let data = transformCoord.shcj_to_wgs84(v[1], [v[0]]);
-        data = [data[1], data[0]];
-        return data;
-      });
       let polygon = L.polygon(coordinates, {
         color: color,
         weight: 3,
         fillColor: color,
         opacity: 1,
-        fillOpacity: 0.4
+        fillOpacity: 0.4,
       }).addTo(map2DViewer.analysisGroups[uniqueId]);
 
-      polygon.on("click", e => {
+      polygon.on("click", (e) => {
         this.auditPopupShow = true;
         this.popup = L.popup({ maxWidth: 700, maxHeight: 600 })
           .setLatLng(e.latlng)
@@ -577,7 +637,7 @@ export default {
     },
     // 综合分析 - 图层绘制面
     addPolygonLayer(data, cid, color) {
-      data.map(feature => {
+      data.map((feature) => {
         let polygonData = JSON.parse(JSON.stringify(feature));
         let coordinates = polygonData.geometry.coordinates[0];
         let infos = polygonData.properties;
@@ -586,16 +646,18 @@ export default {
           weight: 3,
           fillColor: color,
           opacity: 1,
-          fillOpacity: 0.4
+          fillOpacity: 0.4,
         }).addTo(map2DViewer.map);
         map2DViewer.polygons[`${cid}_layer`].push(polygon);
         polygon.infos = infos;
-        polygon.on("click", e => {
+        polygon.on("click", (e) => {
           // console.log(e, "polygon");
           this.auditPopupShow = true;
           // console.log(e.latlng, "获取当前弹窗坐标111");
 
-          this.popup = L.popup({ maxWidth: 700, maxHeight: 600 }).setLatLng(e.latlng).setContent(this.createAuditDiv("cid"));
+          this.popup = L.popup({ maxWidth: 700, maxHeight: 600 })
+            .setLatLng(e.latlng)
+            .setContent(this.createAuditDiv("cid"));
           // .openOn(map2DViewer.map);
           this.auditPopupShow = false;
           this.popup.openOn(map2DViewer.map);
@@ -615,7 +677,7 @@ export default {
     //综合分析 - 标记疑点 - 删除面
     deletePolygonLayer(layer) {
       console.log(layer, "layer");
-      map2DViewer.polygons[layer].forEach(polygon => {
+      map2DViewer.polygons[layer].forEach((polygon) => {
         map2DViewer.map.removeLayer(polygon);
       });
     },
@@ -625,7 +687,7 @@ export default {
       if (!map2DViewer.myLabels[`label_${data.id}`]) {
         // console.log("开始绘制点", data);
         let point = L.marker(data.coord, {
-          opacity: 1
+          opacity: 1,
         }).addTo(map2DViewer.map);
         map2DViewer.myLabels[`label_${data.id}`] = point;
       }
@@ -639,13 +701,15 @@ export default {
           weight: 3,
           fillOpacity: color,
           opacity: 1,
-          fillOpacity: 0.4
+          fillOpacity: 0.4,
         }).addTo(map2DViewer.map);
         // zoom the map to the polyline
         map2DViewer.map.fitBounds(polyline.getBounds());
         map2DViewer.myLabels[`label_${data.id}`] = polyline;
       } else {
-        map2DViewer.map.fitBounds(map2DViewer.myLabels[`label_${data.id}`].getBounds());
+        map2DViewer.map.fitBounds(
+          map2DViewer.myLabels[`label_${data.id}`].getBounds()
+        );
       }
     },
     drawPolygon(data, color) {
@@ -657,12 +721,14 @@ export default {
           weight: 3,
           fillOpacity: color,
           opacity: 1,
-          fillOpacity: 0.4
+          fillOpacity: 0.4,
         }).addTo(map2DViewer.map);
         map2DViewer.map.fitBounds(polygon.getBounds());
         map2DViewer.myLabels[`label_${data.id}`] = polygon;
       } else {
-        map2DViewer.map.fitBounds(map2DViewer.myLabels[`label_${data.id}`].getBounds());
+        map2DViewer.map.fitBounds(
+          map2DViewer.myLabels[`label_${data.id}`].getBounds()
+        );
       }
     },
 
@@ -676,21 +742,24 @@ export default {
           let to = turf.point(coordinates[1].reverse());
           let options = { units: "kilometers" };
           let distance = turf.distance(from, to, options);
-          (distance = parseFloat(distance * 1000).toFixed(6)), console.log(distance, "圆的半径");
+          (distance = parseFloat(distance * 1000).toFixed(6)),
+            console.log(distance, "圆的半径");
           let circle = L.circle(coordinates[0].reverse(), {
             color: color,
             weight: 3,
             fillOpacity: color,
             opacity: 1,
             fillOpacity: 0.4,
-            radius: Number(distance)
+            radius: Number(distance),
           }).addTo(map2DViewer.map);
           console.log(circle);
           map2DViewer.map.fitBounds(circle.getBounds());
           map2DViewer.myLabels[`label_${data.id}`] = circle;
         }
       } else {
-        map2DViewer.map.fitBounds(map2DViewer.myLabels[`label_${data.id}`].getBounds());
+        map2DViewer.map.fitBounds(
+          map2DViewer.myLabels[`label_${data.id}`].getBounds()
+        );
       }
     },
     /**
@@ -719,8 +788,8 @@ export default {
         console.log(geometry, "移除");
         geometry.removeFrom(map2DViewer.map);
       }
-    }
-  }
+    },
+  },
 };
 </script>
 <style lang="less" scoped>

+ 4 - 2
src/components/popup/CaseAuditPopup.vue

@@ -39,7 +39,7 @@
         <input
           class="audit-popup-btn"
           type="button"
-          value="修改"
+          value="取消"
           @click="modifyEvent"
         />
         <input
@@ -153,6 +153,8 @@ export default {
     .center-table {
       width: 100%;
       height: 70%;
+      overflow-y: auto;
+      overflow-x: hidden;
       // border: 1px solid #818ca4;
       display: flex;
       flex-direction: column;
@@ -161,7 +163,7 @@ export default {
       font-size: 15px;
       &-item-normal,
       &-item-special {
-        width: 100%;
+        width: 98%;
         border-top: 1px solid #818ca4;
         border-left: 1px solid #818ca4;
         &:last-child {

+ 11 - 2
src/components/popup/LawPopup.vue

@@ -8,7 +8,7 @@
       <FilePreView style="width: 100%; height: 100%" ref="lawFileRef" />
     </LawDetailsPopup>
     <div class="title">
-      <div class="title-text">XXXX疑点相关的法律法规</div>
+      <div class="title-text">疑点相关的法律法规</div>
       <div class="title-close-btn" @click="closeEvent"></div>
     </div>
     <div class="option">
@@ -26,7 +26,7 @@
       </div>
       <div class="option-right">
         <NewSelect class="option-right-item" :placeholder="'排序方式'" />
-        <NewSelect class="option-right-item" :placeholder="'搜索范围'" />
+        <!-- <NewSelect class="option-right-item" :placeholder="'搜索范围'" /> -->
         <NewSelect class="option-right-item" :placeholder="'时间范围'" />
       </div>
     </div>
@@ -100,6 +100,7 @@ export default {
         },
       },
       currentRow: null,
+      title: "",
     };
   },
   computed: {
@@ -107,6 +108,14 @@ export default {
       return this.$store.state.lawPopupShow;
     },
   },
+  watch: {
+    lawPopupShow(val) {
+      console.log("选中了一个具体的疑点");
+      if (val) {
+        this.title = this.$store.state.lawPopupTitle;
+      }
+    },
+  },
   created() {
     this.timeOptions = [];
     // 时间选择

+ 2 - 0
src/main.js

@@ -74,6 +74,7 @@ router.beforeEach((to, from, next) => {
         } else {
           localStorage.removeItem("TOKEN");
           localStorage.removeItem("USER_ID");
+          localStorage.removeItem("USER_NAME")
           ElementUI.Message.error("用户信息获取失败,请尝试重新登录!");
           next("/login");
         }
@@ -82,6 +83,7 @@ router.beforeEach((to, from, next) => {
         // 请求失败!
         localStorage.removeItem("TOKEN");
         localStorage.removeItem("USER_ID");
+        localStorage.removeItem("USER_NAME");
         ElementUI.Message.error(error);
         next("/login");
       }

+ 1 - 0
src/store/index.js

@@ -32,6 +32,7 @@ export default new Vuex.Store({
     modelStatus: "create",
     // 法律法规弹窗
     lawPopupShow: false,
+    lawPopupTitle:"--",
     // 底图切换距离右侧的位置
     baseMapRight: 23,
     // 我的标记中的疑点数据

+ 69 - 66
src/views/ComprehensiveAnalysis.vue

@@ -484,72 +484,74 @@ export default {
      * 获取图层信息 -- 所有模型和预设模型
      */
     displaySingleLayer(columnId, id) {
-      // console.log(columnId, "columnId");
-      let layerParams = new FormData();
-      layerParams = {
-        columnId: columnId,
-        states: "0,1,2,3",
-        pageSize: 10,
-        page: 0,
-      };
-      this.$Post(this.urlsCollection.selectContentList, layerParams).then(
-        (res) => {
-          if (res.code === 202 && res.content === "数据不存在") {
-            this.$message.info("暂无数据!");
-          }
-          if (res.code === 200 && res.content.data.length > 0) {
-            this.paginationData.currentPage = 1
-            this.paginationData.total = res.content.count
-            let uniqueId = id;
-            map2DViewer.analysisGroups[uniqueId] = L.featureGroup();
-            map2DViewer.analysisGroups[uniqueId].addTo(map2DViewer.map);
-            this.legendTitle.push({
-              name: uniqueId,
-              info: uniqueId,
-            });
-            this.legendIcon.push({
-              name: uniqueId,
-              background: "transparent",
-              border: `1px solid ${this.randomColor.get(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
-                .get("RENDER")
-                .addSinglePolygon(
-                  geometry,
-                  cid,
-                  this.randomColor.get(uniqueId),
-                  uniqueId
-                );
-              return {
-                id: ele.id,
-                // "垃圾堆放点"
-                column_name: ele.column_name,
-                // 是否疑点
-                c_boolean: ele.c_boolean ? "是" : "否",
-                // 行政区划
-                c_xzqh: ele.c_xzqh,
-                // 空间信息
-                c_content: ele.c_content,
-                // 疑点修改时间
-                c_date_time: ele.c_date_time,
-                // 修改人员名称
-                // c_editor_name: ele.c_editor_name,
-                // 标题
-                title: ele.title,
-                column_id: ele.column_id,
-                content: ele.content,
-                secret_level: ele.secret_level,
-              };
-            });
+      if (id !== "永久基本农田_50") {
+        // console.log(columnId, "columnId");
+        let layerParams = new FormData();
+        layerParams = {
+          columnId: columnId,
+          states: "0,1,2,3",
+          pageSize: 10,
+          page: 0,
+        };
+        this.$Post(this.urlsCollection.selectContentList, layerParams).then(
+          (res) => {
+            if (res.code === 202 && res.content === "数据不存在") {
+              this.$message.info("暂无数据!");
+            }
+            if (res.code === 200 && res.content.data.length > 0) {
+              this.paginationData.currentPage = 1;
+              this.paginationData.total = res.content.count;
+              let uniqueId = id;
+              map2DViewer.analysisGroups[uniqueId] = L.featureGroup();
+              map2DViewer.analysisGroups[uniqueId].addTo(map2DViewer.map);
+              this.legendTitle.push({
+                name: uniqueId,
+                info: uniqueId,
+              });
+              this.legendIcon.push({
+                name: uniqueId,
+                background: "transparent",
+                border: `1px solid ${this.randomColor.get(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
+                  .get("RENDER")
+                  .addSinglePolygon(
+                    geometry,
+                    cid,
+                    this.randomColor.get(uniqueId),
+                    uniqueId
+                  );
+                return {
+                  id: ele.id,
+                  // "垃圾堆放点"
+                  column_name: ele.column_name,
+                  // 是否疑点
+                  c_boolean: ele.c_boolean ? "是" : "否",
+                  // 行政区划
+                  c_xzqh: ele.c_xzqh,
+                  // 空间信息
+                  c_content: ele.c_content,
+                  // 疑点修改时间
+                  c_date_time: ele.c_date_time,
+                  // 修改人员名称
+                  // c_editor_name: ele.c_editor_name,
+                  // 标题
+                  title: ele.title,
+                  column_id: ele.column_id,
+                  content: ele.content,
+                  secret_level: ele.secret_level,
+                };
+              });
+            }
           }
-        }
-      );
+        );
+      }
     },
     /**
      * 切换页时改变图层数据
@@ -940,7 +942,7 @@ export default {
       this.$bus.$emit("updateModel", node);
     },
     handleDelete(node) {
-      debugger;
+      // debugger;
       // console.log(node, "删除节点");
       let deleteParams = {
         id: customModelIdMap.get(node.data.label).id,
@@ -1014,6 +1016,7 @@ export default {
             };
             this.$Post(this.urlsCollection.selectContentList, params).then(
               (res) => {
+                // debugger;
                 if (res.code === 202 && res.content === "数据不存在") {
                   this.$message.info("当前用户无权限!");
                   layerAuthorityMap.set(data.id, "无权限");

+ 1 - 0
src/views/Login.vue

@@ -136,6 +136,7 @@ export default {
             }
             localStorage.setItem("TOKEN", res.message);
             localStorage.setItem("USER_ID", res.content.id);
+            localStorage.setItem("USER_NAME",this.userName)
             // 对于临时缓存的全局数据使用store
             this.$store.commit("changeUserInfo", res.content);
             this.$router.push("/");