二次调研功能开发
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
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:
@@ -17,6 +17,16 @@ import { getDictValueEnum } from '@/services/system/dict';
|
||||
import DictTag from '@/components/DictTag';
|
||||
import { postCompanyApproval } from '@/services/company/review';
|
||||
|
||||
const buildListSearchParams = (values: Record<string, any>): API.CompanyList.Params => {
|
||||
const { dateRange, ...rest } = values || {};
|
||||
const params = { ...rest } as API.CompanyList.Params;
|
||||
if (dateRange?.[0] && dateRange?.[1]) {
|
||||
params.startDate = dateRange[0];
|
||||
params.endDate = dateRange[1];
|
||||
}
|
||||
return params;
|
||||
};
|
||||
|
||||
const loadCompanyDetail = async (record: API.CompanyList.Company) => {
|
||||
const resp = await getCmsCompanyDetail(record.companyId);
|
||||
const detail = parseCmsCompanyDetailResponse(resp);
|
||||
@@ -82,6 +92,21 @@ function ManagementList() {
|
||||
}, []);
|
||||
|
||||
const columns: ProColumns<API.CompanyList.Company>[] = [
|
||||
{
|
||||
title: '时间范围',
|
||||
dataIndex: 'dateRange',
|
||||
hideInTable: true,
|
||||
valueType: 'dateRange',
|
||||
fieldProps: {
|
||||
format: 'YYYY-MM-DD',
|
||||
},
|
||||
search: {
|
||||
transform: (value) => ({
|
||||
startDate: value[0],
|
||||
endDate: value[1],
|
||||
}),
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '公司名称',
|
||||
dataIndex: 'name',
|
||||
@@ -279,7 +304,7 @@ function ManagementList() {
|
||||
hidden={!access.hasPerms('system:user:export')}
|
||||
onClick={async () => {
|
||||
const searchVal = formTableRef.current?.getFieldsValue();
|
||||
handleExport(searchVal as API.CompanyList.Params);
|
||||
handleExport(buildListSearchParams(searchVal || {}));
|
||||
}}
|
||||
>
|
||||
<PlusOutlined />
|
||||
|
||||
Reference in New Issue
Block a user