This commit is contained in:
zhangyanan 2025-11-13 16:17:06 +08:00
parent f0e8390d3f
commit e94fb7e225
3 changed files with 19 additions and 7 deletions

View File

@ -67,7 +67,9 @@
:wrapperCol="wrapperCol"
has-feedback
>
<a-input placeholder="请输入部门" v-decorator="['workPlace', {rules: [{required: true, message: '请输入部门'}]}]" />
<a-select style="width: 100%" placeholder="请选择部门" v-decorator="['workPlace', {rules: [{ required: true, message: '请选择部门!' }]}]">
<a-select-option v-for="(item,index) in workPlaceData" :key="index" :value="item.code">{{ item.name }}</a-select-option>
</a-select>
</a-form-item>
</a-form>
</a-spin>
@ -102,7 +104,8 @@
name: '外部'
}
],
typeData:[]
typeData:[],
workPlaceData:[]
}
},
methods: {
@ -112,6 +115,7 @@
this.visible = true
const nameOption = this.$options
this.typeData = nameOption.filters['dictData']('train_type')
this.workPlaceData = nameOption.filters['dictData']('work_place')
},
/**
* 提交表单

View File

@ -68,7 +68,9 @@
:wrapperCol="wrapperCol"
has-feedback
>
<a-input placeholder="请输入部门" v-decorator="['workPlace', {rules: [{required: true, message: '请输入部门'}]}]" />
<a-select style="width: 100%" placeholder="请选择部门" v-decorator="['workPlace', {rules: [{ required: true, message: '请选择部门!' }]}]">
<a-select-option v-for="(item,index) in workPlaceData" :key="index" :value="item.code">{{ item.name }}</a-select-option>
</a-select>
</a-form-item>
</a-form>
</a-spin>
@ -103,7 +105,8 @@
name: '外部'
}
],
typeData:[]
typeData:[],
workPlaceData:[]
}
},
methods: {
@ -113,6 +116,7 @@
this.visible = true
const nameOption = this.$options
this.typeData = nameOption.filters['dictData']('train_type')
this.workPlaceData = nameOption.filters['dictData']('work_place')
setTimeout(() => {
this.form.setFieldsValue(
{

View File

@ -20,7 +20,9 @@
<template v-if="advanced">
<a-col :md="8" :sm="24">
<a-form-item label="部门">
<a-input v-model="queryParam.workPlace" allow-clear placeholder="请输入部门"/>
<a-select style="width: 100%" placeholder="请选择部门" v-model="queryParam.workPlace">
<a-select-option v-for="(item,index) in workPlaceData" :key="index" :value="item.code">{{ item.name }}</a-select-option>
</a-select>
</a-form-item>
</a-col>
</template>
@ -148,7 +150,8 @@
onChange: this.onSelectChange
}
},
typeData: []
typeData: [],
workPlaceData: []
}
},
created () {
@ -159,7 +162,8 @@
scopedSlots: { customRender: 'action' }
} )
const nameOption = this.$options
this.typeData = nameOption.filters['dictData']('train_type')
this.typeData = nameOption.filters[ 'dictData' ]( 'train_type' )
this.workPlaceData = nameOption.filters[ 'dictData' ]( 'work_place' )
},
methods: {
moment,