Browse Source

优化更新列表逻辑

xiaohaizhao 1 year ago
parent
commit
fb4a9e3aac

+ 1 - 0
cloud/collect/mylist.vue

@@ -97,6 +97,7 @@ export default {
                     if (this.cutoff(res.msg)) return;
                     res.data = this.$refs[current.name].handleList(res.data)
                     this.list = res.data;
+                    this.$refs.List.paging(current, res, true)
                 })
             }
         },

+ 1 - 0
cloud/designReality/index.vue

@@ -73,6 +73,7 @@ export default {
                         return v
                     })
                     this.list = res.data;
+                    this.$refs.List.paging(current, res, true)
                     if (data) handle();
                 })
                 function handle() {

+ 3 - 2
components/My_listbox.vue

@@ -111,11 +111,12 @@ export default {
             })
         },
         /* 分页 */
-        paging(content, res) {
+        paging(data, res, update = false) {
+            let content = JSON.parse(JSON.stringify(data))
             content.pageNumber = res.pageNumber + 1;
             content.pageTotal = res.pageTotal;
             // this.pagingText = content.pageNumber + ' / ' + content.pageTotal;
-            this.bottomTips = res.total != 0 && content.pageNumber >= content.pageTotal;
+            if (!update) this.bottomTips = res.total != 0 && content.pageNumber >= content.pageTotal;
             if (this.isShowEmpty) this.empty = res.total == 0;
             return content;
         }

+ 1 - 0
packageA/affiche/index.vue

@@ -120,6 +120,7 @@ export default {
                     console.log("更新通告列表", res)
                     if (this.cutoff(res.msg)) return;
                     this.list = res.data;
+                    this.$refs.List.paging(current, res, true)
                 })
             }
         },

+ 1 - 0
packageA/exam/index.vue

@@ -141,6 +141,7 @@ export default {
                     console.log("更新试卷列表", res)
                     if (this.cutoff(res.msg)) return;
                     this.list = res.data;
+                    this.$refs.List.paging(current, res, true)
                 })
             }
         },

+ 2 - 1
packageA/exam/result.vue

@@ -130,6 +130,7 @@ export default {
                     console.log("更新试卷列表", res)
                     if (this.cutoff(res.msg)) return;
                     this.list = res.data;
+                    this.$refs.List.paging(current, res, true)
                 })
             }
         },
@@ -175,7 +176,7 @@ export default {
             })
             if (e.一级分类 == '') {
                 crumbs.push({
-                    classname:'全部',
+                    classname: '全部',
                     parentid: ''
                 })
             }

+ 1 - 0
packageA/resourceLibrary/index.vue

@@ -132,6 +132,7 @@ export default {
                     console.log("更新装备资源库列表", res)
                     if (this.cutoff(res.msg)) return;
                     this.list = res.data;
+                    this.$refs.List.paging(current, res, true)
                 })
             }
         },

+ 1 - 0
pages/index/index/casePages/design.vue

@@ -103,6 +103,7 @@ export default {
                         return v
                     })
                     this.list = res.data;
+                    this.$refs.List.paging(current, res, true)
                     if (data) handle();
 
                 })

+ 1 - 0
store/center/detail.vue

@@ -310,6 +310,7 @@ export default {
                         if (this.cutoff(res.msg)) return;
                         this.$refs.List.setHeight()
                         this.list = res.data;
+                        this.$refs.List.paging(current, res, true)
                     })
                 }
             }.bind(this)

+ 1 - 0
store/deliveryAddress/index.vue

@@ -93,6 +93,7 @@ export default {
                 console.log("更新收货地址列表", res)
                 if (this.cutoff(res.msg)) return;
                 this.list = res.data;
+                this.$refs.List.paging(this.content, res, true)
             })
         },
         toAdd() {

+ 1 - 0
store/insert/member.vue

@@ -73,6 +73,7 @@ export default {
                     console.log("更新人员列表", res)
                     if (this.cutoff(res.msg)) return;
                     this.list = res.data;
+                    this.$refs.List.paging(current, res, true)
                 })
             }
         },

+ 1 - 0
team/agency/check.vue

@@ -74,6 +74,7 @@ export default {
                         if (this.cutoff(res.msg)) return;
                         this.$refs.List.setHeight()
                         this.list = this.$refs.storeList.handleList(res.data);
+                        this.$refs.List.paging(current, res, true)
                     })
                 }
             }.bind(this)

+ 1 - 0
team/team/modules/agency.vue

@@ -114,6 +114,7 @@ export default {
                         if (this.cutoff(res.msg)) return;
                         this.$refs.List.setHeight()
                         this.list = res.data;
+                        this.$refs.List.paging(current, res, true)
                     })
                 }
             }.bind(this)

+ 1 - 0
team/team/modules/store.vue

@@ -131,6 +131,7 @@ export default {
                         if (this.cutoff(res.msg)) return;
                         this.$refs.List.setHeight()
                         this.list = this.$refs.storeList.handleList(res.data);
+                        this.$refs.List.paging(current, res, true)
                     })
                 }
             }.bind(this)

+ 1 - 0
team/team/modules/users.vue

@@ -85,6 +85,7 @@ export default {
                         if (this.cutoff(res.msg)) return;
                         this.$refs.List.setHeight()
                         this.list = res.data;
+                        this.$refs.List.paging(current, res, true)
                     })
                 }
             }.bind(this)