|
@@ -38,15 +38,19 @@ export default {
|
|
orderList: [{ orderName: "按创建时间排序", orderType: "created" }, { orderName: "按更新时间排序", orderType: "updated" }],
|
|
orderList: [{ orderName: "按创建时间排序", orderType: "created" }, { orderName: "按更新时间排序", orderType: "updated" }],
|
|
currOrderName: "更新时间",
|
|
currOrderName: "更新时间",
|
|
currOrderType: "",
|
|
currOrderType: "",
|
|
- shareModel: ""
|
|
|
|
|
|
+ shareModel: "",
|
|
|
|
+ pageNo: 1,
|
|
|
|
+ dataList: [],
|
|
|
|
+ rowTotal: 0
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
noMore() {
|
|
noMore() {
|
|
- return this.pageModel.count == this.pageModel.total && this.pageModel.total > 1
|
|
|
|
|
|
+ console.log(this.rowTotal, this.dataList.length);
|
|
|
|
+ return this.rowTotal === this.dataList.length;
|
|
},
|
|
},
|
|
disabled() {
|
|
disabled() {
|
|
- return this.loading || this.pageModel.count == this.pageModel.total
|
|
|
|
|
|
+ return this.loading || this.noMore;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
@@ -67,26 +71,27 @@ export default {
|
|
this.houseList = res.list;
|
|
this.houseList = res.list;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
- this.getTestList(true);
|
|
|
|
|
|
+ this.getTestList();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
dataformat(val) {
|
|
dataformat(val) {
|
|
return timeFormat.dateStr(val);
|
|
return timeFormat.dateStr(val);
|
|
},
|
|
},
|
|
- load() {
|
|
|
|
- this.getTestList(false);
|
|
|
|
- },
|
|
|
|
- getTestList(isFirst) {
|
|
|
|
- this.loading = !isFirst
|
|
|
|
|
|
+ getTestList() {
|
|
|
|
+ this.loading = true
|
|
|
|
+ console.log("XXXXXSS");
|
|
let data = {
|
|
let data = {
|
|
"orderType": this.currOrderType,
|
|
"orderType": this.currOrderType,
|
|
- "ownHouseName": this.ownHouseName == "所属项目" ? '' : this.ownHouseName,
|
|
|
|
- "pageNo": isFirst ? 0 : this.pageModel.count + 1,
|
|
|
|
|
|
+ "houseNameList": this.ownHouseName == "所属项目" ? '' : this.ownHouseName,
|
|
|
|
+ "pageNo": this.pageNo++,
|
|
|
|
+ "pageSize": 4
|
|
}
|
|
}
|
|
api.testList(data).then((res) => {
|
|
api.testList(data).then((res) => {
|
|
if (res.success) {
|
|
if (res.success) {
|
|
this.pageModel = res.pageModel;
|
|
this.pageModel = res.pageModel;
|
|
- console.log("success", this.pageModel);
|
|
|
|
|
|
+ this.dataList.push(...this.pageModel.resultSet);
|
|
|
|
+ console.log("success", this.dataList);
|
|
|
|
+ this.rowTotal = res.pageModel.rowTotal;
|
|
} else {
|
|
} else {
|
|
console.log("error");
|
|
console.log("error");
|
|
}
|
|
}
|