From 2175995964d205f1ee89bc9d043ed5f5af5436d4 Mon Sep 17 00:00:00 2001 From: wenyann Date: Fri, 14 May 2021 12:13:32 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=89=93=E6=A0=87=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../track/review/commom/ReviewComment.vue | 6 ++++-- .../track/review/commom/ReviewCommentItem.vue | 15 ++++++++++++++- .../view/components/TestReviewTestCaseEdit.vue | 14 +++++++++++++- 3 files changed, 31 insertions(+), 4 deletions(-) diff --git a/frontend/src/business/components/track/review/commom/ReviewComment.vue b/frontend/src/business/components/track/review/commom/ReviewComment.vue index 8a8a89fa6e..ef4184b8b2 100644 --- a/frontend/src/business/components/track/review/commom/ReviewComment.vue +++ b/frontend/src/business/components/track/review/commom/ReviewComment.vue @@ -4,7 +4,8 @@ + @refresh="refresh" + :review-status="reviewStatus"/>
@@ -44,7 +45,8 @@ export default { props: { caseId: String, comments: Array, - reviewId:String, + reviewId: String, + reviewStatus: String, }, data() { return { diff --git a/frontend/src/business/components/track/review/commom/ReviewCommentItem.vue b/frontend/src/business/components/track/review/commom/ReviewCommentItem.vue index 8a57bd7af4..5c6fa4b4d2 100644 --- a/frontend/src/business/components/track/review/commom/ReviewCommentItem.vue +++ b/frontend/src/business/components/track/review/commom/ReviewCommentItem.vue @@ -10,6 +10,14 @@ {{ comment.createTime | timestampFormatDate }} + + + {{ $t('test_track.review.un_pass') }} + + + {{ $t('test_track.review.pass') }} + + @@ -54,7 +62,8 @@ export default { readOnly: { type: Boolean, default: false - } + }, + reviewStatus: String, }, data() { return { @@ -144,4 +153,8 @@ pre { margin-right: 5px; cursor: pointer; } + +/deep/ .el-button--mini, .el-button--mini.is-round { + padding: 4px 9px; +} 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 aef44a55cd..984281507c 100644 --- a/frontend/src/business/components/track/review/view/components/TestReviewTestCaseEdit.vue +++ b/frontend/src/business/components/track/review/view/components/TestReviewTestCaseEdit.vue @@ -115,7 +115,7 @@ style="margin-left:10px;font-size: 14px; cursor: pointer"/> + @getComments="getComments" :review-status="testCase.reviewStatus" ref="reviewComment"/>
@@ -274,6 +274,18 @@ export default { } else { this.$refs.reviewComment.inputLight(); this.$warning(this.$t('test_track.comment.description_is_null')); + this.$post('/test/review/case/edit', param, () => { + this.$success(this.$t('commons.save_success')); + this.updateTestCases(param); + this.setReviewStatus(this.testCase.reviewId); + // 修改当前用例的评审状态 + this.testCase.reviewStatus = status; + // 修改当前用例在整个用例列表的状态 + this.testCases[this.index].reviewStatus = status; + if (this.index < this.testCases.length - 1) { + this.handleNext(); + } + }); } } else { this.$post('/test/review/case/edit', param, () => {