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

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

View File

@ -44,13 +44,13 @@
<el-divider direction="vertical"></el-divider>
<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="saveCase('Pass')">
{{ $t('test_track.review.pass') }}
</el-button>
<el-button type="danger" size="mini"
:disabled="isReadOnly"
:icon="testCase.reviewStatus === 'UnPass' ? 'el-icon-check' : ''"
:icon="testCase.status === 'UnPass' ? 'el-icon-check' : ''"
@click="saveCase('UnPass')">
{{ $t('test_track.review.un_pass') }}
</el-button>
@ -140,7 +140,7 @@
</template>
<review-comment :comments="comments" :case-id="testCase.caseId" :review-id="testCase.reviewId"
:oldReviewStatus="oldReviewStatus"
@getComments="getComments" :review-status="testCase.reviewStatus" ref="reviewComment"
@getComments="getComments" :review-status="testCase.status" ref="reviewComment"
@saveCaseReview="saveCaseReview"/>
</el-card>
</el-col>
@ -296,7 +296,7 @@ export default {
param.reviewId = this.testCase.reviewId;
param.status = status;
if (status === 'UnPass') {
this.testCase.reviewStatus = 'UnPass';
this.testCase.status = 'UnPass';
//
if (this.oldReviewStatus === 'Prepare' && this.comments.length < 1) {
this.$refs.reviewComment.inputLight();
@ -326,9 +326,10 @@ export default {
}
this.updateTestCases(param);
this.setReviewStatus(this.testCase.reviewId);
this.testCase.reviewStatus = status;
this.testCase.status = status;
//
this.testCases[this.index].reviewStatus = status;
this.testCases[this.index].status
= status;
this.handleNext();
//
this.oldReviewStatus = status;
@ -336,7 +337,7 @@ export default {
},
saveCaseReview() {
let param = {};
let status = this.testCase.reviewStatus;
let status = this.testCase.status;
param.id = this.testCase.id;
param.caseId = this.testCase.caseId;
param.reviewId = this.testCase.reviewId;
@ -346,7 +347,7 @@ export default {
this.setReviewStatus(this.testCase.reviewId);
this.oldReviewStatus = status;
//
this.testCases[this.index].reviewStatus = status;
this.testCases[this.index].status = status;
if (this.index < this.testCases.length - 1) {
this.handleNext();
}
@ -406,7 +407,7 @@ export default {
parseCustomField(item, this.testCaseTemplate, null, buildTestCaseOldFields(item));
this.isCustomFiledActive = true;
this.testCase = item;
this.oldReviewStatus = this.testCase.reviewStatus;
this.oldReviewStatus = this.testCase.status;
if (!this.testCase.actualResult) {
// ,使
this.testCase.actualResult = this.testCaseTemplate.actualResult;
@ -432,7 +433,7 @@ export default {
openTestCaseEdit(testCase, tableData) {
this.showDialog = true;
//
this.oldReviewStatus = testCase.reviewStatus;
this.oldReviewStatus = testCase.status;
this.activeTab = 'detail';
this.getComments(testCase);
this.hasTapdId = false;