Prechádzať zdrojové kódy

工作台页面page的bug修改

wangqiang 2 rokov pred
rodič
commit
74e66fd10d

+ 31 - 3
src/views/modules/sys/dashboard/workBench/Pending.vue

@@ -133,7 +133,7 @@
                 auto-resize
                 resizable
                 height="auto"
-                :loading="loading"
+                :loading="loading2"
                 size="small"
                 ref="notifyTable"
                 show-header-overflow
@@ -189,7 +189,7 @@
                 :total="noticePage.total"
                 :page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
                 :layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
-                @page-change="currentChangeHandle">
+                @page-change="noticeChangeHandle">
               </vxe-pager>
             </div>
             <!-- 弹窗, 新增 / 修改 -->
@@ -231,6 +231,7 @@
           orders: []
         },
         loading: false,
+        loading2: false,
         visible: false,
         currentTask: null,
         processInstanceId: ''
@@ -329,9 +330,36 @@
       currentChangeHandle ({ currentPage, pageSize }) {
         this.tablePage.currentPage = currentPage
         this.tablePage.pageSize = pageSize
+        // 刷新
+        this.loading = true
+        this.taskService.todoList({
+          'current': this.tablePage.currentPage,
+          'size': this.tablePage.pageSize,
+          'orders': this.tablePage.orders,
+          ...this.searchForm
+        }).then(({data}) => {
+          this.dataList = data.records
+          this.tablePage.total = data.total
+          this.loading = false
+        })
+        // this.refreshList()
+      },
+      noticeChangeHandle ({ currentPage, pageSize }) {
+        this.loading2 = true
         this.noticePage.currentPage = currentPage
         this.noticePage.pageSize = pageSize
-        this.refreshList()
+        this.notifyService.list({
+          'current': this.noticePage.currentPage,
+          'size': this.noticePage.pageSize,
+          'orders': this.noticePage.orders,
+          isSelf: true,
+          ...this.searchForm
+        }).then(({data}) => {
+          this.dataLists = data.records
+          this.noticePage.total = data.total
+          this.loading2 = false
+        })
+        // this.refreshList()
       },
       todo (row) {
         this.taskService.getTaskDef({