From 8482f9af56e40dde3cd703660eebe4a33506c41c Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Thu, 9 Jun 2022 11:23:51 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E5=92=8C=E8=AF=84=E5=AE=A1?= =?UTF-8?q?=E7=94=A8=E4=BE=8B=E4=B8=8A=E4=B8=80=E9=A1=B5=E4=B8=8B=E4=B8=80?= =?UTF-8?q?=E9=A1=B5=E6=98=BE=E7=A4=BA=E6=95=B0=E9=87=8F=E4=B8=8D=E6=AD=A3?= =?UTF-8?q?=E7=A1=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1013774 --user=陈建星 【测试跟踪】github#14253 开始用例评审,评审页面用例条数分页时 会显示不正确 https://www.tapd.cn/55049933/s/1177230 --bug=1013306 --user=陈建星 【测试计划】执行功能用例页面用例数统计错误-偶发但经常遇到 https://www.tapd.cn/55049933/s/1177244 --- .../plan/view/comonents/functional/FunctionalTestCaseEdit.vue | 2 ++ .../track/review/view/components/TestReviewTestCaseEdit.vue | 4 ++++ .../track/review/view/components/TestReviewTestCaseList.vue | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/src/business/components/track/plan/view/comonents/functional/FunctionalTestCaseEdit.vue b/frontend/src/business/components/track/plan/view/comonents/functional/FunctionalTestCaseEdit.vue index 8b4b4d1a82..7892ea9f71 100644 --- a/frontend/src/business/components/track/plan/view/comonents/functional/FunctionalTestCaseEdit.vue +++ b/frontend/src/business/components/track/plan/view/comonents/functional/FunctionalTestCaseEdit.vue @@ -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--; diff --git a/frontend/src/business/components/track/review/view/components/TestReviewTestCaseEdit.vue b/frontend/src/business/components/track/review/view/components/TestReviewTestCaseEdit.vue index b01c0cf5a5..680a20be35 100644 --- a/frontend/src/business/components/track/review/view/components/TestReviewTestCaseEdit.vue +++ b/frontend/src/business/components/track/review/view/components/TestReviewTestCaseEdit.vue @@ -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--; diff --git a/frontend/src/business/components/track/review/view/components/TestReviewTestCaseList.vue b/frontend/src/business/components/track/review/view/components/TestReviewTestCaseList.vue index 4091c6c164..6ebf672bd3 100644 --- a/frontend/src/business/components/track/review/view/components/TestReviewTestCaseList.vue +++ b/frontend/src/business/components/track/review/view/components/TestReviewTestCaseList.vue @@ -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(() => {