feat(测试跟踪): 修复测试计划里的功能用例无法关联需求缺陷的问题

--bug=1011428 --user=宋天阳 【测试跟踪】-测试计划 关联需求和关联缺陷不需要禁用
https://www.tapd.cn/55049933/s/1121565
This commit is contained in:
song-tianyang 2022-03-21 10:32:38 +08:00 committed by CountryBuilder
parent 4248d2b029
commit b84ae8a772
3 changed files with 26 additions and 22 deletions

View File

@ -126,28 +126,31 @@ export default {
}
},
mounted() {
//
let el = document.getElementById(this.id);
if (!this.autoReview) {
this.defaultOpen = null;
}
if (el) {
el.addEventListener('click', () => {
let imagePreview = el.getElementsByClassName('v-note-img-wrapper');
if (imagePreview.length > 0) { //
if(!this.disabled){
//
let el = document.getElementById(this.id);
if (!this.autoReview) {
this.defaultOpen = null;
}
if (el) {
el.addEventListener('click', () => {
let imagePreview = el.getElementsByClassName('v-note-img-wrapper');
if (imagePreview.length > 0) { //
if (this.autoReview)
this.defaultOpen = 'preview';
} else {
if (this.autoReview)
this.defaultOpen = null;
}
});
let input = el.getElementsByClassName('auto-textarea-input');
input[0].addEventListener('blur', () => {
if (this.autoReview)
this.defaultOpen = 'preview';
} else {
if (this.autoReview)
this.defaultOpen = null;
}
});
let input = el.getElementsByClassName('auto-textarea-input');
input[0].addEventListener('blur', () => {
if (this.autoReview)
this.defaultOpen = 'preview';
});
});
}
}
},
methods: {
imgAdd(pos, file){

View File

@ -9,7 +9,7 @@
<test-case-test-relate :read-only="readOnly" :case-id="caseId" :version-enable="versionEnable" ref="relateTest"/>
</el-tab-pane>
<el-tab-pane :label="$t('test_track.related_requirements')" :disabled="readOnly" name="demand">
<el-tab-pane :label="$t('test_track.related_requirements')" :disabled="readOnly && !isTestPlanEdit" name="demand">
<el-col :span="7">
<el-form-item :label="$t('test_track.related_requirements')" :label-width="labelWidth"
prop="demandId">
@ -25,7 +25,7 @@
</el-col>
</el-tab-pane>
<el-tab-pane :label="$t('test_track.case.relate_issue')" :disabled="readOnly" name="bug">
<el-tab-pane :label="$t('test_track.case.relate_issue')" :disabled="readOnly && !isTestPlanEdit" name="bug">
<test-case-issue-relate
v-if="tabActiveName === 'bug'"
:plan-id="planId"
@ -93,7 +93,7 @@ export default {
DependenciesList,
TestCaseTestRelate,
FormRichTextItem, TestCaseIssueRelate, TestCaseAttachment, MsRichText, TestCaseRichText},
props: ['form', 'labelWidth', 'caseId', 'readOnly', 'projectId', 'isTestPlan', 'planId', 'versionEnable', 'isCopy'],
props: ['form', 'labelWidth', 'caseId', 'readOnly', 'projectId', 'isTestPlan', 'planId', 'versionEnable', 'isCopy', 'isTestPlanEdit'],
data() {
return {
result: {},

View File

@ -110,6 +110,7 @@
<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"
:is-test-plan-edit="true"
:read-only="true" :is-test-plan="true" :project-id="testCase.projectId"
:form="testCase" :case-id="testCase.caseId" ref="otherInfo"/>
</el-form-item >