Files
my-spring/web-vue/packages/biz/views/biz/mySftpHosts/select.ts
2026-04-12 21:04:03 +08:00

111 lines
2.1 KiB
TypeScript

import { useI18n } from '@jeesite/core/hooks/web/useI18n';
import { BasicColumn, BasicTableProps, FormProps } from '@jeesite/core/components/Table';
import { mySftpHostsListData } from '@jeesite/biz/api/biz/mySftpHosts';
const { t } = useI18n('biz.mySftpHosts');
const modalProps = {
title: t('主机选择'),
};
const searchForm: FormProps<MySftpHosts> = {
baseColProps: { md: 8, lg: 6 },
labelWidth: 90,
schemas: [
{
label: t('主机域名'),
field: 'hostIp',
component: 'Input',
},
{
label: t('主机名称'),
field: 'hostName',
component: 'Input',
},
{
label: t('状态'),
field: 'ustatus',
component: 'Input',
},
],
};
const tableColumns: BasicColumn<MySftpHosts>[] = [
{
title: t('记录时间'),
dataIndex: 'createTime',
key: 'a.create_time',
sorter: true,
width: 230,
align: 'left',
slot: 'firstColumn',
},
{
title: t('主机域名'),
dataIndex: 'hostIp',
key: 'a.host_ip',
sorter: true,
width: 130,
align: 'left',
},
{
title: t('主机端口'),
dataIndex: 'hostPort',
key: 'a.host_port',
sorter: true,
width: 130,
align: 'center',
},
{
title: t('主机名称'),
dataIndex: 'hostName',
key: 'a.host_name',
sorter: true,
width: 130,
align: 'left',
},
{
title: t('备注说明'),
dataIndex: 'hostRemark',
key: 'a.host_remark',
sorter: true,
width: 130,
align: 'left',
},
{
title: t('更新时间'),
dataIndex: 'updateTime',
key: 'a.update_time',
sorter: true,
width: 130,
align: 'center',
},
{
title: t('状态'),
dataIndex: 'ustatus',
key: 'a.ustatus',
sorter: true,
width: 130,
align: 'left',
},
];
const tableProps: BasicTableProps = {
api: mySftpHostsListData,
beforeFetch: (params) => {
params['isAll'] = true;
return params;
},
columns: tableColumns,
formConfig: searchForm,
rowKey: 'hostId',
};
export default {
modalProps,
tableProps,
itemCode: 'hostId',
itemName: 'hostId',
isShowCode: false,
};