소스 검색

1、标记疑点删除角度,并调整距离为单个路段距离,修复拖动marker时保存按钮显示异常BUG。
2、完善综合分析页面《返回上级》按钮页面跳转逻辑。

DESKTOP-6LTVLN7\Liumouren 2 년 전
부모
커밋
604abf7966

+ 33 - 16
public/static/plugins/draw-plugin/leaflet.draw.js

@@ -1,4 +1,5 @@
 let mousemoveStatus = true;
+// del-刘梦祥-时间(删除点中的角度) "<br/>" + pointAngle + "度"
 L.Control.Draw = L.Control.extend({
   //是否初始化
   _initialized: false,
@@ -145,7 +146,7 @@ L.Control.Draw = L.Control.extend({
             var coors = _.clone(_this._measureObjs[_this._lC].measurePoints);
             coors.push(
               _this._measureObjs[_this._lC].measurePoints[
-                _this._measureObjs[_this._lC].measurePoints.length - 1
+              _this._measureObjs[_this._lC].measurePoints.length - 1
               ]
             );
             if (_this._measureObjs[_this._lC].polygon) {
@@ -184,7 +185,7 @@ L.Control.Draw = L.Control.extend({
     for (var i = 1; i < data.length; i++) {
       var curcoor = data[i];
       var prePoint = data[i - 1];
-      lineDistance = lineDistance + L.latLng(curcoor).distanceTo(prePoint);
+      lineDistance = L.latLng(curcoor).distanceTo(prePoint);
       var lineDistanceStr =
         lineDistance > 1000
           ? (lineDistance / 1000).toFixed(2) + "公里"
@@ -201,7 +202,7 @@ L.Control.Draw = L.Control.extend({
     //添加分段信息
     var oLabelObj = L.DomUtil.create("div", "measure-content");
     var pointText = L.DomUtil.create("span", "measure-result-text");
-    pointText.innerHTML = lineDistanceStr + "<br/>" + pointAngle + "度";
+    pointText.innerHTML = lineDistanceStr;
     oLabelObj.appendChild(pointText);
     if (data.length > 1) {
       if (_this.tmpMarkers[data.length - 2]) {
@@ -287,7 +288,7 @@ L.Control.Draw = L.Control.extend({
     for (var i = 0; i < curLatlngs.length; i++) {
       var dispx = Math.sqrt(
         (curpx.x - curLatlngs[i].px.x) * (curpx.x - curLatlngs[i].px.x) +
-          (curpx.y - curLatlngs[i].px.y) * (curpx.y - curLatlngs[i].px.y)
+        (curpx.y - curLatlngs[i].px.y) * (curpx.y - curLatlngs[i].px.y)
       );
       if (dispx < 10) {
         latlng = L.latLng(curLatlngs[i].latlng);
@@ -368,7 +369,7 @@ L.Control.Draw = L.Control.extend({
     //监听地图单击事件
     map2DViewer.map.off("click", _this._onClickPoint, this);
     //监听鼠标移动事件
-    console.log("鼠标移动this --test","_onFinishClick");
+    console.log("鼠标移动this --test", "_onFinishClick");
     map2DViewer.map.off("mousemove", _this._mousemove, this);
     _this.isNewElevation = true;
     _this._finished = true;
@@ -395,7 +396,7 @@ L.Control.Draw = L.Control.extend({
 
         if (i > 0) {
           var prePoint = _this._measureObjs[_this._lC].measurePoints[i - 1];
-          lineDistance = lineDistance + L.latLng(curcoor).distanceTo(prePoint);
+          lineDistance = L.latLng(curcoor).distanceTo(prePoint);
           var lineDistanceStr =
             lineDistance > 1000
               ? (lineDistance / 1000).toFixed(2) + "公里"
@@ -411,7 +412,7 @@ L.Control.Draw = L.Control.extend({
           var delLabel = L.DomUtil.create("div", "measure-ico-del");
           var saveLabel = L.DomUtil.create("div", "measure-ico-save");
           var pointText = L.DomUtil.create("span", "measure-result-text");
-          pointText.innerHTML = lineDistanceStr + "<br/>" + pointAngle + "度";
+          pointText.innerHTML = lineDistanceStr;
           delLabel.lC = _this._lC;
           saveLabel.lC = _this._lC;
           L.DomEvent.on(delLabel, "click", function (e) {
@@ -433,7 +434,7 @@ L.Control.Draw = L.Control.extend({
               var area = _this._getArea(_this._lC);
               _this._measureObjs[_this._lC].area = area;
               pointText.innerHTML =
-                lineDistanceStr + "<br/>" + pointAngle + "度" + "<br/>" + area;
+                lineDistanceStr + "<br/>" + area;
             }
             oLabelObj.appendChild(delLabel);
             oLabelObj.appendChild(saveLabel);
@@ -545,7 +546,7 @@ L.Control.Draw = L.Control.extend({
     for (var i = 1; i < coorslength; i++) {
       var curcoor = _this._measureObjs[data.LC].measurePoints[i];
       var prePoint = _this._measureObjs[data.LC].measurePoints[i - 1];
-      lineDistance = lineDistance + L.latLng(curcoor).distanceTo(prePoint);
+      lineDistance = L.latLng(curcoor).distanceTo(prePoint);
       var lineDistanceStr =
         lineDistance > 1000
           ? (lineDistance / 1000).toFixed(2) + "公里"
@@ -559,21 +560,37 @@ L.Control.Draw = L.Control.extend({
       //添加分段信息
       var oLabelObj = L.DomUtil.create("div", "measure-content");
       var delLabel = L.DomUtil.create("div", "measure-ico-del");
+      var saveLabel = L.DomUtil.create("div", "measure-ico-save");
       var pointText = L.DomUtil.create("span", "measure-result-text");
-      pointText.innerHTML = lineDistanceStr + "<br/>" + pointAngle + "度";
+      pointText.innerHTML = lineDistanceStr;
       delLabel.lC = _this._lC;
+      saveLabel.lC = _this._lC;
       L.DomEvent.on(delLabel, "click", function (e) {
         L.DomEvent.stopPropagation(e);
         _this.del(delLabel.lC);
       });
+      L.DomEvent.on(saveLabel, "click", function (e) {
+        L.DomEvent.stopPropagation(e);
+        map2DViewer.map.fire("draw-result", {
+          distance: _this._measureObjs[delLabel.lC].distance,
+          points: _this._measureObjs[delLabel.lC].measurePoints,
+          area: _this._measureObjs[delLabel.lC].area || 0,
+          LC: delLabel.lC,
+        });
+      });
       if (i == coorslength - 1) {
         oLabelObj.appendChild(delLabel);
+        oLabelObj.appendChild(saveLabel);
         //测量面积
-        if (_this._measureObjs[data.LC].polygon) {
-          var area = _this._getArea(data.LC);
-          _this._measureObjs[data.LC].area;
-          pointText.innerHTML =
-            lineDistanceStr + "<br/>" + pointAngle + "度" + "<br/>" + area;
+        try {
+          if (_this._measureObjs[data.LC].polygon) {
+            var area = _this._getArea(data.LC);
+            _this._measureObjs[data.LC].area;
+            pointText.innerHTML =
+              lineDistanceStr + "<br/>" + area;
+          }
+        } catch (e) {
+          console.error("leaflet.draw.js 测量面积error:", e);
         }
       }
       oLabelObj.appendChild(pointText);
@@ -621,7 +638,7 @@ map2DViewer.setDrawTool = function (options) {
         font_size: defaultData.font_size,
         closeButton: defaultData.closeButton,
         iconUrl:
-          "http://localhost:888/scripts/vendor/leaflet/images/marker-icon.png",
+          "/static/plugins/draw-plugin/images/marker-icon.png",
       }).addTo(this.map);
       this.map.on("draw-result", map2DViewer.drawToolFire);
       return this.distanceTool;

+ 1 - 1
src/components/common/TagCard.vue

@@ -127,7 +127,7 @@ export default {
       left: 50%;
       transform: translate(-50%, -50%);
       border-radius: 50%;
-      background-image: radial-gradient(circle, #34c6d832, #0000, #FFFFFFaa);
+      background-image: radial-gradient(circle, #FFFFFF32, #0000, #34c6d8);
       z-index: 1;
     }
   }

+ 3 - 0
src/components/layout/MenuCard.vue

@@ -191,6 +191,9 @@ export default {
     changeMenu() {
       if (this.menuData != undefined && this.menuData.index != undefined && this.menuData.title != undefined) {
         this.$store.commit("changeLeftMenuTitle", this.menuData.title);
+        if(this.menuData.menuIndex != undefined && this.menuData.subMenuIndex != undefined) {
+          this.$store.commit("changeBackMenu", {index: this.menuData.menuIndex,subIndex: this.menuData.subMenuIndex});
+        }
       }
       if (this.menuData != undefined && this.menuData.gotoPageInfo != undefined) {
         this.$store.commit("changeNavSelect", this.menuData.gotoPageInfo);

+ 5 - 0
src/store/index.js

@@ -13,6 +13,8 @@ export default new Vuex.Store({
       : { index: "1", name: "首页", subIndex: "" },
     // 左侧菜单选中菜单title(主要用于疑点筛查点击某个子菜单时,跳转到综合分析页面综合分析页面自动选中操作。以及元素判断是否显示)
     leftMenuTitle: "",
+    // 左侧菜单跳转menu变量暂存(主要用于疑点筛查点击某个子菜单时,跳转到综合分析页面综合分析页面显示返回按钮,以及返回菜单的依据)
+    backMenu: {},
     // 底部菜单选中菜单index,subIndex(主要用于元素判断是否高亮)
     bottomMenuIndexs: { index: -1, subIndex: -1 },
     // 当前浏览器窗口的宽高(优化自适应布局)
@@ -42,6 +44,9 @@ export default new Vuex.Store({
     treeDataCollection: (state) => state.treeDataCollection,
   },
   mutations: {
+    changeBackMenu(state, backMenu){
+      state.backMenu = backMenu;
+    },
     // 用户信息修改(登录或退出时操作)
     changeUserInfo(state, userInfo) {
       state.userInfo = userInfo;

+ 75 - 125
src/views/ComprehensiveAnalysis.vue

@@ -9,18 +9,17 @@
       @close="closeLabelEvent"
       @save="modifyLabelEvent"
     />
-    <div class="comprehensive-analysis-backbtn" @click="backEvent">
+    <div
+      class="comprehensive-analysis-backbtn"
+      @click="backEvent"
+      v-if="$store.state.backMenu.index && $store.state.backMenu.subIndex"
+    >
       <div class="left-arrow"></div>
       <div class="title">返回上级</div>
     </div>
     <div class="comprehensive-analysis-searchbox">
       <el-input placeholder="请输入地名地址" v-model="addressInput">
-        <el-button
-          type="primary"
-          slot="append"
-          icon="el-icon-search"
-          style="vertical-align: bottom"
-        ></el-button>
+        <el-button type="primary" slot="append" icon="el-icon-search" style="vertical-align: bottom"></el-button>
       </el-input>
     </div>
     <!-- 属性弹窗 -->
@@ -47,7 +46,7 @@
         legendTitle: legendTitle,
         leftWidth: '30%',
         rightWidth: '70%',
-        rightItemWidth: '120',
+        rightItemWidth: '120'
       }"
     />
 
@@ -67,21 +66,9 @@
           <div @click="leftPanelDisplay('hide')"><div></div></div>
         </div>
         <div class="control-container">
-          <el-input
-            class="control-container-input"
-            v-model="filterText"
-            placeholder="请输入文本"
-          ></el-input>
-          <el-tooltip
-            effect="light"
-            :content="isLeftLock ? '解锁面板' : '锁定面板'"
-            placement="bottom-end"
-          >
-            <div
-              :class="{ 'lock-style': isLeftLock }"
-              class="control-container-pin-btn"
-              @click="leftPanelLock"
-            ></div>
+          <el-input class="control-container-input" v-model="filterText" placeholder="请输入文本"></el-input>
+          <el-tooltip effect="light" :content="isLeftLock ? '解锁面板' : '锁定面板'" placement="bottom-end">
+            <div :class="{ 'lock-style': isLeftLock }" class="control-container-pin-btn" @click="leftPanelLock"></div>
           </el-tooltip>
         </div>
         <div class="contant-container">
@@ -96,13 +83,7 @@
               :filter-node-method="filterNode"
             >
               <span class="custom-tree-node" slot-scope="{ node }">
-                <template
-                  v-if="
-                    node.level === 3 ||
-                    node.parent.label === '所有图层' ||
-                    node.parent.label === '我的模型'
-                  "
-                >
+                <template v-if="node.level === 3 || node.parent.label === '所有图层' || node.parent.label === '我的模型'">
                   <el-checkbox v-model="node.checked" style="position: relative"
                     >{{ node.label
                     }}<span
@@ -136,7 +117,7 @@
                   <div
                     :class="{
                       'tree-arrow': !node.expanded,
-                      'tree-arrow-expanded': node.expanded,
+                      'tree-arrow-expanded': node.expanded
                     }"
                   ></div>
                   <span>{{ node.label }}</span>
@@ -156,27 +137,15 @@
         </div>
 
         <div class="control-container">
-          <el-tooltip
-            effect="light"
-            :content="isRightLock ? '解锁面板' : '锁定面板'"
-            placement="bottom-start"
-          >
-            <div
-              :class="{ 'lock-style': isRightLock }"
-              @click="rightPanelLock"
-            ></div>
+          <el-tooltip effect="light" :content="isRightLock ? '解锁面板' : '锁定面板'" placement="bottom-start">
+            <div :class="{ 'lock-style': isRightLock }" @click="rightPanelLock"></div>
           </el-tooltip>
         </div>
 
         <div class="contant-container">
           <div class="contant-container-innerbox">
             <el-collapse v-model="activeNames">
-              <el-collapse-item
-                v-for="key in Object.keys(originalData)"
-                :key="key"
-                :title="key"
-                :name="key"
-              >
+              <el-collapse-item v-for="key in Object.keys(originalData)" :key="key" :title="key" :name="key">
                 <div
                   class="panel-list-item"
                   v-for="i in originalData[key]"
@@ -188,11 +157,7 @@
               </el-collapse-item>
 
               <el-collapse-item title="我的标记" name="myLabel">
-                <div
-                  class="panel-list-item"
-                  v-for="item in rightLabelData"
-                  :key="item.id"
-                >
+                <div class="panel-list-item" v-for="item in rightLabelData" :key="item.id">
                   <div @click="listItemClick('new', item)">
                     {{ item.name }}
                   </div>
@@ -206,18 +171,8 @@
                       justify-content: space-around;
                       width: 75px;
                     "
-                    ><el-button
-                      size="normal"
-                      type="text"
-                      icon="el-icon-edit"
-                      @click="updateLabel(item)"
-                    ></el-button
-                    ><el-button
-                      size="normal"
-                      type="text"
-                      icon="el-icon-delete"
-                      @click="deleteLabel(item.id)"
-                    ></el-button
+                    ><el-button size="normal" type="text" icon="el-icon-edit" @click="updateLabel(item)"></el-button
+                    ><el-button size="normal" type="text" icon="el-icon-delete" @click="deleteLabel(item.id)"></el-button
                   ></span>
                 </div>
               </el-collapse-item>
@@ -246,7 +201,7 @@ export default {
     Legend,
     AttributePopup,
     LawPopup,
-    LabelCasePopup,
+    LabelCasePopup
   },
   data() {
     return {
@@ -274,7 +229,7 @@ export default {
       modelData: [],
       defaultProps: {
         children: "children",
-        label: "label",
+        label: "label"
       },
       legendIcon: [],
       legendTitle: [],
@@ -284,7 +239,7 @@ export default {
       // 存放对应图层的坐标
       treeCoordMap: new Map(),
       isLeftLock: true,
-      isRightLock: true,
+      isRightLock: true
     };
   },
   computed: {
@@ -299,7 +254,7 @@ export default {
     },
     getMyPoints() {
       return map2DViewer.myLabels;
-    },
+    }
   },
   watch: {
     getLeftMenuTitle: {
@@ -312,7 +267,7 @@ export default {
           }
         });
       },
-      immediate: true,
+      immediate: true
     },
     legendTitle(val) {
       // console.log(val, "监听当前图例item数量");
@@ -336,19 +291,19 @@ export default {
         console.log(val, "目前存在的自定义模型");
         let myModelRef = this.$refs.tree.data[2];
         if (myModelRef.label === "我的模型") {
-          this.$refs.tree.data[2].children = val.map((ele) => {
+          this.$refs.tree.data[2].children = val.map(ele => {
             let firstId = publicFun.buildGuid();
             treeIdMap.set(ele.name, firstId);
             return {
               id: firstId,
               label: ele.name,
-              data: ele.data,
+              data: ele.data
             };
           });
           console.log(myModelRef.children, "最新的数据");
         }
       },
-      deep: true,
+      deep: true
     },
     getMyLabelData: {
       handler(val) {
@@ -362,20 +317,20 @@ export default {
               coord: data.geometry.coordinates[0][0],
               type: data.properties.title,
               des: data.properties.desc,
-              geojson: v.geojson,
+              geojson: v.geojson
             };
           });
           console.log(this.rightLabelData, "rightLabelData");
         }
       },
-      deep: true,
+      deep: true
       // immediate: true,
-    },
+    }
   },
   created() {
     this.modelData = [];
     // 分别对应1、2、3级节点
-    this.modelData = treeModel.map((item1) => {
+    this.modelData = treeModel.map(item1 => {
       if (item1.type === "我的模型") {
         this.myModel = item1;
       }
@@ -383,23 +338,23 @@ export default {
       return {
         id: item1.id,
         label: item1.type,
-        children: item1.children.map((item2) => {
+        children: item1.children.map(item2 => {
           treeIdMap.set(item2.type, item2.id);
           return {
             id: item2.id,
             label: item2.type,
-            children: item2.children.map((item3) => {
+            children: item2.children.map(item3 => {
               treeIdMap.set(item3.type, item3.id);
               this.rightPanelDataMap.set(item3.type, item3.children);
               return {
                 id: item3.id,
                 label: item3.type,
                 children: [],
-                checked: false,
+                checked: false
               };
-            }),
+            })
           };
-        }),
+        })
       };
     });
 
@@ -408,7 +363,7 @@ export default {
   },
 
   mounted() {
-    map2DViewer.map.on("move", (e) => {
+    map2DViewer.map.on("move", e => {
       if (!this.isLeftLock) {
         this.showLeftBox = false;
         this.leftBoxBtn = true;
@@ -433,17 +388,17 @@ export default {
         paramData = {
           userId: Number(localStorage.getItem("USER_ID")),
           sourceId: 0,
-          pageSize: 10,
+          pageSize: 10
         };
-        this.$Post(this.urlsCollection.selectByUser, paramData).then((res) => {
+        this.$Post(this.urlsCollection.selectByUser, paramData).then(res => {
           if (res.code === 200 && res.content.length >= 1) {
             console.log(res);
             this.$store.state.myLabelPointsArr = [];
-            this.$store.state.myLabelPointsArr = res.content.map((v) => {
+            this.$store.state.myLabelPointsArr = res.content.map(v => {
               return {
                 id: v.id,
                 geojson: v.geojson,
-                type: v.type,
+                type: v.type
               };
             });
           }
@@ -457,7 +412,12 @@ export default {
     },
     // 回退事件
     backEvent() {
-      console.log("综合分析回退事件");
+      if (this.$store.state.backMenu.index && this.$store.state.backMenu.subIndex) {
+        this.$store.commit("changeNavSelect", {
+          index: this.$store.state.backMenu.index,
+          subIndex: this.$store.state.backMenu.subIndex
+        });
+      }
     },
     // 左侧面板的显示与隐藏
     leftPanelDisplay(val) {
@@ -497,9 +457,7 @@ export default {
     locateEvent(node) {
       // console.log(node, "目前的节点");
       if (this.treeCoordMap.has(node.data.label)) {
-        this.$store.state.mapMethodsCollection
-          .get("RENDER")
-          .setView(this.treeCoordMap.get(node.data.label), 16);
+        this.$store.state.mapMethodsCollection.get("RENDER").setView(this.treeCoordMap.get(node.data.label), 16);
       }
     },
     handleUpdate(node) {
@@ -529,19 +487,19 @@ export default {
 
           let passData = {
             name: data.label,
-            value: cid,
+            value: cid
           };
 
           // 存放当前选中的图层,方便关联自定义模型
           this.$store.commit("changeTreeData", passData);
-          get(`./static/json/${cid}.json`).then((geoJson) => {
+          get(`./static/json/${cid}.json`).then(geoJson => {
             map2DViewer.polygons[`${cid}_layer`] = [];
             this.originalData[data.label] = geoJson.map((v, index) => {
               return {
                 id: publicFun.buildGuid("abnormal"),
                 name: v.properties["异常"] + "_" + index,
                 geometry: v.geometry,
-                properties: v.properties,
+                properties: v.properties
               };
             });
             // console.log(this.originalData[data.label], "label");
@@ -553,14 +511,12 @@ export default {
             let coordinates = firstPolygon.geometry.coordinates[0][0][0];
             this.treeCoordMap.set(data.label, coordinates);
 
-            this.$store.state.mapMethodsCollection
-              .get("RENDER")
-              .addPolygonLayer(geoJson, cid, color);
+            this.$store.state.mapMethodsCollection.get("RENDER").addPolygonLayer(geoJson, cid, color);
           });
         } else {
           let passData = {
             name: data.label,
-            value: data.label,
+            value: data.label
           };
           // 存放当前选中的图层,方便关联自定义模型
           this.$store.commit("changeTreeData", passData);
@@ -578,20 +534,18 @@ export default {
         // 目前仅针对所有图层栏的默认图层
         if (guid.indexOf("defaultLayer") > -1) {
           let layer = `${defaultLayers[data.label].cid}_layer`;
-          this.$store.state.mapMethodsCollection
-            .get("RENDER")
-            .deletePolygonLayer(layer);
+          this.$store.state.mapMethodsCollection.get("RENDER").deletePolygonLayer(layer);
           delete map2DViewer.polygons[layer];
         }
       }
-      this.legendTitle = Object.keys(this.originalData).map((v) => {
+      this.legendTitle = Object.keys(this.originalData).map(v => {
         return { name: v, info: v };
       });
-      this.legendIcon = this.legendTitle.map((v) => {
+      this.legendIcon = this.legendTitle.map(v => {
         let color = publicFun.getRandomColor();
         return {
           background: "transparent",
-          border: `1px solid ${color}`,
+          border: `1px solid ${color}`
         };
       });
     },
@@ -613,7 +567,7 @@ export default {
           version: data.properties["版本"],
           nature: data.properties["性质"],
           area: data.properties["面积"],
-          long: data.properties["周长"] || "--",
+          long: data.properties["周长"] || "--"
         });
         console.log(this.tableData);
       }
@@ -621,13 +575,11 @@ export default {
         this.tableType = "personal";
         this.boxWidth = "300";
         this.boxHeight = "300";
-        this.$store.state.mapMethodsCollection
-          .get("RENDER")
-          .setView(data.coord, 16);
+        this.$store.state.mapMethodsCollection.get("RENDER").setView(data.coord, 16);
         this.tableData.push({
           name: data.name,
           type: data.type,
-          des: data.des,
+          des: data.des
         });
         this.$bus.$emit("listItemClick", data);
       }
@@ -656,17 +608,17 @@ export default {
           sourceId: 0,
           type: geometryType,
           geojson: JSON.stringify(geojson),
-          id: id,
+          id: id
         };
         this.$Post(this.urlsCollection.updateConllection, params).then(
-          (res) => {
+          res => {
             if (res.code === 200) {
               console.log("修改成功", res);
               this.updateCasePopupShow = false;
               this.getUserMarkers();
             }
           },
-          (error) => {
+          error => {
             this.$message.error("保存失败");
             console.log(error);
           }
@@ -696,24 +648,22 @@ export default {
         params = {
           userId: Number(localStorage.getItem("USER_ID")),
           sourceId: 0,
-          id: id,
+          id: id
         };
-        this.$Post(this.urlsCollection.deleteConllection, params).then(
-          (res) => {
-            if (res.code === 200) {
-              console.log("疑点删除成功");
-              this.getUserMarkers();
-              // this.rightLabelData.forEach((v, i) => {
-              //   if (v.id === id) {
-              //     this.rightLabelData.splice(i, 1);
-              //   }
-              // });
-            }
+        this.$Post(this.urlsCollection.deleteConllection, params).then(res => {
+          if (res.code === 200) {
+            console.log("疑点删除成功");
+            this.getUserMarkers();
+            // this.rightLabelData.forEach((v, i) => {
+            //   if (v.id === id) {
+            //     this.rightLabelData.splice(i, 1);
+            //   }
+            // });
           }
-        );
+        });
       }
-    },
-  },
+    }
+  }
 };
 </script>
 <style lang="less" scoped>

+ 93 - 119
src/views/HomeView.vue

@@ -13,7 +13,7 @@
           menuIndex: '2',
           subMenuIndex: '5',
           legendIcon: legendIcon,
-          legendTitle: legendTitle,
+          legendTitle: legendTitle
         }"
       />
       <div class="select-title">所属街道</div>
@@ -31,7 +31,7 @@
               type: 'card',
               title: streetSelectVal + '资源问题',
               titleWidth: 40,
-              boxWidth: '780',
+              boxWidth: '780'
             }"
           >
             <template slot="top">
@@ -47,7 +47,7 @@
               type: 'card',
               title: '资金投入TOP10',
               titleWidth: 85,
-              boxWidth: '400',
+              boxWidth: '400'
             }"
             ><template slot="top"><TopCard :dataSize="10" /></template
           ></MenuCard>
@@ -56,7 +56,7 @@
               type: 'card',
               title: '历年频发问题TOP10',
               titleWidth: 85,
-              boxWidth: '400',
+              boxWidth: '400'
             }"
             ><template slot="top"><TopCard :dataSize="10" /></template
           ></MenuCard>
@@ -65,10 +65,7 @@
     </div>
 
     <!-- 综合分析 -->
-    <ComprehensiveAnalysis
-      id="ComprehensiveContainer"
-      v-if="$ifMenu('3', '')"
-    />
+    <ComprehensiveAnalysis id="ComprehensiveContainer" v-if="$ifMenu('3', '')" />
 
     <!-- 法律法规 -->
     <LawView id="LawContainer" v-if="$ifMenu('5', '1')" />
@@ -83,8 +80,7 @@
     </div>
     <!-- 左侧菜单列(较宽,两列) -- 疑点筛查 -->
     <div id="leftMenusW">
-      <MenuCard v-for="item in menus.leftW" :menuData="item" :key="item.title">
-      </MenuCard>
+      <MenuCard v-for="item in menus.leftW" :menuData="item" :key="item.title"> </MenuCard>
     </div>
     <!-- 中部菜单列 -->
     <div id="mainMenus">
@@ -129,7 +125,7 @@
           boxHeight: '180',
           menuIndex: '1',
           legendIcon: legendIcon,
-          legendTitle: legendTitle,
+          legendTitle: legendTitle
         }"
       />
     </div>
@@ -168,13 +164,7 @@ import Header from "@/components/layout/Header.vue";
 import MenuCard from "@/components/layout/MenuCard";
 import NewSelect from "@/components/common/NewSelect.vue";
 import BarChart from "@/components/chart/BarChart.vue";
-import {
-  street,
-  streetLocation,
-  soilData,
-  waterData,
-  forestryData,
-} from "@/config/common";
+import { street, streetLocation, soilData, waterData, forestryData } from "@/config/common";
 import publicFun from "@/utils/publicFunction.js";
 import TagCard from "@/components/common/TagCard";
 import ChartCard from "@/components/common/ChartCard.vue";
@@ -209,7 +199,7 @@ export default {
     Legend,
     WholeProcessManagement,
     FrequencyView,
-    LawView,
+    LawView
   },
   data() {
     return {
@@ -217,7 +207,7 @@ export default {
         type: "lr",
         title: "林地面积",
         value: 654,
-        unit: "公顷",
+        unit: "公顷"
       },
       testTitle: "土地资源",
       activeIndex: 1,
@@ -238,37 +228,37 @@ export default {
                   title: "基本农田面积",
                   value: 150,
                   categoryData: ["2019", "2020", "2021"],
-                  valueData: [100, 120, 150],
+                  valueData: [100, 120, 150]
                 },
                 {
                   title: "储备土地面积",
                   value: 250,
                   categoryData: ["2019", "2020", "2021"],
-                  valueData: [2000, 220, 250],
+                  valueData: [2000, 220, 250]
                 },
                 {
                   title: "减量化面积",
                   value: 350,
                   categoryData: ["2019", "2020", "2021"],
-                  valueData: [300, 20, 350],
+                  valueData: [300, 20, 350]
                 },
                 {
                   title: "一般耕地面积",
                   value: 450,
                   categoryData: ["2019", "2020", "2021"],
-                  valueData: [40, 420, 450],
+                  valueData: [40, 420, 450]
                 },
                 {
                   type: "tb",
                   title: "土地资源面积",
                   value: 172,
-                  unit: "公顷",
-                },
-              ],
+                  unit: "公顷"
+                }
+              ]
             },
             bottomSolt: {
-              commonName: "ChartCard",
-            },
+              commonName: "ChartCard"
+            }
           },
           {
             type: "card",
@@ -286,7 +276,7 @@ export default {
                   value: 654,
                   unit: "条",
                   categoryData: ["2019", "2020", "2021"],
-                  valueData: [40, 420, 654],
+                  valueData: [40, 420, 654]
                 },
                 {
                   type: "tb",
@@ -294,7 +284,7 @@ export default {
                   value: 654,
                   unit: "条",
                   categoryData: ["2019", "2020", "2021"],
-                  valueData: [400, 420, 654],
+                  valueData: [400, 420, 654]
                 },
                 {
                   type: "tb",
@@ -302,13 +292,13 @@ export default {
                   value: 654,
                   unit: "条",
                   categoryData: ["2019", "2020", "2021"],
-                  valueData: [400, 40, 654],
-                },
-              ],
+                  valueData: [400, 40, 654]
+                }
+              ]
             },
             bottomSolt: {
-              commonName: "ChartCard",
-            },
+              commonName: "ChartCard"
+            }
           },
           {
             type: "card",
@@ -326,7 +316,7 @@ export default {
                   value: 654,
                   unit: "公顷",
                   categoryData: ["2019", "2020", "2021"],
-                  valueData: [40, 420, 654],
+                  valueData: [40, 420, 654]
                 },
                 {
                   type: "lr",
@@ -334,14 +324,14 @@ export default {
                   value: 654,
                   unit: "公顷",
                   categoryData: ["2019", "2020", "2021"],
-                  valueData: [400, 420, 654],
-                },
-              ],
+                  valueData: [400, 420, 654]
+                }
+              ]
             },
             bottomSolt: {
-              commonName: "ChartCard",
-            },
-          },
+              commonName: "ChartCard"
+            }
+          }
         ],
         leftW: [
           {
@@ -354,7 +344,7 @@ export default {
             menuIndex: "2",
             subMenuIndex: "1",
             position: "left",
-            gotoPageInfo: { index: "3", subIndex: "", name: "综合分析" },
+            gotoPageInfo: { index: "3", subIndex: "", name: "综合分析" }
           },
           {
             type: "imageMenu",
@@ -366,7 +356,7 @@ export default {
             menuIndex: "2",
             subMenuIndex: "1",
             position: "left",
-            gotoPageInfo: { index: "3", subIndex: "", name: "综合分析" },
+            gotoPageInfo: { index: "3", subIndex: "", name: "综合分析" }
           },
           {
             type: "imageMenu",
@@ -378,7 +368,7 @@ export default {
             menuIndex: "2",
             subMenuIndex: "1",
             position: "left",
-            gotoPageInfo: { index: "3", subIndex: "", name: "综合分析" },
+            gotoPageInfo: { index: "3", subIndex: "", name: "综合分析" }
           },
           {
             type: "imageMenu",
@@ -390,8 +380,8 @@ export default {
             menuIndex: "2",
             subMenuIndex: "1",
             position: "left",
-            gotoPageInfo: { index: "3", subIndex: "", name: "综合分析" },
-          },
+            gotoPageInfo: { index: "3", subIndex: "", name: "综合分析" }
+          }
         ],
         main: [
           {
@@ -402,8 +392,8 @@ export default {
             boxBackground: "rgba(0,39,77,0.6)",
             menuIndex: "1",
             position: "top",
-            minDomWidth: 1500,
-          },
+            minDomWidth: 1500
+          }
         ],
         right: [
           {
@@ -422,13 +412,13 @@ export default {
                   value: 72,
                   unit: "万元",
                   categoryData: ["2019", "2020", "2021"],
-                  valueData: [100, 120, 72],
-                },
-              ],
+                  valueData: [100, 120, 72]
+                }
+              ]
             },
             bottomSolt: {
-              commonName: "ChartCard",
-            },
+              commonName: "ChartCard"
+            }
           },
           {
             type: "card",
@@ -446,7 +436,7 @@ export default {
                   value: 172,
                   unit: "个",
                   categoryData: ["2019", "2020", "2021"],
-                  valueData: [40, 420, 172],
+                  valueData: [40, 420, 172]
                 },
                 {
                   type: "tb",
@@ -454,7 +444,7 @@ export default {
                   value: 156,
                   unit: "个",
                   categoryData: ["2019", "2020", "2021"],
-                  valueData: [400, 420, 156],
+                  valueData: [400, 420, 156]
                 },
                 {
                   type: "tb",
@@ -462,13 +452,13 @@ export default {
                   value: 188,
                   unit: "个",
                   categoryData: ["2019", "2020", "2021"],
-                  valueData: [100, 40, 188],
-                },
-              ],
+                  valueData: [100, 40, 188]
+                }
+              ]
             },
             bottomSolt: {
-              commonName: "ChartCard",
-            },
+              commonName: "ChartCard"
+            }
           },
           {
             type: "card",
@@ -477,7 +467,7 @@ export default {
             menuIndex: "1",
             position: "right",
             minDomWidth: 1000,
-            gotoPageInfo: { index: "5", subIndex: "2", name: "频发问题" },
+            gotoPageInfo: { index: "5", subIndex: "2", name: "频发问题" }
           },
           {
             type: "card",
@@ -496,13 +486,13 @@ export default {
                   value: 72,
                   unit: "个",
                   categoryData: ["2019", "2020", "2021"],
-                  valueData: [100, 120, 72],
-                },
-              ],
+                  valueData: [100, 120, 72]
+                }
+              ]
             },
             bottomSolt: {
-              commonName: "ChartCard",
-            },
+              commonName: "ChartCard"
+            }
           },
           {
             type: "card",
@@ -511,59 +501,59 @@ export default {
             menuIndex: "2",
             subMenuIndex: "1",
             position: "right",
-            minDomWidth: 1200,
-          },
-        ],
+            minDomWidth: 1200
+          }
+        ]
       },
       // 首页饼图相关
       buttonData: ["A", "B", "C"],
       legendTitle: [
         {
           name: "A类",
-          info: "耕地林地总和占镇域面积约 45%以上,或超过3000公顷",
+          info: "耕地林地总和占镇域面积约 45%以上,或超过3000公顷"
         },
         {
           name: "B类",
-          info: "有一定的自然资源资产(耕地林地总和 900-3000公项)",
+          info: "有一定的自然资源资产(耕地林地总和 900-3000公项)"
         },
         {
           name: "C类",
-          info: "自然资源资产较少(耕地林地总和低于 900公项)",
-        },
+          info: "自然资源资产较少(耕地林地总和低于 900公项)"
+        }
       ],
       // legendData: ["#E565FF", "#0055FF", "#00FFD5"],
       legendIcon: [
         {
           background: "#E565FF",
-          border: "none",
+          border: "none"
         },
         {
           background: "#0055FF",
-          border: "none",
+          border: "none"
         },
         {
           background: "#00FFD5",
-          border: "none",
-        },
+          border: "none"
+        }
       ],
       btnChecked: "A",
       AData: {
         soil: [],
         water: [],
         forestry: [],
-        categoryData: [],
+        categoryData: []
       },
       BData: {
         soil: [],
         water: [],
         forestry: [],
-        categoryData: [],
+        categoryData: []
       },
       CData: {
         soil: [],
         water: [],
         forestry: [],
-        categoryData: [],
+        categoryData: []
       },
       streetSelectVal: "浦东新区",
       streetOptions: [],
@@ -572,17 +562,18 @@ export default {
         { name: "土地资源问题", num: 67 },
         { name: "水资源问题", num: 37 },
         { name: "林地资源问题", num: 60 },
-        { name: "生态资源问题", num: 55 },
+        { name: "生态资源问题", num: 55 }
       ],
       // 综合分析
       analysis: {
-        searchInput: "",
-      },
+        searchInput: ""
+      }
     };
   },
   methods: {
     navSelect: function (data) {
       this.$store.commit("changeNavSelect", data);
+      this.$store.commit("changeBackMenu", {});
     },
     clickEvent(type) {
       this.btnChecked = type;
@@ -615,7 +606,7 @@ export default {
     // 镇域专题下拉框
     specialTownSelect(val) {
       this.$refs.mapLoaderRef.setView(streetLocationMap.get(val), 11);
-    },
+    }
   },
   created() {
     // 目录
@@ -630,19 +621,10 @@ export default {
     let CDataArr = [];
     // 街道排序
     for (let i in category) {
-      let ADataSum =
-        soilData[category[i]].A +
-        waterData[category[i]].A +
-        forestryData[category[i]].A;
-      let BDataSum =
-        soilData[category[i]].B +
-        waterData[category[i]].B +
-        forestryData[category[i]].B;
+      let ADataSum = soilData[category[i]].A + waterData[category[i]].A + forestryData[category[i]].A;
+      let BDataSum = soilData[category[i]].B + waterData[category[i]].B + forestryData[category[i]].B;
 
-      let CDataSum =
-        soilData[category[i]].C +
-        waterData[category[i]].C +
-        forestryData[category[i]].C;
+      let CDataSum = soilData[category[i]].C + waterData[category[i]].C + forestryData[category[i]].C;
       ADataArr.push({ name: category[i], sum: ADataSum });
       BDataArr.push({ name: category[i], sum: BDataSum });
       CDataArr.push({ name: category[i], sum: CDataSum });
@@ -653,21 +635,21 @@ export default {
     CDataArr.sort(publicFun.compare("sum"));
 
     // 按A,B,C分出各自资源的排序数组
-    ADataArr.forEach((item) => {
+    ADataArr.forEach(item => {
       this.AData.soil.push(soilData[item.name].A);
       this.AData.water.push(waterData[item.name].A);
       this.AData.forestry.push(forestryData[item.name].A);
       this.AData.categoryData.push(item.name);
     });
 
-    BDataArr.forEach((item) => {
+    BDataArr.forEach(item => {
       this.BData.soil.push(soilData[item.name].B);
       this.BData.water.push(waterData[item.name].B);
       this.BData.forestry.push(forestryData[item.name].B);
       this.BData.categoryData.push(item.name);
     });
 
-    CDataArr.forEach((item) => {
+    CDataArr.forEach(item => {
       this.CData.soil.push(soilData[item.name].C);
       this.CData.water.push(waterData[item.name].C);
       this.CData.forestry.push(forestryData[item.name].C);
@@ -683,10 +665,10 @@ export default {
     for (let key in street) {
       this.streetOptions.push({
         value: street[key],
-        label: street[key],
+        label: street[key]
       });
     }
-  },
+  }
 };
 </script>
 <style lang="less" scoped>
@@ -964,22 +946,14 @@ export default {
     transform: translate(-50%, -50%) rotate(45deg);
     width: 110px;
     height: 100px;
-    background: linear-gradient(to left, @commonBorderColor, @commonBorderColor)
-        left top no-repeat,
-      linear-gradient(to bottom, @commonBorderColor, @commonBorderColor) left
-        top no-repeat,
-      linear-gradient(to left, @commonBorderColor, @commonBorderColor) right top
-        no-repeat,
-      linear-gradient(to bottom, @commonBorderColor, @commonBorderColor) right
-        top no-repeat,
-      linear-gradient(to left, @commonBorderColor, @commonBorderColor) left
-        bottom no-repeat,
-      linear-gradient(to bottom, @commonBorderColor, @commonBorderColor) left
-        bottom no-repeat,
-      linear-gradient(to left, @commonBorderColor, @commonBorderColor) right
-        bottom no-repeat,
-      linear-gradient(to left, @commonBorderColor, @commonBorderColor) right
-        bottom no-repeat;
+    background: linear-gradient(to left, @commonBorderColor, @commonBorderColor) left top no-repeat,
+      linear-gradient(to bottom, @commonBorderColor, @commonBorderColor) left top no-repeat,
+      linear-gradient(to left, @commonBorderColor, @commonBorderColor) right top no-repeat,
+      linear-gradient(to bottom, @commonBorderColor, @commonBorderColor) right top no-repeat,
+      linear-gradient(to left, @commonBorderColor, @commonBorderColor) left bottom no-repeat,
+      linear-gradient(to bottom, @commonBorderColor, @commonBorderColor) left bottom no-repeat,
+      linear-gradient(to left, @commonBorderColor, @commonBorderColor) right bottom no-repeat,
+      linear-gradient(to left, @commonBorderColor, @commonBorderColor) right bottom no-repeat;
     background-size: 6px 6px, 6px 6px, 6px 6px, 6px 6px;
   }
 }