fix: 测试评审样式

This commit is contained in:
wenyann 2021-03-18 13:59:51 +08:00
parent cf5688fc4e
commit 878439795d
1 changed files with 8 additions and 21 deletions

View File

@ -136,12 +136,12 @@
<el-row>
<el-col :span="10">
<el-form-item label="关联需求" :label-width="formLabelWidth" prop="demandId">
<el-select filterable :disabled="readOnly" v-model="form.demandId" @visible-change="visibleChange"
<el-select filterable :disabled="readOnly" v-model="form.demandId"
:placeholder="$t('test_track.case.input_type')" class="ms-case-input">
<el-option
v-for="item in demandOptions"
:key="item.id"
:label="item.platform + ': '+item.name"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
@ -761,31 +761,18 @@ export default {
});
}
},
visibleChange(flag) {
if (flag) {
this.getDemandOptions()
}
},
getDemandOptions() {
if (this.demandOptions.length === 0) {
this.projectId = getCurrentProjectID();
this.result = {loading : true};
this.$get("demand/list/" + this.projectId).then(response => {
this.demandOptions = response.data.data;
this.demandOptions.unshift({id: 'other', name: this.$t('test_track.case.other'), platform: 'Other'})
this.result = {loading : false};
}).catch(() => {
this.result = {loading : false};
})
}
this.projectId = getCurrentProjectID()
this.result = this.$get("demand/list/" + this.projectId, response => {
this.demandOptions = response.data;
this.demandOptions.unshift({id: 'other', name: this.$t('test_track.case.other')})
});
},
getSelectOptions() {
this.getModuleOptions();
this.getMaintainerOptions();
this.getTestOptions();
if (this.type === 'edit') {
this.getDemandOptions();
}
// this.getDemandOptions()
},
resetForm() {