This commit is contained in:
2025-11-30 18:38:38 +08:00
parent edf26b0b18
commit 71cc66ea9b
61 changed files with 5547 additions and 45 deletions

View File

@@ -0,0 +1,197 @@
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
import { BasicColumn, BasicTableProps, FormProps } from '@jeesite/core/components/Table';
import { BizMonitorHost, bizMonitorHostListData } from '@jeesite/biz/api/biz/monitorHost';
const { t } = useI18n('biz.monitorHost');
const modalProps = {
title: t('主机信息选择'),
};
const searchForm: FormProps<BizMonitorHost> = {
baseColProps: { md: 8, lg: 6 },
labelWidth: 90,
schemas: [
{
label: t('主机名称'),
field: 'hostname',
component: 'Input',
},
{
label: t('IP地址'),
field: 'ipAddress',
component: 'Input',
},
{
label: t('主机类型'),
field: 'hostType',
component: 'Select',
componentProps: {
dictType: 'host_type',
allowClear: true,
},
},
{
label: t('操作系统'),
field: 'hostOs',
component: 'Select',
componentProps: {
dictType: 'host_os',
allowClear: true,
},
},
{
label: t('主机状态'),
field: 'ustatus',
component: 'Select',
componentProps: {
dictType: 'host_status',
allowClear: true,
},
},
{
label: t('物理位置'),
field: 'locationName',
component: 'Input',
},
{
label: t('地址类型'),
field: 'locationType',
component: 'Select',
componentProps: {
dictType: 'location_type',
allowClear: true,
},
},
],
};
const tableColumns: BasicColumn<BizMonitorHost>[] = [
{
title: t('记录时间'),
dataIndex: 'createTime',
key: 'a.create_time',
sorter: true,
width: 180,
align: 'left',
},
{
title: t('主机名称'),
dataIndex: 'hostname',
key: 'a.hostname',
sorter: true,
width: 130,
align: 'left',
},
{
title: t('IP地址'),
dataIndex: 'ipAddress',
key: 'a.ip_address',
sorter: true,
width: 130,
align: 'left',
},
{
title: t('主机类型'),
dataIndex: 'hostType',
key: 'a.host_type',
sorter: true,
width: 130,
align: 'left',
dictType: 'host_type',
},
{
title: t('操作系统'),
dataIndex: 'hostOs',
key: 'a.host_os',
sorter: true,
width: 130,
align: 'left',
dictType: 'host_os',
},
{
title: t('主机状态'),
dataIndex: 'ustatus',
key: 'a.ustatus',
sorter: true,
width: 130,
align: 'left',
dictType: 'host_status',
},
{
title: t('监测运行时间'),
dataIndex: 'lastOnlineTime',
key: 'a.last_online_time',
sorter: true,
width: 180,
align: 'center',
},
{
title: t('物理位置'),
dataIndex: 'locationName',
key: 'a.location_name',
sorter: true,
width: 130,
align: 'left',
},
{
title: t('地址类型'),
dataIndex: 'locationType',
key: 'a.location_type',
sorter: true,
width: 130,
align: 'left',
dictType: 'location_type',
},
{
title: t('联系方式'),
dataIndex: 'otherContact',
key: 'a.other_contact',
sorter: true,
width: 130,
align: 'left',
},
{
title: t('备注信息'),
dataIndex: 'remark',
key: 'a.remark',
sorter: true,
width: 130,
align: 'left',
},
{
title: t('更新时间'),
dataIndex: 'updateTime',
key: 'a.update_time',
sorter: true,
width: 180,
align: 'center',
},
{
title: t('失效日期'),
dataIndex: 'expiryDate',
key: 'a.expiry_date',
sorter: true,
width: 180,
align: 'center',
},
];
const tableProps: BasicTableProps = {
api: bizMonitorHostListData,
beforeFetch: (params) => {
params['isAll'] = true;
return params;
},
columns: tableColumns,
formConfig: searchForm,
rowKey: 'hostId',
};
export default {
modalProps,
tableProps,
itemCode: 'hostId',
itemName: 'hostname',
isShowCode: true,
};