fix(测试跟踪): 测试跟踪首页列表数据切换问题

--bug=1032339 --user=王旭 【测试跟踪】首页-过去7天测试计划失败用例TOP 10-页数切换-显示暂无数据 https://www.tapd.cn/55049933/s/1435638
This commit is contained in:
WangXu10 2023-11-13 11:43:28 +08:00 committed by 刘瑞斌
parent ebfe7786ba
commit 7e5ceb67ea
2 changed files with 20 additions and 5 deletions

View File

@ -178,7 +178,7 @@ export default {
homeTestPlanFailureCaseGet(
this.projectId,
this.pageSize,
this.currentPage
this.currentPage - 1
)
.then((r) => {
this.loading = false;

View File

@ -48,14 +48,29 @@ export default {
},
change: Function
},
data() {
return {
timer: null
};
},
methods: {
handleSizeChange: function (size) {
this.$emit('update:pageSize', size)
this.change();
this.$emit('update:pageSize', size);
if (this.timer === null) {
this.timer = setTimeout(() => {
this.change();
this.timer = null;
}, 0);
}
},
handleCurrentChange(current) {
this.$emit('update:currentPage', current)
this.change();
this.$emit('update:currentPage', current);
if (this.timer === null) {
this.timer = setTimeout(() => {
this.change();
this.timer = null;
}, 0);
}
}
}
}