1、入驻人员
This commit is contained in:
@@ -1,84 +1,45 @@
|
||||
import type { FormSchemaGetter } from '#/adapter/form';
|
||||
import type { VxeGridProps } from '#/adapter/vxe-table';
|
||||
|
||||
import {getDictOptions} from "#/utils/dict";
|
||||
|
||||
export const querySchema: FormSchemaGetter = () => [
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'userId',
|
||||
label: '用户id',
|
||||
fieldName: 'unitId',
|
||||
label: '所属单位',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'userName',
|
||||
label: '用户名称',
|
||||
label: '员工名称',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'phone',
|
||||
label: '联系电话',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'gender',
|
||||
label: '性别',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'img',
|
||||
label: '人脸图片',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'unitId',
|
||||
label: '所属单位id',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'unitName',
|
||||
label: '所属单位名称',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'locathon',
|
||||
label: '入驻位置',
|
||||
},
|
||||
{
|
||||
component: 'DatePicker',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
showTime: true,
|
||||
format: 'YYYY-MM-DD HH:mm:ss',
|
||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
options: getDictOptions('wy_state'),
|
||||
},
|
||||
fieldName: 'time',
|
||||
label: '入驻时间',
|
||||
},
|
||||
{
|
||||
component: 'Textarea',
|
||||
fieldName: 'carNumber',
|
||||
label: '车牌号码',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'state',
|
||||
label: '状态',
|
||||
},
|
||||
];
|
||||
|
||||
// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新
|
||||
// export const columns: () => VxeGridProps['columns'] = () => [
|
||||
export const columns: VxeGridProps['columns'] = [
|
||||
{ type: 'checkbox', width: 60 },
|
||||
{
|
||||
title: '主键id',
|
||||
title: '序号',
|
||||
field: 'id',
|
||||
slots: {
|
||||
default: ({ rowIndex }) => {
|
||||
return (rowIndex + 1).toString();
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '用户id',
|
||||
title: '员工编号',
|
||||
field: 'userId',
|
||||
},
|
||||
{
|
||||
title: '用户名称',
|
||||
title: '员工名称',
|
||||
field: 'userName',
|
||||
},
|
||||
{
|
||||
@@ -90,15 +51,13 @@ export const columns: VxeGridProps['columns'] = [
|
||||
field: 'gender',
|
||||
},
|
||||
{
|
||||
title: '人脸图片',
|
||||
field: 'img',
|
||||
title: '人脸图片',
|
||||
slots: { default: 'img' },
|
||||
minWidth: 80,
|
||||
},
|
||||
{
|
||||
title: '所属单位id',
|
||||
field: 'unitId',
|
||||
},
|
||||
{
|
||||
title: '所属单位名称',
|
||||
title: '所属单位',
|
||||
field: 'unitName',
|
||||
},
|
||||
{
|
||||
@@ -116,6 +75,7 @@ export const columns: VxeGridProps['columns'] = [
|
||||
{
|
||||
title: '状态',
|
||||
field: 'state',
|
||||
// slots: { default: 'state' },
|
||||
},
|
||||
{
|
||||
title: '备注',
|
||||
@@ -141,49 +101,37 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '用户id',
|
||||
label: '入住员工',
|
||||
fieldName: 'userId',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
component: "Select",
|
||||
rules: 'selectRequired',
|
||||
formItemClass: 'col-span-2'
|
||||
},
|
||||
{
|
||||
label: '用户名称',
|
||||
fieldName: 'userName',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '联系电话',
|
||||
fieldName: 'phone',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '性别',
|
||||
fieldName: 'gender',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '人脸图片',
|
||||
fieldName: 'img',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '所属单位id',
|
||||
label: '所属单位',
|
||||
fieldName: 'unitId',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '所属单位名称',
|
||||
fieldName: 'unitName',
|
||||
component: 'Input',
|
||||
component: 'Select',
|
||||
formItemClass: 'col-span-2',
|
||||
rules:'selectRequired',
|
||||
},
|
||||
{
|
||||
label: '入驻位置',
|
||||
fieldName: 'locathon',
|
||||
component: 'Input',
|
||||
rules:'required',
|
||||
formItemClass: 'col-span-2',
|
||||
},
|
||||
{
|
||||
label: '人脸图片',
|
||||
fieldName: 'img',
|
||||
component: 'ImageUpload',
|
||||
componentProps: {
|
||||
// accept: 'image/*', // 可选拓展名或者mime类型 ,拼接
|
||||
maxCount: 1, // 最大上传文件数 默认为1 为1会绑定为string而非string[]类型
|
||||
},
|
||||
formItemClass: 'col-span-2',
|
||||
},
|
||||
|
||||
{
|
||||
label: '入驻时间',
|
||||
fieldName: 'time',
|
||||
@@ -197,17 +145,93 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
{
|
||||
label: '车牌号码',
|
||||
fieldName: 'carNumber',
|
||||
component: 'Textarea',
|
||||
},
|
||||
{
|
||||
label: '状态',
|
||||
fieldName: 'state',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '备注',
|
||||
fieldName: 'remark',
|
||||
component: 'Textarea',
|
||||
formItemClass: 'col-span-2',
|
||||
},
|
||||
];
|
||||
|
||||
//门禁记录
|
||||
export const accessControlColumns: VxeGridProps['columns'] = [
|
||||
{
|
||||
title: '序号',
|
||||
field: 'id',
|
||||
},
|
||||
{
|
||||
title: '通过时间',
|
||||
field: 'userId',
|
||||
},
|
||||
{
|
||||
title: '进出类型',
|
||||
field: 'userName',
|
||||
},
|
||||
{
|
||||
title: '位置',
|
||||
field: 'phone',
|
||||
},
|
||||
{
|
||||
title: '设备名称',
|
||||
field: 'gender',
|
||||
},
|
||||
{
|
||||
title: '门禁类型',
|
||||
field: 'img',
|
||||
},
|
||||
{
|
||||
title: '识别类型',
|
||||
field: 'unitName',
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
field: 'locathon',
|
||||
},
|
||||
|
||||
];
|
||||
|
||||
//车辆记录
|
||||
export const carColumns: VxeGridProps['columns'] = [
|
||||
{
|
||||
title: '序号',
|
||||
field: 'id',
|
||||
},
|
||||
{
|
||||
title: '通过时间',
|
||||
field: 'userId',
|
||||
},
|
||||
{
|
||||
title: '进出类型',
|
||||
field: 'userName',
|
||||
},
|
||||
{
|
||||
title: '位置',
|
||||
field: 'phone',
|
||||
},
|
||||
{
|
||||
title: '设备名称',
|
||||
field: 'gender',
|
||||
},
|
||||
{
|
||||
title: '进出方式',
|
||||
field: 'img',
|
||||
},
|
||||
{
|
||||
title: '停车类型',
|
||||
field: 'unitName',
|
||||
},
|
||||
{
|
||||
title: '费用(元)',
|
||||
field: 'locathon',
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
field: 'state',
|
||||
},
|
||||
{
|
||||
title: '备注',
|
||||
field: 'remark',
|
||||
},
|
||||
];
|
||||
|
Reference in New Issue
Block a user