morphone1995 4 年之前
父節點
當前提交
958280b6e2

+ 18 - 2
src/components/common/Menu.vue

@@ -1,5 +1,10 @@
 <template>
-  <el-menu :router="true" :default-active="defaultActive" class="el-menu-vertical-demo">
+  <el-menu
+    :router="true"
+    :default-active="defaultActive"
+    class="el-menu-vertical-demo"
+    @select="handleSelect"
+  >
     <template v-for="(item,index) in data">
       <el-menu-item :index="'/'+role+'/'+item.code" v-if="item.subMenuList.length==0">
         <!-- <i v-bind:class="icons[item.code]"></i> -->
@@ -42,9 +47,20 @@ export default {
   },
   created() {
     // console.log(this.$route,'this.$route');
+    let menupath = localStorage.getItem('menuPath')
     this.defaultActive = this.$route.fullPath;
+    if(this.$route.fullPath != menupath ){
+      this.defaultActive = menupath
+      this.$router.push({path:menupath});
+    }else{
+      this.defaultActive = this.$route.fullPath
+    }
   },
-  methods: {}
+  methods: {
+    handleSelect(key, keyPath) {
+      localStorage.setItem('menuPath',key)
+    }
+  }
 };
 </script>
 

+ 1 - 0
src/components/icss/dept/DeptManage.vue

@@ -92,6 +92,7 @@ export default {
     const that = this;
     //返回时避免参数未赋值就获取列表
     setTimeout(function() {
+      that.clearFilter();
       that.getDataList();
     });
     // 非首页 编辑页返回 设置 this.currentPage

+ 1 - 0
src/components/icss/disease/ChemicalAndCommonMapping.vue

@@ -89,6 +89,7 @@ export default {
     const that = this;
     //返回时避免参数未赋值就获取列表
     setTimeout(function() {
+      that.clearFilter();
       that.getDataList();
     });
     // 非首页 编辑页返回 设置 this.currentPage

+ 2 - 0
src/components/icss/drug/DrugManage.vue

@@ -89,7 +89,9 @@ export default {
     const that = this;
     //返回时避免参数未赋值就获取列表
     setTimeout(function() {
+      that.clearFilter();
       that.getDataList();
+      
     });
     // 非首页 编辑页返回 设置 this.currentPage
     if (Object.keys(this.$route.params).length !== 0) {

+ 1 - 0
src/components/icss/fusion/Fusion.vue

@@ -88,6 +88,7 @@ export default {
     const that = this;
     //返回时避免参数未赋值就获取列表
     setTimeout(function() {
+      that.clearFilter();
       that.getDataList();
     });
     // 非首页 编辑页返回 设置 this.currentPage

+ 1 - 0
src/components/icss/lis/Lis.vue

@@ -93,6 +93,7 @@ export default {
     const that = this;
     //返回时避免参数未赋值就获取列表
     setTimeout(function() {
+      that.clearFilter();
       that.getDataList();
     });
     // 非首页 编辑页返回 设置 this.currentPage

+ 1 - 0
src/components/icss/operation/Operation.vue

@@ -93,6 +93,7 @@ export default {
     const that = this;
     //返回时避免参数未赋值就获取列表
     setTimeout(function() {
+      that.clearFilter();
       that.getDataList();
     });
     // 非首页 编辑页返回 设置 this.currentPage

+ 1 - 0
src/components/icss/pacs/Pacs.vue

@@ -88,6 +88,7 @@ export default {
     const that = this;
     //返回时避免参数未赋值就获取列表
     setTimeout(function() {
+      that.clearFilter();
       that.getDataList();
     });
     // 非首页 编辑页返回 设置 this.currentPage