瀏覽代碼

预问诊模板维护返回

zhouna 6 年之前
父節點
當前提交
5395273f89
共有 2 個文件被更改,包括 17 次插入9 次删除
  1. 4 2
      src/components/preTreat/AddQuestionModules.vue
  2. 13 7
      src/components/preTreat/QuestionModules.vue

+ 4 - 2
src/components/preTreat/AddQuestionModules.vue

@@ -3,7 +3,8 @@
         <crumbs
                 :title="txt"
                 class="topBack"
-                linkTo="/admin/LT-YWZSJWH-MBWH"
+                :param="$route.params"
+                linkTo="QuestionModules"
         ></crumbs>
         <div class="PubTagGroupWrapper">
         <el-form class="groups"
@@ -265,7 +266,8 @@
           api.addModule(param).then((res) => {
             if (res.data.code === '0') {
               this.warning(res.data.msg || '保存成功', 'success');
-              this.$router.push("/admin/LT-YWZSJWH-MBWH");
+              //返回带搜索条件的首页
+              this.$router.push({name:'QuestionModules',params:Object.assign({},this.$route.params,{currentPage:1})});
             } else {
               this.warning(res.data.msg)
             }

+ 13 - 7
src/components/preTreat/QuestionModules.vue

@@ -6,7 +6,7 @@
                     <el-input size="mini" v-model="filter.name" placeholder="模板名称" clearable></el-input>
                 </el-form-item>
                 <el-form-item label="归属:">
-                    <el-select size="mini" v-model="filter.type" @change="getValue"  placeholder="归属" clearable>
+                    <el-select size="mini" v-model="filter.type"  placeholder="归属" clearable>
                         <el-option v-if="item.val!=6&&item.val!=7&&item.val!=8&&item.val!=9&&item.val!=10&&item.val!=21&&item.val!=22" v-for="item in Adscriptions" :label="item.name" :value="item.val" :key="item.id" ></el-option>
                     </el-select>
                 </el-form-item>
@@ -16,7 +16,7 @@
                     </el-select>
                 </el-form-item>
                 <el-form-item label="归属科室:" v-if="filter.moduleType==1">
-                    <el-select size="mini" v-model="filter.relationId" @change="getValue"  placeholder="归属" clearable>
+                    <el-select size="mini" v-model="filter.relationId"  placeholder="归属" clearable>
                         <el-option v-for="item in deptList" :label="item.name" :value="item.conceptId" :key="item.conceptId" ></el-option>
                     </el-select>
                 </el-form-item>
@@ -120,10 +120,13 @@
     created() {
       this.getDropList();
     },
+    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)
-      },
       getDropList() {
         api.getPreTypeList().then((res) =>{
           this.getDataList();
@@ -182,14 +185,17 @@
         this.getDataList();
       },
       addModule() {
-        this.$router.push({path:'LT-YWZSJWH-TJMBWH'});
+        this.$router.push({name:'AddQuestionModules',
+          params:{currentPage:this.currentPage,
+            filter:this.filter}});
       },
       modifyModule(row) {
         api.getModuleDetail({moduleId:row.id,type:row.type}).then((res)=>{
           const {code,data,msg} = res.data;
           if(code=='0'){
             const item = Object.assign({},row,data);
-            this.$router.push({name:'AddQuestionModules',params:{isEdit:true,data:item}});
+            this.$router.push({name:'AddQuestionModules',params:{isEdit:true,data:item,currentPage:this.currentPage,
+                filter:this.filter}});
           }else{
             this.$message({
               message: msg,