Explorar o código

icss数据维护添加每页条数选择

zhouna %!s(int64=5) %!d(string=hai) anos
pai
achega
e5e11d33b8

+ 4 - 1
src/api/config.js

@@ -292,5 +292,8 @@ export default {
   ],
   ],
   msg:{
   msg:{
     imgTip:'无法上传图片,图片大小不可超过2M'
     imgTip:'无法上传图片,图片大小不可超过2M'
-  }
+  },
+  pageSizeArr:[10,50,100,500],         //分页每页显示条数选项
+  pageSize:10,      //初始每页显示条数
+  pageLayout:"total,sizes,prev, pager, next, jumper",        //分页组件成分
 }
 }

+ 21 - 18
src/components/icss/IndeptLabel.vue

@@ -84,32 +84,21 @@
                     </template>
                     </template>
                 </el-table-column>
                 </el-table-column>
             </el-table>
             </el-table>
-          <el-pagination v-if="total>pageSize"
-                        :current-page.sync="currentPage"
-                        @current-change="currentChange"
+          <el-pagination @current-change="currentChange"
                         background
                         background
                         :page-size="pageSize"
                         :page-size="pageSize"
-                        layout="total,prev, pager, next, jumper"
+                        :page-sizes="pageSizeArr"
+                         @size-change="handleSizeChange"
+                        :layout="pageLayout"
                         :total="total">
                         :total="total">
             </el-pagination>
             </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>
     </div>
 </template>
 </template>
 
 
 <script>
 <script>
   import api from '@api/icss.js';
   import api from '@api/icss.js';
-
+  import config from '@api/config.js';
   export default {
   export default {
     name: 'tag-group',
     name: 'tag-group',
     data: function() {
     data: function() {
@@ -126,7 +115,9 @@
           tagSysName: '', //标签系统名称
           tagSysName: '', //标签系统名称
         },
         },
         currentPage: 1,
         currentPage: 1,
-        pageSize: 10,
+        pageSize: config.pageSize,
+        pageSizeArr:config.pageSizeArr,
+        pageLayout:config.pageLayout,
         total: 0,
         total: 0,
       }
       }
     },
     },
@@ -151,6 +142,10 @@
       })
       })
     },
     },
     methods: {
     methods: {
+      handleSizeChange(val){
+        this.pageSize = val;
+        this.getDataList();
+      },
       getValue(val) {
       getValue(val) {
         console.log('changeVal', val, this.filter.tagAdscription)
         console.log('changeVal', val, this.filter.tagAdscription)
       },
       },
@@ -194,8 +189,9 @@
       addIndeptTag() {
       addIndeptTag() {
         const pam = this.searched ? {
         const pam = this.searched ? {
           currentPage: this.currentPage,
           currentPage: this.currentPage,
+          pageSize:this.pageSize,
           filter: this.filter
           filter: this.filter
-        } : {currentPage: this.currentPage};
+        } : {currentPage: this.currentPage,pageSize:this.pageSize};
         this.$router.push({
         this.$router.push({
           name: 'AddIndeptLabel',
           name: 'AddIndeptLabel',
           params: pam
           params: pam
@@ -325,4 +321,11 @@
     .el-select .el-input .el-icon-circle-close{
     .el-select .el-input .el-icon-circle-close{
         float:left;
         float:left;
     }
     }
+  .el-pagination__sizes{
+      margin-right: 20px;
+    .el-input .el-input__inner{
+        height: 28px;
+        line-height: 28px;
+    }
+  }
 </style>
 </style>

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

@@ -83,33 +83,24 @@
                 </el-table-column>
                 </el-table-column>
             </el-table>
             </el-table>
         <div class="pagination">
         <div class="pagination">
-            <el-pagination v-if="total>pageSize"
-                       :current-page.sync="currentPage"
+            <el-pagination :current-page.sync="currentPage"
                        @current-change="currentChange"
                        @current-change="currentChange"
                        background
                        background
                        :page-size="pageSize"
                        :page-size="pageSize"
-                       layout="total,prev, pager, next, jumper"
+                        :page-sizes="pageSizeArr"
+                        @size-change="handleSizeChange"
+                        :layout="pageLayout"
                        :total="total">
                        :total="total">
             </el-pagination>
             </el-pagination>
         </div>
         </div>
-        
         </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>
     </div>
 </template>
 </template>
 
 
 <script>
 <script>
 import api from '@api/icss.js';
 import api from '@api/icss.js';
+import config from '@api/config.js';
 
 
 export default {
 export default {
     name: 'tag-group',
     name: 'tag-group',
@@ -126,7 +117,9 @@ export default {
                 tagSysName: '', //标签系统名称
                 tagSysName: '', //标签系统名称
             },
             },
             currentPage: 1,
             currentPage: 1,
-            pageSize: 10,
+            pageSize: config.pageSize,
+            pageSizeArr:config.pageSizeArr,
+            pageLayout:config.pageLayout,
             total: 0,
             total: 0,
         }
         }
     },
     },
@@ -151,6 +144,10 @@ export default {
     })
     })
   },
   },
     methods: {
     methods: {
+      handleSizeChange(val){
+        this.pageSize = val;
+        this.getDataList();
+      },
         getValue(val) {
         getValue(val) {
             // console.log('changeVal', val, this.filter.tagAdscription)
             // console.log('changeVal', val, this.filter.tagAdscription)
         },
         },
@@ -199,8 +196,10 @@ export default {
         addTagGroup() {
         addTagGroup() {
           const pam = this.searched ? {
           const pam = this.searched ? {
             currentPage: this.currentPage,
             currentPage: this.currentPage,
+            pageSize:this.pageSize,
             filter: this.filter
             filter: this.filter
-          } : {currentPage: this.currentPage};
+          } : {currentPage: this.currentPage,
+            pageSize:this.pageSize};
           this.$router.push({name: 'AddLabelGroup', params: pam});
           this.$router.push({name: 'AddLabelGroup', params: pam});
         },
         },
         modifyTagGroup(row, type) {
         modifyTagGroup(row, type) {

+ 15 - 6
src/components/icss/PhysicalExamTemplate.vue

@@ -64,12 +64,13 @@
                     </template>
                     </template>
                 </el-table-column>
                 </el-table-column>
             </el-table>
             </el-table>
-            <el-pagination v-if="total>pageSize"
-                           :current-page.sync="currentPage"
+            <el-pagination :current-page.sync="currentPage"
                            @current-change="currentChange"
                            @current-change="currentChange"
                            background
                            background
                            :page-size="pageSize"
                            :page-size="pageSize"
-                           layout="total,prev, pager, next, jumper"
+                           :page-sizes="pageSizeArr"
+                           @size-change="handleSizeChange"
+                           :layout="pageLayout"
                            :total="total">
                            :total="total">
             </el-pagination>
             </el-pagination>
         </div>
         </div>
@@ -79,7 +80,7 @@
 
 
 <script>
 <script>
   import api from '@api/icss.js';
   import api from '@api/icss.js';
-  import utils from '@api/utils.js';
+  import config from '@api/config.js';
 
 
   export default {
   export default {
     name: 'PhysicalExamTemplate',
     name: 'PhysicalExamTemplate',
@@ -89,7 +90,9 @@
         cacheData: {},
         cacheData: {},
         deptList: [], //科室下拉列表
         deptList: [], //科室下拉列表
         currentPage: 1,
         currentPage: 1,
-        pageSize: 10,
+        pageSize: config.pageSize,
+        pageSizeArr:config.pageSizeArr,
+        pageLayout:config.pageLayout,
         total: 0,
         total: 0,
         linkIn:[],
         linkIn:[],
         pays:[],
         pays:[],
@@ -121,11 +124,17 @@
       })
       })
     },
     },
     methods: {
     methods: {
+      handleSizeChange(val){
+        this.pageSize = val;
+        this.getDataList();
+      },
       addModule() {
       addModule() {
         const pam = this.searched ? {
         const pam = this.searched ? {
           currentPage: this.currentPage,
           currentPage: this.currentPage,
+          pageSize:this.pageSize,
           filter: this.filter
           filter: this.filter
-        } : {currentPage: this.currentPage};
+        } : {currentPage: this.currentPage,
+          pageSize:this.pageSize};
         this.$router.push({name: 'AddPhysicalExamTemp', params: pam});
         this.$router.push({name: 'AddPhysicalExamTemp', params: pam});
       },
       },
       toEditProduct(row){
       toEditProduct(row){

+ 16 - 5
src/components/icss/TemplateMaintenance.vue

@@ -85,12 +85,13 @@
 
 
         </div>
         </div>
         <div class="pagination">
         <div class="pagination">
-            <el-pagination v-if="total>pageSize"
-                        :current-page.sync="currentPage"
+            <el-pagination :current-page.sync="currentPage"
                         @current-change="currentChange"
                         @current-change="currentChange"
                         background
                         background
                         :page-size="pageSize"
                         :page-size="pageSize"
-                        layout="total,prev, pager, next, jumper"
+                        :page-sizes="pageSizeArr"
+                        @size-change="handleSizeChange"
+                        :layout="pageLayout"
                         :total="total">
                         :total="total">
             </el-pagination>
             </el-pagination>
         </div>
         </div>
@@ -100,6 +101,7 @@
 
 
 <script>
 <script>
   import api from '@api/icss.js';
   import api from '@api/icss.js';
+  import config from '@api/config.js';
 
 
   export default {
   export default {
     name: 'TemplateMaintenance',
     name: 'TemplateMaintenance',
@@ -117,7 +119,9 @@
           tagAdscription: '', //标签归属
           tagAdscription: '', //标签归属
         },
         },
         currentPage: 1,
         currentPage: 1,
-        pageSize: 10,
+        pageSize: config.pageSize,
+        pageSizeArr:config.pageSizeArr,
+        pageLayout:config.pageLayout,
         total: 0,
         total: 0,
         deptAndDisInfo:{},
         deptAndDisInfo:{},
       }
       }
@@ -178,6 +182,7 @@
         //const pm = to.param;
         //const pm = to.param;
         const flt = to.params.filter;
         const flt = to.params.filter;
         vm.currentPage = to.params.currentPage||1;
         vm.currentPage = to.params.currentPage||1;
+        vm.pageSize = to.params.pageSize;
         vm.deptAndDisInfo = JSON.parse(localStorage.getItem('deptDis')||null);
         vm.deptAndDisInfo = JSON.parse(localStorage.getItem('deptDis')||null);
         if(flt){
         if(flt){
           vm.filter.templateType = flt.templateType;
           vm.filter.templateType = flt.templateType;
@@ -189,6 +194,10 @@
       })
       })
     },
     },
     methods: {
     methods: {
+      handleSizeChange(val){
+        this.pageSize = val;
+        this.getDataList();
+      },
       getSubTemplate() {
       getSubTemplate() {
         api.getAllDeptAndDisInfo({}).then((res) => {
         api.getAllDeptAndDisInfo({}).then((res) => {
           if (res.data.code === '0') {//获取科室和疾病所有信息
           if (res.data.code === '0') {//获取科室和疾病所有信息
@@ -234,8 +243,10 @@
       addIndeptTag() {
       addIndeptTag() {
         const pam = this.searched ? {
         const pam = this.searched ? {
           currentPage: this.currentPage,
           currentPage: this.currentPage,
+          pageSize:this.pageSize,
           filter: this.filter
           filter: this.filter
-        } : {currentPage: this.currentPage};
+        } : {currentPage: this.currentPage,
+          pageSize:this.pageSize};
         this.$router.push({name: 'TemplateMaintenanceWrap', params: pam})
         this.$router.push({name: 'TemplateMaintenanceWrap', params: pam})
       },
       },
       modifyIndeptTag(row) {
       modifyIndeptTag(row) {