parent
d1d36352c3
commit
e12ec631a1
|
@ -131,7 +131,7 @@
|
|||
:select-node="selectNode"
|
||||
:select-condition="condition"
|
||||
:public-enable="currentActiveName === 'default' ? false : true"
|
||||
:type="type"
|
||||
:case-type="type"
|
||||
@addTab="addTab"
|
||||
ref="testCaseEdit">
|
||||
</test-case-edit>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<template>
|
||||
<el-card>
|
||||
<el-card :bodyStyle="{padding:'0px'}">
|
||||
<div class="card-content">
|
||||
<div class="ms-main-div" @click="showAll">
|
||||
<ms-container v-loading="result.loading" style="overflow: auto">
|
||||
<ms-aside-container :height="pageHight" width="360px">
|
||||
<ms-aside-container :height="pageHight">
|
||||
<test-case-base-info
|
||||
:form="form"
|
||||
:is-form-alive="isFormAlive"
|
||||
|
@ -48,6 +48,7 @@
|
|||
@compare="compare" @checkout="checkout" @create="create" @del="del"/>
|
||||
<el-dropdown split-button type="primary" class="ms-api-buttion" @click="handleCommand"
|
||||
@command="handleCommand" size="small" style="float: right;margin-right: 20px"
|
||||
v-if="(this.path ==='/test/case/add') || (this.isPublic && this.isXpack)"
|
||||
:disabled="readOnly">
|
||||
{{ $t('commons.save') }}
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
|
@ -61,6 +62,10 @@
|
|||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
<el-button v-else type="primary" class="ms-api-buttion" @click="handleCommand"
|
||||
@command="handleCommand" size="small" style="float: right;margin-right: 20px">
|
||||
{{ $t('commons.save') }}
|
||||
</el-button>
|
||||
</div>
|
||||
<ms-form-divider :title="$t('test_track.case.step_info')"/>
|
||||
|
||||
|
@ -81,30 +86,10 @@
|
|||
<test-case-edit-other-info :read-only="readOnly" :project-id="projectIds" :form="form"
|
||||
:is-copy="currentTestCaseInfo.isCopy"
|
||||
:label-width="formLabelWidth" :case-id="form.id"
|
||||
:type="type" :comments="comments"
|
||||
@openComment="openComment"
|
||||
:version-enable="versionEnable"
|
||||
ref="otherInfo"/>
|
||||
|
||||
<el-row style="margin-top: 10px" v-if="type!=='add'">
|
||||
<el-col :span="20" :offset="1">{{ $t('test_track.review.comment') }}:
|
||||
<el-button icon="el-icon-plus" type="mini" @click="openComment"></el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="type!=='add'">
|
||||
<el-col :span="20" :offset="1">
|
||||
|
||||
<review-comment-item v-for="(comment,index) in comments"
|
||||
:key="index"
|
||||
:comment="comment"
|
||||
@refresh="getComments" api-url="/test/case"/>
|
||||
<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>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<test-case-comment :case-id="form.id"
|
||||
@getComments="getComments" ref="testCaseComment"/>
|
||||
</el-form>
|
||||
|
@ -217,6 +202,7 @@ export default {
|
|||
showFollow: false,
|
||||
isValidate: false,
|
||||
currentValidateName: "",
|
||||
type:"",
|
||||
form: {
|
||||
name: '',
|
||||
module: 'default-module',
|
||||
|
@ -308,7 +294,7 @@ export default {
|
|||
selectCondition: {
|
||||
type: Object
|
||||
},
|
||||
type: String,
|
||||
caseType: String,
|
||||
publicEnable: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
|
@ -390,6 +376,7 @@ export default {
|
|||
|
||||
},
|
||||
created() {
|
||||
this.type = this.caseType;
|
||||
if (!this.projectList || this.projectList.length === 0) { //没有项目数据的话请求项目数据
|
||||
this.$get("/project/listAll", (response) => {
|
||||
this.projectList = response.data; //获取当前工作空间所拥有的项目,
|
||||
|
@ -717,6 +704,7 @@ export default {
|
|||
} else {
|
||||
param.id = response.data.id;
|
||||
this.$emit("caseCreate", param);
|
||||
this.type = 'edit';
|
||||
this.close();
|
||||
}
|
||||
this.form.id = response.data.id;
|
||||
|
@ -1105,7 +1093,7 @@ export default {
|
|||
.ms-opt-btn {
|
||||
position: fixed;
|
||||
right: 50px;
|
||||
z-index: 9;
|
||||
z-index: 9999!important;
|
||||
}
|
||||
|
||||
.ms-case-input {
|
||||
|
|
|
@ -41,7 +41,8 @@
|
|||
<template v-slot:label>
|
||||
<tab-pane-count :title="$t('commons.relationship.name')" :count="relationshipCount"/>
|
||||
</template>
|
||||
<dependencies-list @setCount="setRelationshipCount" :read-only="readOnly" :resource-id="caseId" :version-enable="versionEnable" resource-type="TEST_CASE" ref="relationship"/>
|
||||
<dependencies-list @setCount="setRelationshipCount" :read-only="readOnly" :resource-id="caseId"
|
||||
:version-enable="versionEnable" resource-type="TEST_CASE" ref="relationship"/>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane :label="$t('test_track.case.attachment')" name="attachment">
|
||||
|
@ -72,6 +73,36 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane v-if="type!=='add'" :label="$t('test_track.review.comment')" name="comment">
|
||||
<el-tooltip class="item-tabs" effect="dark" :content="$t('test_track.review.comment')" placement="top-start" slot="label">
|
||||
<span>
|
||||
{{ $t('test_track.review.comment') }}
|
||||
<div class="el-step__icon is-text ms-api-col ms-header" v-if="comments.length>0">
|
||||
<div class="el-step__icon-inner">{{ comments.length }}</div>
|
||||
</div>
|
||||
</span>
|
||||
</el-tooltip>
|
||||
<el-row style="margin-top: 10px" v-if="type!=='add'">
|
||||
<el-col :span="20" :offset="1">{{ $t('test_track.review.comment') }}:
|
||||
<el-button icon="el-icon-plus" type="mini" @click="openComment"></el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="type!=='add'">
|
||||
<el-col :span="20" :offset="1">
|
||||
<review-comment-item v-for="(comment,index) in comments"
|
||||
:key="index"
|
||||
:comment="comment"
|
||||
@refresh="getComments" api-url="/test/case"/>
|
||||
<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>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</template>
|
||||
|
||||
|
@ -86,6 +117,8 @@ import TestCaseTestRelate from "@/business/components/track/case/components/Test
|
|||
import DependenciesList from "@/business/components/common/components/graph/DependenciesList";
|
||||
import TabPaneCount from "@/business/components/track/plan/view/comonents/report/detail/component/TabPaneCount";
|
||||
import {getRelationshipCountCase} from "@/network/testCase";
|
||||
import TestCaseComment from "@/business/components/track/case/components/TestCaseComment";
|
||||
import ReviewCommentItem from "@/business/components/track/review/commom/ReviewCommentItem";
|
||||
|
||||
export default {
|
||||
name: "TestCaseEditOtherInfo",
|
||||
|
@ -93,8 +126,11 @@ export default {
|
|||
TabPaneCount,
|
||||
DependenciesList,
|
||||
TestCaseTestRelate,
|
||||
FormRichTextItem, TestCaseIssueRelate, TestCaseAttachment, MsRichText, TestCaseRichText},
|
||||
props: ['form', 'labelWidth', 'caseId', 'readOnly', 'projectId', 'isTestPlan', 'planId', 'versionEnable', 'isCopy', 'isTestPlanEdit'],
|
||||
TestCaseComment,
|
||||
ReviewCommentItem,
|
||||
FormRichTextItem, TestCaseIssueRelate, TestCaseAttachment, MsRichText, TestCaseRichText
|
||||
},
|
||||
props: ['form', 'labelWidth', 'caseId', 'readOnly', 'projectId', 'isTestPlan', 'planId', 'versionEnable', 'isCopy', 'isTestPlanEdit', 'type', 'comments'],
|
||||
data() {
|
||||
return {
|
||||
result: {},
|
||||
|
@ -153,6 +189,20 @@ export default {
|
|||
updateRemark(text) {
|
||||
this.form.remark = text;
|
||||
},
|
||||
openComment() {
|
||||
this.$emit('openComment');
|
||||
},
|
||||
getComments(testCase) {
|
||||
let id = '';
|
||||
if (testCase) {
|
||||
id = testCase.id;
|
||||
} else {
|
||||
id = this.form.id;
|
||||
}
|
||||
this.result = this.$get('/test/case/comment/list/' + id, res => {
|
||||
this.comments = res.data;
|
||||
})
|
||||
},
|
||||
setRelationshipCount(count) {
|
||||
this.relationshipCount = count;
|
||||
},
|
||||
|
@ -280,13 +330,21 @@ export default {
|
|||
if (response.data.data && response.data.data.length > 0) {
|
||||
this.buildDemandCascaderOptions(response.data.data, this.demandOptions, []);
|
||||
}
|
||||
this.demandOptions.unshift({value: 'other', label: 'Other: ' + this.$t('test_track.case.other'), platform: 'Other'});
|
||||
this.demandOptions.unshift({
|
||||
value: 'other',
|
||||
label: 'Other: ' + this.$t('test_track.case.other'),
|
||||
platform: 'Other'
|
||||
});
|
||||
if (this.form.demandId === 'other') {
|
||||
this.demandValue = ['other'];
|
||||
}
|
||||
this.result = {loading: false};
|
||||
}).catch(() => {
|
||||
this.demandOptions.unshift({value: 'other', label: 'Other: ' + this.$t('test_track.case.other'), platform: 'Other'});
|
||||
this.demandOptions.unshift({
|
||||
value: 'other',
|
||||
label: 'Other: ' + this.$t('test_track.case.other'),
|
||||
platform: 'Other'
|
||||
});
|
||||
if (this.form.demandId === 'other') {
|
||||
this.demandValue = ['other'];
|
||||
}
|
||||
|
@ -335,4 +393,12 @@ export default {
|
|||
.el-cascader >>> .el-input {
|
||||
cursor: pointer;
|
||||
}
|
||||
.ms-header{
|
||||
background: #783887;
|
||||
color: white;
|
||||
height: 18px;
|
||||
width: 18px;
|
||||
font-size: xx-small;
|
||||
border-radius: 50%;
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue