|
@@ -31,7 +31,6 @@ export default {
|
|
|
label: '广州'
|
|
|
}],
|
|
|
value: '',
|
|
|
- pageModel: "",
|
|
|
loading: false,
|
|
|
houseList: [],
|
|
|
ownHouseName: "所属项目",
|
|
@@ -41,13 +40,12 @@ export default {
|
|
|
shareModel: "",
|
|
|
pageNo: 1,
|
|
|
dataList: [],
|
|
|
- rowTotal: 0
|
|
|
+ total: 0
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
noMore() {
|
|
|
- console.log(this.rowTotal, this.dataList.length);
|
|
|
- return this.rowTotal === this.dataList.length;
|
|
|
+ return this.pageNo > this.total;
|
|
|
},
|
|
|
disabled() {
|
|
|
return this.loading || this.noMore;
|
|
@@ -78,20 +76,19 @@ export default {
|
|
|
return timeFormat.dateStr(val);
|
|
|
},
|
|
|
getTestList() {
|
|
|
+ console.log("加载第" + this.pageNo + "页");
|
|
|
this.loading = true
|
|
|
- console.log("XXXXXSS");
|
|
|
let data = {
|
|
|
"orderType": this.currOrderType,
|
|
|
"houseNameList": this.ownHouseName == "所属项目" ? '' : this.ownHouseName,
|
|
|
"pageNo": this.pageNo++,
|
|
|
- "pageSize": 4
|
|
|
+ "pageSize": 39
|
|
|
}
|
|
|
api.testList(data).then((res) => {
|
|
|
if (res.success) {
|
|
|
- this.pageModel = res.pageModel;
|
|
|
- this.dataList.push(...this.pageModel.resultSet);
|
|
|
- console.log("success", this.dataList);
|
|
|
- this.rowTotal = res.pageModel.rowTotal;
|
|
|
+ this.total = res.pageModel.total;
|
|
|
+ this.dataList.push(...res.pageModel.resultSet);
|
|
|
+ console.log("success", this.dataList, res.pageModel);
|
|
|
} else {
|
|
|
console.log("error");
|
|
|
}
|
|
@@ -137,7 +134,7 @@ export default {
|
|
|
if (res.success) {
|
|
|
instance.confirmButtonLoading = false;
|
|
|
this.$message.success("删除成功");
|
|
|
- this.pageModel.resultSet.splice(index, 1);
|
|
|
+ this.dataList.splice(index, 1);
|
|
|
done();
|
|
|
} else {
|
|
|
this.$message.error("删除失败,请重试");
|
|
@@ -152,6 +149,9 @@ export default {
|
|
|
}).catch(() => { });
|
|
|
},
|
|
|
copyTest(item) {
|
|
|
+ // document.getElementById("historyTools").scrollTo(0, 0);
|
|
|
+ // document.getElementById("historyTools").scrollIntoView();
|
|
|
+ // console.log("SSSS", document.getElementById("historyTools").scrollHeight)
|
|
|
let data = {
|
|
|
"id": item._id,
|
|
|
"operator": "admin"
|
|
@@ -162,7 +162,7 @@ export default {
|
|
|
message: '复制成功',
|
|
|
type: 'success'
|
|
|
});
|
|
|
- this.pageModel.resultSet.unshift(res.single);
|
|
|
+ this.dataList.unshift(res.single);
|
|
|
this.isCopy = true;
|
|
|
setTimeout(() => {
|
|
|
this.isCopy = false;
|