feat(测试跟踪): 保存评审结果后自动跳转下一条用例

This commit is contained in:
shiziyuan9527 2020-10-21 14:14:13 +08:00
parent 49bd060cad
commit 4866c32746
2 changed files with 6 additions and 4 deletions

View File

@ -401,8 +401,7 @@ export default {
this.$success(this.$t('commons.save_success')); this.$success(this.$t('commons.save_success'));
this.updateTestCases(param); this.updateTestCases(param);
this.setPlanStatus(this.testCase.planId); this.setPlanStatus(this.testCase.planId);
// Pass if (this.index < this.testCases.length - 1) {
if (this.testCase.status === 'Pass' && this.index < this.testCases.length - 1) {
this.handleNext(); this.handleNext();
} }
}); });

View File

@ -39,11 +39,11 @@
<el-divider direction="vertical"></el-divider> <el-divider direction="vertical"></el-divider>
<el-button type="success" size="mini" <el-button type="success" size="mini"
:disabled="isReadOnly" :plain="testCase.reviewStatus !== 'Pass'" @click="saveCase('Pass')"> :disabled="isReadOnly" :icon="testCase.reviewStatus === 'Pass' ? 'el-icon-check' : ''" @click="saveCase('Pass')">
{{ $t('test_track.review.pass') }} {{ $t('test_track.review.pass') }}
</el-button> </el-button>
<el-button type="danger" size="mini" <el-button type="danger" size="mini"
:disabled="isReadOnly" :plain="testCase.reviewStatus !== 'UnPass'" @click="saveCase('UnPass')"> :disabled="isReadOnly" :icon="testCase.reviewStatus === 'UnPass' ? 'el-icon-check' : ''" @click="saveCase('UnPass')">
{{ $t('test_track.review.un_pass') }} {{ $t('test_track.review.un_pass') }}
</el-button> </el-button>
</el-col> </el-col>
@ -296,6 +296,9 @@ export default {
this.testCase.reviewStatus = status; this.testCase.reviewStatus = status;
// //
this.testCases[this.index].reviewStatus = status; this.testCases[this.index].reviewStatus = status;
if (this.index < this.testCases.length - 1) {
this.handleNext();
}
}); });
}, },
updateTestCases(param) { updateTestCases(param) {