master
271556543@qq.com 3 years ago
parent 544ec611d7
commit cc72824e89

@ -99,7 +99,7 @@
<u-loadmore :status="status" :load-text='loadText' @loadmore='select.page++,getList()' />
<u-calendar v-model="isShowCalendar" mode="range" @change='datePick'>
<u-calendar v-model="isShowCalendar" max-date="2100-01-01" mode="range" @change='datePick'>
</u-calendar>
</view>
@ -181,9 +181,10 @@
datePick(e) {
console.log(e);
this.select.page = 1
this.select.start_time = e.startDate
this.select.start_time = `${e.startDate} 00:00:00`
this.select.end_time = `${e.endDate} 23:59:59`
this.nursingList = []
console.log(this.select);
this.getList()
},
@ -195,18 +196,16 @@
this.$u.debounce(this.getList, 1000)
},
async getList() {
this.$u.throttle(async () => {
let res = await this.$u.api.nurseList(this.select)
if (res.data.length > 0 && res.data) {
this.nursingList.push(...res.data)
this.status = 'loadmore'
} else {
this.status = 'nomore'
if (this.select.page > 1) {
this.select.page--
}
let res = await this.$u.api.nurseList(this.select)
if (res.data.length > 0 && res.data) {
this.nursingList.push(...res.data)
this.status = 'loadmore'
} else {
this.status = 'nomore'
if (this.select.page > 1) {
this.select.page--
}
})
}
},
toThere(item) {

Loading…
Cancel
Save