diff --git a/src/components/patientRegister/PatientRegisterList.vue b/src/components/patientRegister/PatientRegisterList.vue index 74f801d..a3b1bd4 100644 --- a/src/components/patientRegister/PatientRegisterList.vue +++ b/src/components/patientRegister/PatientRegisterList.vue @@ -1758,6 +1758,7 @@ export default { async load() { this.loadOpts.skipCount++; await this.getPrList(); + this.lazyLoading = false; }, // 获取列表数据 @@ -1967,16 +1968,23 @@ export default { //滚动加载数据 async scrollFull(scroll, event) { - if (scroll.judgeFlse) { - if ( - (Number(this.loadOpts.skipCount) + 1) * - Number(this.loadOpts.maxResultCount) >= - Number(this.loadOpts.totalCount) - ) { - return; - } else { - await this.load(); - } + if (!scroll.judgeFlse) return; + + // 正在加载时阻止重复触发 + if (this.lazyLoading) return; + if ( + (Number(this.loadOpts.skipCount) + 1) * + Number(this.loadOpts.maxResultCount) >= + Number(this.loadOpts.totalCount) + ) { + return; + } + + this.lazyLoading = true; + try { + await this.load(); + } catch (e) { + console.error('scrollFull load error', e); } // this.dom = this.$refs.info.bodyWrapper // console.log('this.dom', this.dom)