培训计划调整

This commit is contained in:
Yjhon 2022-03-14 17:50:53 +08:00
parent d0458c0499
commit ad7fde1681
1 changed files with 9 additions and 1 deletions

View File

@ -10,7 +10,11 @@
</a-select>
</a-form-model-item>
<a-button v-if="!disabled" type="primary" size="default" icon="plus" @click="showDrawer" style="margin-right: 8px;">选择项目</a-button>
<a-table v-if="selectedRows.length > 0" rowKey="id" :columns="columns" :data-source="selectedRows" :pagination="false"></a-table>
<a-table v-if="selectedRows.length > 0" rowKey="id" :columns="columns" :data-source="selectedRows" :pagination="false">
<span slot="serial" slot-scope="text, record, index">
{{ index + 1 }}
</span>
</a-table>
<a-form-model-item label="备注">
<a-input v-model="form.remark" type="textarea" :disabled="disabled" />
</a-form-model-item>
@ -63,8 +67,11 @@ export default {
name: [{ required: true, message: '请输入培训计划名称', trigger: 'blur' }],
year: [{ required: true, message: '请选择培训计划年度', trigger: 'change' }],
},
wayEmun:['培训','考试','培训-练习','培训-练习-考试'],
columns: [
{ title: '序号', key: 'id', dataIndex: 'id', width: 60, scopedSlots: { customRender: 'serial' } },
{ title: '项目名称', dataIndex: 'projectName', key: 'projectName' },
{ title: '项目类型', key: 'trainWay', dataIndex: 'trainWay',customRender: (text, record, index) => { return this.wayEmun[Number(text)-1] } },
{ title: '创建人', dataIndex: 'createBy', key: 'createBy' },
{ title: '创建时间', dataIndex: 'createDate', key: 'createDate' }
],
@ -214,6 +221,7 @@ export default {
this.columns = this.columns.filter(item => { return item.key != 'createBy' })
this.columns = this.columns.filter(item => { return item.key != 'createDate' })
this.columns.push({title:'参与人数',dataIndex:'signCount',key:'signCount'});
})
}
if (this.$route.query.t != 'year') {