import {BasicColumn} from '/@/components/Table'; import {FormSchema} from '/@/components/Table'; import { rules} from '/@/utils/helper/validator'; import { render } from '/@/utils/common/renderUtils'; //列表数据 export const columns: BasicColumn[] = [ { title: '操作人', align:"center", dataIndex: 'createBy_dictText', customRender: ({ text }) => { return text?? '系统'; }, }, { title: '时间', align:"center", dataIndex: 'createTime' }, { title: '日志类型', align: "center", dataIndex: 'logType', customRender: ({ text }) => { let map = ['','状态正常', '开启成功', '开启失败'] return map[text] }, }, { title: '教学楼名称', align: "center", dataIndex: 'jxlName' }, { title: '教室名称', align: "center", dataIndex: 'jsmc' }, ]; //查询数据 export const searchFormSchema: FormSchema[] = [ { label: "日志类型", field: 'logType', component: 'Select', colProps: {span: 6}, componentProps: { options: [ { label: '状态正常', value: 1, key: 1, }, { label: '开启成功', value: 2, key: 2, }, { label: '开启失败', value: 2, key: 2, }, ], }, }, { label: "教学楼名称", field: 'jxlName', component: 'Input', colProps: {span: 6}, }, { label: "教室名称", field: 'jsmc', component: 'Input', colProps: {span: 6}, }, ]; //表单数据 export const formSchema: FormSchema[] = [ { label: '日志类型', field: 'logType', component: 'JDictSelectTag', componentProps:{ dictCode: "" }, }, { label: '教学楼名称', field: 'jxlName', component: 'Input', }, { label: '教室名称', field: 'jsmc', component: 'Input', }, // TODO 主键隐藏字段,目前写死为ID { label: '', field: 'id', component: 'Input', show: false, }, ];