Browse Source

人员登记列表虚拟化

master
luobinjie 3 months ago
parent
commit
6fa4213a45
  1. 28
      src/components/patientRegister/PatientRegisterList.vue

28
src/components/patientRegister/PatientRegisterList.vue

@ -1758,6 +1758,7 @@ export default {
async load() { async load() {
this.loadOpts.skipCount++; this.loadOpts.skipCount++;
await this.getPrList(); await this.getPrList();
this.lazyLoading = false;
}, },
// //
@ -1967,16 +1968,23 @@ export default {
// //
async scrollFull(scroll, event) { 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 // this.dom = this.$refs.info.bodyWrapper
// console.log('this.dom', this.dom) // console.log('this.dom', this.dom)

Loading…
Cancel
Save