import { BasicColumn } from '/@/components/Table'; import { FormSchema } from '/@/components/Table'; import { rules } from '/@/utils/helper/validator'; import { render } from '/@/utils/common/renderUtils'; import { getWeekMonthQuarterYear } from '/@/utils'; import { getUserDeparts } from '/@/views/system/depart/depart.api'; //列表数据 export const columns: BasicColumn[] = [ { title: '用户昵称', align: 'center', dataIndex: 'username', }, { title: '头像', align: 'center', dataIndex: 'avatar', slots: { customRender: 'img' }, }, { title: '手机号码', align: 'center', dataIndex: 'phone', }, { title: '是否实名', align: 'center', dataIndex: 'realNameStatus', customRender: ({ record }) => { return record.realNameStatus == 1 ? '已实名' : '未实名'; }, }, { title: '家庭成员数(包括自己)', align: 'center', dataIndex: 'familyNum', }, { title: '创建时间', align: 'center', dataIndex: 'createTime', }, ]; //查询数据 export const searchFormSchema: FormSchema[] = [ { label: '用户昵称', field: 'merchantName', component: 'Input', colProps: { span: 6 }, }, { label: '是否实名', field: 'accountStatus', component: 'Select', colProps: { span: 6 }, componentProps: { options: [ { label: '所有', value: null }, { label: '未实名', value: 0 }, { label: '已实名', value: 1 }, ], }, }, ]; //表单数据 export const formSchema: FormSchema[] = [ { label: 'title1', field: 'orgCode', colSlot: 'title1', component: 'Input', }, { label: '用户ID', field: 'id', component: 'Input', required: true, componentProps: { readonly: true, }, }, { label: '微信OpenID', field: 'openid', component: 'Input', required: true, componentProps: { readonly: true, }, }, { label: '用户昵称', field: 'realname', component: 'Input', required: true, componentProps: { readonly: true, }, }, { label: '头像', field: 'avatar', component: 'Input', slot: 'avatar', componentProps: { readonly: true, }, }, { label: '手机号码', field: 'id', component: 'Input', required: true, componentProps: { readonly: true, }, }, { label: '创建时间', field: 'id', component: 'Input', required: true, }, { label: '魔板', field: 'familyMembersList', component: 'Input', colSlot: 'moban', }, // TODO 主键隐藏字段,目前写死为ID { label: '', field: 'id', component: 'Input', show: false, }, ]; /** * 流程表单调用这个方法获取formSchema * @param param */ export function getBpmFormSchema(_formData): FormSchema[] { // 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema return formSchema; }