fix(测试跟踪): 测试计划和评审用例上一页下一页显示数量不正确

--bug=1013774 --user=陈建星 【测试跟踪】github#14253 开始用例评审,评审页面用例条数分页时 会显示不正确 https://www.tapd.cn/55049933/s/1177230
--bug=1013306 --user=陈建星 【测试计划】执行功能用例页面用例数统计错误-偶发但经常遇到 https://www.tapd.cn/55049933/s/1177244
This commit is contained in:
chenjianxing 2022-06-09 11:23:51 +08:00 committed by jianxing
parent d12a115211
commit 8482f9af56
3 changed files with 7 additions and 1 deletions

View File

@ -366,6 +366,7 @@ export default {
return;
} else if (this.index === this.testCases.length - 1) {
this.$emit('nextPage');
this.index = 0;
return;
}
this.index++;
@ -384,6 +385,7 @@ export default {
return;
} else if (this.index === 0) {
this.$emit('prePage');
this.index = this.pageSize - 1;
return;
}
this.index--;

View File

@ -368,9 +368,12 @@ export default {
},
handleNext() {
if (this.index === this.testCases.length - 1 && this.pageNum === this.pageTotal) {
//
return;
} else if (this.index === this.testCases.length - 1) {
//
this.$emit('nextPage');
this.index = 0;
return;
}
this.index++;
@ -381,6 +384,7 @@ export default {
return;
} else if (this.index === 0) {
this.$emit('prePage');
this.index = this.pageSize - 1;
return;
}
this.index--;

View File

@ -372,7 +372,7 @@ export default {
this.total = data.itemCount;
this.tableData = data.listObject;
this.getPreData();
if (callback && typeof callback === "function") {
if (callback && callback instanceof Function) {
callback();
}
setTimeout(() => {