Просмотр исходного кода

筛选条件不确认翻页修改2056

zhouna 6 лет назад
Родитель
Сommit
7098fac0f0

+ 8 - 4
src/components/icss/AssaySon.vue

@@ -119,8 +119,8 @@
     })
   },
     methods: {
-        getDataList() {
-            const param = this.getFilterItems();
+        getDataList(isTurnPage) {
+            const param = this.getFilterItems(isTurnPage);
             this.searched = true;
             api.getAssaySon(param).then((res) => {
                 if(res.data.code == '0') {
@@ -159,9 +159,13 @@
         },
         currentChange(next) {
             this.currentPage = next;
-            this.getDataList();
+            this.getDataList(true);
         },
-        getFilterItems() {
+        getFilterItems(isTurnPage) {
+          //翻页时筛选条件没点确定则清空
+          if(isTurnPage&&!this.searched){
+            this.filter.conceptName='';
+          };
             const param = {
                 current: this.currentPage,
                 size: this.pageSize,

+ 16 - 9
src/components/icss/ChemicalAndCommonMapping.vue

@@ -133,8 +133,8 @@ export default {
     })
   },
     methods: {
-        getDataList() {
-            const param = this.getFilterItems();
+        getDataList(isTurnPage) {
+            const param = this.getFilterItems(isTurnPage);
           this.searched = true;
             api.getLisMappingPage(param).then((res) => {
                 if(res.data.code == '0') {
@@ -167,14 +167,25 @@ export default {
         },
         currentChange(next) {
             this.currentPage = next;
-            this.getDataList();
+            this.getDataList(true);
             // if (this.cacheData[next]) {       //如果已请求过该页数据,则使用缓存不重复请求
             //     this.list = this.cacheData[next];
             // } else {
             //     this.getDataList();
             // }
         },
-        getFilterItems() {
+      clearFilter(){
+        this.filter={
+          mealName:'',
+          itemName:'',
+          uniqueName:''
+        };
+      },
+        getFilterItems(isTurnPage) {
+          //翻页时筛选条件没点确定则清空
+          if(isTurnPage&&!this.searched){
+            this.clearFilter();
+          };
             const param = {
                 current: this.currentPage,
                 size: this.pageSize,
@@ -211,11 +222,7 @@ export default {
               if(res.data.code=='0'){
                 if(!this.searched){
                   //未点确认时清空搜索条件
-                  this.filter={
-                    mealName:'',
-                    itemName:'',
-                    uniqueName:''
-                  };
+                  this.clearFilter();
                 }
                 if(this.list.length==1){
                   //当前在最后一页且只有一条数据时,删除后跳到前一页

+ 8 - 4
src/components/icss/ChronicAndIndexRelation.vue

@@ -125,8 +125,8 @@
     })
   },
     methods: {
-        getDataList() {
-            const param = this.getFilterItems();
+        getDataList(isTurnPage) {
+            const param = this.getFilterItems(isTurnPage);
             this.searched = true;
             api.queryIndexConfigPages(param).then((res) => {
                 if(res.data.code == '0') {
@@ -163,14 +163,18 @@
         },
         currentChange(next) {
             this.currentPage = next;
-            this.getDataList();
+            this.getDataList(true);
             // if (this.cacheData[next]) {       //如果已请求过该页数据,则使用缓存不重复请求
             //     this.list = this.cacheData[next];
             // } else {
             //     this.getDataList();
             // }
         },
-        getFilterItems() {
+        getFilterItems(isTurnPage) {
+          //翻页时筛选条件没点确定则清空
+          if(isTurnPage&&!this.searched){
+            this.filter.diseaseName='';
+          };
             const param = {
                 current: this.currentPage,
                 size: this.pageSize,

+ 16 - 9
src/components/icss/ChronicDiseaseStructureList.vue

@@ -144,8 +144,8 @@
           }
         })
       },
-      getDataList() {
-        const param = this.getFilterItems();
+      getDataList(isTurnPage) {
+        const param = this.getFilterItems(isTurnPage);
         this.searched = true;
         api.scaleContentStructure(param).then((res) => {
           const list = res.data.data.records;
@@ -190,9 +190,13 @@
       },
       currentChange(next) {
         this.currentPage = next;
-        this.getDataList();
+        this.getDataList(true);
       },
-      getFilterItems() {
+      getFilterItems(isTurnPage) {
+        //翻页时筛选条件没点确定则清空
+        if(isTurnPage&&!this.searched){
+          this.clearFilter();
+        };
         const param = {
           current: this.currentPage,
           size: this.pageSize,
@@ -219,6 +223,13 @@
           resolve();
         }).catch(() => {});
       },
+      clearFilter(){
+        this.filter={
+          isState:'',
+          tagType: [], //标签类型
+          tagSysName: '', //标签系统名称
+        };
+      },
       showDelDialog(item){
         let tmpArr = []
         tmpArr.push(item.conceptId)
@@ -232,11 +243,7 @@
             if(res.data.code=='0'){
               if(!this.searched){
                 //未点确认时清空搜索条件
-                this.filter={
-                  isState:'',
-                  tagType: [], //标签类型
-                  tagSysName: '', //标签系统名称
-                };
+                this.clearFilter();
               }
               if(item.isDeleted !== 'N'){       //恢复成功后跳转到筛选条件的首页
                 this.currentPage = 1;

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

@@ -118,8 +118,8 @@ export default {
     })
   },
     methods: {
-        getDataList() {
-            const param = this.getFilterItems();
+        getDataList(isTurnPage) {
+            const param = this.getFilterItems(isTurnPage);
             this.searched = true;
             api.getConceptRelation(param).then((res) => {
               if(res.data.code == '0') {
@@ -162,9 +162,15 @@ export default {
         },
         currentChange(next) {
             this.currentPage = next;
-            this.getDataList();
+            this.getDataList(true);
         },
-        getFilterItems() {
+        getFilterItems(isTurnPage) {
+          //翻页时筛选条件没点确定则清空
+          if(isTurnPage&&!this.searched){
+            this.filter={
+              conceptName:''
+            };
+          };
             const param = {
                 current: this.currentPage,
                 size: this.pageSize,

+ 8 - 4
src/components/icss/DisclaimerInformation.vue

@@ -138,8 +138,8 @@
         this.currentPage = 1;
         this.getDataList();
       },
-      getDataList() {
-        const param = this.getFilterItems();
+      getDataList(isTurnPage) {
+        const param = this.getFilterItems(isTurnPage);
         this.searched = true;
         api.discInformation(param).then((res) => {
           if (res.data.code == '0') {
@@ -155,7 +155,11 @@
       getDetail(item) {
         this.$router.push({name:'DiscInfoDetail', params:{info: item}})
       },
-      getFilterItems() {
+      getFilterItems(isTurnPage) {
+        //翻页时筛选条件没点确定则清空
+        if(isTurnPage&&!this.searched){
+          this.filter.title='';
+        };
         const param = {
           title: this.filter.title,
           current: this.currentPage,
@@ -171,7 +175,7 @@
         /*if (this.cacheData[next]) {       //如果已请求过该页数据,则使用缓存不重复请求
           this.list = this.cacheData[next];
         } else {*/
-          this.getDataList();
+          this.getDataList(true);
         //}
       },
       warning(msg,type){

+ 17 - 10
src/components/icss/IndeptLabel.vue

@@ -165,8 +165,8 @@
 
         })
       },
-      getDataList() {
-        const param = this.getFilterItems();
+      getDataList(isTurnPage) {
+        const param = this.getFilterItems(isTurnPage);
         this.searched = true;
         api.getTagList(param).then((res) => {
           const list = [...res.data.data.records];
@@ -228,14 +228,26 @@
       },
       currentChange(next) {
         this.currentPage = next;
-        this.getDataList();
+        this.getDataList(true);
         // if (this.cacheData[next]) {       //如果已请求过该页数据,则使用缓存不重复请求
         //     this.list = this.cacheData[next];
         // } else {
         //     this.getDataList();
         // }
       },
-      getFilterItems() {
+      clearFilter(){
+        this.filter={
+          tagType: [], //标签类型
+          controlType: [],
+          tagAdscription: '', //标签归属
+          tagSysName: '', //标签系统名称
+        };
+      },
+      getFilterItems(isTurnPage) {
+        //翻页时筛选条件没点确定则清空
+        if(isTurnPage&&!this.searched){
+          this.clearFilter();
+        };
         const param = {
           tagTypeList: [1],
           current: this.currentPage,
@@ -277,12 +289,7 @@
             if(res.data.code=='0'){
               if(!this.searched){
                 //未点确认时清空搜索条件
-                this.filter={
-                  tagType: [], //标签类型
-                  controlType: [],
-                  tagAdscription: '', //标签归属
-                  tagSysName: '', //标签系统名称
-                };
+                this.clearFilter();
               }
               if(this.list.length==1){
                 //当前在最后一页且只有一条数据时,删除后跳到前一页

+ 16 - 9
src/components/icss/LabelGroup.vue

@@ -170,8 +170,8 @@ export default {
                  
             })
         },
-        getDataList() {
-            const param = this.getFilterItems();
+        getDataList(isTurnPage) {
+            const param = this.getFilterItems(isTurnPage);
           this.searched = true;
             api.getTagList(param).then((res) => {
                 const list = res.data.data.records
@@ -236,14 +236,18 @@ export default {
         },
         currentChange(next) {
             this.currentPage = next;
-            this.getDataList();
+            this.getDataList(true);
             // if (this.cacheData[next]) {       //如果已请求过该页数据,则使用缓存不重复请求
             //     this.list = this.cacheData[next];
             // } else {
             //     this.getDataList();
             // }
         },
-        getFilterItems() {
+        getFilterItems(isTurnPage) {
+          //翻页时筛选条件没点确定则清空
+          if(isTurnPage&&!this.searched){
+            this.clearFilter();
+          };
             const param = {
                 tagTypeList: this.filter.tagType[0] && this.filter.tagType|| this.tagTypesList,
                 current: this.currentPage,
@@ -275,17 +279,20 @@ export default {
             resolve();
           }).catch(() => {});
         },
+      clearFilter(){
+        this.filter={
+          tagType: [], //标签类型
+          tagAdscription: '', //标签归属
+          tagSysName: '', //标签系统名称
+        };
+      },
         showDelDialog(id,type){
           this.showConfirmDialog('是否删除该标签组?',()=>{
             api.deleteTagGroup({ids:id,type:type}).then((res)=>{
               if(res.data.code=='0'){
                 if(!this.searched){
                   //未点确认时清空搜索条件
-                  this.filter={
-                    tagType: [], //标签类型
-                    tagAdscription: '', //标签归属
-                    tagSysName: '', //标签系统名称
-                  };
+                  this.clearFilter();
                 }
                 if(this.list.length==1){
                   //当前在最后一页且只有一条数据时,删除后跳到前一页

+ 15 - 8
src/components/icss/MedicalMultRelation.vue

@@ -152,8 +152,8 @@
         this.currentPage = 1;
         this.getDataList();
       },
-      getDataList() {
-        const param = this.getFilterItems();
+      getDataList(isTurnPage) {
+        const param = this.getFilterItems(isTurnPage);
         this.searched = true;
         api.multContactList(param).then((res) => {
           if (res.data.code == '0') {
@@ -181,7 +181,11 @@
       /*getDetailList(id) {
         this.$router.push({name:'DeptInfoDetail', params:{id: id}})
       },*/
-      getFilterItems() {
+      getFilterItems(isTurnPage) {
+        //翻页时筛选条件没点确定则清空
+        if(isTurnPage&&!this.searched){
+          this.clearFilter();
+        };
         const param = {
           name: this.filter.term,
           current: this.currentPage,
@@ -199,7 +203,7 @@
         if (this.cacheData[next]) {       //如果已请求过该页数据,则使用缓存不重复请求
           this.list = this.cacheData[next];
         } else {
-          this.getDataList();
+          this.getDataList(true);
         }
       },
       warning(msg,type){
@@ -234,10 +238,7 @@
             if(res.data.code=='0'){
               if(!this.searched){
                 //未点确认时清空搜索条件
-                this.filter={
-                  term:'',
-                  type:''
-                };
+                this.clearFilter();
               }
               if(this.list.length==1){
                 //当前在最后一页且只有一条数据时,删除后跳到前一页
@@ -253,6 +254,12 @@
           })
         });
       },
+      clearFilter(){
+        this.filter={
+          term:'',
+          type:''
+        };
+      },
       uploadClick(){
         let inp = document.getElementById("upFile");
         inp.click();

+ 17 - 10
src/components/icss/MedicalName.vue

@@ -183,8 +183,8 @@
         this.currentPage = 1;
         this.getDataList();
       },
-      getDataList() {
-        const param = this.getFilterItems();
+      getDataList(isTurnPage) {
+        const param = this.getFilterItems(isTurnPage);
         this.searched = true;
         api.knowledgeName(param).then((res) => {
           if (res.data.code == '0') {
@@ -212,7 +212,11 @@
       /*getDetailList(id) {
         this.$router.push({name:'DeptInfoDetail', params:{id: id}})
       },*/
-      getFilterItems() {
+      getFilterItems(isTurnPage) {
+        //翻页时筛选条件没点确定则清空
+        if(isTurnPage&&!this.searched){
+          this.clearFilter();
+        };
         const param = {
           name: this.filter.term,
           current: this.currentPage,
@@ -231,7 +235,7 @@
         // if (this.cacheData[next]) {       //如果已请求过该页数据,则使用缓存不重复请求
         //   this.list = this.cacheData[next];
         // } else {
-          this.getDataList();
+          this.getDataList(true);
         // }
       },
       warning(msg,type){
@@ -265,12 +269,7 @@
             if(res.data.code=='0') {
               if (!this.searched) {
                 //未点确认时清空搜索条件
-                this.filter = {
-                  term:'',
-                  type:'',
-                  libName:'',
-                  isState:'',
-                };
+                this.clearFilter();
               }
               if (item.isDeleted !== 'N') {       //恢复成功后跳转到筛选条件的首页
                 this.currentPage = 1;
@@ -290,6 +289,14 @@
           })
         });
       },
+      clearFilter(){
+        this.filter = {
+          term:'',
+          type:'',
+          libName:'',
+          isState:'',
+        };
+      },
       uploadClick(){
         let inp = document.getElementById("upFile");
         inp.click();

+ 17 - 10
src/components/icss/MedicalRelation.vue

@@ -182,8 +182,8 @@
         this.currentPage = 1;
         this.getDataList(1);
       },
-      getDataList(flag) {
-        const params = this.getFilterItems();
+      getDataList(flag,isTurnPage) {
+        const params = this.getFilterItems(isTurnPage);
         this.searched = true;
         api.knowledgeRelation(params).then((res) => {
           if (res.data.code == '0') {
@@ -220,7 +220,11 @@
           }
         })
       },*/
-      getFilterItems() {
+      getFilterItems(isTurnPage) {
+        //翻页时筛选条件没点确定则清空
+        if(isTurnPage&&!this.searched){
+          this.clearFilter();
+        };
         const param = {
           current: this.currentPage,
           size: this.pageSize,
@@ -239,7 +243,7 @@
         /*if (this.cacheData[next]) {       //如果已请求过该页数据,则使用缓存不重复请求
           this.list = this.cacheData[next];
         } else {*/
-          this.getDataList();
+          this.getDataList(1,true);
         //}
       },
       warning(msg,type){
@@ -268,12 +272,7 @@
             if(res.data.code=='0'){
               if(!this.searched){
                 //未点确认时清空搜索条件
-                this.filter={
-                  isState:'',
-                  startName:'',
-                  endName:'',
-                  type:'',
-                };
+                this.clearFilter();
               }
               if(item.isDeleted !== 'N'){       //恢复成功后跳转到筛选条件的首页
                 this.currentPage = 1;
@@ -293,6 +292,14 @@
           })
         });
       },
+      clearFilter(){
+        this.filter={
+          isState:'',
+          startName:'',
+          endName:'',
+          type:'',
+        };
+      },
       uploadClick(){
         let inp = document.getElementById("upFile");
         inp.click();

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

@@ -146,8 +146,8 @@
         this.currentPage = 1;
         this.getDataList();
       },
-      getDataList() {
-        const param = this.getFilterItems();
+      getDataList(isTurnPage) {
+        const param = this.getFilterItems(isTurnPage);
         this.searched = true;
         api.getConceptKnowledgeList(param).then((res) => {
           if (res.data.code == '0') {
@@ -160,7 +160,17 @@
           console.log(error);
         });
       },
-      getFilterItems() {
+      clearFilter(){
+        this.filter={
+          term: '',
+          title:''
+        };
+      },
+      getFilterItems(isTurnPage) {
+        //翻页时筛选条件没点确定则清空
+        if(isTurnPage&&!this.searched){
+          this.clearFilter();
+        };
         const param = {
           conceptName:this.filter.term,
           title:this.filter.title,
@@ -177,7 +187,7 @@
         /*if (this.cacheData[next]) {       //如果已请求过该页数据,则使用缓存不重复请求
           this.list = this.cacheData[next];
         } else {*/
-          this.getDataList();
+          this.getDataList(true);
         //}
       },
       warning(msg,type){
@@ -203,10 +213,7 @@
             if(res.data.code=='0'){
               if(!this.searched){
                 //未点确认时清空搜索条件
-                this.filter={
-                  term: '',
-                  title:''
-                };
+                this.clearFilter();
               }
               this.warning(res.data.msg||'操作成功','success');
               this.getDataList();

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

@@ -163,8 +163,8 @@
           }
         })
       },
-      getDataList() {
-        const param = this.getFilterItems();
+      getDataList(isTurnPage) {
+        const param = this.getFilterItems(isTurnPage);
         this.searched = true;
         api.getPhysicalExamTempList(param).then((res) => {
           if (res.data.code == '0') {
@@ -179,7 +179,11 @@
       getDetailList(row) {
          this.getPhysicalExamTempByDepId('isDetail', row)
       },
-      getFilterItems() {
+      getFilterItems(isTurnPage) {
+        //翻页时筛选条件没点确定则清空
+        if(isTurnPage&&!this.searched){
+          this.filter.deptId='';
+        };
         const param = {
           deptId: this.filter.deptId,
           current: this.currentPage,
@@ -195,7 +199,7 @@
         if (this.cacheData[next]) {       //如果已请求过该页数据,则使用缓存不重复请求
           this.list = this.cacheData[next];
         } else {
-          this.getDataList();
+          this.getDataList(true);
         }
       },
       warning(msg,type){

+ 21 - 11
src/components/icss/TemplateMaintenance.vue

@@ -209,12 +209,12 @@
           }
         })
       },
-      getDataList() {
-        const param = this.getFilterItems();
+      getDataList(isTurnPage) {
+        const param = this.getFilterItems(isTurnPage);
         this.searched = true;
         api.getModuleInfoList(param).then((res) => {
           if(res.data.code == 0){
-            const list = res.data.data.records
+            const list = res.data.data.records;
             for (var i = 0; i < list.length; i++) {
               for (var z =  0; z < this.Adscriptions.length; z++) {
                 if(list[i].type === this.Adscriptions[z].val) {
@@ -271,9 +271,17 @@
       },
       currentChange(next) {
         this.currentPage = next;
-        this.getDataList();
+        this.getDataList(true);
       },
-      getFilterItems() {
+      getFilterItems(isTurnPage) {
+        //翻页时筛选条件没点确定则清空
+        if(isTurnPage&&!this.searched){
+          this.filter={
+            templateType: '', //模板类型
+            ownTo: '', //属于科室、慢病
+            tagAdscription: '', //标签归属
+          };
+        };
         const param = {
           current: this.currentPage,
           size: this.pageSize,
@@ -301,18 +309,20 @@
           resolve();
         }).catch(() => {});
       },
+      clearfilter(){
+        this.filter={
+          templateType: '', //模板类型
+          ownTo: '', //属于科室、慢病
+          tagAdscription: '', //标签归属
+        };
+      },
       showDelDialog(id,type){
         this.showConfirmDialog('是否删除该标签?',()=>{
           api.delTemplate({ids:id,type:type}).then((res)=>{
             if(res.data.code=='0'){
               if(!this.searched){
                 //未点确认时清空搜索条件
-                this.filter={
-                  tagType: [], //标签类型
-                  templateType: '', //模板类型
-                  ownTo: '', //属于科室、慢病
-                  tagAdscription: '', //标签归属
-                };
+                this.clearfilter();
               }
               if(this.list.length==1){
                 //当前在最后一页且只有一条数据时,删除后跳到前一页

+ 8 - 4
src/components/icss/VersionInfo.vue

@@ -133,8 +133,8 @@
         this.currentPage = 1;
         this.getDataList();
       },
-      getDataList() {
-        const param = this.getFilterItems();
+      getDataList(isTurnPage) {
+        const param = this.getFilterItems(isTurnPage);
         this.searched = true;
         api.versionInfo(param).then((res) => {
           if (res.data.code == '0') {
@@ -156,7 +156,11 @@
         let isFirst = false;
         this.$router.push({name:'VersionDetail', params:{info:item,isFirst}});
       },
-      getFilterItems() {
+      getFilterItems(isTurnPage) {
+        //翻页时筛选条件没点确定则清空
+        if(isTurnPage&&!this.searched){
+          this.filter.name='';
+        };
         const param = {
           name: this.filter.name,
           current: this.currentPage,
@@ -172,7 +176,7 @@
         if (this.cacheData[next]) {       //如果已请求过该页数据,则使用缓存不重复请求
           this.list = this.cacheData[next];
         } else {
-          this.getDataList();
+          this.getDataList(true);
         }
       }
     }

+ 13 - 5
src/components/preTreat/CombinQuestion.vue

@@ -139,8 +139,8 @@
 
         })
       },
-      getDataList() {
-        const param = this.getFilterItems();
+      getDataList(isTurnPage) {
+        const param = this.getFilterItems(isTurnPage);
         this.searched = true;
         api.getQuestionList(param).then((res) => {
           const list = [...res.data.data.records];
@@ -189,10 +189,18 @@
       },
       currentChange(next) {
         this.currentPage = next;
-        this.getDataList();
+        this.getDataList(true);
       },
-      getFilterItems() {
-        const param = {
+      getFilterItems(isTurnPage) {
+        //翻页时筛选条件没点确定则清空
+        if(isTurnPage&&!this.searched){
+          this.filter = {
+            tagType: [], //标签类型
+            tagAdscription: '', //标签归属
+            tagSysName: '', //标签系统名称
+          }
+        };
+        let param = {
           tagTypeList: this.filter.tagType[0] ? this.filter.tagType: [4,6],
           current: this.currentPage,
           size: this.pageSize,

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

@@ -160,8 +160,8 @@
           }
         });
       },
-      getDataList() {
-        const param = this.getFilterItems();
+      getDataList(isTurnPage) {
+        const param = this.getFilterItems(isTurnPage);
         this.searched = true;
         api.getModuleList(param).then((res) => {
           if (res.data.code === '0') {
@@ -218,9 +218,18 @@
       },
       currentChange(next) {
         this.currentPage = next;
-        this.getDataList();
+        this.getDataList(true);
       },
-      getFilterItems() {
+      getFilterItems(isTurnPage) {
+        //翻页时筛选条件没点确定则清空
+        if(isTurnPage&&!this.searched){
+          this.filter = {
+            name: '', //模板名称
+            type: '', //模板归属
+            moduleType: '', //模板类型
+            relationId:'',  //归属科室
+          }
+        };
         const param = {
           name: this.filter.name,
           type:this.filter.type,

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

@@ -140,8 +140,8 @@
 
         })
       },
-      getDataList() {
-        const param = this.getFilterItems();
+      getDataList(isTurnPage) {
+        const param = this.getFilterItems(isTurnPage);
         this.searched = true;
         api.getQuestionList(param).then((res) => {
           const list = [...res.data.data.records];
@@ -207,14 +207,23 @@
       },
       currentChange(next) {
         this.currentPage = next;
-        this.getDataList();
+        this.getDataList(true);
         // if (this.cacheData[next]) {       //如果已请求过该页数据,则使用缓存不重复请求
         //     this.list = this.cacheData[next];
         // } else {
         //     this.getDataList();
         // }
       },
-      getFilterItems() {
+      getFilterItems(isTurnPage) {
+        //翻页时筛选条件没点确定则清空
+        if(isTurnPage&&!this.searched){
+          this.filter = {
+            tagType: [], //标签类型
+            controlType: [],
+            tagAdscription: '', //标签归属
+            tagSysName: '', //标签系统名称
+          }
+        };
         const param = {
           tagTypeList: [1],
           current: this.currentPage,