Prechádzať zdrojové kódy

最后一页只有一条数据删除后跳到上一页2020

zhouna 6 rokov pred
rodič
commit
11d1587dc7

+ 4 - 0
src/components/icss/ChemicalAndCommonMapping.vue

@@ -217,6 +217,10 @@ export default {
                     uniqueName:''
                   };
                 }
+                if(this.list.length==1){
+                  //当前在最后一页且只有一条数据时,删除后跳到前一页
+                  this.currentPage = this.currentPage===1?1:this.currentPage-1;
+                }
                 this.getDataList();
                 this.warning(res.data.msg || '操作成功','success');
               }else{

+ 4 - 0
src/components/icss/ConceptRelation.vue

@@ -208,6 +208,10 @@ export default {
                     conceptName:''
                   };
                 }
+                if(this.list.length==1){
+                  //当前在最后一页且只有一条数据时,删除后跳到前一页
+                  this.currentPage = this.currentPage===1?1:this.currentPage-1;
+                }
                 this.getDataList();
                 this.warning(res.data.msg || '操作成功','success');
               }else{

+ 4 - 0
src/components/icss/IndeptLabel.vue

@@ -284,6 +284,10 @@
                   tagSysName: '', //标签系统名称
                 };
               }
+              if(this.list.length==1){
+                //当前在最后一页且只有一条数据时,删除后跳到前一页
+                this.currentPage = this.currentPage===1?1:this.currentPage-1;
+              }
               this.getDataList();
               this.warning(res.data.msg || '操作成功','success');
             }else{

+ 4 - 0
src/components/icss/MedicalMultRelation.vue

@@ -239,6 +239,10 @@
                   type:''
                 };
               }
+              if(this.list.length==1){
+                //当前在最后一页且只有一条数据时,删除后跳到前一页
+                this.currentPage = this.currentPage===1?1:this.currentPage-1;
+              }
               this.warning(res.data.msg||'操作成功','success');
               this.getDataList();
             }else{

+ 4 - 0
src/components/icss/PhysicalExamTemplate.vue

@@ -223,6 +223,10 @@
                   deptId: ''
                 };
               }
+              if(this.list.length==1){
+                //当前在最后一页且只有一条数据时,删除后跳到前一页
+                this.currentPage = this.currentPage===1?1:this.currentPage-1;
+              }
               this.warning(res.data.msg||'操作成功','success');
               this.getDataList();
             }else{

+ 4 - 0
src/components/icss/TemplateMaintenance.vue

@@ -318,6 +318,10 @@
                   tagSysName: '', //标签系统名称
                 };
               }
+              if(this.list.length==1){
+                //当前在最后一页且只有一条数据时,删除后跳到前一页
+                this.currentPage = this.currentPage===1?1:this.currentPage-1;
+              }
               this.getDataList();
               this.warning(res.data.msg || '操作成功','success');
             }else{

+ 4 - 0
src/components/preTreat/CombinQuestion.vue

@@ -238,6 +238,10 @@
                   tagSysName: '', //标签系统名称
                 };
               }
+              if(this.list.length==1){
+                //当前在最后一页且只有一条数据时,删除后跳到前一页
+                this.currentPage = this.currentPage===1?1:this.currentPage-1;
+              }
               this.getDataList();
               this.warning(res.data.msg || '操作成功','success');
             }else{

+ 4 - 0
src/components/preTreat/QuestionModules.vue

@@ -268,6 +268,10 @@
                   relationId:'',  //归属科室
                 };
               }
+              if(this.list.length==1){
+                //当前在最后一页且只有一条数据时,删除后跳到前一页
+                this.currentPage = this.currentPage===1?1:this.currentPage-1;
+              }
               this.getDataList();
               this.warning(res.data.msg || '操作成功','success');
             }else{

+ 4 - 0
src/components/preTreat/SimpleQuestion.vue

@@ -263,6 +263,10 @@
                     tagSysName: '', //标签系统名称
                 };
               }
+              if(this.list.length==1){
+                //当前在最后一页且只有一条数据时,删除后跳到前一页
+                this.currentPage = this.currentPage===1?1:this.currentPage-1;
+              }
               this.getDataList();
               this.warning(res.data.msg || '操作成功','success');
             }else{