二次调研功能开发
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 />
|
||||
|
||||
@@ -552,19 +552,19 @@ const JobDetailPage: React.FC = () => {
|
||||
lineWidth: 2,
|
||||
},
|
||||
}}
|
||||
meta={{
|
||||
score: {
|
||||
alias: '评分',
|
||||
min: 0,
|
||||
max: 100,
|
||||
scale={{
|
||||
y: {
|
||||
domainMin: 0,
|
||||
domainMax: 100,
|
||||
nice: true,
|
||||
},
|
||||
}}
|
||||
yAxis={{
|
||||
label: false,
|
||||
tickLine: null,
|
||||
line: null,
|
||||
grid: null,
|
||||
axis={{
|
||||
y: {
|
||||
label: false,
|
||||
tick: false,
|
||||
line: false,
|
||||
},
|
||||
}}
|
||||
height={300}
|
||||
/>
|
||||
|
||||
@@ -11,7 +11,6 @@ import {
|
||||
import {
|
||||
ArrowLeftOutlined,
|
||||
CalendarOutlined,
|
||||
EyeOutlined,
|
||||
FileTextOutlined,
|
||||
BankOutlined,
|
||||
} from '@ant-design/icons';
|
||||
@@ -140,9 +139,6 @@ const PolicyDetailPage: React.FC = () => {
|
||||
<BankOutlined /> {detail.sourceUnit}
|
||||
</Text>
|
||||
)}
|
||||
<Text type="secondary">
|
||||
<EyeOutlined /> {detail.viewNum ?? 0} 次浏览
|
||||
</Text>
|
||||
</div>
|
||||
|
||||
{detail.zcContent?.trim() ? (
|
||||
|
||||
@@ -11,7 +11,6 @@ import {
|
||||
} from 'antd';
|
||||
import {
|
||||
CalendarOutlined,
|
||||
EyeOutlined,
|
||||
FileTextOutlined,
|
||||
SearchOutlined,
|
||||
BankOutlined,
|
||||
@@ -125,9 +124,6 @@ const PolicyListPage: React.FC = () => {
|
||||
<CalendarOutlined /> {item.publishTime}
|
||||
</span>
|
||||
)}
|
||||
<span>
|
||||
<EyeOutlined /> {item.viewNum ?? 0} 次浏览
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</List.Item>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { useRef, useState, useEffect } from 'react';
|
||||
import { useAccess, history } from '@umijs/max';
|
||||
import { Button, message, Modal } from 'antd';
|
||||
import { Button, FormInstance, message, Modal } from 'antd';
|
||||
import { ActionType, PageContainer, ProColumns, ProTable } from '@ant-design/pro-components';
|
||||
import { PlusOutlined, DeleteOutlined, FormOutlined, ExportOutlined, EyeOutlined } from '@ant-design/icons';
|
||||
import { getDictValueEnum } from '@/services/system/dict';
|
||||
@@ -17,6 +17,7 @@ import EditModal from './components/EditModal';
|
||||
|
||||
const PublicJobFairList: React.FC = () => {
|
||||
const access = useAccess();
|
||||
const formRef = useRef<FormInstance>();
|
||||
const actionRef = useRef<ActionType>();
|
||||
const [modalVisible, setModalVisible] = useState(false);
|
||||
const [currentRow, setCurrentRow] = useState<API.PublicJobFair.JobFairItem>();
|
||||
@@ -44,10 +45,21 @@ const PublicJobFairList: React.FC = () => {
|
||||
});
|
||||
};
|
||||
|
||||
const buildListSearchParams = (values: Record<string, any>): API.PublicJobFair.ListParams => {
|
||||
const { dateRange, current, pageSize, ...rest } = values || {};
|
||||
const params = { ...rest } as API.PublicJobFair.ListParams;
|
||||
if (dateRange?.[0] && dateRange?.[1]) {
|
||||
params.startDate = dateRange[0];
|
||||
params.endDate = dateRange[1];
|
||||
}
|
||||
return params;
|
||||
};
|
||||
|
||||
const handleExport = async () => {
|
||||
message.loading('正在导出...');
|
||||
try {
|
||||
await exportPublicJobFair();
|
||||
const searchVal = formRef.current?.getFieldsValue();
|
||||
await exportPublicJobFair(buildListSearchParams(searchVal || {}));
|
||||
message.success('导出成功');
|
||||
} catch {
|
||||
message.error('导出失败');
|
||||
@@ -55,6 +67,21 @@ const PublicJobFairList: React.FC = () => {
|
||||
};
|
||||
|
||||
const columns: ProColumns<API.PublicJobFair.JobFairItem>[] = [
|
||||
{
|
||||
title: '时间范围',
|
||||
dataIndex: 'dateRange',
|
||||
hideInTable: true,
|
||||
valueType: 'dateRange',
|
||||
fieldProps: {
|
||||
format: 'YYYY-MM-DD',
|
||||
},
|
||||
search: {
|
||||
transform: (value) => ({
|
||||
startDate: value[0],
|
||||
endDate: value[1],
|
||||
}),
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '招聘会标题',
|
||||
dataIndex: 'jobFairTitle',
|
||||
@@ -85,6 +112,12 @@ const PublicJobFairList: React.FC = () => {
|
||||
valueType: 'dateTime',
|
||||
hideInSearch: true,
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
dataIndex: 'createTime',
|
||||
valueType: 'dateTime',
|
||||
hideInSearch: true,
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
valueType: 'option',
|
||||
@@ -136,6 +169,7 @@ const PublicJobFairList: React.FC = () => {
|
||||
<ProTable<API.PublicJobFair.JobFairItem>
|
||||
headerTitle="公共招聘会列表"
|
||||
actionRef={actionRef}
|
||||
formRef={formRef}
|
||||
rowKey="jobFairId"
|
||||
columns={columns}
|
||||
scroll={{ x: 'max-content' }}
|
||||
@@ -149,6 +183,8 @@ const PublicJobFairList: React.FC = () => {
|
||||
pageSize: params.pageSize,
|
||||
jobFairTitle: params.jobFairTitle,
|
||||
jobFairType: params.jobFairType,
|
||||
startDate: params.startDate,
|
||||
endDate: params.endDate,
|
||||
});
|
||||
return { data: res.rows, total: res.total, success: true };
|
||||
}}
|
||||
|
||||
@@ -7,11 +7,12 @@ import {
|
||||
exportCmsJob,
|
||||
exportJobApply,
|
||||
getCmsJobList,
|
||||
importJobRow,
|
||||
updateCmsJobList,
|
||||
} from '@/services/Management/list';
|
||||
import { Button, FormInstance, message, Modal, Switch } from 'antd';
|
||||
import { ActionType, ProColumns, ProTable } from '@ant-design/pro-components';
|
||||
import { AlignLeftOutlined, BarChartOutlined, DeleteOutlined, FormOutlined, PlusOutlined,DownloadOutlined } from '@ant-design/icons';
|
||||
import { AlignLeftOutlined, BarChartOutlined, DeleteOutlined, FormOutlined, PlusOutlined, DownloadOutlined, UploadOutlined } from '@ant-design/icons';
|
||||
import EditManageRow from './edit';
|
||||
import { getDictValueEnum } from '@/services/system/dict';
|
||||
import DictTag from '@/components/DictTag';
|
||||
@@ -76,6 +77,7 @@ function ManagementList() {
|
||||
|
||||
const formTableRef = useRef<FormInstance>();
|
||||
const actionRef = useRef<ActionType>();
|
||||
const fileInputRef = useRef<HTMLInputElement>(null);
|
||||
|
||||
const [educationEnum, setEducationEnum] = useState<any>([]);
|
||||
const [experienceEnum, setExperienceEnum] = useState<any>([]);
|
||||
@@ -120,6 +122,29 @@ function ManagementList() {
|
||||
}
|
||||
}
|
||||
|
||||
const handleBatchUpload = async (event: React.ChangeEvent<HTMLInputElement>) => {
|
||||
const file = event.target.files?.[0];
|
||||
if (!file) return;
|
||||
const hide = message.loading('正在上传');
|
||||
try {
|
||||
const resp = await importJobRow(file);
|
||||
hide();
|
||||
if (resp.code === 200) {
|
||||
message.success('批量上传成功');
|
||||
actionRef.current?.reload();
|
||||
} else {
|
||||
message.error(resp.msg || '上传失败,请重试');
|
||||
}
|
||||
} catch (error) {
|
||||
hide();
|
||||
message.error('上传失败,请重试');
|
||||
}
|
||||
// 清空 input 以便重复选择同一文件
|
||||
if (fileInputRef.current) {
|
||||
fileInputRef.current.value = '';
|
||||
}
|
||||
};
|
||||
|
||||
const columns: ProColumns<API.ManagementList.Manage>[] = [
|
||||
{
|
||||
title: '时间范围',
|
||||
@@ -390,9 +415,24 @@ function ManagementList() {
|
||||
>
|
||||
<DownloadOutlined />录用人导出
|
||||
</Button>,
|
||||
<Button
|
||||
type="primary"
|
||||
key="batchUpload"
|
||||
hidden={!access.hasPerms('manage:List:add')}
|
||||
onClick={() => fileInputRef.current?.click()}
|
||||
>
|
||||
<UploadOutlined /> 批量上传岗位
|
||||
</Button>,
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
<input
|
||||
type="file"
|
||||
ref={fileInputRef}
|
||||
style={{ display: 'none' }}
|
||||
accept=".xlsx,.xls"
|
||||
onChange={handleBatchUpload}
|
||||
/>
|
||||
<EditManageRow
|
||||
open={modalVisible}
|
||||
mode={mode}
|
||||
|
||||
Reference in New Issue
Block a user