fix(测试跟踪): 版本对比,其他信息展示的问题

This commit is contained in:
zhangdahai112 2022-01-16 22:04:39 +08:00 committed by jianxing
parent 319737f3c1
commit a1cdc50d81
3 changed files with 12 additions and 41 deletions

View File

@ -974,8 +974,8 @@ export default {
that.newData.steps = JSON.parse(that.newData.steps || "");
that.oldData.tags = JSON.parse(that.oldData.tags || "");
that.oldData.steps = JSON.parse(that.oldData.steps || "");
that.newData.readOnly = false;
that.oldData.readOnly = false;
that.newData.readOnly = true;
that.oldData.readOnly = true;
},
compare(row) {
this.$get('/test/case/get/' + row.id + "/" + this.currentTestCaseInfo.refId, response => {

View File

@ -6,7 +6,7 @@
</el-row>
</el-tab-pane>
<el-tab-pane :label="$t('test_track.case.relate_test')" name="relateTest">
<test-case-test-relate :read-only="readOnly" :case-id="caseId"/>
<test-case-test-relate :read-only="readOnly" :case-id="caseId" ref="relateTest"/>
</el-tab-pane>
<el-tab-pane :label="$t('test_track.related_requirements')" name="demand">
@ -126,6 +126,10 @@ export default {
this.$refs.relationship.open();
} else if (this.tabActiveName === 'attachment') {
this.getFileMetaData();
} else if (this.tabActiveName === 'relateTest') {
this.$nextTick(() => {
this.getRelatedTest();
});
}
},
caseId() {
@ -256,6 +260,9 @@ export default {
});
}
},
getRelatedTest() {
this.$refs.relateTest.initTable();
},
visibleChange(flag) {
if (flag) {
this.getDemandOptions();

View File

@ -79,7 +79,7 @@
<ms-form-divider :title="$t('test_track.case.other_info')"/>
<test-case-edit-other-info :read-only="oldData.readOnly" :project-id="projectIds" :form="oldData"
:label-width="oldData.formLabelWidth" :case-id="oldData.id" ref="otherInfo"/>
:label-width="oldData.formLabelWidth" :case-id="oldData.id" ref="oldOtherInfo"/>
<el-row style="margin-top: 10px">
<el-col :span="20" :offset="1">{{ $t('test_track.review.comment') }}:
@ -184,7 +184,7 @@
<ms-form-divider :title="$t('test_track.case.other_info')"/>
<test-case-edit-other-info :read-only="newData.readOnly" :project-id="projectIds" :form="newData"
:label-width="newData.formLabelWidth" :case-id="newData.id" ref="otherInfo"/>
:label-width="newData.formLabelWidth" :case-id="newData.id" ref="newOtherInfo"/>
<el-row style="margin-top: 10px">
<el-col :span="20" :offset="1">{{ $t('test_track.review.comment') }}:
@ -428,42 +428,6 @@ export default {
this.dialogFormVisible = false;
}
,
getOption(param) {
let formData = new FormData();
if (this.$refs.otherInfo && this.$refs.otherInfo.uploadList) {
this.$refs.otherInfo.uploadList.forEach(f => {
formData.append("file", f);
});
}
if (this.$refs.otherInfo && this.$refs.otherInfo.fileList) {
if (param.isCopy) {
// copyID
param.fileIds = this.$refs.otherInfo.fileList.map(f => f.id);
}
param.updatedFileList = this.$refs.otherInfo.fileList;
} else {
param.fileIds = [];
param.updatedFileList = [];
}
let requestJson = JSON.stringify(param, function (key, value) {
return key === "file" ? undefined : value
});
formData.append('request', new Blob([requestJson], {
type: "application/json"
}));
return {
method: 'POST',
url: this.path,
data: formData,
headers: {
'Content-Type': undefined
}
};
}
,
getMaintainerOptions() {
this.$post('/user/project/member/tester/list', {projectId: getCurrentProjectID()}, response => {
this.maintainerOptions = response.data;