dbsd_kczx/src/views/system/tenant/tenant.data.ts

116 lines
2.3 KiB
TypeScript
Raw Normal View History

2022-03-10 09:47:29 +08:00
import { BasicColumn, FormSchema } from '/@/components/Table';
2021-10-20 14:32:09 +08:00
export const columns: BasicColumn[] = [
{
title: '租户名称',
dataIndex: 'name',
2022-03-10 09:47:29 +08:00
width: 200,
2021-10-20 14:32:09 +08:00
align: 'left',
},
{
title: '租户编号',
dataIndex: 'id',
2022-03-10 09:47:29 +08:00
width: 180,
2021-10-20 14:32:09 +08:00
},
{
title: '开始时间',
dataIndex: 'beginDate',
2022-03-10 09:47:29 +08:00
sorter: true,
width: 180,
2021-10-20 14:32:09 +08:00
},
{
title: '结束时间',
dataIndex: 'endDate',
2022-03-10 09:47:29 +08:00
sorter: true,
width: 180
2021-10-20 14:32:09 +08:00
},
{
title: '创建时间',
dataIndex: 'createTime',
2022-03-10 09:47:29 +08:00
sorter: true,
width: 180
2021-10-20 14:32:09 +08:00
},
{
title: '状态',
dataIndex: 'status_dictText',
2022-03-10 09:47:29 +08:00
width: 100,
2021-10-20 14:32:09 +08:00
}
];
export const searchFormSchema: FormSchema[] = [
2022-03-10 09:47:29 +08:00
{
field: 'name',
label: '租户名称',
component: 'Input',
colProps: { span: 8 },
},
{
field: 'status',
label: '状态',
component: 'Select',
componentProps: {
options: [
{ label: '启用', value: 1 },
{ label: '停用', value: 0 },
],
2021-10-20 14:32:09 +08:00
},
2022-03-10 09:47:29 +08:00
colProps: { span: 8 },
},
{
field: 'fieldTime',
component: 'RangePicker',
label: '时间字段',
colProps: {
span: 8,
2021-10-20 14:32:09 +08:00
},
2022-03-10 09:47:29 +08:00
},
2021-10-20 14:32:09 +08:00
];
export const formSchema: FormSchema[] = [
{
field: 'name',
label: '租户名称',
component: 'Input',
2022-03-10 09:47:29 +08:00
required: true
2021-10-20 14:32:09 +08:00
},
{
field: 'id',
label: '租户编号',
component: 'InputNumber',
2022-03-10 09:47:29 +08:00
dynamicDisabled: ({values}) => {
return !!values.id;
},
required: true
2021-10-20 14:32:09 +08:00
},
{
field: 'beginDate',
label: '开始时间',
component: 'DatePicker',
componentProps: {
showTime:true,
valueFormat:'YYYY-MM-DD HH:mm:ss',
}
},
{
field: 'endDate',
label: '结束时间',
component: 'DatePicker',
componentProps: {
showTime:true,
valueFormat:'YYYY-MM-DD HH:mm:ss',
}
},
{
field: 'status',
label: '状态',
component: 'RadioButtonGroup',
defaultValue: 1,
componentProps: {
options: [
{label: '正常', value: 1},
{label: '冻结', value: 0},
],
},
},
];