Parcourir la source

Merge branch 'ui-tag' into 'master'

上线ui升级

See merge request spfm/spfm-market-front!284
徐兴安 il y a 2 ans
Parent
commit
ec76b16edc
3 fichiers modifiés avec 38 ajouts et 39 suppressions
  1. 1 1
      package.json
  2. 34 37
      src/components/p-tabs.vue
  3. 3 1
      src/pages/main/achievements/achievementsIndex.vue

+ 1 - 1
package.json

@@ -34,7 +34,7 @@
     "vue-axios": "^2.1.5",
     "vue-contextmenu": "^1.5.10",
     "vue-cookie": "^1.1.4",
-    "vue-fullscreen": "^2.2.0",
+    "vue-fullscreen": "^2.6.1",
     "vue-router": "^3.0.7",
     "vuex": "^3.3.0",
     "xlsx": "^0.16.9"

+ 34 - 37
src/components/p-tabs.vue

@@ -124,9 +124,10 @@ export default {
      * 删除tab元素触发关闭页面的逻辑
      * @param {Object} e 事件对象
      * @param {Object} item 当前点击的tab元素数据
-     * @param {Object} index 当前tab的下标
+     * @param {Object} index 当前tab的下标p
      */
     handleClose(e, item, index) {
+      console.log(item);
       this.$store.commit(
         "removePagesByName",
         (item.rountPath == undefined ? item.jspUrl : item.rountPath).replace(
@@ -142,43 +143,38 @@ export default {
           (item.rountPath == undefined ? item.jspUrl : item.rountPath) !=
           this.getDefaultActive
         ) {
-          list.splice(index, 1);
+          if (item.jspUrl != "/leader" && item.rountPath != "/leader") {
+            list.splice(index, 1);
+          }
           this.$store.commit("setTabList", list);
         } else {
-          if (list[index - 1]) {
-            let rountPath = list[index - 1].hasOwnProperty("rountPath")
-              ? list[index - 1].rountPath
-              : list[index - 1].jspUrl;
-            this.$store.commit("setDefaultActive", rountPath);
-            if (
-              (item.rountPath == undefined ? item.jspUrl : item.rountPath) !=
-              this.getDefaultActive
-            ) {
-              list.splice(index, 1);
-              this.$store.commit("setTabList", list);
-              this.$router.push(rountPath);
-            }
-          } else if (list[index + 1]) {
-            let rountPath = list[index + 1].hasOwnProperty("rountPath")
-              ? list[index + 1].rountPath
-              : list[index + 1].jspUrl;
-            this.$store.commit("setDefaultActive", rountPath);
-            if (
-              (item.rountPath == undefined ? item.jspUrl : item.rountPath) !=
-              this.getDefaultActive
-            ) {
-              list.splice(index, 1);
-              this.$store.commit("setTabList", list);
-              this.$router.push(rountPath);
-            }
-          } else {
-            if (
-              (item.rountPath == undefined ? item.jspUrl : item.rountPath) !=
-              this.getDefaultActive
-            ) {
-              list.splice(index, 1);
-              this.$store.commit("setTabList", list);
-              this.$router.push("/");
+          if (item.jspUrl != "/leader" && item.rountPath != "/leader") {
+            if (list[index - 1]) {
+              let rountPath = list[index - 1].hasOwnProperty("rountPath")
+                ? list[index - 1].rountPath
+                : list[index - 1].jspUrl;
+              this.$store.commit("setDefaultActive", rountPath);
+              if (item.jspUrl != "/leader" && item.rountPath != "/leader") {
+                list.splice(index, 1);
+                this.$store.commit("setTabList", list);
+                this.$router.push(rountPath);
+              }
+            } else if (list[index + 1]) {
+              let rountPath = list[index + 1].hasOwnProperty("rountPath")
+                ? list[index + 1].rountPath
+                : list[index + 1].jspUrl;
+              this.$store.commit("setDefaultActive", rountPath);
+              if (item.jspUrl != "/leader" && item.rountPath != "/leader") {
+                list.splice(index, 1);
+                this.$store.commit("setTabList", list);
+                this.$router.push(rountPath);
+              }
+            } else {
+              if (item.jspUrl != "/leader" && item.rountPath != "/leader") {
+                list.splice(index, 1);
+                this.$store.commit("setTabList", list);
+                this.$router.push("/");
+              }
             }
           }
         }
@@ -403,7 +399,7 @@ export default {
     line-height: 50px;
     color: black;
     position: relative;
-    width: 160px;
+    width: 180px;
     overflow: hidden;
     border-radius: 0px 5px 0px 0px;
     // margin-left: 15px;
@@ -457,6 +453,7 @@ export default {
 
   .tab-item-active {
     border-bottom: 3px solid #41a2fd;
+
     .skew {
       background: #fff;
     }

+ 3 - 1
src/pages/main/achievements/achievementsIndex.vue

@@ -67,14 +67,16 @@ export default {
   computed: {
     menuList: function () {
       let arr = [];
+      let list = []
       this.routerList.map((item) => {
         this.showList.map((row) => {
           if (item.path == row) {
             arr.push(item);
+            list  = [...new Set(arr)]
           }
         });
       });
-      return arr;
+      return list;
     },
   },
   methods: {