import { BasicColumn, FormSchema, render } from '@jdlinker/ui'; import { Badge, Space } from 'ant-design-vue'; export const statusMap = { enabled: , disabled: }; //列表数据 export const columns: BasicColumn[] = [ { title: '名称', align: 'center', dataIndex: 'name' }, { title: '类型', align: 'center', dataIndex: 'typeId', customRender: ({ text }) => { return render.renderDict(text, 'data_source_type'); } }, { title: '状态', align: 'center', dataIndex: 'state', customRender: ({ record }) => { return {statusMap[record.state]}; } }, { title: '描述', align: 'center', dataIndex: 'description' }, { title: '创建时间', align: 'center', dataIndex: 'createTime', width: 150 } ]; //查询数据 export const searchFormSchema: FormSchema[] = [ { label: '名称', field: 'name', component: 'Input' }, { label: '类型', field: 'typeId', component: 'Input' } ]; //表单数据 export const formSchema: FormSchema[] = [ { label: '名称', field: 'name', component: 'Input' }, { label: '类型', field: 'typeId', component: 'Input' }, { label: '数据源配置', field: 'shareConfig', component: 'InputTextArea' }, { label: '是否集群', field: 'shareCluster', component: 'Input' }, { label: '描述', field: 'description', component: 'Input' }, { label: '删除状态(0,正常,1已删除)', field: 'delFlag', component: 'Input' }, { label: '创建人', field: 'createBy', component: 'Input' }, { label: '创建时间', field: 'createTime', component: 'Input' }, { label: '更新人', field: 'updateBy', component: 'Input' }, { label: '更新时间', field: 'updateTime', component: 'Input' }, // TODO 主键隐藏字段,目前写死为ID { label: '', field: 'id', component: 'Input', show: false } ]; /** * 流程表单调用这个方法获取formSchema * @param _formData */ export function getBpmFormSchema(_formData): FormSchema[] { // 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema return formSchema; }