Sfoglia il codice sorgente

修复分页缺陷

coys 1 anno fa
parent
commit
e741b92237

+ 11 - 5
src/views/menu/monitoringCall/index.vue

@@ -70,7 +70,9 @@
             <template #title>
               <span class="custom-title"
                 >{{ item.taskName
-                }}<van-tag class="resetDy" @click.stop="resetHandler(item.id)" v-if="item.status == 1"  type="primary">重新调阅</van-tag></span
+                }}<van-tag class="resetDy" @click.stop="resetHandler(item.id)" v-if="item.status == 1" type="primary"
+                  >重新调阅</van-tag
+                ></span
               >
               <!-- v-if="item.status == 1" -->
 
@@ -219,10 +221,12 @@ export default {
       if (this.pageNum == 1) {
         this.pageNum = 2
       }
+      this.loading = true
 
       this.selectListAppHandler(1, () => {
-        this.loading = false
         this.pageNum++
+        this.loading = false
+       
       })
     },
     //清空查询条件
@@ -247,12 +251,13 @@ export default {
           this.columns.push(item.dictLabel)
         })
       })
-      this.selectListAppHandler()
+      // this.selectListAppHandler()
     },
     selectListAppHandler(type = 0, callBack = () => {}) {
       if (!type) {
         this.pageNum = 1
       }
+      
       //获取任务列表
       selectListApp({
         pageNum: this.pageNum,
@@ -261,15 +266,16 @@ export default {
         orgId: this.cascaderValue || JSON.parse(window.sessionStorage.getItem('SET_USER_ORGID')) + '' || '',
         moth: this.currentDate || ''
       }).then(res => {
-        let { code, rows, msg } = res
+        let { code, rows, total } = res
         if (code == 200) {
           if (type) {
             this.taskList.push(...rows)
             if (rows.length == 0 || rows.length < 10) {
               //已加载完全部数据
               this.finished = true
-            }
+            } 
             callBack()
+            
           } else {
             this.finished = false
             this.taskList = rows || []

+ 2 - 2
src/views/menu/rehearsalTask/index.vue

@@ -315,7 +315,7 @@ export default {
         this.columns.unshift('全部')
       })
       //获取分页列表
-      this.selectListAppHandler()
+      // this.selectListAppHandler()
     },
     selectListAppHandler(type = 0, callback = () => {}) {
       let obj = {
@@ -429,7 +429,7 @@ export default {
       this.selectListAppHandler(1, () => {
         this.pageNum++
         this.loading = false
-        console.log(1)
+        
       })
     },
     //查看签名情况

+ 1 - 1
src/views/menu/rehearsalTask/learning.vue

@@ -189,7 +189,7 @@ export default {
         this.columns.unshift('全部')
       })
       //获取分页列表
-      this.selectListAppHandler()
+      // this.selectListAppHandler()
     },
     selectListAppHandler(type = 0, callback = () => {}) {
       let obj = {

+ 1 - 1
src/views/menu/rehearsalTask/optimal.vue

@@ -289,7 +289,7 @@ export default {
       })
      
 
-      this.selectListAppHandler()
+      // this.selectListAppHandler()
     },
     selectListAppHandler(type = 0, callback = () => {}) {
       let obj = {

+ 1 - 1
src/views/menu/resumptionEvaluate/index.vue

@@ -202,7 +202,7 @@ export default {
         this.columns.unshift('全部')
       })
       //获取分页列表
-      this.selectListAppHandler()
+      // this.selectListAppHandler()
     },
     selectListAppHandler(type = 0, callback = () => {}) {
       let obj = {

+ 1 - 1
src/views/menu/training/index.vue

@@ -301,7 +301,7 @@ export default {
 
     //初始化
     init() {
-      this.selectListAppHandler()
+      // this.selectListAppHandler()
     },
     selectListAppHandler(type = 0, callback = () => {}) {
       let obj = {

+ 2 - 1
vue.config.js

@@ -118,7 +118,8 @@ module.exports = defineConfig({
         }
       },
       '/dev': {
-        target: "http://10.87.23.62:8080",
+        // target: "http://10.87.21.107:8080",
+        target: "http://10.87.21.103:8080",
         // ws:true,
         changOrigin:true,
         pathRewrite:{