import {BasicColumn} from '/@/components/Table'; import {FormSchema} from '/@/components/Table'; import { rules} from '/@/utils/helper/validator'; import { render } from '/@/utils/common/renderUtils'; //import { getRowUser } from '/@/views/cees/group/CeesGroup.api'; //列表数据 export const columns: BasicColumn[] = [ { title: '组名', align:"center", dataIndex: 'name' }, // { // title: '操作', // align: 'center', // width: 150, // slots: { customRender: 'action2' }, // 使用插槽自定义操作列 //}, { title: '组员信息', align: 'center', dataIndex: 'rowUser', //customRender: ({ record }) => { // // 使用Promise处理异步操作 // return getRowUser({ id: record.id }).then((data) => { // console.log(data); // // 假设getRowUser返回的数据是一个字符串数组 // return data.map((item) => item).join(','); // }).catch((error) => { // console.error(error); // return '加载失败'; // }); //}, } // { // title: '专业id', // align:"center", // dataIndex: 'majorId' // }, ]; //查询数据 export const searchFormSchema: FormSchema[] = [ ]; //表单数据 export const formSchema: FormSchema[] = [ { label: '组名', field: 'name', component: 'Input', dynamicRules: ({model,schema}) => { return [ { required: true, message: '请输入分组名!'}, ]; }, }, { label: '专业id', field: 'majorId', component: 'InputNumber', dynamicRules: ({model,schema}) => { return [ { required: true, message: '请输入专业id!'}, ]; }, }, // TODO 主键隐藏字段,目前写死为ID { label: '', field: 'id', component: 'Input', show: false }, ]; // 高级查询数据 export const superQuerySchema = { name: {title: '组名',order: 0,view: 'text', type: 'string',}, majorId: {title: '专业id',order: 1,view: 'number', type: 'number',}, }; /** * 流程表单调用这个方法获取formSchema * @param param */ export function getBpmFormSchema(_formData): FormSchema[]{ // 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema return formSchema; }