Browse Source

Merge branch 'master' of http://132.232.92.186:3000/XinXiBu/oa-system

wangh 2 years ago
parent
commit
37a7cf12d1
2 changed files with 11 additions and 7 deletions
  1. 1 1
      src/components/child/AuthorityJob.vue
  2. 10 6
      src/components/child/PageConfig.vue

+ 1 - 1
src/components/child/AuthorityJob.vue

@@ -60,7 +60,7 @@
 </template>
 
 <script>
-import { promised, reject, resolve } from 'q';
+
 
 export default {
     data() {

+ 10 - 6
src/components/child/PageConfig.vue

@@ -6,7 +6,7 @@
         <div class="pageConfig-head">
             <div style="display: flex;">
                 <div>
-                    <el-select @change="Inquirechange()" v-model="ModulValue" clearable placeholder="全部模块">
+                    <el-select @change="Inquirechange(1)" v-model="ModulValue" clearable placeholder="全部模块">
                         <el-option v-for="item in ModulList" :key="item.value" :label="item.name" :value="item.id">
                         </el-option>
                     </el-select>
@@ -167,8 +167,6 @@
 
 
 <script>
-import { cw } from '@fullcalendar/core/internal-common';
-import { promised, reject, resolve } from 'q';
 import Modal from '../template/dialog.vue';
 
 export default {
@@ -240,12 +238,18 @@ export default {
                     });
                     that.pageList = resp.data.data.viewList.data;
                 }
-                that.Inquirechange();
+                that.Inquirechange(that.currentPage);
                 that.isload = false;
+
+                if (that.pageList.slice((that.currentPage - 1) * that.pageSize, that.currentPage * that.pageSize).length == 0) {
+                    if (that.currentPage > 1) {
+                        that.currentPage = that.currentPage - 1;
+                    }
+                }
             })
 
         },
-        Inquirechange() {
+        Inquirechange(Pindex) {
             var that = this;
 
             if(this.ModulValue == ''){
@@ -259,7 +263,7 @@ export default {
                     return item.modulid == that.ModulValue;
                 });
             }
-            this.currentPage = 1;
+            this.currentPage = Pindex;
         },
         //每页条数改变时触发 选择一页显示多少行
         handleSizeChange(val) {