Browse Source

动画优化和提示优化。

DESKTOP-6LTVLN7\Liumouren 2 years ago
parent
commit
4369869664
2 changed files with 55 additions and 13 deletions
  1. 29 8
      src/components/layout/Header.vue
  2. 26 5
      src/components/layout/MenuCard.vue

+ 29 - 8
src/components/layout/Header.vue

@@ -3,7 +3,7 @@
     <el-row>
       <el-col :span="8" v-if="$store.state.windowsSize.width >= 1300" class="logoBox">
         <div class="logo"></div>
-        <div class="title">浦东新区资源环境智慧审计平台</div>
+        <div class="title">浦东新区资源环境智慧审计平台 <span class="title_version">V 20221212_T_1.0.1</span></div>
       </el-col>
       <el-col :span="2" v-if="$store.state.windowsSize.width < 1300" class="logoBox">
         <div class="logo"></div>
@@ -95,9 +95,9 @@ export default {
         1: "首页",
         2: "疑点筛查",
         "2-1": "土地资源",
-        "2-2": "生态资源",
+        "2-2": "资源",
         "2-3": "林资源",
-        "2-4": "资源",
+        "2-4": "生态资源",
         "2-5": "镇域专题",
         3: "综合分析",
         4: "全流程管理",
@@ -142,12 +142,22 @@ export default {
     select: function (index) {
       var that = this;
       var name = that.navData[index];
-      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) {
@@ -218,6 +228,7 @@ export default {
     background: url("../../assets/home/header_title_icon.png") no-repeat center;
   }
   .title {
+    position: relative;
     width: 30vw;
     padding-left: 1.5rem;
     transform: skew(45deg);
@@ -232,6 +243,16 @@ export default {
     display: -webkit-box;
     -webkit-box-orient: vertical;
     -webkit-line-clamp: 1;
+    &_version {
+      position: absolute;
+      right: 1.5rem;
+      font-size: 12px;
+      bottom: 0;
+      line-height: 12px;
+      padding: 3px 5px;
+      border-radius: 2px;
+      color: #ffffff;
+    }
   }
 }
 

+ 26 - 5
src/components/layout/MenuCard.vue

@@ -196,11 +196,32 @@ export default {
       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 ,name: this.menuData.menuName ? this.menuData.menuName : "" });
+          this.$store.commit("changeBackMenu", {
+            index: this.menuData.menuIndex,
+            subIndex: this.menuData.subMenuIndex,
+            name: this.menuData.menuName ? this.menuData.menuName : ""
+          });
         }
       }
       if (this.menuData != undefined && this.menuData.gotoPageInfo != undefined) {
-        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对象自动生成元素的样式(背景以及高度)
@@ -222,14 +243,14 @@ export default {
           setTimeout(() => {
             this.$refs.menuCard.style.transform = "translate(0,0)";
             this.$refs.menuCard.style.opacity = "0.9";
-          },300);
+          }, 300);
         } else {
           // 延迟0.3s后修改display为none
           this.$refs.menuCard.style.transform = this.positionTotransform();
           this.$refs.menuCard.style.opacity = "0";
-          // setTimeout(() => {
+          setTimeout(() => {
             this.$refs.menuCard.style.display = "none";
-          // }, 300);
+          }, 300);
         }
       }
     },