fix(测试跟踪): 测试评审和计划关联需求禁用
--bug=1015009 --user=陈建星 【测试跟踪】用例评审-编辑用例评审-可以编辑关联需求信息,但是不生效 https://www.tapd.cn/55049933/s/1204783
This commit is contained in:
parent
53390397a2
commit
c83f2f3534
|
@ -18,12 +18,17 @@
|
|||
<el-col :span="8">
|
||||
<el-form-item :label="$t('test_track.related_requirements')" :label-width="labelWidth"
|
||||
prop="demandId">
|
||||
<el-cascader v-model="demandValue" :show-all-levels="false" :options="demandOptions"
|
||||
|
||||
<el-cascader v-if="!readOnly" v-model="demandValue" :show-all-levels="false" :options="demandOptions"
|
||||
clearable filterable :filter-method="filterDemand">
|
||||
<template slot-scope="{ node, data }">
|
||||
<span class="demand-span" :title="data.label">{{ data.label }}</span>
|
||||
</template>
|
||||
</el-cascader>
|
||||
|
||||
<el-input class="demandInput" v-else :disabled="readOnly" :value="demandLabel">
|
||||
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="2">
|
||||
|
@ -160,6 +165,7 @@ export default {
|
|||
demandOptions: [],
|
||||
relationshipCount: 0,
|
||||
demandValue: [],
|
||||
demandLabel: '',
|
||||
//sysList:this.sysList,//一级选择框的数据
|
||||
props: {
|
||||
multiple: true,
|
||||
|
@ -386,34 +392,29 @@ export default {
|
|||
}
|
||||
},
|
||||
getDemandOptions() {
|
||||
if (this.demandOptions.length === 0) {
|
||||
this.result = {loading: true};
|
||||
this.$get("/issues/demand/list/" + this.projectId).then(response => {
|
||||
this.demandOptions = [];
|
||||
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'
|
||||
});
|
||||
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'
|
||||
});
|
||||
if (this.form.demandId === 'other') {
|
||||
this.demandValue = ['other'];
|
||||
}
|
||||
this.result = {loading: false};
|
||||
});
|
||||
this.result = {loading: true};
|
||||
this.demandLabel = '';
|
||||
this.$get("/issues/demand/list/" + this.projectId).then(response => {
|
||||
this.demandOptions = [];
|
||||
if (response.data.data && response.data.data.length > 0) {
|
||||
this.buildDemandCascaderOptions(response.data.data, this.demandOptions, []);
|
||||
}
|
||||
this.addOtherOption();
|
||||
}).catch(() => {
|
||||
this.addOtherOption();
|
||||
});
|
||||
},
|
||||
addOtherOption() {
|
||||
this.demandOptions.unshift({
|
||||
value: 'other',
|
||||
label: 'Other: ' + this.$t('test_track.case.other'),
|
||||
platform: 'Other'
|
||||
});
|
||||
if (this.form.demandId === 'other') {
|
||||
this.demandValue = ['other'];
|
||||
this.demandLabel = 'Other: ' + this.$t('test_track.case.other');
|
||||
}
|
||||
this.result = {loading: false};
|
||||
},
|
||||
buildDemandCascaderOptions(data, options, pathArray) {
|
||||
data.forEach(item => {
|
||||
|
@ -421,6 +422,9 @@ export default {
|
|||
label: item.platform + ': ' + item.name,
|
||||
value: item.id
|
||||
}
|
||||
if (this.form.demandId === item.id) {
|
||||
this.demandLabel = option.label;
|
||||
}
|
||||
options.push(option);
|
||||
pathArray.push(item.id);
|
||||
if (item.id === this.form.demandId) {
|
||||
|
@ -475,4 +479,8 @@ export default {
|
|||
word-break: break-all;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.demandInput {
|
||||
width: 200px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -428,6 +428,10 @@ export default {
|
|||
this.testCaseTemplate = template;
|
||||
initFuc(testCase.id);
|
||||
});
|
||||
|
||||
if (this.$refs.otherInfo) {
|
||||
this.$refs.otherInfo.reset();
|
||||
}
|
||||
},
|
||||
openTestTestCase(item) {
|
||||
let testCaseData = this.$router.resolve(
|
||||
|
|
Loading…
Reference in New Issue