fix: 测试计划执行列表中最后一个用例保存失效

--bug=1009979 --user=陈建星 【测试跟踪】执行测试计划中的接口用例,执行通过,用例状态没变 https://www.tapd.cn/55049933/s/1098523
This commit is contained in:
chenjianxing 2022-01-25 22:20:21 +08:00 committed by john1298308460
parent 875f711eee
commit ad83cad98f
1 changed files with 2 additions and 8 deletions

View File

@ -219,8 +219,7 @@ export default {
},
props: {
total: {
type: Number,
type: Number
},
searchParam: {
type: Object
@ -242,7 +241,7 @@ export default {
return !hasPermission('PROJECT_TRACK_PLAN:READ+RUN');
},
pageTotal() {
return this.total / this.pageSize;
return Math.ceil(this.total / this.pageSize);
}
},
methods: {
@ -307,10 +306,6 @@ export default {
};
},
saveCase(next, noTip) {
if (next && this.index === this.testCases.length - 1) {//
this.handleNext();
return;
}
let param = {};
param.id = this.testCase.id;
param.status = this.testCase.status;
@ -359,7 +354,6 @@ export default {
},
handleNext() {
if (this.index === this.testCases.length - 1 && this.pageNum === this.pageTotal) {
this.$warning('已经是最后一页');
return;
} else if (this.index === this.testCases.length - 1) {
this.$emit('nextPage');