ソースを参照

医学数据维护返回修改

zhouna 6 年 前
コミット
247e71d578

+ 4 - 6
src/components/icss/AddChemicalAndCommonMapping.vue

@@ -5,9 +5,10 @@
                 @click="back"
         ></i> 化验大小项与公表项对应维护--添加关联</div> -->
         <crumbs
-          title="化验大小项与公表项对应维护--添加关联"
-          class="topBack"
-          linkTo="ChemicalAndCommonMapping"
+                title="化验大小项与公表项对应维护--添加关联"
+                class="topBack"
+                :param="$route.params"
+                linkTo="ChemicalAndCommonMapping"
         ></crumbs>
         <div class="AddChemicalAndCommonMappingBox clearfix">
             <div class="titleBox clearfix">
@@ -135,9 +136,6 @@ export default {
             this.$refs['itemNameList'].style.display='none';
             this.$refs['uniqueNameList'].style.display='none';
         },
-        back() {
-            this.$router.go(-1)
-        },
         searchMealItem(type) {
             if( type == '1' || type == '2') {
                 this.getTagList(type)

+ 5 - 4
src/components/icss/AddIndeptLabel.vue

@@ -1,9 +1,10 @@
 <template>
     <div class="NoiseTemplateWrapper TemplateWrapper">
         <crumbs
-          :title="txt"
-          class="topBack"
-          linkTo="IndeptLabel"
+                :title="txt"
+                class="topBack"
+                :param="$route.params"
+                linkTo="IndeptLabel"
         ></crumbs>
         <PubIndeptTag
                 @changeVal="changeVal"
@@ -185,7 +186,7 @@
           api.saveOrUpdate(param).then((res) => {
             if (res.data.code === '0') {
               this.warning(res.data.msg || '保存成功', 'success');
-              this.$router.push("/admin/LT-YXSJWH-DLLXBQWH");
+              this.$router.push({name: 'IndeptLabel', params: Object.assign({}, this.$route.params, {currentPage: 1})});
             } else {
               this.warning(res.data.msg)
             }

+ 7 - 7
src/components/icss/AddPhysicalExamTemp.vue

@@ -2,9 +2,10 @@
 <template>
     <div class="AddPhysicalExamTempWrapper">
         <crumbs
-          :title="'查体模板维护系统-'+titleText"
-          class="topBack"
-          linkTo="PhysicalExamTemplate"
+                :title="'查体模板维护系统-'+titleText"
+                class="topBack"
+                :param="$route.params"
+                linkTo="PhysicalExamTemplate"
         ></crumbs>
         <el-form :model="form" ref="ruleForm" :rules="rules" class="addDepartForm">
             <el-form-item label="模板归属:"  >
@@ -137,9 +138,6 @@
         }
     },
     methods: {
-        back(){
-            this.$router.go(-1);
-        },
         getDepartmentList() {
             api.getPhysicalExamTempDepartList().then((res)=>{
                if(res.data.code === '0') {
@@ -275,8 +273,10 @@
                 if (res.data.code  === '0') {
                     this.warning(res.data.msg || '保存成功', 'success','1000')
                     setTimeout(() => {
+                      //返回带搜索条件的首页
                     this.$router.push({
-                        path:'/admin/LT-YXSJWH-CTMBWH'
+                      name: 'PhysicalExamTemplate',
+                      params: Object.assign({}, this.$route.params, {currentPage: 1})
                     })
                     }, 1000);
                 } else {

+ 7 - 3
src/components/icss/AddVersion.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <crumbs :title="title" linkTo="VersionInfo"></crumbs>
+    <crumbs :title="title" :param="$route.params" linkTo="VersionInfo"></crumbs>
     <div class="contents">
       <div class="content">
         <!-- <el-form ref="form" :label-position="labelPosition" label-width="95px" class="add-admin-form" :model="form" :rules="rules"> -->
@@ -137,8 +137,12 @@
                   this.$message({
                     message:"修改成功",
                     type:'success'
-                  })
-                  this.$router.push({path: 'LT-YXSJWH-BBXXWH'});
+                  });
+                  //返回带搜索条件的首页
+                  this.$router.push({
+                    name: 'VersionInfo',
+                    params: Object.assign({}, this.$route.params, {currentPage: 1})
+                  });
                 }else{
                   this.$message({
                     message:res.data.msg,

+ 29 - 3
src/components/icss/ChemicalAndCommonMapping.vue

@@ -103,6 +103,7 @@ export default {
     data: function() {
         return {
             list: [],
+          searched: false,
             filter: {
                 mealName:'',
                 itemName:'',
@@ -117,9 +118,24 @@ export default {
         this.getDataList()
         
     },
+  watch: {
+    'filter': {
+      handler: function () {
+        this.searched = false;
+      },
+      deep: true
+    }
+  },
+  beforeRouteEnter(to, from, next) {
+    next(vm => {
+      //const pm = to.param;
+      Object.assign(vm, to.params);
+    })
+  },
     methods: {
         getDataList() {
             const param = this.getFilterItems();
+          this.searched = true;
             api.getLisMappingPage(param).then((res) => {
                 if(res.data.code == '0') {
                     this.list = res.data.data.records
@@ -132,12 +148,22 @@ export default {
             this.getDataList();
         },
         addRelation() {
-            this.$router.push({name:'AddChemicalAndCommonMapping'})
+          const pam = this.searched ? {
+            currentPage: this.currentPage,
+            filter: this.filter
+          } : {currentPage: this.currentPage};
+          this.$router.push({name: 'AddChemicalAndCommonMapping', params: pam})
         },
         modifyRelation(row) {
-            console.log(row,'row')
             const item = Object.assign({},row);
-            this.$router.push({name:'AddChemicalAndCommonMapping',params:{isEdit:true,data:item}});
+          const pam = this.searched ? {
+            currentPage: this.currentPage,
+            filter: this.filter
+          } : {currentPage: this.currentPage};
+          this.$router.push({
+            name: 'AddChemicalAndCommonMapping',
+            params: Object.assign(pam, {isEdit: true, data: item})
+          });
         },
         currentChange(next) {
             this.currentPage = next;

+ 30 - 3
src/components/icss/IndeptLabel.vue

@@ -118,6 +118,7 @@
         tagTypes: [],
         Adscriptions: [],
         tagTypesList:[],
+        searched: false,
         filter: {
           tagType: [], //标签类型
           controlType: [],
@@ -135,6 +136,20 @@
       })
 
     },
+    watch: {
+      'filter': {
+        handler: function () {
+          this.searched = false;
+        },
+        deep: true
+      }
+    },
+    beforeRouteEnter(to, from, next) {
+      next(vm => {
+        //const pm = to.param;
+        Object.assign(vm, to.params);
+      })
+    },
     methods: {
       getValue(val) {
         console.log('changeVal', val, this.filter.tagAdscription)
@@ -152,6 +167,7 @@
       },
       getDataList() {
         const param = this.getFilterItems();
+        this.searched = true;
         api.getTagList(param).then((res) => {
           const list = [...res.data.data.records];
           for (var i = 0; i < list.length; i++) {
@@ -176,17 +192,28 @@
         this.getDataList();
       },
       addIndeptTag() {
-        this.$router.push({path:'LT-YXSJWH-TJDLBQ'})
+        const pam = this.searched ? {
+          currentPage: this.currentPage,
+          filter: this.filter
+        } : {currentPage: this.currentPage};
+        this.$router.push({
+          name: 'AddIndeptLabel',
+          params: pam
+        })
       },
       modifyIndeptTag(row, type) {
         api.detailsTag({id:row.id}).then((res)=>{
           const {code,data,msg} = res.data;
           if(code=='0'){
             const item = Object.assign({},row,data);
+            const pam = this.searched ? {
+              currentPage: this.currentPage,
+              filter: this.filter
+            } : {currentPage: this.currentPage};
             if(type == 'modify') {
-                this.$router.push({name:'AddIndeptLabel',params:{isEdit:true,data:item}});
+              this.$router.push({name: 'AddIndeptLabel', params: Object.assign(pam, {isEdit: true, data: item})});
             } else if( type == 'copy') {
-                this.$router.push({name:'AddIndeptLabel',params:{isCopy:true,data:item}});
+              this.$router.push({name: 'AddIndeptLabel', params: Object.assign(pam, {isCopy: true, data: item})});
             } else {
                 return
             }

+ 33 - 3
src/components/icss/LabelGroup.vue

@@ -119,6 +119,7 @@ export default {
             tagTypes: [],
             Adscriptions: [],   //标签归属列表
             tagTypesList: [],   //标签类型列表
+          searched: false,
             filter: {
                 tagType: [], //标签类型
                 tagAdscription: '', //标签归属
@@ -135,6 +136,20 @@ export default {
         })
         
     },
+  watch: {
+    'filter': {
+      handler: function () {
+        this.searched = false;
+      },
+      deep: true
+    }
+  },
+  beforeRouteEnter(to, from, next) {
+    next(vm => {
+      //const pm = to.param;
+      Object.assign(vm, to.params);
+    })
+  },
     methods: {
         getValue(val) {
             // console.log('changeVal', val, this.filter.tagAdscription)
@@ -157,6 +172,7 @@ export default {
         },
         getDataList() {
             const param = this.getFilterItems();
+          this.searched = true;
             api.getTagList(param).then((res) => {
                 const list = res.data.data.records
                 for (var i = 0; i < list.length; i++) {
@@ -181,18 +197,32 @@ export default {
             this.getDataList();
         },
         addTagGroup() {
-            this.$router.push({path:'LT-YXSJWH-TJBQZ'})
+          const pam = this.searched ? {
+            currentPage: this.currentPage,
+            filter: this.filter
+          } : {currentPage: this.currentPage};
+          this.$router.push({name: 'AddLabelGroup', params: pam});
         },
         modifyTagGroup(row, type) {
             api.detailsTag({id:row.id}).then((res)=>{
                 const {code,data,msg} = res.data;
                 if(code=='0'){
                     const item = Object.assign({},row,data);
+                  const pam = this.searched ? {
+                    currentPage: this.currentPage,
+                    filter: this.filter
+                  } : {currentPage: this.currentPage};
                     // console.log('item', item)
                     if(type == 'modify') {
-                        this.$router.push({name:'AddLabelGroup',params:{isEdit:true,data:item}});
+                      this.$router.push({
+                        name: 'AddLabelGroup',
+                        params: Object.assign(pam, {isEdit: true, data: item})
+                      });
                     } else if( type == 'copy') {
-                        this.$router.push({name:'AddLabelGroup',params:{isCopy:true,data:item}});
+                      this.$router.push({
+                        name: 'AddLabelGroup',
+                        params: Object.assign(pam, {isCopy: true, data: item})
+                      });
                     } else {
                         return
                     }

+ 7 - 5
src/components/icss/NoiseTemplate.vue

@@ -1,9 +1,10 @@
 <template>
   <div class="NoiseTemplateWrapper TemplateWrapper">
       <crumbs
-      :title="txt"
-      class="topBack"
-      linkTo="labelGroup"
+              :title="txt"
+              class="topBack"
+              :param="$route.params"
+              linkTo="labelGroup"
     ></crumbs>
     <PubTagGroup
       :editData="editData"
@@ -166,7 +167,6 @@ export default {
     },
   },
   methods: {
-    back() { this.$router.go(-1) },
     changeVal(val) {    //子组件数据改变传递到父组件
       this.dataPub = val
       // console.log('公用组件传的值都在这', val)
@@ -249,8 +249,10 @@ export default {
           if (res.data.code === '0') {
             this.warning(res.data.msg || '保存成功', 'success','1000')
             setTimeout(() => {
+              //返回带搜索条件的首页
               this.$router.push({
-                path:'/admin/LT-YXSJWH-BQZWH'
+                name: 'labelGroup',
+                params: Object.assign({}, this.$route.params, {currentPage: 1})
               })
             }, 1000);
           } else {

+ 34 - 9
src/components/icss/PhysicalExamTemplate.vue

@@ -14,9 +14,7 @@
                 </el-form-item>
                 <el-form-item>
                     <el-button size="mini" @click="filterDatas">确认</el-button>
-                    <router-link to="/admin/LT-YXSJWH-TJCTMB" style="margin:0 10px">
-                        <el-button size="mini" type="warning">添加模板</el-button>
-                    </router-link>
+                    <el-button size="mini" type="warning" @click="addModule" style="margin:0 10px">添加模板</el-button>
                 </el-form-item>
             </el-form>
         </crumbs>
@@ -95,16 +93,41 @@
         total: 0,
         linkIn:[],
         pays:[],
+        searched: false,
         filter: {
           deptId: ''
         }
       }
     },
     created() {
-      this.getDeptShortListSearh()
-      this.getDataList();
+      this.getDeptShortListSearh();
+      const that = this;
+      setTimeout(function () {
+        that.getDataList();
+      }, 200);
+    },
+    watch: {
+      'filter': {
+        handler: function () {
+          this.searched = false;
+        },
+        deep: true
+      }
+    },
+    beforeRouteEnter(to, from, next) {
+      next(vm => {
+        //const pm = to.param;
+        Object.assign(vm, to.params);
+      })
     },
     methods: {
+      addModule() {
+        const pam = this.searched ? {
+          currentPage: this.currentPage,
+          filter: this.filter
+        } : {currentPage: this.currentPage};
+        this.$router.push({name: 'AddPhysicalExamTemp', params: pam});
+      },
       toEditProduct(row){
         this.getPhysicalExamTempByDepId('isEdit', row)
       },
@@ -113,8 +136,12 @@
         api.getPhysicalExamTempByDepId(param).then((res)=>{
             const {code,data,msg} = res.data;
             if(code=='0'){
+              const pam = this.searched ? {
+                currentPage: this.currentPage,
+                filter: this.filter
+              } : {currentPage: this.currentPage};
                 const item = Object.assign({},row,data);
-                this.$router.push({name:'AddPhysicalExamTemp',params:{[type]:true,data:item}});
+              this.$router.push({name: 'AddPhysicalExamTemp', params: Object.assign(pam, {[type]: true, data: item})});
             }else{
                 this.$message({
                 message: msg,
@@ -138,9 +165,7 @@
       },
       getDataList() {
         const param = this.getFilterItems();
-        // const param = {
-        //   'name':''
-        // };
+        this.searched = true;
         api.getPhysicalExamTempList(param).then((res) => {
           if (res.data.code == '0') {
             const data = res.data.data;

+ 28 - 3
src/components/icss/TemplateMaintenance.vue

@@ -112,6 +112,7 @@
         AdscriptionsType:[],
         AdscriptionsOwnTo:[],
         tagTypesList: [],
+        searched: false,
         filter: {
           tagType: [], //标签类型
           templateType: '', //模板类型
@@ -137,6 +138,12 @@
       }
     },
     watch: {
+      'filter': {
+        handler: function () {
+          this.searched = false;
+        },
+        deep: true
+      },
       tmpType(newVal, preVal){
         this.filter.tagAdscription = ''
         //根据类型不同删选归属
@@ -169,6 +176,12 @@
         }
       }
     },
+    beforeRouteEnter(to, from, next) {
+      next(vm => {
+        //const pm = to.param;
+        Object.assign(vm, to.params);
+      })
+    },
     methods: {
       getSubTemplate() {
         api.getAllDeptAndDisInfo({}).then((res) => {
@@ -196,6 +209,7 @@
       },
       getDataList() {
         const param = this.getFilterItems();
+        this.searched = true;
         api.getModuleInfoList(param).then((res) => {
           if(res.data.code == 0){
             const list = res.data.data.records
@@ -221,7 +235,11 @@
         this.getDataList();
       },
       addIndeptTag() {
-        this.$router.push({path:'LT-YXSJWH-TJMBWH'})
+        const pam = this.searched ? {
+          currentPage: this.currentPage,
+          filter: this.filter
+        } : {currentPage: this.currentPage};
+        this.$router.push({name: 'TemplateMaintenanceWrap', params: pam})
       },
       modifyIndeptTag(row) {
         // api.detailsTag({ids:row.id}).then((res) => {
@@ -243,8 +261,15 @@
           if(data1.code == 0){
             rightMsg = Object.assign({},data1);
           }
-          allData = Object.assign({},topMsg,rightMsg)
-          this.$router.push({name:'TemplateMaintenanceWrap',params:{isEdit:true,data:allData}});
+          allData = Object.assign({}, topMsg, rightMsg);
+          const pam = this.searched ? {
+            currentPage: this.currentPage,
+            filter: this.filter
+          } : {currentPage: this.currentPage};
+          this.$router.push({
+            name: 'TemplateMaintenanceWrap',
+            params: Object.assign(pam, {isEdit: true, data: allData})
+          });
         })
       },
       currentChange(next) {

+ 8 - 6
src/components/icss/TemplateMaintenanceWrap.vue

@@ -1,9 +1,10 @@
 <template>
   <div class="NoiseTemplateWrapper TemplateWrapper">
     <crumbs
-      :title="txt"
-      class="topBack"
-      linkTo="TemplateMaintenance"
+            :title="txt"
+            class="topBack"
+            :param="$route.params"
+            linkTo="TemplateMaintenance"
     ></crumbs>
     <PubTemplateGroup
       :editData="editData"
@@ -65,7 +66,6 @@ export default {
     }
   },
   methods: {
-    back() { this.$router.go(-1) },
     staticOwn(val){
       this.staticOwnTo = val
     },
@@ -150,10 +150,12 @@ export default {
           this.saveDisable = false  //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
           api.updateModuleInfo(param).then((res) => {
             if (res.data.code === '0') {
-              this.warning(res.data.msg || '修改成功', 'success','1000')
+              this.warning(res.data.msg || '修改成功', 'success', '1000');
+              //返回带搜索条件的首页
               setTimeout(() => {
                 this.$router.push({
-                  path:'/admin/LT-YXSJWH-MBWH'
+                  name: 'TemplateMaintenance',
+                  params: Object.assign({}, this.$route.params, {currentPage: 1})
                 })
               }, 1000);
             } else {

+ 26 - 2
src/components/icss/VersionInfo.vue

@@ -82,6 +82,7 @@
         currentPage: 1,
         pageSize: 10,
         total: 0,
+        searched: false,
         filter: {
           name: ''
         },
@@ -92,18 +93,40 @@
     created() {
       this.getDataList();
     },
+    watch: {
+      'filter': {
+        handler: function () {
+          this.searched = false;
+        },
+        deep: true
+      }
+    },
+    beforeRouteEnter(to, from, next) {
+      next(vm => {
+        //const pm = to.param;
+        Object.assign(vm, to.params);
+      })
+    },
     methods: {
       addVersion(){
         // 添加版本信息
+        const pam = this.searched ? {
+          currentPage: this.currentPage,
+          filter: this.filter
+        } : {currentPage: this.currentPage};
         this.$router.push({
           name:'AddVersion',
-          params: {copy:true}
+          params: pam
         })
       },
       toEditVersion(row,flag){
+        const pam = this.searched ? {
+          currentPage: this.currentPage,
+          filter: this.filter
+        } : {currentPage: this.currentPage};
         this.$router.push({
           name:'AddVersion',
-          params: {info:row,copy:flag}
+          params: Object.assign(pam, {info: row, copy: flag})
         })
       },
       filterDatas(){
@@ -112,6 +135,7 @@
       },
       getDataList() {
         const param = this.getFilterItems();
+        this.searched = true;
         api.versionInfo(param).then((res) => {
           if (res.data.code == '0') {
             const data = res.data.data;