fix(测试跟踪): 用例评审中用例列表的状态与编辑的状态不一致

--bug=1015533 --user=陈建星 【测试跟踪】用例评审,评审通过的用例,在新评审中评审的时候还是通过状态 https://www.tapd.cn/55049933/s/1215445
This commit is contained in:
chenjianxing 2022-07-29 15:18:33 +08:00 committed by f2c-ci-robot[bot]
parent 30b65c725a
commit 41fa8c8839
2 changed files with 11 additions and 11 deletions

View File

@ -2,13 +2,13 @@
<el-card class="executeCard"> <el-card class="executeCard">
<div class="status-bnt"> <div class="status-bnt">
<el-button type="success" size="mini" <el-button type="success" size="mini"
:disabled="isReadOnly" :icon="testCase.reviewStatus === 'Pass' ? 'el-icon-check' : ''" :disabled="isReadOnly" :icon="testCase.status === 'Pass' ? 'el-icon-check' : ''"
@click="changeStatus('Pass')"> @click="changeStatus('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" :disabled="isReadOnly"
:icon="testCase.reviewStatus === 'UnPass' ? 'el-icon-check' : ''" :icon="testCase.status === 'UnPass' ? 'el-icon-check' : ''"
@click="changeStatus('UnPass')"> @click="changeStatus('UnPass')">
{{ $t('test_track.review.un_pass') }} {{ $t('test_track.review.un_pass') }}
</el-button> </el-button>
@ -43,14 +43,14 @@ export default {
methods: { methods: {
saveCase() { saveCase() {
// //
if (this.testCase.reviewStatus === 'UnPass' && this.originStatus !== 'UnPass' && !this.testCase.comment) { if (this.testCase.status === 'UnPass' && this.originStatus !== 'UnPass' && !this.testCase.comment) {
this.$refs.comment.inputLight(); this.$refs.comment.inputLight();
} else { } else {
this.$emit('saveCase'); this.$emit('saveCase');
} }
}, },
changeStatus(status) { changeStatus(status) {
this.testCase.reviewStatus = status; this.testCase.status = status;
} }
} }
} }

View File

@ -292,16 +292,16 @@ export default {
param.caseId = this.testCase.caseId; param.caseId = this.testCase.caseId;
param.reviewId = this.testCase.reviewId; param.reviewId = this.testCase.reviewId;
param.comment = this.testCase.comment; param.comment = this.testCase.comment;
param.status = this.testCase.reviewStatus; param.status = this.testCase.status;
this.$post('/test/review/case/edit', param, () => { this.$post('/test/review/case/edit', param, () => {
this.$success(this.$t('commons.save_success')); this.$success(this.$t('commons.save_success'));
this.updateTestCases(param); this.updateTestCases(param);
this.setReviewStatus(this.testCase.reviewId); this.setReviewStatus(this.testCase.reviewId);
// //
this.testCases[this.index].reviewStatus = this.testCase.reviewStatus; this.testCases[this.index].status = this.testCase.status;
// //
this.oldReviewStatus = this.testCase.reviewStatus; this.oldReviewStatus = this.testCase.status;
if (this.testCase.comment) { if (this.testCase.comment) {
this.$refs.comment.getComments(); this.$refs.comment.getComments();
@ -311,7 +311,7 @@ export default {
}, },
saveCaseReview() { saveCaseReview() {
let param = {}; let param = {};
let status = this.testCase.reviewStatus; let status = this.testCase.status;
param.id = this.testCase.id; param.id = this.testCase.id;
param.caseId = this.testCase.caseId; param.caseId = this.testCase.caseId;
param.reviewId = this.testCase.reviewId; param.reviewId = this.testCase.reviewId;
@ -321,7 +321,7 @@ export default {
this.setReviewStatus(this.testCase.reviewId); this.setReviewStatus(this.testCase.reviewId);
this.oldReviewStatus = status; this.oldReviewStatus = status;
// //
this.testCases[this.index].reviewStatus = status; this.testCases[this.index].status = status;
if (this.index < this.testCases.length - 1) { if (this.index < this.testCases.length - 1) {
this.handleNext(); this.handleNext();
} }
@ -381,7 +381,7 @@ export default {
parseCustomField(item, this.testCaseTemplate, null, buildTestCaseOldFields(item)); parseCustomField(item, this.testCaseTemplate, null, buildTestCaseOldFields(item));
this.isCustomFiledActive = true; this.isCustomFiledActive = true;
this.testCase = item; this.testCase = item;
this.oldReviewStatus = this.testCase.reviewStatus; this.oldReviewStatus = this.testCase.status;
if (!this.testCase.actualResult) { if (!this.testCase.actualResult) {
// ,使 // ,使
this.testCase.actualResult = this.testCaseTemplate.actualResult; this.testCase.actualResult = this.testCaseTemplate.actualResult;
@ -405,7 +405,7 @@ export default {
openTestCaseEdit(testCase, tableData) { openTestCaseEdit(testCase, tableData) {
this.showDialog = true; this.showDialog = true;
// //
this.oldReviewStatus = testCase.reviewStatus; this.oldReviewStatus = testCase.status;
this.activeTab = 'detail'; this.activeTab = 'detail';
this.hasTapdId = false; this.hasTapdId = false;
this.hasZentaoId = false; this.hasZentaoId = false;