Commit b7e47258 authored by 旭艳's avatar 旭艳

修改指令维护自定义搜索组件

parent 2c6a163f
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="search-sorties"> <div class="search-sorties">
<el-form :inline="true" :model="form" class="demo-form-inline search-bar"> <el-form :inline="true" :model="form" class="demo-form-inline search-bar">
<el-form-item label="架次:"> <el-form-item label="架次:">
<el-select v-model="form.sorties" placeholder="架次"> <el-select v-model="form.sorties" placeholder="架次" @change="changeFrom">
<el-option <el-option
v-for="(item, i) in sortiesData" v-for="(item, i) in sortiesData"
:key="item.value + i" :key="item.value + i"
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="站位:"> <el-form-item label="站位:">
<el-select v-model="form.postion" placeholder="站位"> <el-select v-model="form.postion" placeholder="站位" @change="changeFrom">
<el-option <el-option
v-for="(item, i) in postionList" v-for="(item, i) in postionList"
:key="item.value + i" :key="item.value + i"
...@@ -31,12 +31,17 @@ export default { ...@@ -31,12 +31,17 @@ export default {
componentName: 'AO架次站位搜索', componentName: 'AO架次站位搜索',
name: 'SearchSorties', name: 'SearchSorties',
components: {}, components: {},
props: {}, props: {
form: {
type: Object,
default: () => ({ sorties: '', postion: '' })
}
},
data() { data() {
return { return {
sortiesData: [], sortiesData: [],
SoriteTypeOptions: [], SoriteTypeOptions: [],
form: {}, // form: {},
postionList: [] postionList: []
} }
}, },
...@@ -59,6 +64,9 @@ export default { ...@@ -59,6 +64,9 @@ export default {
mounted() {}, mounted() {},
// 组件方法 // 组件方法
methods: { methods: {
changeFrom(val) {
this.$emit('input', val)
},
getStation(val) { getStation(val) {
this.postionList = [] this.postionList = []
this.$set(this.form, 'postion', '') this.$set(this.form, 'postion', '')
......
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