11
Some checks failed
Node CI / build (14.x, macOS-latest) (push) Has been cancelled
Node CI / build (14.x, ubuntu-latest) (push) Has been cancelled
Node CI / build (14.x, windows-latest) (push) Has been cancelled
Node CI / build (16.x, macOS-latest) (push) Has been cancelled
Node CI / build (16.x, ubuntu-latest) (push) Has been cancelled
Node CI / build (16.x, windows-latest) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
coverage CI / build (push) Has been cancelled
Node pnpm CI / build (16.x, macOS-latest) (push) Has been cancelled
Node pnpm CI / build (16.x, ubuntu-latest) (push) Has been cancelled
Node pnpm CI / build (16.x, windows-latest) (push) Has been cancelled

This commit is contained in:
francis-fh
2026-06-04 16:50:40 +08:00
parent 03f26885c5
commit 197e80826e
2 changed files with 42 additions and 6 deletions

View File

@@ -42,6 +42,16 @@ const lyrhandleExport = async (values: API.ManagementList.ListParams) => {
return false;
}
};
const buildListSearchParams = (values: Record<string, any>): API.ManagementList.ListParams => {
const { dateRange, ...rest } = values || {};
const params = { ...rest } as API.ManagementList.ListParams;
if (dateRange?.[0] && dateRange?.[1]) {
params.startDate = dateRange[0];
params.endDate = dateRange[1];
}
return params;
};
const handleRemoveOne = async (jobId: string) => {
const hide = message.loading('正在删除');
if (!jobId) return true;
@@ -111,6 +121,21 @@ function ManagementList() {
}
const columns: ProColumns<API.ManagementList.Manage>[] = [
{
title: '时间范围',
dataIndex: 'dateRange',
hideInTable: true,
valueType: 'dateRange',
fieldProps: {
format: 'YYYY-MM-DD',
},
search: {
transform: (value) => ({
startDate: value[0],
endDate: value[1],
}),
},
},
{
title: '岗位名称',
dataIndex: 'jobTitle',
@@ -221,6 +246,14 @@ function ManagementList() {
align: 'center',
hideInSearch: true,
},
{
title: '创建时间',
dataIndex: 'createTime',
valueType: 'dateTime',
align: 'center',
hideInSearch: true,
width: 180,
},
{
title: '操作',
hideInSearch: true,
@@ -339,8 +372,8 @@ function ManagementList() {
key="export"
hidden={!access.hasPerms('system:user:export')}
onClick={async () => {
const searchVal = formTableRef.current && formTableRef.current.getFieldsValue();
handleExport(searchVal as API.ManagementList.ListParams);
const searchVal = formTableRef.current?.getFieldsValue();
handleExport(buildListSearchParams(searchVal || {}));
}}
>
<DownloadOutlined />
@@ -351,8 +384,8 @@ function ManagementList() {
key="export"
hidden={!access.hasPerms('cms:jobApply:export')}
onClick={async () => {
const searchVal = formTableRef.current && formTableRef.current.getFieldsValue();
lyrhandleExport(searchVal as API.ManagementList.ListParams);
const searchVal = formTableRef.current?.getFieldsValue();
lyrhandleExport(buildListSearchParams(searchVal || {}));
}}
>
<DownloadOutlined />

View File

@@ -27,8 +27,9 @@ declare namespace API.ManagementList {
view?: number;
release?: number;
isPublish?: number;
jobType?:string;
jobType?: string;
jobContactList?: ContactPerson[];
createTime?: string;
}
export interface AddParams {
@@ -53,7 +54,7 @@ declare namespace API.ManagementList {
view?: number;
release?: number;
isPublish?: number;
jobType?:string;
jobType?: string;
jobContactList?: ContactPerson[];
}
@@ -63,6 +64,8 @@ declare namespace API.ManagementList {
remark?: string;
pageSize?: number;
current?: number;
startDate?: string;
endDate?: string;
}
export interface ManageIdResult {