diff --git a/backend/src/main/java/io/metersphere/track/controller/IssueCommentController.java b/backend/src/main/java/io/metersphere/track/controller/IssueCommentController.java index 64092d8d73..a9fe5c6d0e 100644 --- a/backend/src/main/java/io/metersphere/track/controller/IssueCommentController.java +++ b/backend/src/main/java/io/metersphere/track/controller/IssueCommentController.java @@ -29,7 +29,7 @@ public class IssueCommentController { @PostMapping("/save") @RequiresPermissions(PermissionConstants.PROJECT_TRACK_REVIEW_READ_COMMENT) @SendNotice(taskType = NoticeConstants.TaskType.DEFECT_TASK, target = "#targetClass.get(#request.issuesId)", targetClass = IssuesService.class, - event = NoticeConstants.Event.COMMENT, mailTemplate = "track/IssuesCommentUpdate", subject = "缺陷评论更新通知") + event = NoticeConstants.Event.COMMENT, mailTemplate = "track/IssuesCommentUpdate", subject = "缺陷") public IssueComment saveComment(@RequestBody IssuesRelevanceRequest request) { request.setId(UUID.randomUUID().toString()); return issueCommentService.saveComment(request); diff --git a/frontend/src/business/components/track/case/components/CaseComment.vue b/frontend/src/business/components/track/case/components/CaseComment.vue index cd10488fb9..e712771cef 100644 --- a/frontend/src/business/components/track/case/components/CaseComment.vue +++ b/frontend/src/business/components/track/case/components/CaseComment.vue @@ -10,7 +10,7 @@ :key="index" :comment="comment" :read-only="readOnly" - @refresh="getComments()"/> + @refresh="getComments()" api-url="/test/case"/>
diff --git a/frontend/src/business/components/track/case/components/TestCaseEdit.vue b/frontend/src/business/components/track/case/components/TestCaseEdit.vue index 429dffa8a3..ba2f6a95d0 100644 --- a/frontend/src/business/components/track/case/components/TestCaseEdit.vue +++ b/frontend/src/business/components/track/case/components/TestCaseEdit.vue @@ -115,7 +115,7 @@ + @refresh="getComments" api-url="/test/case"/>
diff --git a/frontend/src/business/components/track/case/components/TestCaseEditShow.vue b/frontend/src/business/components/track/case/components/TestCaseEditShow.vue index d8c4731eb5..c07d47e20b 100644 --- a/frontend/src/business/components/track/case/components/TestCaseEditShow.vue +++ b/frontend/src/business/components/track/case/components/TestCaseEditShow.vue @@ -102,7 +102,7 @@ + @refresh="getComments" :disabled="true" api-url="/test/case"/>
diff --git a/frontend/src/business/components/track/issue/IssueComment.vue b/frontend/src/business/components/track/issue/IssueComment.vue index c1a4a652dc..896e357bd3 100644 --- a/frontend/src/business/components/track/issue/IssueComment.vue +++ b/frontend/src/business/components/track/issue/IssueComment.vue @@ -88,7 +88,7 @@ export default { } this.result = this.$post('/issues/comment/save', comment, () => { this.$success(this.$t('test_track.comment.send_success')); - this.refresh(comment.IssueId); + this.refresh(comment.issuesId); this.from.description = ''; this.dialogTableVisible = false; }); diff --git a/frontend/src/business/components/track/issue/IssueEdit.vue b/frontend/src/business/components/track/issue/IssueEdit.vue index 1bd7133ddb..5212786997 100644 --- a/frontend/src/business/components/track/issue/IssueEdit.vue +++ b/frontend/src/business/components/track/issue/IssueEdit.vue @@ -29,10 +29,10 @@ export default { } }, methods: { - open(data) { + open(data, type) { this.visible = true; this.$nextTick(() => { - this.$refs.issueEditDetail.open(data); + this.$refs.issueEditDetail.open(data, type); }) }, handleClose() { diff --git a/frontend/src/business/components/track/issue/IssueEditDetail.vue b/frontend/src/business/components/track/issue/IssueEditDetail.vue index 235ac0b441..52a47518a8 100644 --- a/frontend/src/business/components/track/issue/IssueEditDetail.vue +++ b/frontend/src/business/components/track/issue/IssueEditDetail.vue @@ -235,8 +235,9 @@ export default { }, }, methods: { - open(data) { + open(data, type) { this.result.loading = true; + this.type = type; this.$nextTick(() => { getIssuePartTemplateWithProject((template, project) => { this.currentProject = project; @@ -244,17 +245,18 @@ export default { }); }); - if(data&&data.id){ + if (data && data.id) { this.$get('/issues/follow/' + data.id, response => { this.form.follows = response.data; for (let i = 0; i < response.data.length; i++) { - if(response.data[i]===this.currentUser().id){ + if (response.data[i] === this.currentUser().id) { this.showFollow = true; break; } } }) - }else { + } else { + this.issueId = null; this.form.follows = []; } }, @@ -325,6 +327,7 @@ export default { } } this.customFieldForm = parseCustomField(this.form, this.issueTemplate, this.customFieldRules); + this.comments = []; this.$nextTick(() => { if (this.$refs.testCaseIssueList) { this.$refs.testCaseIssueList.initTableData(); @@ -422,6 +425,10 @@ export default { } }, openComment() { + if (!this.issueId) { + this.$warning(this.$t('test_track.issue.save_before_open_comment')); + return; + } this.$refs.issueComment.open(); }, getComments() { diff --git a/frontend/src/business/components/track/issue/IssueList.vue b/frontend/src/business/components/track/issue/IssueList.vue index 07c24748f4..f75698944f 100644 --- a/frontend/src/business/components/track/issue/IssueList.vue +++ b/frontend/src/business/components/track/issue/IssueList.vue @@ -295,17 +295,17 @@ export default { }, handleEdit(data) { - this.$refs.issueEdit.open(data); + this.$refs.issueEdit.open(data, 'edit'); }, handleCreate() { - this.$refs.issueEdit.open(); + this.$refs.issueEdit.open(null, 'add'); }, handleCopy(data) { let copyData = {}; Object.assign(copyData, data); copyData.id = null; copyData.name = data.name + '_copy'; - this.$refs.issueEdit.open(copyData); + this.$refs.issueEdit.open(copyData, 'copy'); }, handleDelete(data) { this.page.result = this.$get('issues/delete/' + data.id, () => { diff --git a/frontend/src/business/components/track/review/commom/ReviewCommentItem.vue b/frontend/src/business/components/track/review/commom/ReviewCommentItem.vue index d0f5417515..f26b99ad1c 100644 --- a/frontend/src/business/components/track/review/commom/ReviewCommentItem.vue +++ b/frontend/src/business/components/track/review/commom/ReviewCommentItem.vue @@ -19,46 +19,45 @@ - +
- - - -
+ +
{{ comment.description }}
{{ imgDescription }}
+ :z-index="imageIndex" + style="width: 100px; height: 100px;" + fit="contain" + :src="src" + :preview-src-list="srcList">
- - - - - - + + +
+
+
+ +
+
+
+ + {{ $t('test_track.comment.send') }} + +
+
+
@@ -66,10 +65,11 @@