瀏覽代碼

添加水资源和林地资源菜单

DESKTOP-6LTVLN7\Liumouren 2 年之前
父節點
當前提交
cb594c1a9c
共有 3 個文件被更改,包括 106 次插入34 次删除
  1. 21 15
      src/components/layout/Header.vue
  2. 20 19
      src/components/layout/MenuCard.vue
  3. 65 0
      src/config/common.js

+ 21 - 15
src/components/layout/Header.vue

@@ -185,22 +185,28 @@ export default {
     select: function (index) {
       var that = this;
       var name = that.navData[index];
-      let notFound = ["2-2", "2-3", "2-4", "5-3"];
-      let notFoundState = true;
-      notFound.forEach(item => {
-        if (item == index) {
-          this.$message.info("页面开发中,敬请期待!");
-          notFoundState = false;
-        }
+      index = index.split("-");
+      that.$emit("navSelect", {
+        index: index[0],
+        subIndex: index[1],
+        name: name
       });
-      if (notFoundState) {
-        index = index.split("-");
-        that.$emit("navSelect", {
-          index: index[0],
-          subIndex: index[1],
-          name: name
-        });
-      }
+      // let notFound = ["2-2", "2-3", "2-4", "5-3"];
+      // let notFoundState = true;
+      // notFound.forEach(item => {
+      //   if (item == index) {
+      //     this.$message.info("页面开发中,敬请期待!");
+      //     notFoundState = false;
+      //   }
+      // });
+      // if (notFoundState) {
+      //   index = index.split("-");
+      //   that.$emit("navSelect", {
+      //     index: index[0],
+      //     subIndex: index[1],
+      //     name: name
+      //   });
+      // }
     },
     // 用户菜单
     handleCommand(command) {

+ 20 - 19
src/components/layout/MenuCard.vue

@@ -195,7 +195,7 @@ export default {
                 }
               }
               if (listMap["全部"] && listMap["全部"].valueData) {
-                listMap["全部"].valueData.forEach((item,index) => {
+                listMap["全部"].valueData.forEach((item, index) => {
                   listMap["全部"].valueData[index] = item.toFixed(2);
                 });
               }
@@ -287,24 +287,25 @@ export default {
         }
       }
       if (this.menuData != undefined && this.menuData.gotoPageInfo != undefined) {
-        // 暂未开发页面集合
-        let notFound = [
-          { index: "2", subIndex: "2" },
-          { index: "2", subIndex: "3" }
-        ];
-        // 是否跳转暂存变量
-        let notFoundState = true;
-        // 遍历未开发页面index信息
-        notFound.forEach(item => {
-          // 如果要跳转的页面存在未开发页面集合中
-          if (item.index == this.menuData.gotoPageInfo.index && item.subIndex == this.menuData.gotoPageInfo.subIndex) {
-            this.$message.info("页面开发中,敬请期待!");
-            notFoundState = false;
-          }
-        });
-        if (notFoundState) {
-          this.$store.commit("changeNavSelect", this.menuData.gotoPageInfo);
-        }
+        this.$store.commit("changeNavSelect", this.menuData.gotoPageInfo);
+        // // 暂未开发页面集合
+        // let notFound = [
+        //   { index: "2", subIndex: "2" },
+        //   { index: "2", subIndex: "3" }
+        // ];
+        // // 是否跳转暂存变量
+        // let notFoundState = true;
+        // // 遍历未开发页面index信息
+        // notFound.forEach(item => {
+        //   // 如果要跳转的页面存在未开发页面集合中
+        //   if (item.index == this.menuData.gotoPageInfo.index && item.subIndex == this.menuData.gotoPageInfo.subIndex) {
+        //     this.$message.info("页面开发中,敬请期待!");
+        //     notFoundState = false;
+        //   }
+        // });
+        // if (notFoundState) {
+        //   this.$store.commit("changeNavSelect", this.menuData.gotoPageInfo);
+        // }
       }
     },
     // 根据菜单imageURL和boxHeight对象自动生成元素的样式(背景以及高度)

+ 65 - 0
src/config/common.js

@@ -739,6 +739,71 @@ export const menusMap = {
       position: "left",
       gotoPageInfo: { index: "3", subIndex: "", name: "综合分析" },
     },
+    {
+      type: "imageMenu",
+      index: 0,
+      title: "水域数量",
+      titleWidth: 81,
+      boxHeight: 236,
+      imageUrl: "/static/images/2.png",
+      menuIndex: "2",
+      subMenuIndex: "2",
+      menuName: "水资源",
+      position: "left",
+      gotoPageInfo: { index: "3", subIndex: "", name: "综合分析" },
+    },
+    {
+      type: "imageMenu",
+      index: 1,
+      title: "区管河道数量",
+      titleWidth: 81,
+      boxHeight: 236,
+      imageUrl: "/static/images/3.png",
+      menuIndex: "2",
+      subMenuIndex: "2",
+      menuName: "水资源",
+      position: "left",
+      gotoPageInfo: { index: "3", subIndex: "", name: "综合分析" },
+    },
+    {
+      type: "imageMenu",
+      index: 2,
+      title: "镇管河道数量",
+      titleWidth: 81,
+      boxHeight: 236,
+      imageUrl: "/static/images/1.png",
+      menuIndex: "2",
+      subMenuIndex: "2",
+      menuName: "水资源",
+      position: "left",
+      gotoPageInfo: { index: "3", subIndex: "", name: "综合分析" },
+    },
+    {
+      type: "imageMenu",
+      index: 0,
+      title: "林地面积",
+      titleWidth: 81,
+      boxHeight: 236,
+      imageUrl: "/static/images/1.png",
+      menuIndex: "2",
+      subMenuIndex: "3",
+      menuName: "林地资源",
+      position: "left",
+      gotoPageInfo: { index: "3", subIndex: "", name: "综合分析" },
+    },
+    {
+      type: "imageMenu",
+      index: 1,
+      title: "公益林面积",
+      titleWidth: 81,
+      boxHeight: 236,
+      imageUrl: "/static/images/4.png",
+      menuIndex: "2",
+      subMenuIndex: "3",
+      menuName: "林地资源",
+      position: "left",
+      gotoPageInfo: { index: "3", subIndex: "", name: "综合分析" },
+    },
   ],
   main: [
     {