fix(测试跟踪): 测试计划及用例评审依赖关系的显示问题

--bug=1017148 --user=宋昌昌 【测试跟踪】测试计划-查看功能用例的依赖关系图显示评论框 https://www.tapd.cn/55049933/s/1251156
This commit is contained in:
song-cc-rock 2022-09-23 16:13:17 +08:00 committed by 刘瑞斌
parent f49a50fc25
commit 95643875c1
4 changed files with 28 additions and 9 deletions

View File

@ -25,7 +25,7 @@
</el-tooltip> </el-tooltip>
</div> </div>
<relationship-graph-drawer v-xpack v-permission :graph-data="graphData" ref="relationshipGraph"/> <relationship-graph-drawer v-xpack v-permission :graph-data="graphData" @closeRelationGraph="closeRelationGraph" ref="relationshipGraph"/>
</div> </div>
</template> </template>
@ -67,8 +67,12 @@ export default {
getRelationshipGraph(this.resourceId, this.resourceType, (data) => { getRelationshipGraph(this.resourceId, this.resourceType, (data) => {
this.graphData = data; this.graphData = data;
this.$refs.relationshipGraph.open(); this.$refs.relationshipGraph.open();
this.$emit("openDependGraphDrawer", true);
}); });
}, },
closeRelationGraph() {
this.$emit("openDependGraphDrawer", false);
},
setPreCount(count) { setPreCount(count) {
this.preCount = count; this.preCount = count;
this.$emit('setCount', this.preCount + this.postCount); this.$emit('setCount', this.preCount + this.postCount);

View File

@ -55,6 +55,7 @@
<tab-pane-count :title="$t('commons.relationship.name')" :count="relationshipCount"/> <tab-pane-count :title="$t('commons.relationship.name')" :count="relationshipCount"/>
</template> </template>
<dependencies-list @setCount="setRelationshipCount" :read-only="readOnly" :resource-id="caseId" <dependencies-list @setCount="setRelationshipCount" :read-only="readOnly" :resource-id="caseId"
@openDependGraphDrawer="setRelationshipGraph"
:version-enable="versionEnable" resource-type="TEST_CASE" ref="relationship"/> :version-enable="versionEnable" resource-type="TEST_CASE" ref="relationship"/>
</el-tab-pane> </el-tab-pane>
@ -195,7 +196,7 @@ export default {
uploadFiles: [], uploadFiles: [],
relateFiles: [], relateFiles: [],
unRelateFiles: [], unRelateFiles: [],
dumpFile: {}, dumpFile: {}
}; };
}, },
computed: { computed: {
@ -255,6 +256,9 @@ export default {
setRelationshipCount(count) { setRelationshipCount(count) {
this.relationshipCount = count; this.relationshipCount = count;
}, },
setRelationshipGraph(val) {
this.$emit("syncRelationGraphOpen", val);
},
reset() { reset() {
this.tabActiveName = "remark"; this.tabActiveName = "remark";
}, },

View File

@ -110,7 +110,7 @@
<el-form-item :label="$t('test_track.case.other_info')" :label-width="formLabelWidth"> <el-form-item :label="$t('test_track.case.other_info')" :label-width="formLabelWidth">
<test-case-edit-other-info :plan-id="testCase.planId" v-if="otherInfoActive" @openTest="openTest" <test-case-edit-other-info :plan-id="testCase.planId" v-if="otherInfoActive" @openTest="openTest"
:is-test-plan-edit="true" :is-test-plan-edit="true" @syncRelationGraphOpen="syncRelationGraphOpen"
:read-only="true" :is-test-plan="true" :project-id="testCase.projectId" :read-only="true" :is-test-plan="true" :project-id="testCase.projectId"
:form="testCase" :case-id="testCase.caseId" ref="otherInfo"/> :form="testCase" :case-id="testCase.caseId" ref="otherInfo"/>
</el-form-item > </el-form-item >
@ -121,7 +121,7 @@
</el-card> </el-card>
</div> </div>
</el-col> </el-col>
<el-col :span="7"> <el-col :span="7" v-if="!relationGraphOpen">
<div class="comment-card"> <div class="comment-card">
<test-plan-functional-execute <test-plan-functional-execute
:test-case="testCase" :test-case="testCase"
@ -214,7 +214,8 @@ export default {
isReadOnly: false, isReadOnly: false,
testCases: [], testCases: [],
originalStatus: '', originalStatus: '',
titleWith: 0 titleWith: 0,
relationGraphOpen: false,
}; };
}, },
props: { props: {
@ -506,6 +507,9 @@ export default {
} }
} }
}, },
syncRelationGraphOpen(val) {
this.relationGraphOpen = val;
},
setTitleWith() { setTitleWith() {
this.$nextTick(() => { this.$nextTick(() => {
this.titleWith = 0; this.titleWith = 0;
@ -629,7 +633,8 @@ p {
} }
/deep/ .el-scrollbar__bar.is-vertical { /deep/ .el-scrollbar__bar.is-vertical {
z-index: 3; z-index: 0;
width: 0;
} }
.head-bar { .head-bar {

View File

@ -115,6 +115,7 @@
<el-form-item :label="$t('test_track.case.other_info')" :label-width="formLabelWidth"> <el-form-item :label="$t('test_track.case.other_info')" :label-width="formLabelWidth">
<test-case-edit-other-info @openTest="openTest" :read-only="true" <test-case-edit-other-info @openTest="openTest" :read-only="true"
@syncRelationGraphOpen="syncRelationGraphOpen"
:project-id="projectId" :form="testCase" :case-id="testCase.caseId" :project-id="projectId" :form="testCase" :case-id="testCase.caseId"
ref="otherInfo"/> ref="otherInfo"/>
</el-form-item> </el-form-item>
@ -126,7 +127,7 @@
</el-card> </el-card>
</div> </div>
</el-col> </el-col>
<el-col :span="7"> <el-col :span="7" v-if="!relationGraphOpen">
<div class="comment-card"> <div class="comment-card">
<test-review-test-case-execute <test-review-test-case-execute
:test-case="testCase" :test-case="testCase"
@ -219,7 +220,8 @@ export default {
formLabelWidth: '100px', formLabelWidth: '100px',
isCustomFiledActive: false, isCustomFiledActive: false,
oldReviewStatus: '', oldReviewStatus: '',
titleWith: 0 titleWith: 0,
relationGraphOpen: false,
}; };
}, },
props: { props: {
@ -282,6 +284,9 @@ export default {
} }
} }
}, },
syncRelationGraphOpen(val) {
this.relationGraphOpen = val;
},
handleClose() { handleClose() {
removeGoBackListener(this.handleClose); removeGoBackListener(this.handleClose);
this.showDialog = false; this.showDialog = false;
@ -574,6 +579,7 @@ export default {
} }
/deep/ .el-scrollbar__bar.is-vertical { /deep/ .el-scrollbar__bar.is-vertical {
z-index: 3; z-index: 0;
width: 0;
} }
</style> </style>