初始化项目
This commit is contained in:
@@ -0,0 +1,148 @@
|
||||
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
|
||||
import { BasicColumn, BasicTableProps, FormProps } from '@jeesite/core/components/Table';
|
||||
import { MyPerson, myPersonListData } from '@jeesite/biz/api/biz/myPerson';
|
||||
|
||||
const { t } = useI18n('biz.myPerson');
|
||||
|
||||
const modalProps = {
|
||||
title: t('人员选择'),
|
||||
};
|
||||
|
||||
const searchForm: FormProps<MyPerson> = {
|
||||
baseColProps: { md: 8, lg: 6 },
|
||||
labelWidth: 90,
|
||||
schemas: [
|
||||
{
|
||||
label: t('姓名'),
|
||||
field: 'personName',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: t('身份证号'),
|
||||
field: 'idCard',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: t('状态'),
|
||||
field: 'ustatus',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
dictType: 'biz_status',
|
||||
allowClear: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
const tableColumns: BasicColumn<MyPerson>[] = [
|
||||
{
|
||||
title: t('记录时间'),
|
||||
dataIndex: 'createTime',
|
||||
key: 'a.create_time',
|
||||
sorter: true,
|
||||
width: 150,
|
||||
align: 'center',
|
||||
fixed: 'left',
|
||||
},
|
||||
{
|
||||
title: t('姓名'),
|
||||
dataIndex: 'personName',
|
||||
key: 'a.person_name',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('性别'),
|
||||
dataIndex: 'gender',
|
||||
key: 'a.gender',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
dictType: 'sys_user_sex',
|
||||
},
|
||||
{
|
||||
title: t('身份证号'),
|
||||
dataIndex: 'idCard',
|
||||
key: 'a.id_card',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('手机号码'),
|
||||
dataIndex: 'phone',
|
||||
key: 'a.phone',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('邮箱'),
|
||||
dataIndex: 'email',
|
||||
key: 'a.email',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('出生日期'),
|
||||
dataIndex: 'birthDate',
|
||||
key: 'a.birth_date',
|
||||
sorter: true,
|
||||
width: 150,
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: t('居住地址'),
|
||||
dataIndex: 'address',
|
||||
key: 'a.address',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('所属部门'),
|
||||
dataIndex: 'department',
|
||||
key: 'a.department',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('职位'),
|
||||
dataIndex: 'positionName',
|
||||
key: 'a.position_name',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('状态'),
|
||||
dataIndex: 'ustatus',
|
||||
key: 'a.ustatus',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
dictType: 'biz_status',
|
||||
},
|
||||
];
|
||||
|
||||
const tableProps: BasicTableProps = {
|
||||
api: myPersonListData,
|
||||
beforeFetch: (params) => {
|
||||
params['isAll'] = true;
|
||||
return params;
|
||||
},
|
||||
columns: tableColumns,
|
||||
formConfig: searchForm,
|
||||
rowKey: 'personId',
|
||||
};
|
||||
|
||||
export default {
|
||||
modalProps,
|
||||
tableProps,
|
||||
itemCode: 'personId',
|
||||
itemName: 'personName',
|
||||
isShowCode: true,
|
||||
};
|
||||
@@ -0,0 +1,115 @@
|
||||
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
|
||||
import { BasicColumn, BasicTableProps, FormProps } from '@jeesite/core/components/Table';
|
||||
import { MyScreenInfo, myScreenInfoListData } from '@jeesite/biz/api/biz/myScreenInfo';
|
||||
|
||||
const { t } = useI18n('biz.myScreenInfo');
|
||||
|
||||
const modalProps = {
|
||||
title: t('大屏选择'),
|
||||
};
|
||||
|
||||
const searchForm: FormProps<MyScreenInfo> = {
|
||||
baseColProps: { md: 8, lg: 6 },
|
||||
labelWidth: 90,
|
||||
schemas: [
|
||||
{
|
||||
label: t('大屏名称'),
|
||||
field: 'screenName',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: t('大屏编码'),
|
||||
field: 'screenCode',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: t('状态'),
|
||||
field: 'ustatus',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
dictType: 'biz_status',
|
||||
allowClear: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
const tableColumns: BasicColumn<MyScreenInfo>[] = [
|
||||
{
|
||||
title: t('记录时间'),
|
||||
dataIndex: 'createTime',
|
||||
key: 'a.create_time',
|
||||
sorter: true,
|
||||
width: 150,
|
||||
align: 'center',
|
||||
fixed: 'left',
|
||||
},
|
||||
{
|
||||
title: t('大屏名称'),
|
||||
dataIndex: 'screenName',
|
||||
key: 'a.screen_name',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('大屏编码'),
|
||||
dataIndex: 'screenCode',
|
||||
key: 'a.screen_code',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('大屏标题'),
|
||||
dataIndex: 'screenTitle',
|
||||
key: 'a.screen_title',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('说明描述'),
|
||||
dataIndex: 'remark',
|
||||
key: 'a.remark',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
title: t('状态'),
|
||||
dataIndex: 'ustatus',
|
||||
key: 'a.ustatus',
|
||||
sorter: true,
|
||||
width: 130,
|
||||
align: 'center',
|
||||
dictType: 'biz_status',
|
||||
},
|
||||
{
|
||||
title: t('更新时间'),
|
||||
dataIndex: 'updateTime',
|
||||
key: 'a.update_time',
|
||||
sorter: true,
|
||||
width: 150,
|
||||
align: 'center',
|
||||
},
|
||||
];
|
||||
|
||||
const tableProps: BasicTableProps = {
|
||||
api: myScreenInfoListData,
|
||||
beforeFetch: (params) => {
|
||||
params['isAll'] = true;
|
||||
return params;
|
||||
},
|
||||
columns: tableColumns,
|
||||
formConfig: searchForm,
|
||||
rowKey: 'screenCode',
|
||||
};
|
||||
|
||||
export default {
|
||||
modalProps,
|
||||
tableProps,
|
||||
itemCode: 'screenCode',
|
||||
itemName: 'screenTitle',
|
||||
isShowCode: true,
|
||||
};
|
||||
Reference in New Issue
Block a user