1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
| selectLoadMore() { this.phenotypeSearch.pageNum = this.phenotypeSearch.pageNum + 1 if (this.phenotypeList.length >= this.phenotypeSearch.totalPage) return this.readAllUsers() },
remoteMethod(query, callback) { this.loading = true this.phenotypeSearch.cn = query this.phenotypeSearch.pageNum = 1 this.phenotypeList = [] callback && callback() setTimeout(() => { this.loading = false this.readAllUsers() }, 200) },
readAllUsers() { let params = { pageNum: this.phenotypeSearch.pageNum, pageSize: this.phenotypeSearch.pageSize, cn: this.phenotypeSearch.cn, } findListByConditionFun(params).then((res) => { this.phenotypeSearch.totalPage = res.data.totalRecords this.phenotypeList = this.phenotypeList.concat( res.data.data.map((i) => { return { id: i.id, value: i.hpNumber, label: i.cn, } }) ) }) },
|