1、入驻管理
This commit is contained in:
155
apps/web-antd/src/views/property/resident/unit/data.ts
Normal file
155
apps/web-antd/src/views/property/resident/unit/data.ts
Normal file
@@ -0,0 +1,155 @@
|
||||
import type {FormSchemaGetter} from '#/adapter/form';
|
||||
import type {VxeGridProps} from '#/adapter/vxe-table';
|
||||
import {getDictOptions} from "#/utils/dict";
|
||||
import {renderDict} from "#/utils/render";
|
||||
|
||||
|
||||
export const querySchema: FormSchemaGetter = () => [
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'name',
|
||||
label: '单位名称',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'contactPerson',
|
||||
label: '联系人',
|
||||
},
|
||||
{
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
options: getDictOptions('wy_state'),
|
||||
},
|
||||
fieldName: 'state',
|
||||
label: '状态',
|
||||
},
|
||||
];
|
||||
|
||||
export const columns: VxeGridProps['columns'] = [
|
||||
{type: 'checkbox', width: 60},
|
||||
{
|
||||
title: '序号',
|
||||
field: 'id',
|
||||
slots: {
|
||||
default: ({ rowIndex }) => {
|
||||
return rowIndex + 1;
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '单位编号',
|
||||
field: 'unitNumber',
|
||||
},
|
||||
{
|
||||
title: '单位名称',
|
||||
field: 'name',
|
||||
},
|
||||
{
|
||||
title: '单位类型',
|
||||
field: 'type',
|
||||
},
|
||||
{
|
||||
title: '联系人',
|
||||
field: 'contactPerson',
|
||||
},
|
||||
{
|
||||
title: '联系电话',
|
||||
field: 'phone',
|
||||
},
|
||||
{
|
||||
title: '入驻位置',
|
||||
field: 'location',
|
||||
},
|
||||
{
|
||||
title: '入驻时间',
|
||||
field: 'time',
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
field: 'state',
|
||||
slots: {
|
||||
default: ({ row }) => {
|
||||
return renderDict(row.state, 'wy_state');
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '员工数量',
|
||||
field: 'number',
|
||||
},
|
||||
{
|
||||
title: '备注',
|
||||
field: 'remark',
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
field: 'createTime',
|
||||
},
|
||||
{
|
||||
field: 'action',
|
||||
fixed: 'right',
|
||||
slots: {default: 'action'},
|
||||
title: '操作',
|
||||
width: 180,
|
||||
},
|
||||
];
|
||||
|
||||
export const modalSchema: FormSchemaGetter = () => [
|
||||
{
|
||||
label: 'id',
|
||||
fieldName: 'id',
|
||||
component: 'Input',
|
||||
dependencies: {
|
||||
show: () => false,
|
||||
triggerFields: [''],
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '单位名称',
|
||||
fieldName: 'name',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
|
||||
},
|
||||
{
|
||||
label: '单位类型',
|
||||
fieldName: 'type',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '联系人',
|
||||
fieldName: 'contactPerson',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '联系电话',
|
||||
fieldName: 'phone',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '入驻位置',
|
||||
fieldName: 'location',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '入驻时间',
|
||||
fieldName: 'time',
|
||||
component: 'DatePicker',
|
||||
componentProps: {
|
||||
showTime: true,
|
||||
format: 'YYYY-MM-DD HH:mm:ss',
|
||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
},
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '备注',
|
||||
fieldName: 'remark',
|
||||
component: 'Textarea',
|
||||
formItemClass: 'col-span-2'
|
||||
},
|
||||
];
|
Reference in New Issue
Block a user