403 lines
9.6 KiB
TypeScript
403 lines
9.6 KiB
TypeScript
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: '用户id',
|
||
align:"center",
|
||
dataIndex: 'userId'
|
||
},
|
||
{
|
||
title: '专业id',
|
||
align:"center",
|
||
dataIndex: 'majorId'
|
||
},
|
||
{
|
||
title: '用户专业id',
|
||
align:"center",
|
||
dataIndex: 'userMajorId'
|
||
},
|
||
{
|
||
title: '用户名',
|
||
align:"center",
|
||
dataIndex: 'userName'
|
||
},
|
||
{
|
||
title: '手机号',
|
||
align:"center",
|
||
dataIndex: 'phone'
|
||
},
|
||
{
|
||
title: '职称',
|
||
align:"center",
|
||
dataIndex: 'jobTitle'
|
||
},
|
||
{
|
||
title: '银行卡号',
|
||
align:"center",
|
||
dataIndex: 'pyCard'
|
||
},
|
||
{
|
||
title: '饭卡',
|
||
align:"center",
|
||
dataIndex: 'mealCard'
|
||
},
|
||
{
|
||
title: '办公位',
|
||
align:"center",
|
||
dataIndex: 'office'
|
||
},
|
||
{
|
||
title: '工作名称',
|
||
align:"center",
|
||
dataIndex: 'workName'
|
||
},
|
||
{
|
||
title: '固定电话',
|
||
align:"center",
|
||
dataIndex: 'workPhone'
|
||
},
|
||
{
|
||
title: '身份证',
|
||
align:"center",
|
||
dataIndex: 'identityId'
|
||
},
|
||
{
|
||
title: '车牌号',
|
||
align:"center",
|
||
dataIndex: 'carNumber'
|
||
},
|
||
{
|
||
title: '性别',
|
||
align:"center",
|
||
dataIndex: 'sex'
|
||
},
|
||
{
|
||
title: '年龄',
|
||
align:"center",
|
||
dataIndex: 'age'
|
||
},
|
||
{
|
||
title: '车辆是否入校',
|
||
align:"center",
|
||
dataIndex: 'carStatus'
|
||
},
|
||
{
|
||
title: '宿舍信息',
|
||
align:"center",
|
||
dataIndex: 'dormitory'
|
||
},
|
||
{
|
||
title: '是否住宿',
|
||
align:"center",
|
||
dataIndex: 'dormitoryStatus'
|
||
},
|
||
{
|
||
title: '开户所在地',
|
||
align:"center",
|
||
dataIndex: 'bankAddress'
|
||
},
|
||
{
|
||
title: '开户行',
|
||
align:"center",
|
||
dataIndex: 'bankName'
|
||
},
|
||
{
|
||
title: '组id',
|
||
align:"center",
|
||
dataIndex: 'groupId'
|
||
},
|
||
{
|
||
title: '使用次数',
|
||
align:"center",
|
||
dataIndex: 'numberuse'
|
||
},
|
||
{
|
||
title: '状态:0已报道 1未报到',
|
||
align:"center",
|
||
dataIndex: 'status'
|
||
},
|
||
];
|
||
//查询数据
|
||
export const searchFormSchema: FormSchema[] = [
|
||
{
|
||
label: "专业id",
|
||
field: "majorId",
|
||
component: 'JRangeNumber',
|
||
//colProps: {span: 6},
|
||
},
|
||
{
|
||
label: "用户名",
|
||
field: 'userName',
|
||
component: 'Input',
|
||
//colProps: {span: 6},
|
||
},
|
||
];
|
||
//表单数据
|
||
export const formSchema: FormSchema[] = [
|
||
{
|
||
label: '用户id',
|
||
field: 'userId',
|
||
component: 'Input',
|
||
dynamicRules: ({model,schema}) => {
|
||
return [
|
||
{ required: true, message: '请输入用户id!'},
|
||
];
|
||
},
|
||
},
|
||
{
|
||
label: '专业id',
|
||
field: 'majorId',
|
||
component: 'InputNumber',
|
||
dynamicRules: ({model,schema}) => {
|
||
return [
|
||
{ required: true, message: '请输入专业id!'},
|
||
];
|
||
},
|
||
},
|
||
{
|
||
label: '用户专业id',
|
||
field: 'userMajorId',
|
||
component: 'Input',
|
||
dynamicRules: ({model,schema}) => {
|
||
return [
|
||
{ required: true, message: '请输入用户专业id!'},
|
||
];
|
||
},
|
||
},
|
||
{
|
||
label: '用户名',
|
||
field: 'userName',
|
||
component: 'Input',
|
||
dynamicRules: ({model,schema}) => {
|
||
return [
|
||
{ required: true, message: '请输入用户名!'},
|
||
];
|
||
},
|
||
},
|
||
{
|
||
label: '手机号',
|
||
field: 'phone',
|
||
component: 'Input',
|
||
dynamicRules: ({model,schema}) => {
|
||
return [
|
||
{ required: true, message: '请输入手机号!'},
|
||
];
|
||
},
|
||
},
|
||
{
|
||
label: '职称',
|
||
field: 'jobTitle',
|
||
component: 'Input',
|
||
dynamicRules: ({model,schema}) => {
|
||
return [
|
||
{ required: true, message: '请输入职称!'},
|
||
];
|
||
},
|
||
},
|
||
{
|
||
label: '银行卡号',
|
||
field: 'pyCard',
|
||
component: 'Input',
|
||
dynamicRules: ({model,schema}) => {
|
||
return [
|
||
{ required: true, message: '请输入银行卡号!'},
|
||
];
|
||
},
|
||
},
|
||
{
|
||
label: '饭卡',
|
||
field: 'mealCard',
|
||
component: 'Input',
|
||
dynamicRules: ({model,schema}) => {
|
||
return [
|
||
{ required: true, message: '请输入饭卡!'},
|
||
];
|
||
},
|
||
},
|
||
{
|
||
label: '办公位',
|
||
field: 'office',
|
||
component: 'Input',
|
||
dynamicRules: ({model,schema}) => {
|
||
return [
|
||
{ required: true, message: '请输入办公位!'},
|
||
];
|
||
},
|
||
},
|
||
{
|
||
label: '工作名称',
|
||
field: 'workName',
|
||
component: 'Input',
|
||
dynamicRules: ({model,schema}) => {
|
||
return [
|
||
{ required: true, message: '请输入工作名称!'},
|
||
];
|
||
},
|
||
},
|
||
{
|
||
label: '固定电话',
|
||
field: 'workPhone',
|
||
component: 'Input',
|
||
dynamicRules: ({model,schema}) => {
|
||
return [
|
||
{ required: true, message: '请输入固定电话!'},
|
||
];
|
||
},
|
||
},
|
||
{
|
||
label: '身份证',
|
||
field: 'identityId',
|
||
component: 'Input',
|
||
dynamicRules: ({model,schema}) => {
|
||
return [
|
||
{ required: true, message: '请输入身份证!'},
|
||
];
|
||
},
|
||
},
|
||
{
|
||
label: '车牌号',
|
||
field: 'carNumber',
|
||
component: 'Input',
|
||
dynamicRules: ({model,schema}) => {
|
||
return [
|
||
{ required: true, message: '请输入车牌号!'},
|
||
];
|
||
},
|
||
},
|
||
{
|
||
label: '性别',
|
||
field: 'sex',
|
||
component: 'Input',
|
||
},
|
||
{
|
||
label: '年龄',
|
||
field: 'age',
|
||
component: 'InputNumber',
|
||
},
|
||
{
|
||
label: '车辆是否入校',
|
||
field: 'carStatus',
|
||
component: 'InputNumber',
|
||
dynamicRules: ({model,schema}) => {
|
||
return [
|
||
{ required: true, message: '请输入车辆是否入校!'},
|
||
];
|
||
},
|
||
},
|
||
{
|
||
label: '宿舍信息',
|
||
field: 'dormitory',
|
||
component: 'Input',
|
||
dynamicRules: ({model,schema}) => {
|
||
return [
|
||
{ required: true, message: '请输入宿舍信息!'},
|
||
];
|
||
},
|
||
},
|
||
{
|
||
label: '是否住宿',
|
||
field: 'dormitoryStatus',
|
||
component: 'Input',
|
||
dynamicRules: ({model,schema}) => {
|
||
return [
|
||
{ required: true, message: '请输入是否住宿!'},
|
||
];
|
||
},
|
||
},
|
||
{
|
||
label: '开户所在地',
|
||
field: 'bankAddress',
|
||
component: 'Input',
|
||
dynamicRules: ({model,schema}) => {
|
||
return [
|
||
{ required: true, message: '请输入开户所在地!'},
|
||
];
|
||
},
|
||
},
|
||
{
|
||
label: '开户行',
|
||
field: 'bankName',
|
||
component: 'Input',
|
||
dynamicRules: ({model,schema}) => {
|
||
return [
|
||
{ required: true, message: '请输入开户行!'},
|
||
];
|
||
},
|
||
},
|
||
{
|
||
label: '组id',
|
||
field: 'groupId',
|
||
component: 'InputNumber',
|
||
dynamicRules: ({model,schema}) => {
|
||
return [
|
||
{ required: true, message: '请输入组id!'},
|
||
];
|
||
},
|
||
},
|
||
{
|
||
label: '使用次数',
|
||
field: 'numberuse',
|
||
component: 'InputNumber',
|
||
dynamicRules: ({model,schema}) => {
|
||
return [
|
||
{ required: true, message: '请输入使用次数!'},
|
||
];
|
||
},
|
||
},
|
||
{
|
||
label: '状态:0已报道 1未报到',
|
||
field: 'status',
|
||
component: 'InputNumber',
|
||
dynamicRules: ({model,schema}) => {
|
||
return [
|
||
{ required: true, message: '请输入状态:0已报道 1未报到!'},
|
||
];
|
||
},
|
||
},
|
||
// TODO 主键隐藏字段,目前写死为ID
|
||
{
|
||
label: '',
|
||
field: 'id',
|
||
component: 'Input',
|
||
show: false
|
||
},
|
||
];
|
||
|
||
// 高级查询数据
|
||
export const superQuerySchema = {
|
||
userId: {title: '用户id',order: 0,view: 'text', type: 'string',},
|
||
majorId: {title: '专业id',order: 1,view: 'number', type: 'number',},
|
||
userMajorId: {title: '用户专业id',order: 2,view: 'text', type: 'string',},
|
||
userName: {title: '用户名',order: 3,view: 'text', type: 'string',},
|
||
phone: {title: '手机号',order: 4,view: 'text', type: 'string',},
|
||
jobTitle: {title: '职称',order: 5,view: 'text', type: 'string',},
|
||
pyCard: {title: '银行卡号',order: 6,view: 'text', type: 'string',},
|
||
mealCard: {title: '饭卡',order: 7,view: 'text', type: 'string',},
|
||
office: {title: '办公位',order: 8,view: 'text', type: 'string',},
|
||
workName: {title: '工作名称',order: 9,view: 'text', type: 'string',},
|
||
workPhone: {title: '固定电话',order: 10,view: 'text', type: 'string',},
|
||
identityId: {title: '身份证',order: 11,view: 'text', type: 'string',},
|
||
carNumber: {title: '车牌号',order: 12,view: 'text', type: 'string',},
|
||
sex: {title: '性别',order: 13,view: 'text', type: 'string',},
|
||
age: {title: '年龄',order: 14,view: 'number', type: 'number',},
|
||
carStatus: {title: '车辆是否入校',order: 15,view: 'number', type: 'number',},
|
||
dormitory: {title: '宿舍信息',order: 16,view: 'text', type: 'string',},
|
||
dormitoryStatus: {title: '是否住宿',order: 17,view: 'text', type: 'string',},
|
||
bankAddress: {title: '开户所在地',order: 18,view: 'text', type: 'string',},
|
||
bankName: {title: '开户行',order: 19,view: 'text', type: 'string',},
|
||
groupId: {title: '组id',order: 20,view: 'number', type: 'number',},
|
||
numberuse: {title: '使用次数',order: 21,view: 'number', type: 'number',},
|
||
status: {title: '状态:0已报道 1未报到',order: 22,view: 'number', type: 'number',},
|
||
};
|
||
|
||
/**
|
||
* 流程表单调用这个方法获取formSchema
|
||
* @param param
|
||
*/
|
||
export function getBpmFormSchema(_formData): FormSchema[]{
|
||
// 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema
|
||
return formSchema;
|
||
} |