feat: add job fair region type functionality and improve job fair detail pages
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
- Introduced job fair region type selection in EditModal and PublicJobFairList components. - Enhanced JobFairDetail page to display job fair region type using DictTag. - Updated API types to include jobFairRegionType for better data handling. - Created new JobPortal pages for displaying job fair details with improved styling. - Added CSS styles for job fair detail and list pages to enhance user experience. - Implemented loading states and error handling for job fair data fetching.
This commit is contained in:
@@ -23,6 +23,8 @@ import {
|
||||
removeJobFromJobFair,
|
||||
reviewPublicJobFairCompany,
|
||||
} from '@/services/jobfair/publicJobFair';
|
||||
import { getDictValueEnum } from '@/services/system/dict';
|
||||
import DictTag from '@/components/DictTag';
|
||||
import CompanySelectModal from '../components/CompanySelectModal';
|
||||
import JobSelectModal from '../components/JobSelectModal';
|
||||
|
||||
@@ -51,6 +53,7 @@ const JobFairDetail: React.FC = () => {
|
||||
const [reviewModalOpen, setReviewModalOpen] = useState(false);
|
||||
const [reviewCompany, setReviewCompany] = useState<API.PublicJobFair.CompanyInfo>();
|
||||
const [reviewSubmitting, setReviewSubmitting] = useState(false);
|
||||
const [jobFairRegionTypeEnum, setJobFairRegionTypeEnum] = useState<any>({});
|
||||
const [reviewForm] = Form.useForm<ReviewFormValues>();
|
||||
const reviewStatus = Form.useWatch('reviewStatus', reviewForm);
|
||||
|
||||
@@ -72,6 +75,10 @@ const JobFairDetail: React.FC = () => {
|
||||
}
|
||||
}, [jobFairId, isEnterprise]);
|
||||
|
||||
useEffect(() => {
|
||||
getDictValueEnum('job_fair_region_type').then(setJobFairRegionTypeEnum);
|
||||
}, []);
|
||||
|
||||
const handleRemoveCompany = (company: API.PublicJobFair.CompanyInfo) => {
|
||||
Modal.confirm({
|
||||
title: '确认移除',
|
||||
@@ -174,6 +181,13 @@ const JobFairDetail: React.FC = () => {
|
||||
{jobFairTypeMap[detail?.jobFairType || '']}
|
||||
</Tag>
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="区域类型">
|
||||
{detail?.jobFairRegionType ? (
|
||||
<DictTag enums={jobFairRegionTypeEnum} value={detail.jobFairRegionType} />
|
||||
) : (
|
||||
'-'
|
||||
)}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="地址">{detail?.jobFairAddress}</Descriptions.Item>
|
||||
<Descriptions.Item label="联系电话">{detail?.jobFairPhone}</Descriptions.Item>
|
||||
<Descriptions.Item label="招聘会时间">
|
||||
|
||||
@@ -18,6 +18,7 @@ interface EditModalProps {
|
||||
open: boolean;
|
||||
values?: API.PublicJobFair.JobFairItem;
|
||||
jobFairTypeEnum: any;
|
||||
jobFairRegionTypeEnum: any;
|
||||
onCancel: () => void;
|
||||
onSubmit: (values: API.PublicJobFair.JobFairForm) => Promise<void>;
|
||||
}
|
||||
@@ -69,6 +70,7 @@ const EditModal: React.FC<EditModalProps> = ({
|
||||
open,
|
||||
values,
|
||||
jobFairTypeEnum,
|
||||
jobFairRegionTypeEnum,
|
||||
onCancel,
|
||||
onSubmit,
|
||||
}) => {
|
||||
@@ -175,6 +177,12 @@ const EditModal: React.FC<EditModalProps> = ({
|
||||
valueEnum={jobFairTypeEnum}
|
||||
rules={[{ required: true, message: '请选择招聘会类型' }]}
|
||||
/>
|
||||
<ProFormRadio.Group
|
||||
name="jobFairRegionType"
|
||||
label="区域类型"
|
||||
valueEnum={jobFairRegionTypeEnum}
|
||||
rules={[{ required: true, message: '请选择区域类型' }]}
|
||||
/>
|
||||
<ProFormRadio.Group name="isCrossDomain" label="是否跨域" valueEnum={yesNoEnum} />
|
||||
{isCrossDomain === 'y' && (
|
||||
<ProFormSelect
|
||||
|
||||
@@ -33,11 +33,13 @@ const PublicJobFairList: React.FC = () => {
|
||||
const [companyJobModalOpen, setCompanyJobModalOpen] = useState(false);
|
||||
const [currentJobFair, setCurrentJobFair] = useState<API.PublicJobFair.JobFairItem>();
|
||||
const [jobFairTypeEnum, setJobFairTypeEnum] = useState<any>({});
|
||||
const [jobFairRegionTypeEnum, setJobFairRegionTypeEnum] = useState<any>({});
|
||||
const [yesNoEnum, setYesNoEnum] = useState<any>({});
|
||||
const [selectedRowKeys, setSelectedRowKeys] = useState<React.Key[]>([]);
|
||||
|
||||
useEffect(() => {
|
||||
getDictValueEnum('job_fair_type', true).then(setJobFairTypeEnum);
|
||||
getDictValueEnum('job_fair_region_type').then(setJobFairRegionTypeEnum);
|
||||
getDictValueEnum('sys_yes_no').then(setYesNoEnum);
|
||||
}, []);
|
||||
|
||||
@@ -129,6 +131,26 @@ const PublicJobFairList: React.FC = () => {
|
||||
valueEnum: jobFairTypeEnum,
|
||||
render: (_, record) => <DictTag enums={jobFairTypeEnum} value={record.jobFairType} />,
|
||||
},
|
||||
{
|
||||
title: '区域类型',
|
||||
dataIndex: 'jobFairRegionType',
|
||||
valueType: 'select',
|
||||
valueEnum: jobFairRegionTypeEnum,
|
||||
render: (_, record) => (
|
||||
<DictTag enums={jobFairRegionTypeEnum} value={record.jobFairRegionType} />
|
||||
),
|
||||
},
|
||||
{
|
||||
title: '举办状态',
|
||||
dataIndex: 'jobFairStatus',
|
||||
hideInSearch: true,
|
||||
render: (_, record) => {
|
||||
const status = record.jobFairStatus;
|
||||
if (!status) return '-';
|
||||
const color = status === '未举办' ? 'blue' : status === '正在举办' ? 'green' : 'default';
|
||||
return <Tag color={color}>{status}</Tag>;
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '报名审核状态',
|
||||
dataIndex: 'enterpriseReviewStatus',
|
||||
@@ -284,6 +306,7 @@ const PublicJobFairList: React.FC = () => {
|
||||
pageSize: params.pageSize,
|
||||
jobFairTitle: params.jobFairTitle,
|
||||
jobFairType: params.jobFairType,
|
||||
jobFairRegionType: params.jobFairRegionType,
|
||||
startDate: params.startDate,
|
||||
endDate: params.endDate,
|
||||
});
|
||||
@@ -322,6 +345,7 @@ const PublicJobFairList: React.FC = () => {
|
||||
open={modalVisible}
|
||||
values={currentRow}
|
||||
jobFairTypeEnum={jobFairTypeEnum}
|
||||
jobFairRegionTypeEnum={jobFairRegionTypeEnum}
|
||||
onCancel={() => {
|
||||
setModalVisible(false);
|
||||
setCurrentRow(undefined);
|
||||
|
||||
Reference in New Issue
Block a user