Commit adbbb9d5 authored by xioln's avatar xioln

架次类型选择器

parent 61dbccc6
<template>
<div>
<el-select v-model="selVal" :disabled="disabledVal">
<el-select v-model="selVal" :disabled="disabledVal" @change="changeVal">
<el-option
v-for="(item,i) in options"
:key="i"
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.id"
:value="item.value"
/>
</el-select>
</div>
......@@ -34,7 +34,8 @@ export default {
return {
options: [],
disabledVal: false,
selVal: ''
selVal: '',
linkageValue: ''
}
},
computed: {},
......@@ -73,11 +74,7 @@ export default {
},
// 生命周期 - 挂载完成(可以访问 DOM 元素)
mounted() {
this.$nextTick(() => {
if (this.form.materialType) {
this.selVal = this.form.materialType
}
})
},
methods: {
getData(val) {
......@@ -90,12 +87,13 @@ export default {
'openProps': [{ name: 'target' }]
}
this.$api.searchApi('SoritesLink', params).then(res => {
this.options = res.items.content.map(row => {
const options = res.items.content.map(row => {
return {
value: row.target.id,
label: row.target.type
}
})
this.options = options
})
}
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment