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; 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 handleRemoveOne = async (jobId: string) => {
const hide = message.loading('正在删除'); const hide = message.loading('正在删除');
if (!jobId) return true; if (!jobId) return true;
@@ -111,6 +121,21 @@ function ManagementList() {
} }
const columns: ProColumns<API.ManagementList.Manage>[] = [ 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: '岗位名称', title: '岗位名称',
dataIndex: 'jobTitle', dataIndex: 'jobTitle',
@@ -221,6 +246,14 @@ function ManagementList() {
align: 'center', align: 'center',
hideInSearch: true, hideInSearch: true,
}, },
{
title: '创建时间',
dataIndex: 'createTime',
valueType: 'dateTime',
align: 'center',
hideInSearch: true,
width: 180,
},
{ {
title: '操作', title: '操作',
hideInSearch: true, hideInSearch: true,
@@ -339,8 +372,8 @@ function ManagementList() {
key="export" key="export"
hidden={!access.hasPerms('system:user:export')} hidden={!access.hasPerms('system:user:export')}
onClick={async () => { onClick={async () => {
const searchVal = formTableRef.current && formTableRef.current.getFieldsValue(); const searchVal = formTableRef.current?.getFieldsValue();
handleExport(searchVal as API.ManagementList.ListParams); handleExport(buildListSearchParams(searchVal || {}));
}} }}
> >
<DownloadOutlined /> <DownloadOutlined />
@@ -351,8 +384,8 @@ function ManagementList() {
key="export" key="export"
hidden={!access.hasPerms('cms:jobApply:export')} hidden={!access.hasPerms('cms:jobApply:export')}
onClick={async () => { onClick={async () => {
const searchVal = formTableRef.current && formTableRef.current.getFieldsValue(); const searchVal = formTableRef.current?.getFieldsValue();
lyrhandleExport(searchVal as API.ManagementList.ListParams); lyrhandleExport(buildListSearchParams(searchVal || {}));
}} }}
> >
<DownloadOutlined /> <DownloadOutlined />

View File

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