修改培训类型

This commit is contained in:
zhangyanan 2025-11-13 14:32:39 +08:00
parent 8f30c60ad6
commit f0e8390d3f
3 changed files with 28 additions and 8 deletions

View File

@ -23,7 +23,10 @@
:wrapperCol="wrapperCol"
has-feedback
>
<a-input placeholder="请输入培训类型" v-decorator="['type', {rules: [{required: true, message: '请输入培训类型'}]}]" />
<!-- <a-input placeholder="请输入培训类型" v-decorator="['type', {rules: [{required: true, message: '请输入培训类型'}]}]" /> -->
<a-select style="width: 100%" placeholder="请选择培训类型" v-decorator="['type', {rules: [{ required: true, message: '请选择培训类型!' }]}]">
<a-select-option v-for="(item,index) in typeData" :key="index" :value="item.code">{{ item.name }}</a-select-option>
</a-select>
</a-form-item>
<a-form-item
label="数量"
@ -98,7 +101,8 @@
code: 0,
name: '外部'
}
]
],
typeData:[]
}
},
methods: {
@ -106,6 +110,8 @@
//
add (record) {
this.visible = true
const nameOption = this.$options
this.typeData = nameOption.filters['dictData']('train_type')
},
/**
* 提交表单

View File

@ -24,7 +24,10 @@
:wrapperCol="wrapperCol"
has-feedback
>
<a-input placeholder="请输入培训类型" v-decorator="['type', {rules: [{required: true, message: '请输入培训类型'}]}]" />
<!-- <a-input placeholder="请输入培训类型" v-decorator="['type', {rules: [{required: true, message: '请输入培训类型'}]}]" /> -->
<a-select style="width: 100%" placeholder="请选择培训类型" v-decorator="['type', {rules: [{ required: true, message: '请选择培训类型!' }]}]">
<a-select-option v-for="(item,index) in typeData" :key="index" :value="item.code">{{ item.name }}</a-select-option>
</a-select>
</a-form-item>
<a-form-item
label="数量"
@ -99,7 +102,8 @@
code: 0,
name: '外部'
}
]
],
typeData:[]
}
},
methods: {
@ -107,6 +111,8 @@
//
edit (record) {
this.visible = true
const nameOption = this.$options
this.typeData = nameOption.filters['dictData']('train_type')
setTimeout(() => {
this.form.setFieldsValue(
{
@ -114,7 +120,9 @@
type: record.type,
num: record.num,
nborwb: record.nborwb,
workPlace: record.workPlace
workPlace: record.workPlace,
nborwb: record.nborwb,
wbNum: record.wbNum,
}
)
}, 100)

View File

@ -6,7 +6,10 @@
<a-row :gutter="48">
<a-col :md="8" :sm="24">
<a-form-item label="培训类型">
<a-input v-model="queryParam.type" allow-clear placeholder="请输入培训类型"/>
<!-- <a-input v-model="queryParam.type" allow-clear placeholder="请输入培训类型"/> -->
<a-select style="width: 100%" placeholder="请选择培训类型" v-model="queryParam.type">
<a-select-option v-for="(item,index) in typeData" :key="index" :value="item.code">{{ item.name }}</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :md="8" :sm="24">
@ -144,7 +147,8 @@
selectedRowKeys: this.selectedRowKeys,
onChange: this.onSelectChange
}
}
},
typeData: []
}
},
created () {
@ -154,6 +158,8 @@
dataIndex: 'action',
scopedSlots: { customRender: 'action' }
} )
const nameOption = this.$options
this.typeData = nameOption.filters['dictData']('train_type')
},
methods: {
moment,