import { BasicColumn, FormSchema } from '/@/components/Table'; export const columns: BasicColumn[] = [ { title: '通知标题', dataIndex: 'title', }, { title: '通知范围', dataIndex: 'scopeType', customRender: ({ text }) => { switch (text) { case 1: return '指定机构'; case 2: return '指定员工'; case 3: return '即指定机构又指定员工'; default: return '-'; } }, width: 120, }, { title: '发布时间', dataIndex: 'createTime', width: 150, }, { title: '操作人', dataIndex: 'createBy', width: 150, }, ]; export const searchFormSchema: FormSchema[] = [ { label: '通知标题', field: 'title', component: 'Input', }, { label: '通知范围', field: 'scopeType', component: 'Select', componentProps: () => ({ options: [ { label: '指定机构', value: 1, }, { label: '指定员工', value: 2, }, ], }), }, { label: '发布日期', field: 'date', component: 'RangeDate', componentProps: () => ({ valueFormat: 'YYYY-MM-DD', format: 'YYYY-MM-DD', }), }, ]; export const schemas: FormSchema[] = [ { label: '通知标题', field: 'title', component: 'Input', required: true, }, { label: '通知范围', field: 'scopeType', component: 'RadioGroup', defaultValue: 1, componentProps: () => ({ options: [ { label: '指定机构', value: 1, }, { label: '指定员工', value: 2, }, ], }), slot: 'scopeTypeSlot', required: true, }, { label: '机构', field: 'departScopeList', component: 'Input', show: false, }, { label: '员工', field: 'userScopeList', component: 'Input', show: false, }, { label: '员工', field: 'userScopeListRecord', component: 'Input', show: false, }, { label: '通知内容', field: 'content', component: 'JEditor', componentProps: ({ formModel }) => ({ showImageUpload: true, 'onUpdate:status': (v: any) => { formModel.imgStatus = v ? '1' : '0'; }, }), required: true, }, { label: '', field: 'imgStatus', component: 'Input', show: false, }, { label: '', field: 'id', component: 'Input', show: false, }, ]; export const auditorColumns: BasicColumn[] = [ { title: '单位名称', align: 'center', dataIndex: 'orgName', }, { title: '部门名称', align: 'center', dataIndex: 'departName', }, { title: '员工姓名', align: 'center', dataIndex: 'realName', }, { title: '员工工号', align: 'center', dataIndex: 'workNo', }, ]; export const auditorSchema: FormSchema[] = [ { label: '单位', field: 'orgCode', component: 'JlazyTreeSelect', componentProps: () => ({ isHaveFLevel: true, multiple: false, }), }, { label: '员工姓名', field: 'realName', component: 'Input', }, { label: '员工工号', field: 'workNo', component: 'Input', }, ];