fix: 修复用例评审评论链接

This commit is contained in:
wenyann 2020-11-04 18:09:11 +08:00
parent 0d663a0579
commit c1f4c8cba3
6 changed files with 8 additions and 4 deletions

View File

@ -144,7 +144,7 @@ public class MailService {
context.put("testCaseName", testCaseWithBLOBs.getName()); context.put("testCaseName", testCaseWithBLOBs.getName());
context.put("description", request.getDescription()); context.put("description", request.getDescription());
context.put("url", baseSystemConfigDTO.getUrl()); context.put("url", baseSystemConfigDTO.getUrl());
context.put("id", testCaseWithBLOBs.getId()); context.put("id", request.getReviewId());
try { try {
String commentTemplate = IOUtils.toString(this.getClass().getResource("/mail/ReviewComments.html"), StandardCharsets.UTF_8); String commentTemplate = IOUtils.toString(this.getClass().getResource("/mail/ReviewComments.html"), StandardCharsets.UTF_8);
sendReviewNotice(addresseeIdList(messageDetail, userIds, eventType), context, commentTemplate); sendReviewNotice(addresseeIdList(messageDetail, userIds, eventType), context, commentTemplate);

View File

@ -7,5 +7,6 @@ import lombok.Setter;
@Getter @Getter
@Setter @Setter
public class SaveCommentRequest extends TestCaseComment { public class SaveCommentRequest extends TestCaseComment {
private String reviewId;
} }

View File

@ -10,7 +10,7 @@
${testCaseName}<br/> ${testCaseName}<br/>
添加评论:${description}<br/> 添加评论:${description}<br/>
点击下面链接进入用例评审页面</p> 点击下面链接进入用例评审页面</p>
<a href="${url}/#/track/review/view">${url}/#/track/review/view</a> <a href="${url}/#/track/review/view/${id}">${url}/#/track/review/view/${id}</a>
</div> </div>
</body> </body>
</html> </html>

View File

@ -40,7 +40,8 @@ export default {
components: {ReviewCommentItem}, components: {ReviewCommentItem},
props: { props: {
caseId: String, caseId: String,
comments: Array comments: Array,
reviewId:String,
}, },
data() { data() {
return { return {
@ -53,6 +54,7 @@ export default {
let comment = {}; let comment = {};
comment.caseId = this.caseId; comment.caseId = this.caseId;
comment.description = this.textarea; comment.description = this.textarea;
comment.reviewId=this.reviewId;
if (!this.textarea) { if (!this.textarea) {
this.$warning(this.$t('test_track.comment.description_is_null')); this.$warning(this.$t('test_track.comment.description_is_null'));
return; return;

View File

@ -229,7 +229,7 @@
<i class="el-icon-refresh" @click="getComments(testCase)" <i class="el-icon-refresh" @click="getComments(testCase)"
style="margin-left:10px;font-size: 14px; cursor: pointer"/> style="margin-left:10px;font-size: 14px; cursor: pointer"/>
</template> </template>
<review-comment :comments="comments" :case-id="testCase.caseId" @getComments="getComments"/> <review-comment :comments="comments" :case-id="testCase.caseId" :review-id="testCase.reviewId" @getComments="getComments"/>
</el-card> </el-card>
</el-col> </el-col>
</div> </div>

View File

@ -300,6 +300,7 @@ export default {
return path + "/" + this.currentPage + "/" + this.pageSize; return path + "/" + this.currentPage + "/" + this.pageSize;
}, },
handleEdit(testCase, index) { handleEdit(testCase, index) {
console.log(testCase)
this.isReadOnly = false; this.isReadOnly = false;
if (!checkoutTestManagerOrTestUser()) { if (!checkoutTestManagerOrTestUser()) {
this.isReadOnly = true; this.isReadOnly = true;