Browse Source

术语维护添加每页条数选择

zhouna 5 years ago
parent
commit
3c7ee1130b

+ 18 - 6
src/components/icss/AssaySon.vue

@@ -67,12 +67,13 @@
                 </el-table-column>
             </el-table>
         <div class="pagination">
-            <el-pagination v-if="total>pageSize"
-                       :current-page.sync="currentPage"
+            <el-pagination :current-page.sync="currentPage"
                        @current-change="currentChange"
                        background
                        :page-size="pageSize"
-                       layout="total,prev, pager, next, jumper"
+                       :page-sizes="pageSizeArr"
+                       @size-change="handleSizeChange"
+                       :layout="pageLayout"
                        :total="total">
             </el-pagination>
         </div>       
@@ -82,6 +83,7 @@
 
 <script>
   import api from '@api/icss.js';
+  import config from '@api/config.js';
 
   export default {
     name: 'AssaySon',   //慢病指标值关联维护
@@ -93,7 +95,9 @@
               conceptName:'',
             },
             currentPage: 1,
-            pageSize: 10,
+          pageSize: config.pageSize,
+          pageSizeArr:config.pageSizeArr,
+          pageLayout:config.pageLayout,
             total: 0,
         }
     },
@@ -119,6 +123,10 @@
     })
   },
     methods: {
+      handleSizeChange(val){
+        this.pageSize = val;
+        this.getDataList();
+      },
         getDataList(isTurnPage) {
             const param = this.getFilterItems(isTurnPage);
             this.searched = true;
@@ -136,8 +144,10 @@
         addRelation() {
           const pam = this.searched ? {
             currentPage: this.currentPage,
+            pageSize:this.pageSize,
             filter: this.filter
-          } : {currentPage: this.currentPage};
+          } : {currentPage: this.currentPage,
+            pageSize:this.pageSize};
             this.$router.push({name:'AddAssaySon', params: pam})
         },
         modifyRelation(row) {
@@ -151,8 +161,10 @@
                 if(res.data.code == '0') {
                   const pam = this.searched ? {
                     currentPage: this.currentPage,
+                    pageSize:this.pageSize,
                     filter: this.filter
-                  } : {currentPage: this.currentPage};
+                  } : {currentPage: this.currentPage,
+                    pageSize:this.pageSize};
                     // const item = Object.assign({},row,{data: res.data.data});
                     const item = res.data.data;
                     this.$router.push({name:'AddAssaySon',params:Object.assign(pam, {isEdit:true,data:item})});

+ 23 - 18
src/components/icss/ChemicalAndCommonMapping.vue

@@ -70,33 +70,24 @@
                 </el-table-column>
             </el-table>
         <div class="pagination">
-            <el-pagination v-if="total>pageSize"
-                       :current-page.sync="currentPage"
+            <el-pagination :current-page.sync="currentPage"
                        @current-change="currentChange"
                        background
                        :page-size="pageSize"
-                       layout="total,prev, pager, next, jumper"
+                       :page-sizes="pageSizeArr"
+                       @size-change="handleSizeChange"
+                       :layout="pageLayout"
                        :total="total">
             </el-pagination>
         </div>
-        
         </div>
-       <!--  <div class="pagination">
-           <el-pagination v-if="total>pageSize"
-                      :current-page.sync="currentPage"
-                      @current-change="currentChange"
-                      background
-                      :page-size="pageSize"
-                      layout="total,prev, pager, next, jumper"
-                      :total="total">
-           </el-pagination>
-       </div> -->
         
     </div>
 </template>
 
 <script>
 import api from '@api/icss.js';
+import config from '@api/config.js';
 
 export default {
     name: 'ChemicalAndCommonMapping',   //化验大小项和公表维护
@@ -110,12 +101,18 @@ export default {
                 uniqueName:''
             },
             currentPage: 1,
-            pageSize: 10,
+          pageSize: config.pageSize,
+          pageSizeArr:config.pageSizeArr,
+          pageLayout:config.pageLayout,
             total: 0,
         }
     },
     created() {
-        this.getDataList()
+      const that = this;
+      //返回时避免参数未赋值就获取列表
+      setTimeout(function() {
+        that.getDataList();
+      });
         
     },
   watch: {
@@ -133,6 +130,10 @@ export default {
     })
   },
     methods: {
+      handleSizeChange(val){
+        this.pageSize = val;
+        this.getDataList();
+      },
         getDataList(isTurnPage) {
             const param = this.getFilterItems(isTurnPage);
           this.searched = true;
@@ -150,16 +151,20 @@ export default {
         addRelation() {
           const pam = this.searched ? {
             currentPage: this.currentPage,
+            pageSize:this.pageSize,
             filter: this.filter
-          } : {currentPage: this.currentPage};
+          } : {currentPage: this.currentPage,
+            pageSize:this.pageSize};
           this.$router.push({name: 'AddChemicalAndCommonMapping', params: pam})
         },
         modifyRelation(row) {
             const item = Object.assign({},row);
           const pam = this.searched ? {
             currentPage: this.currentPage,
+            pageSize:this.pageSize,
             filter: this.filter
-          } : {currentPage: this.currentPage};
+          } : {currentPage: this.currentPage,
+            pageSize:this.pageSize};
           this.$router.push({
             name: 'AddChemicalAndCommonMapping',
             params: Object.assign(pam, {isEdit: true, data: item})

+ 18 - 18
src/components/icss/ChronicAndIndexRelation.vue

@@ -62,33 +62,23 @@
                 </el-table-column>
             </el-table>
         <div class="pagination">
-            <el-pagination v-if="total>pageSize"
-                       :current-page.sync="currentPage"
+            <el-pagination :current-page.sync="currentPage"
                        @current-change="currentChange"
                        background
                        :page-size="pageSize"
-                       layout="total,prev, pager, next, jumper"
+                       :page-sizes="pageSizeArr"
+                       @size-change="handleSizeChange"
+                       :layout="pageLayout"
                        :total="total">
             </el-pagination>
         </div>
-        
         </div>
-       <!--  <div class="pagination">
-           <el-pagination v-if="total>pageSize"
-                      :current-page.sync="currentPage"
-                      @current-change="currentChange"
-                      background
-                      :page-size="pageSize"
-                      layout="total,prev, pager, next, jumper"
-                      :total="total">
-           </el-pagination>
-       </div> -->
-        
     </div>
 </template>
 
 <script>
   import api from '@api/icss.js';
+  import config from '@api/config.js';
 
   export default {
     name: 'ChronicAndIndexRelation',   //慢病指标值关联维护
@@ -100,7 +90,9 @@
                 diseaseName: ''
             },
             currentPage: 1,
-            pageSize: 10,
+          pageSize: config.pageSize,
+          pageSizeArr:config.pageSizeArr,
+          pageLayout:config.pageLayout,
             total: 0,
         }
     },
@@ -125,6 +117,10 @@
     })
   },
     methods: {
+      handleSizeChange(val){
+        this.pageSize = val;
+        this.getDataList();
+      },
         getDataList(isTurnPage) {
             const param = this.getFilterItems(isTurnPage);
             this.searched = true;
@@ -142,8 +138,10 @@
         addRelation() {
           const pam = this.searched ? {
             currentPage: this.currentPage,
+            pageSize:this.pageSize,
             filter: this.filter
-          } : {currentPage: this.currentPage};
+          } : {currentPage: this.currentPage,
+            pageSize:this.pageSize};
             this.$router.push({name:'AddChronicAndIndexRelation', params: pam})
         },
         modifyRelation(row) {
@@ -154,8 +152,10 @@
                 if(res.data.code == '0') {
                     const pam = this.searched ? {
                         currentPage: this.currentPage,
+                      pageSize:this.pageSize,
                         filter: this.filter
-                      } : {currentPage: this.currentPage};
+                      } : {currentPage: this.currentPage,
+                      pageSize:this.pageSize};
                     const item = Object.assign({},row,{data: res.data.data});
                     this.$router.push({name:'AddChronicAndIndexRelation',params:Object.assign(pam, {isEdit:true,data:item})});
                 }

+ 18 - 6
src/components/icss/ChronicDiseaseStructureList.vue

@@ -70,12 +70,13 @@
 
         </div>
         <div class="pagination">
-            <el-pagination v-if="total>pageSize"
-                        :current-page.sync="currentPage"
+            <el-pagination :current-page.sync="currentPage"
                         @current-change="currentChange"
                         background
                         :page-size="pageSize"
-                        layout="total,prev, pager, next, jumper"
+                        :page-sizes="pageSizeArr"
+                        @size-change="handleSizeChange"
+                        :layout="pageLayout"
                         :total="total">
             </el-pagination>
         </div>
@@ -85,6 +86,7 @@
 
 <script>
   import api from '@api/icss.js';
+  import config from '@api/config.js';
 
   export default {
     name: 'TemplateMaintenance',
@@ -107,7 +109,9 @@
           tagSysName: '', //标签系统名称
         },
         currentPage: 1,
-        pageSize: 10,
+        pageSize: config.pageSize,
+        pageSizeArr:config.pageSizeArr,
+        pageLayout:config.pageLayout,
         total: 0,
       }
     },
@@ -131,6 +135,10 @@
       })
     },
     methods: {
+      handleSizeChange(val){
+        this.pageSize = val;
+        this.getDataList();
+      },
       getDropList() {
         let templateType = localStorage.getItem('icssEnumsData') ? JSON.parse(localStorage.getItem('icssEnumsData')).moduleInfoTypeEnum : []
         this.AdscriptionsType = templateType;
@@ -167,8 +175,10 @@
       addIndeptTag() {
         const pam = this.searched ? {
           currentPage: this.currentPage,
+          pageSize:this.pageSize,
           filter: this.filter
-        } : {currentPage: this.currentPage};
+        } : {currentPage: this.currentPage,
+          pageSize:this.pageSize};
         this.$router.push({name:'ChronicDiseaseAdd', params: pam})
       },
       modifyIndeptTag(row) {
@@ -177,8 +187,10 @@
             if(code=='0'){
               const pam = this.searched ? {
                 currentPage: this.currentPage,
+                pageSize:this.pageSize,
                 filter: this.filter
-              } : {currentPage: this.currentPage};
+              } : {currentPage: this.currentPage,
+                pageSize:this.pageSize};
               this.$router.push({name:'ChronicDiseaseAdd',params:Object.assign(pam, {isEdit:true,data:data,row:row})});
             }else{
               this.$message({

+ 18 - 6
src/components/icss/ConceptRelation.vue

@@ -74,12 +74,13 @@
                 </el-table-column>
             </el-table>
         <div class="pagination">
-            <el-pagination v-if="total>pageSize"
-               :current-page.sync="currentPage"
+            <el-pagination :current-page.sync="currentPage"
                @current-change="currentChange"
                background
                :page-size="pageSize"
-               layout="total,prev, pager, next, jumper"
+               :page-sizes="pageSizeArr"
+               @size-change="handleSizeChange"
+               :layout="pageLayout"
                :total="total">
             </el-pagination>
         </div>
@@ -89,6 +90,7 @@
 
 <script>
 import api from '@api/icss.js';
+import config from '@api/config.js';
 
 export default {
     name: 'ConceptRelation',   //诊断量表关联维护
@@ -101,7 +103,9 @@ export default {
             type:'' 
           },
           currentPage: 1,
-          pageSize: 10,
+          pageSize: config.pageSize,
+          pageSizeArr:config.pageSizeArr,
+          pageLayout:config.pageLayout,
           total: 0,
           typeList:[]
         }
@@ -131,6 +135,10 @@ export default {
     })
   },
     methods: {
+      handleSizeChange(val){
+        this.pageSize = val;
+        this.getDataList();
+      },
         toggTab(item){
           // bug2348 搜索后切换tab时清空搜索条件
           this.filter.conceptName = '';
@@ -155,8 +163,10 @@ export default {
         addRelation() {
           const pam = this.searched ? {
             currentPage: this.currentPage,
+            pageSize:this.pageSize,
             filter: this.filter
-          } : {currentPage: this.currentPage,filter:Object.assign(this.filter,{conceptName:''})};
+          } : {currentPage: this.currentPage,
+            pageSize:this.pageSize,filter:Object.assign(this.filter,{conceptName:''})};
           this.$router.push({name:'AddConceptRelation',params:pam})
         },
         modifyRelation(row) {
@@ -171,8 +181,10 @@ export default {
             }
           const pam = this.searched ? {
             currentPage: this.currentPage,
+            pageSize:this.pageSize,
             filter: this.filter
-          } : {currentPage: this.currentPage,filter:Object.assign(this.filter,{conceptName:''})};
+          } : {currentPage: this.currentPage,
+            pageSize:this.pageSize,filter:Object.assign(this.filter,{conceptName:''})};
             api.getConceptRelationDet(param).then((res) => {
               if(res.data.code=='0'){
                 const { data } = res.data;

+ 18 - 6
src/components/icss/MedicalMultRelation.vue

@@ -58,12 +58,13 @@
                     </template>
                 </el-table-column>
             </el-table>
-            <el-pagination v-if="total>pageSize"
-                           :current-page.sync="currentPage"
+            <el-pagination :current-page.sync="currentPage"
                            @current-change="currentChange"
                            background
                            :page-size="pageSize"
-                           layout="total,prev, pager, next, jumper"
+                           :page-sizes="pageSizeArr"
+                           @size-change="handleSizeChange"
+                           :layout="pageLayout"
                            :total="total">
             </el-pagination>
         </div>
@@ -73,6 +74,7 @@
 
 <script>
   import api from '@api/icss.js';
+  import config from '@api/config.js';
   export default {
     name: 'MedicalName',
     data: function () {
@@ -85,7 +87,9 @@
         isState:'',
         cacheData: {},
         currentPage: 1,
-        pageSize: 10,
+        pageSize: config.pageSize,
+        pageSizeArr:config.pageSizeArr,
+        pageLayout:config.pageLayout,
         total: 0,
         searched: false,
         filter: {
@@ -118,11 +122,17 @@
       })
     },
     methods: {
+      handleSizeChange(val){
+        this.pageSize = val;
+        this.getDataList();
+      },
       addMedicalMultR(){
         const pam = this.searched ? {
           currentPage: this.currentPage,
+          pageSize:this.pageSize,
           filter: this.filter
-        } : {currentPage: this.currentPage};
+        } : {currentPage: this.currentPage,
+          pageSize:this.pageSize};
         this.$router.push({name:'AddMedicalMultRelation',
           params:pam});
       },
@@ -134,8 +144,10 @@
         };
         const pam = this.searched ? {
           currentPage: this.currentPage,
+          pageSize:this.pageSize,
           filter: this.filter
-        } : {currentPage: this.currentPage};
+        } : {currentPage: this.currentPage,
+          pageSize:this.pageSize};
         api.relationContactDetail(param).then((res) => {
           const {code,data,msg} = res.data;
           if(code=='0'){

+ 18 - 6
src/components/icss/MedicalName.vue

@@ -103,12 +103,13 @@
                     </template>
                 </el-table-column>
             </el-table>
-            <el-pagination v-if="total>pageSize"
-                           :current-page.sync="currentPage"
+            <el-pagination :current-page.sync="currentPage"
                            @current-change="currentChange"
                            background
                            :page-size="pageSize"
-                           layout="total,prev, pager, next, jumper"
+                           :page-sizes="pageSizeArr"
+                           @size-change="handleSizeChange"
+                           :layout="pageLayout"
                            :total="total">
             </el-pagination>
         </div>
@@ -118,6 +119,7 @@
 
 <script>
   import api from '@api/icss.js';
+  import config from '@api/config.js';
 
   export default {
     name: 'MedicalName',
@@ -131,7 +133,9 @@
         // isState:'',
         cacheData: {}, //因为删除和恢复要及时更新,所以不做缓存
         currentPage: 1,
-        pageSize: 10,
+        pageSize: config.pageSize,
+        pageSizeArr:config.pageSizeArr,
+        pageLayout:config.pageLayout,
         total: 0,
         searched:false,
         filter: {
@@ -168,6 +172,10 @@
       })
     },
     methods: {
+      handleSizeChange(val){
+        this.pageSize = val;
+        this.getDataList();
+      },
       reloadLib(){
         if(this.reloadFlag){
           this.reloadFlag = false;
@@ -180,13 +188,17 @@
       },
       addMedicalName(){
         const pam = this.searched?{currentPage:this.currentPage,
-          filter:this.filter}:{currentPage:this.currentPage};
+          pageSize:this.pageSize,
+          filter:this.filter}:{currentPage:this.currentPage,
+          pageSize:this.pageSize};
         this.$router.push({name:'AddMedicalName',
           params:pam});
       },
       toEditProduct(row,copy){
         const pam = this.searched?{currentPage:this.currentPage,
-          filter:this.filter}:{currentPage:this.currentPage};
+          pageSize:this.pageSize,
+          filter:this.filter}:{currentPage:this.currentPage,
+          pageSize:this.pageSize};
         this.$router.push({
           name:'AddMedicalName',
           // params: {info:row}

+ 15 - 5
src/components/icss/MedicalRelation.vue

@@ -104,12 +104,13 @@
                     </template>
                 </el-table-column>
             </el-table>
-            <el-pagination v-if="total>pageSize"
-                           :current-page.sync="currentPage"
+            <el-pagination :current-page.sync="currentPage"
                            @current-change="currentChange"
                            background
                            :page-size="pageSize"
-                           layout="total,prev, pager, next, jumper"
+                           :page-sizes="pageSizeArr"
+                           @size-change="handleSizeChange"
+                           :layout="pageLayout"
                            :total="total">
             </el-pagination>
         </div>
@@ -119,6 +120,7 @@
 
 <script>
   import api from '@api/icss.js';
+  import config from '@api/config.js';
 
   export default {
     name: 'MedicalRelation',
@@ -138,7 +140,9 @@
         },
         cacheData: {},
         currentPage: 1,
-        pageSize: 10,
+        pageSize: config.pageSize,
+        pageSizeArr:config.pageSizeArr,
+        pageLayout:config.pageLayout,
         total: 0,
         typeList:[],
         titleWidth:'1070px' //头部最小宽度
@@ -171,11 +175,17 @@
       })
     },
     methods: {
+      handleSizeChange(val){
+        this.pageSize = val;
+        this.getDataList();
+      },
       addMedicalR(){
         const pam = this.searched ? {
           currentPage: this.currentPage,
+          pageSize:this.pageSize,
           filter: this.filter
-        } : {currentPage: this.currentPage};
+        } : {currentPage: this.currentPage,
+          pageSize:this.pageSize};
         this.$router.push({name: 'AddMedicalRelation', params: pam});
       },
       filterDatas(){

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

@@ -77,12 +77,13 @@
                     </template>
                 </el-table-column>
             </el-table>
-            <el-pagination v-if="total>pageSize"
-                           :current-page.sync="currentPage"
+            <el-pagination :current-page.sync="currentPage"
                            @current-change="currentChange"
                            background
                            :page-size="pageSize"
-                           layout="total,prev, pager, next, jumper"
+                           :page-sizes="pageSizeArr"
+                           @size-change="handleSizeChange"
+                           :layout="pageLayout"
                            :total="total">
             </el-pagination>
         </div>
@@ -92,6 +93,7 @@
 
 <script>
   import api from '@api/icss.js';
+  import config from '@api/config.js';
 
   export default {
     name: 'MedicinePrompt',
@@ -100,7 +102,9 @@
         list: [],
         cacheData: {},
         currentPage: 1,
-        pageSize: 10,
+        pageSize: config.pageSize,
+        pageSizeArr:config.pageSizeArr,
+        pageLayout:config.pageLayout,
         total: 0,
         linkIn:[],
         pays:[],
@@ -142,19 +146,27 @@
       })
     },
     methods: {
+      handleSizeChange(val){
+        this.pageSize = val;
+        this.getDataList();
+      },
       addMedicalPrompt(){
         const pam = this.searched ? {
           currentPage: this.currentPage,
+          pageSize:this.pageSize,
           filter: this.filter
-        } : {currentPage: this.currentPage};
+        } : {currentPage: this.currentPage,
+          pageSize:this.pageSize};
         this.$router.push({name:'AddMedicinePrompt',
           params:pam});
       },
       toEditProduct(row){
         const pam = this.searched ? {
           currentPage: this.currentPage,
+          pageSize:this.pageSize,
           filter: this.filter
-        } : {currentPage: this.currentPage};
+        } : {currentPage: this.currentPage,
+          pageSize:this.pageSize};
         this.$router.push({
           name:'AddMedicinePrompt',
           params: Object.assign(pam, {data:row,isEdit:true})
@@ -163,8 +175,10 @@
       toCopyProduct(row){
         const pam = this.searched ? {
           currentPage: this.currentPage,
+          pageSize:this.pageSize,
           filter: this.filter
-        } : {currentPage: this.currentPage};
+        } : {currentPage: this.currentPage,
+          pageSize:this.pageSize};
         this.$router.push({
           name:'AddMedicinePrompt',
           params: Object.assign(pam, {data:row,isCopy:true})

+ 18 - 6
src/components/medicalTerm/AssistCheckSon.vue

@@ -67,12 +67,13 @@
                 </el-table-column>
             </el-table>
         <div class="pagination">
-            <el-pagination v-if="total>pageSize"
-                       :current-page.sync="currentPage"
+            <el-pagination :current-page.sync="currentPage"
                        @current-change="currentChange"
                        background
                        :page-size="pageSize"
-                       layout="total,prev, pager, next, jumper"
+                       :page-sizes="pageSizeArr"
+                       @size-change="handleSizeChange"
+                       :layout="pageLayout"
                        :total="total">
             </el-pagination>
         </div>       
@@ -82,6 +83,7 @@
 
 <script>
   import api from '@api/medicalTerm.js';
+  import config from '@api/config.js';
 
   export default {
     name: 'AssistCheckSon',   //慢病指标值关联维护
@@ -93,7 +95,9 @@
               conceptName:'',
             },
             currentPage: 1,
-            pageSize: 10,
+          pageSize: config.pageSize,
+          pageSizeArr:config.pageSizeArr,
+          pageLayout:config.pageLayout,
             total: 0,
         }
     },
@@ -119,6 +123,10 @@
     })
   },
     methods: {
+      handleSizeChange(val){
+        this.pageSize = val;
+        this.getDataList();
+      },
         getDataList(isTurnPage) {
             const param = this.getFilterItems(isTurnPage);
             this.searched = true;
@@ -136,8 +144,10 @@
         addRelation() {
           const pam = this.searched ? {
             currentPage: this.currentPage,
+            pageSize:this.pageSize,
             filter: this.filter
-          } : {currentPage: this.currentPage};
+          } : {currentPage: this.currentPage,
+            pageSize:this.pageSize};
             this.$router.push({name:'AddAssistCheckSon', params: pam})
         },
         modifyRelation(row) {
@@ -151,8 +161,10 @@
                 if(res.data.code == '0') {
                   const pam = this.searched ? {
                     currentPage: this.currentPage,
+                    pageSize:this.pageSize,
                     filter: this.filter
-                  } : {currentPage: this.currentPage};
+                  } : {currentPage: this.currentPage,
+                    pageSize:this.pageSize};
                     // const item = Object.assign({},row,{data: res.data.data});
                     const item = res.data.data;
                     this.$router.push({name:'AddAssistCheckSon',params:Object.assign(pam, {isEdit:true,data:item})});