|
@@ -152,8 +152,8 @@ export default {
|
|
},
|
|
},
|
|
async getList() {
|
|
async getList() {
|
|
const query = {
|
|
const query = {
|
|
- // num: this.list.pageNum,
|
|
|
|
- // size: this.list.pageSize
|
|
|
|
|
|
+ pageNum: this.list.pageNum,
|
|
|
|
+ pageSize: this.list.pageSize,
|
|
productCode: this.getproductCode
|
|
productCode: this.getproductCode
|
|
}
|
|
}
|
|
console.log('搜索参数:', query)
|
|
console.log('搜索参数:', query)
|
|
@@ -162,21 +162,20 @@ export default {
|
|
this.list.loading = false
|
|
this.list.loading = false
|
|
this.list.loaded = true
|
|
this.list.loaded = true
|
|
if (data && Array.isArray(data.list)) {
|
|
if (data && Array.isArray(data.list)) {
|
|
- // this.list.pageNum += 1
|
|
|
|
- // this.list.total = data.total
|
|
|
|
|
|
+ this.list.pageNum += 1
|
|
|
|
+ this.list.total = data.total
|
|
// this.list.total = 10 //不支持分页可以写死
|
|
// this.list.total = 10 //不支持分页可以写死
|
|
this.list.value = this.list.value.concat(data.list)
|
|
this.list.value = this.list.value.concat(data.list)
|
|
- this.list.finished = true
|
|
|
|
} else {
|
|
} else {
|
|
this.list.finished = true
|
|
this.list.finished = true
|
|
}
|
|
}
|
|
// 数据请求完成(根据页码计算,当前页是否是最后一页)
|
|
// 数据请求完成(根据页码计算,当前页是否是最后一页)
|
|
// 请求完成后,页码就变为了下一页的页面,所以这里要-1
|
|
// 请求完成后,页码就变为了下一页的页面,所以这里要-1
|
|
- // const isLastPage =
|
|
|
|
- // (this.list.pageNum - 1) * this.list.pageSize >= this.list.total
|
|
|
|
- // if (isLastPage) {
|
|
|
|
- // this.list.finished = true
|
|
|
|
- // }
|
|
|
|
|
|
+ const isLastPage =
|
|
|
|
+ (this.list.pageNum - 1) * this.list.pageSize >= this.list.total
|
|
|
|
+ if (isLastPage) {
|
|
|
|
+ this.list.finished = true
|
|
|
|
+ }
|
|
},
|
|
},
|
|
nameF(item) {
|
|
nameF(item) {
|
|
if (item.userType === 0) {
|
|
if (item.userType === 0) {
|