feat: 新增招聘会企业签到与未参会统计
This commit is contained in:
@@ -0,0 +1,85 @@
|
||||
import React from 'react';
|
||||
import { Card, Col, Row, Tag } from 'antd';
|
||||
import { ProColumns, ProTable } from '@ant-design/pro-components';
|
||||
import {
|
||||
getOutdoorFairCompanyAttendanceList,
|
||||
} from '@/services/jobportal/outdoorFairDetail';
|
||||
import type { OutdoorFairCompanyAttendanceItem } from '@/services/jobportal/outdoorFairDetail';
|
||||
|
||||
interface Props {
|
||||
fairId: number;
|
||||
}
|
||||
|
||||
const columns: ProColumns<OutdoorFairCompanyAttendanceItem>[] = [
|
||||
{ title: '企业名称', dataIndex: 'companyName', ellipsis: true },
|
||||
{
|
||||
title: '行业',
|
||||
dataIndex: 'industry',
|
||||
hideInSearch: true,
|
||||
render: (_, record) => record.industry || '--',
|
||||
},
|
||||
{
|
||||
title: '联系人',
|
||||
dataIndex: 'contactPerson',
|
||||
hideInSearch: true,
|
||||
render: (_, record) => record.contactPerson || '--',
|
||||
},
|
||||
{
|
||||
title: '签到时间',
|
||||
dataIndex: 'checkInTime',
|
||||
valueType: 'dateTime',
|
||||
hideInSearch: true,
|
||||
render: (_, record) => record.checkInTime || '--',
|
||||
},
|
||||
];
|
||||
|
||||
const CompanyAttendanceList: React.FC<{ fairId: number; checkedIn: boolean }> = ({
|
||||
fairId,
|
||||
checkedIn,
|
||||
}) => (
|
||||
<ProTable<OutdoorFairCompanyAttendanceItem>
|
||||
rowKey="id"
|
||||
columns={columns}
|
||||
search={{ labelWidth: 'auto' }}
|
||||
options={false}
|
||||
pagination={{ pageSize: 8 }}
|
||||
request={async (params) => {
|
||||
const res = await getOutdoorFairCompanyAttendanceList(fairId, {
|
||||
current: params.current,
|
||||
pageSize: params.pageSize,
|
||||
companyName: params.companyName,
|
||||
checkedIn,
|
||||
});
|
||||
return {
|
||||
data: res.rows || [],
|
||||
total: res.total || 0,
|
||||
success: res.code === 200,
|
||||
};
|
||||
}}
|
||||
/>
|
||||
);
|
||||
|
||||
const CompanyAttendanceTab: React.FC<Props> = ({ fairId }) => (
|
||||
<Row gutter={16} align="top">
|
||||
<Col span={12}>
|
||||
<Card
|
||||
title="已签到企业"
|
||||
extra={<Tag color="green">已签到</Tag>}
|
||||
bodyStyle={{ padding: 0 }}
|
||||
>
|
||||
<CompanyAttendanceList fairId={fairId} checkedIn />
|
||||
</Card>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Card
|
||||
title="未签到企业"
|
||||
extra={<Tag color="orange">未签到</Tag>}
|
||||
bodyStyle={{ padding: 0 }}
|
||||
>
|
||||
<CompanyAttendanceList fairId={fairId} checkedIn={false} />
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
);
|
||||
|
||||
export default CompanyAttendanceTab;
|
||||
@@ -11,6 +11,7 @@ import ParticipatingCompaniesTab from './components/ParticipatingCompaniesTab';
|
||||
import ParticipatingJobsTab from './components/ParticipatingJobsTab';
|
||||
import CompanyUnsubscribeTab from './components/CompanyUnsubscribeTab';
|
||||
import AttendeeTab from './components/AttendeeTab';
|
||||
import CompanyAttendanceTab from './components/CompanyAttendanceTab';
|
||||
import DeviceTab from './components/DeviceTab';
|
||||
|
||||
const OutdoorFairDetail: React.FC = () => {
|
||||
@@ -43,6 +44,7 @@ const OutdoorFairDetail: React.FC = () => {
|
||||
const tabItems = [
|
||||
{ key: 'fair-info', label: '招聘会管理' },
|
||||
{ key: 'participating-companies', label: '参会企业' },
|
||||
{ key: 'company-attendance', label: '企业签到' },
|
||||
{ key: 'company-unsubscribe', label: '企业退订' },
|
||||
{ key: 'participating-jobs', label: '参会岗位' },
|
||||
{ key: 'attendee', label: '参会人员管理' },
|
||||
@@ -88,6 +90,8 @@ const OutdoorFairDetail: React.FC = () => {
|
||||
return <BoothTab fairId={fairId} fairInfo={fairInfo} />;
|
||||
case 'participating-companies':
|
||||
return <ParticipatingCompaniesTab fairId={fairId} />;
|
||||
case 'company-attendance':
|
||||
return <CompanyAttendanceTab fairId={fairId} />;
|
||||
case 'company-unsubscribe':
|
||||
return <CompanyUnsubscribeTab fairId={fairId} />;
|
||||
case 'participating-jobs':
|
||||
|
||||
Reference in New Issue
Block a user