feat: Enhance Company and Job Portal functionality
- Added company nature selection to ManagementList and JobDetailPage. - Implemented detailed tags for job benefits and schedules in JobDetailPage and JobListPage. - Introduced CompanyInfoPage for managing company details, including nature, scale, and contacts. - Enhanced ManagementList to support salary composition, welfare benefits, and work schedule fields. - Created utility functions for parsing and serializing comma-separated tags. - Updated API services to fetch and update current company information. - Added tests for new utility functions to ensure correct parsing and serialization of tags.
This commit is contained in:
@@ -68,6 +68,7 @@ function ManagementList() {
|
||||
const [detailLoading, setDetailLoading] = useState<boolean>(false);
|
||||
const [detailData, setDetailData] = useState<API.CompanyList.Company | undefined>();
|
||||
const [scaleEnum, setScaleEnum] = useState<Record<string, any>>({});
|
||||
const [companyNatureEnum, setCompanyNatureEnum] = useState<DictValueEnumObj>({});
|
||||
const [industryEnum, setIndustryEnum] = useState<DictValueEnumObj>({});
|
||||
const [approvalVisible, setApprovalVisible] = useState<boolean>(false);
|
||||
const [approvalStatus, setApprovalStatus] = useState<1 | 2>(1);
|
||||
@@ -110,6 +111,9 @@ function ManagementList() {
|
||||
getDictValueEnum('scale', true, true).then((data) => {
|
||||
setScaleEnum(data);
|
||||
});
|
||||
getDictValueEnum('company_nature', false, true).then((data) => {
|
||||
setCompanyNatureEnum(data);
|
||||
});
|
||||
getCmsIndustryTreeList().then((res) => {
|
||||
if (res?.data) {
|
||||
setIndustryEnum(flattenIndustryTree(res.data));
|
||||
@@ -158,6 +162,14 @@ function ManagementList() {
|
||||
return <DictTag enums={scaleEnum} value={record.scale} />;
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '企业性质',
|
||||
dataIndex: 'companyNature',
|
||||
valueType: 'select',
|
||||
align: 'center',
|
||||
valueEnum: companyNatureEnum,
|
||||
render: (_, record) => <DictTag enums={companyNatureEnum} value={record.companyNature} />,
|
||||
},
|
||||
{
|
||||
title: '公司位置',
|
||||
dataIndex: 'location',
|
||||
@@ -350,9 +362,15 @@ function ManagementList() {
|
||||
onSubmit={async (values) => {
|
||||
let resData;
|
||||
if (values.companyId) {
|
||||
resData = await putCmsCompanyList(values);
|
||||
resData = await putCmsCompanyList({
|
||||
...values,
|
||||
companyNature: values.companyNature || '',
|
||||
});
|
||||
} else {
|
||||
resData = await addCmsCompanyList(values);
|
||||
resData = await addCmsCompanyList({
|
||||
...values,
|
||||
companyNature: values.companyNature || '',
|
||||
});
|
||||
}
|
||||
if (resData.code === 200) {
|
||||
setModalVisible(false);
|
||||
@@ -367,6 +385,7 @@ function ManagementList() {
|
||||
}}
|
||||
values={currentRow}
|
||||
scaleEnum={scaleEnum}
|
||||
companyNatureEnum={companyNatureEnum}
|
||||
/>
|
||||
|
||||
<CompanyDetailView
|
||||
@@ -378,6 +397,7 @@ function ManagementList() {
|
||||
}}
|
||||
record={detailData}
|
||||
scaleEnum={scaleEnum}
|
||||
companyNatureEnum={companyNatureEnum}
|
||||
industryEnum={industryEnum}
|
||||
/>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user