feat(测试跟踪): 测试用例添加评论
This commit is contained in:
parent
ba689c3e27
commit
3f59ca5928
|
@ -53,6 +53,7 @@ public class PerformanceTestController {
|
|||
public Pager<List<LoadTestDTO>> list(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody QueryTestPlanRequest request) {
|
||||
Page<Object> page = PageHelper.startPage(goPage, pageSize, true);
|
||||
request.setWorkspaceId(SessionUtils.getCurrentWorkspaceId());
|
||||
request.setProjectId(SessionUtils.getCurrentProjectId());
|
||||
return PageUtils.setPageInfo(page, performanceTestService.list(request));
|
||||
}
|
||||
|
||||
|
|
|
@ -79,7 +79,6 @@ public class PerformanceTestService {
|
|||
|
||||
public List<LoadTestDTO> list(QueryTestPlanRequest request) {
|
||||
request.setOrders(ServiceUtils.getDefaultOrder(request.getOrders()));
|
||||
request.setProjectId(SessionUtils.getCurrentProjectId());
|
||||
return extLoadTestMapper.list(request);
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,66 @@
|
|||
<template>
|
||||
<el-card v-loading="result.loading">
|
||||
<template slot="header">
|
||||
<span style="font-size: 15px; color: #1E90FF">{{ $t('test_track.review.comment') }}</span>
|
||||
<i class="el-icon-refresh" @click="getComments()"
|
||||
style="margin-left:10px;font-size: 14px; cursor: pointer"/>
|
||||
</template>
|
||||
<div class="comment-list" style="height: 500px; overflow: auto;">
|
||||
<review-comment-item v-for="(comment,index) in comments"
|
||||
:key="index"
|
||||
:comment="comment"
|
||||
@refresh="getComments()"/>
|
||||
<div v-if="comments.length === 0" style="text-align: center">
|
||||
<i class="el-icon-chat-line-square" style="font-size: 15px;color: #8a8b8d;">
|
||||
<span style="font-size: 15px; color: #8a8b8d;">
|
||||
{{ $t('test_track.comment.no_comment') }}
|
||||
</span>
|
||||
</i>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ReviewCommentItem from "@/business/components/track/review/commom/ReviewCommentItem";
|
||||
|
||||
export default {
|
||||
name: "CaseComment",
|
||||
components: {ReviewCommentItem},
|
||||
props: {
|
||||
caseId: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
caseId() {
|
||||
this.comments = [];
|
||||
this.getComments();
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.comments = [];
|
||||
this.getComments();
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
comments: [],
|
||||
result: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getComments() {
|
||||
if (this.caseId) {
|
||||
this.result = this.$get('/test/case/comment/list/' + this.caseId, res => {
|
||||
this.comments = res.data;
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
|
@ -1,12 +1,14 @@
|
|||
<template>
|
||||
|
||||
<div>
|
||||
|
||||
<el-dialog :close-on-click-modal="false"
|
||||
<el-dialog :close-on-click-modal="false" class="case-dialog"
|
||||
@close="close"
|
||||
:title="operationType == 'edit' ? ( readOnly ? $t('test_track.case.view_case') : $t('test_track.case.edit_case')) : $t('test_track.case.create')"
|
||||
:visible.sync="dialogFormVisible" width="65%">
|
||||
:visible.sync="dialogFormVisible" width="88%">
|
||||
|
||||
<el-row :gutter="10">
|
||||
<div>
|
||||
<el-col :span="17">
|
||||
<el-card>
|
||||
<el-form :model="form" :rules="rules" ref="caseFrom" v-loading="result.loading">
|
||||
|
||||
<el-row>
|
||||
|
@ -235,9 +237,7 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
|
||||
<template v-slot:footer>
|
||||
<el-row style="float: right; margin-bottom: 10px;">
|
||||
<el-switch v-if="operationType == 'add'"
|
||||
v-model="isCreateContinue"
|
||||
:active-text="$t('test_track.case.save_create_continue')">
|
||||
|
@ -245,12 +245,20 @@
|
|||
<ms-dialog-footer v-if="!readOnly"
|
||||
@cancel="dialogFormVisible = false"
|
||||
@confirm="saveCase"/>
|
||||
</template>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<case-comment :case-id="testCase ? testCase.id : ''"/>
|
||||
</el-col>
|
||||
</div>
|
||||
</el-row>
|
||||
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
|
@ -264,10 +272,11 @@ import {Message} from "element-ui";
|
|||
import TestCaseAttachment from "@/business/components/track/case/components/TestCaseAttachment";
|
||||
import {getCurrentProjectID} from "../../../../../common/js/utils";
|
||||
import {buildNodePath} from "../../../api/definition/model/NodeTree";
|
||||
import CaseComment from "@/business/components/track/case/components/CaseComment";
|
||||
|
||||
export default {
|
||||
name: "TestCaseEdit",
|
||||
components: {MsDialogFooter, TestCaseAttachment},
|
||||
components: {CaseComment, MsDialogFooter, TestCaseAttachment},
|
||||
data() {
|
||||
return {
|
||||
result: {},
|
||||
|
@ -318,7 +327,8 @@ export default {
|
|||
methodOptions: [
|
||||
{value: 'auto', label: this.$t('test_track.case.auto')},
|
||||
{value: 'manual', label: this.$t('test_track.case.manual')}
|
||||
]
|
||||
],
|
||||
testCase: {}
|
||||
};
|
||||
},
|
||||
props: {
|
||||
|
@ -347,6 +357,11 @@ export default {
|
|||
this.$nextTick(() => (this.isStepTableAlive = true));
|
||||
},
|
||||
open(testCase) {
|
||||
this.testCase = {};
|
||||
if (testCase) {
|
||||
// 复制 不查询评论
|
||||
this.testCase = testCase.isCopy ? {} : testCase;
|
||||
}
|
||||
this.resetForm();
|
||||
this.projectId = getCurrentProjectID();
|
||||
if (window.history && window.history.pushState) {
|
||||
|
@ -697,4 +712,8 @@ export default {
|
|||
width: 194px;
|
||||
}
|
||||
|
||||
.case-dialog >>> .el-dialog__body {
|
||||
padding: 0 20px 10px 20px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue