luolei 4 rokov pred
rodič
commit
d76906bc19

+ 21 - 15
src/components/icss/MedicinePrompt.vue

@@ -120,19 +120,25 @@ export default {
     };
     };
   },
   },
   created() {
   created() {
-    const that = this;
+    const param = this.$route.params;
+    if(param.currentPage){
+      this.inCurrentPage = param.currentPage
+    }
+    if(param.filter){
+      this.filter = param.filter
+    }
     //返回时避免参数未赋值就获取列表
     //返回时避免参数未赋值就获取列表
-    setTimeout(function() {
-      that.clearFilter();
-      that.getDataList();
-      that.getDicList();
+    this.$nextTick(()=> {
+      // this.clearFilter();
+      this.getDataList();
+      this.getDicList();
     });
     });
     
     
     // this.typeList = config.emData;
     // this.typeList = config.emData;
     // 非首页 编辑页返回 设置 this.currentPage
     // 非首页 编辑页返回 设置 this.currentPage
-    if (Object.keys(this.$route.params).length !== 0) {
-      this.currentPage = this.$route.params.currentPage;
-    }
+    // if (Object.keys(this.$route.params).length !== 0) {
+    //   this.currentPage = this.$route.params.currentPage;
+    // }
   },
   },
   watch: {
   watch: {
     filter: {
     filter: {
@@ -142,13 +148,13 @@ export default {
       deep: true
       deep: true
     }
     }
   },
   },
-  beforeRouteEnter(to, from, next) {
-    next(vm => {
-      //const pm = to.param;
-      Object.assign(vm, to.params);
-      vm.inCurrentPage = to.params.currentPage;
-    });
-  },
+  // beforeRouteEnter(to, from, next) {
+  //   next(vm => {
+  //     //const pm = to.param;
+  //     Object.assign(vm, to.params);
+  //     vm.inCurrentPage = to.params.currentPage;
+  //   });
+  // },
   methods: {
   methods: {
     // 获取字典类型
     // 获取字典类型
     getDicList() {
     getDicList() {

+ 9 - 11
src/components/icss/dept/DeptManage.vue

@@ -89,11 +89,16 @@ export default {
     };
     };
   },
   },
   created() {
   created() {
-    const that = this;
+    const param = this.$route.params;
+    if(param.currentPage){
+      this.inCurrentPage = param.currentPage
+    }
+    if(param.filter){
+      this.filter = param.filter
+    }
     //返回时避免参数未赋值就获取列表
     //返回时避免参数未赋值就获取列表
-    setTimeout(function() {
-      that.clearFilter();
-      that.getDataList();
+    setTimeout(()=> {
+      this.getDataList();
     });
     });
     // 非首页 编辑页返回 设置 this.currentPage
     // 非首页 编辑页返回 设置 this.currentPage
     if (Object.keys(this.$route.params).length !== 0) {
     if (Object.keys(this.$route.params).length !== 0) {
@@ -108,13 +113,6 @@ export default {
       deep: true
       deep: true
     }
     }
   },
   },
-  beforeRouteEnter(to, from, next) {
-    next(vm => {
-      //const pm = to.param;
-      Object.assign(vm, to.params);
-      vm.inCurrentPage = to.params.currentPage;
-    });
-  },
   methods: {
   methods: {
     handleSizeChange(val) {
     handleSizeChange(val) {
       this.pageSize = val;
       this.pageSize = val;

+ 17 - 15
src/components/icss/disease/ChemicalAndCommonMapping.vue

@@ -85,16 +85,18 @@ export default {
     };
     };
   },
   },
   created() {
   created() {
-    const that = this;
+    const param = this.$route.params;
+    if(param.currentPage){
+      this.inCurrentPage = param.currentPage
+    }
+    if(param.filter){
+      this.filter = param.filter
+    }
     //返回时避免参数未赋值就获取列表
     //返回时避免参数未赋值就获取列表
-    setTimeout(function() {
-      that.clearFilter();
-      that.getDataList();
+    setTimeout(()=> {
+      // this.clearFilter();
+      this.getDataList();
     });
     });
-    // 非首页 编辑页返回 设置 this.currentPage
-    if (Object.keys(this.$route.params).length !== 0) {
-      this.currentPage = this.$route.params.currentPage;
-    }
   },
   },
   watch: {
   watch: {
     filter: {
     filter: {
@@ -104,13 +106,13 @@ export default {
       deep: true
       deep: true
     }
     }
   },
   },
-  beforeRouteEnter(to, from, next) {
-    next(vm => {
-      //const pm = to.param;
-      Object.assign(vm, to.params);
-      vm.inCurrentPage = to.params.currentPage;
-    });
-  },
+  // beforeRouteEnter(to, from, next) {
+  //   next(vm => {
+  //     //const pm = to.param;
+  //     Object.assign(vm, to.params);
+  //     vm.inCurrentPage = to.params.currentPage;
+  //   });
+  // },
   methods: {
   methods: {
     handleSizeChange(val) {
     handleSizeChange(val) {
       this.pageSize = val;
       this.pageSize = val;

+ 9 - 16
src/components/icss/drug/DrugManage.vue

@@ -85,17 +85,17 @@ export default {
     };
     };
   },
   },
   created() {
   created() {
-    const that = this;
+    const param = this.$route.params;
+    if(param.currentPage){
+      this.inCurrentPage = param.currentPage
+    }
+    if(param.filter){
+      this.filter = param.filter
+    }
     //返回时避免参数未赋值就获取列表
     //返回时避免参数未赋值就获取列表
-    setTimeout(function() {
-      that.clearFilter();
-      that.getDataList();
-      
+    setTimeout(()=> {
+      this.getDataList();
     });
     });
-    // 非首页 编辑页返回 设置 this.currentPage
-    if (Object.keys(this.$route.params).length !== 0) {
-      this.currentPage = this.$route.params.currentPage;
-    }
   },
   },
   watch: {
   watch: {
     filter: {
     filter: {
@@ -105,13 +105,6 @@ export default {
       deep: true
       deep: true
     }
     }
   },
   },
-  beforeRouteEnter(to, from, next) {
-    next(vm => {
-      //const pm = to.param;
-      Object.assign(vm, to.params);
-      vm.inCurrentPage = to.params.currentPage;
-    });
-  },
   methods: {
   methods: {
     handleSizeChange(val) {
     handleSizeChange(val) {
       this.pageSize = val;
       this.pageSize = val;

+ 10 - 15
src/components/icss/fusion/Fusion.vue

@@ -84,16 +84,17 @@ export default {
     };
     };
   },
   },
   created() {
   created() {
-    const that = this;
+    const param = this.$route.params;
+    if(param.currentPage){
+      this.inCurrentPage = param.currentPage
+    }
+    if(param.filter){
+      this.filter = param.filter
+    }
     //返回时避免参数未赋值就获取列表
     //返回时避免参数未赋值就获取列表
-    setTimeout(function() {
-      that.clearFilter();
-      that.getDataList();
+    setTimeout(()=> {
+      this.getDataList();
     });
     });
-    // 非首页 编辑页返回 设置 this.currentPage
-    if (Object.keys(this.$route.params).length !== 0) {
-      this.currentPage = this.$route.params.currentPage;
-    }
   },
   },
   watch: {
   watch: {
     filter: {
     filter: {
@@ -103,13 +104,7 @@ export default {
       deep: true
       deep: true
     }
     }
   },
   },
-  beforeRouteEnter(to, from, next) {
-    next(vm => {
-      //const pm = to.param;
-      Object.assign(vm, to.params);
-      vm.inCurrentPage = to.params.currentPage;
-    });
-  },
+
   methods: {
   methods: {
     handleSizeChange(val) {
     handleSizeChange(val) {
       this.pageSize = val;
       this.pageSize = val;

+ 12 - 15
src/components/icss/lis/Lis.vue

@@ -89,16 +89,19 @@ export default {
     };
     };
   },
   },
   created() {
   created() {
-    const that = this;
+    const param = this.$route.params;
+    if(param.currentPage){
+      this.inCurrentPage = param.currentPage
+    }
+    if(param.filter){
+      this.filter = param.filter
+    }
     //返回时避免参数未赋值就获取列表
     //返回时避免参数未赋值就获取列表
-    setTimeout(function() {
-      that.clearFilter();
-      that.getDataList();
+    setTimeout(()=> {
+      // that.clearFilter();
+      this.getDataList();
     });
     });
-    // 非首页 编辑页返回 设置 this.currentPage
-    if (Object.keys(this.$route.params).length !== 0) {
-      this.currentPage = this.$route.params.currentPage;
-    }
+
   },
   },
   watch: {
   watch: {
     filter: {
     filter: {
@@ -108,13 +111,7 @@ export default {
       deep: true
       deep: true
     }
     }
   },
   },
-  beforeRouteEnter(to, from, next) {
-    next(vm => {
-      //const pm = to.param;
-      Object.assign(vm, to.params);
-      vm.inCurrentPage = to.params.currentPage;
-    });
-  },
+
   methods: {
   methods: {
     handleSizeChange(val) {
     handleSizeChange(val) {
       this.pageSize = val;
       this.pageSize = val;

+ 10 - 15
src/components/icss/operation/Operation.vue

@@ -89,16 +89,18 @@ export default {
     };
     };
   },
   },
   created() {
   created() {
-    const that = this;
+    const param = this.$route.params;
+    if(param.currentPage){
+      this.inCurrentPage = param.currentPage
+    }
+    if(param.filter){
+      this.filter = param.filter
+    }
+    console.log(param)
     //返回时避免参数未赋值就获取列表
     //返回时避免参数未赋值就获取列表
-    setTimeout(function() {
-      that.clearFilter();
-      that.getDataList();
+    setTimeout(()=> {
+      this.getDataList();
     });
     });
-    // 非首页 编辑页返回 设置 this.currentPage
-    if (Object.keys(this.$route.params).length !== 0) {
-      this.currentPage = this.$route.params.currentPage;
-    }
   },
   },
   watch: {
   watch: {
     filter: {
     filter: {
@@ -108,13 +110,6 @@ export default {
       deep: true
       deep: true
     }
     }
   },
   },
-  beforeRouteEnter(to, from, next) {
-    next(vm => {
-      //const pm = to.param;
-      Object.assign(vm, to.params);
-      vm.inCurrentPage = to.params.currentPage;
-    });
-  },
   methods: {
   methods: {
     handleSizeChange(val) {
     handleSizeChange(val) {
       this.pageSize = val;
       this.pageSize = val;

+ 10 - 16
src/components/icss/plan/Plan.vue

@@ -98,17 +98,18 @@ export default {
       hospitalId: ''
       hospitalId: ''
     };
     };
   },
   },
-  created() {
-    const that = this;
+  created() {    
+    const param = this.$route.params;
+    if(param.currentPage){
+      this.inCurrentPage = param.currentPage
+    }
+    if(param.filter){
+      this.filter = param.filter
+    }
     //返回时避免参数未赋值就获取列表
     //返回时避免参数未赋值就获取列表
-    setTimeout(function() {
-      that.getDataList();
-      that.clearFilter()
+    setTimeout(()=> {
+      this.getDataList();
     });
     });
-    // 非首页 编辑页返回 设置 this.currentPage
-    if (Object.keys(this.$route.params).length !== 0) {
-      this.currentPage = this.$route.params.currentPage;
-    }
   },
   },
   watch: {
   watch: {
     filter: {
     filter: {
@@ -118,13 +119,6 @@ export default {
       deep: true
       deep: true
     }
     }
   },
   },
-  beforeRouteEnter(to, from, next) {
-    next(vm => {
-      //const pm = to.param;
-      Object.assign(vm, to.params);
-      vm.inCurrentPage = to.params.currentPage;
-    });
-  },
   methods: {
   methods: {
     handleSizeChange(val) {
     handleSizeChange(val) {
       this.pageSize = val;
       this.pageSize = val;

+ 9 - 10
src/components/knowledgeExtra/RuleManager.vue

@@ -176,11 +176,17 @@
             }
             }
         },
         },
         created() {
         created() {
+            const param = this.$route.params;
+            if(param.currentPage){
+                this.inCurrentPage = param.currentPage
+            }
+            if(param.filter){
+                this.filter = param.filter
+            }
             this.getTypeList();
             this.getTypeList();
-            const that = this;
             //返回时避免参数未赋值就获取列表
             //返回时避免参数未赋值就获取列表
-            setTimeout(function(){
-                that.getDataList();
+            setTimeout(()=>{
+                this.getDataList();
             });
             });
             this.getDict();
             this.getDict();
         },
         },
@@ -192,13 +198,6 @@
                 deep: true
                 deep: true
             }
             }
         },
         },
-        beforeRouteEnter(to, from, next) {
-            next(vm => {
-                //const pm = to.param;
-                Object.assign(vm, to.params);
-                vm.inCurrentPage=to.params.currentPage;
-            })
-        },
         methods: {
         methods: {
             getDict(){
             getDict(){
                 api.zskgetDict().then((res) => {
                 api.zskgetDict().then((res) => {