|
@@ -45,7 +45,8 @@ export default {
|
|
|
},
|
|
|
computed: {
|
|
|
noMore() {
|
|
|
- return this.pageNo > this.total;
|
|
|
+ console.log("SSSS", this.pageNo, this.total);
|
|
|
+ return this.pageNo > this.total && this.pageNo > 2;
|
|
|
},
|
|
|
disabled() {
|
|
|
return this.loading || this.noMore;
|
|
@@ -69,24 +70,31 @@ export default {
|
|
|
this.houseList = res.list;
|
|
|
}
|
|
|
});
|
|
|
- this.getTestList();
|
|
|
+ this.getTestList(true);
|
|
|
},
|
|
|
methods: {
|
|
|
dataformat(val) {
|
|
|
return timeFormat.dateStr(val);
|
|
|
},
|
|
|
- getTestList() {
|
|
|
+ getTestList(isFirst) {
|
|
|
+ if (isFirst) {
|
|
|
+ this.pageNo = 1;
|
|
|
+ }
|
|
|
+ console.log("XSSSSSSS", isFirst)
|
|
|
console.log("加载第" + this.pageNo + "页");
|
|
|
this.loading = true
|
|
|
let data = {
|
|
|
"orderType": this.currOrderType,
|
|
|
"houseNameList": this.ownHouseName == "所属项目" ? '' : this.ownHouseName,
|
|
|
"pageNo": this.pageNo++,
|
|
|
- "pageSize": 39
|
|
|
+ "pageSize": isFirst ? 39 : 40
|
|
|
}
|
|
|
api.testList(data).then((res) => {
|
|
|
if (res.success) {
|
|
|
this.total = res.pageModel.total;
|
|
|
+ if (isFirst) {
|
|
|
+ this.dataList = [];
|
|
|
+ }
|
|
|
this.dataList.push(...res.pageModel.resultSet);
|
|
|
console.log("success", this.dataList, res.pageModel);
|
|
|
} else {
|
|
@@ -94,6 +102,12 @@ export default {
|
|
|
}
|
|
|
this.loading = false
|
|
|
})
|
|
|
+ .then(() => {
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.loading = false
|
|
|
+ });
|
|
|
},
|
|
|
projectCommand(command) {
|
|
|
if (this.houseList.indexOf(command) == -1) {
|