简历是否被查看功能开发
This commit is contained in:
@@ -7,12 +7,13 @@ import {
|
||||
ProFormTextArea,
|
||||
ProDescriptions,
|
||||
} from '@ant-design/pro-components';
|
||||
import { Form, Button, Input } from 'antd';
|
||||
import { Form, Button, Input, TreeSelect } from 'antd';
|
||||
import { PlusOutlined, MinusCircleOutlined } from '@ant-design/icons';
|
||||
import React, { useEffect, useRef, useState } from 'react';
|
||||
import { DictValueEnumObj } from '@/components/DictTag';
|
||||
import { getCmsCompanyList } from '@/services/company/list';
|
||||
import { getCmsJobDetail } from '@/services/Management/list';
|
||||
import { getJobTitleTreeSelect } from '@/services/common/jobTitle';
|
||||
|
||||
export type ListFormProps = {
|
||||
onCancel: (flag?: boolean, formVals?: unknown) => void;
|
||||
@@ -39,6 +40,7 @@ const listEdit: React.FC<ListFormProps> = (props) => {
|
||||
const companyNameMap = useRef<Record<number, string>>({});
|
||||
const [jobDetail, setJobDetail] = useState<API.ManagementList.Manage | null>(null);
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [jobCategoryTreeData, setJobCategoryTreeData] = useState<any[]>([]);
|
||||
const { educationEnum, experienceEnum, areaEnum, jobTypeEnum } = props;
|
||||
const { mode = props.values ? 'edit' : 'create' } = props;
|
||||
useEffect(() => {
|
||||
@@ -50,6 +52,10 @@ const listEdit: React.FC<ListFormProps> = (props) => {
|
||||
jobLocationAreaCode: String(props.values.jobLocationAreaCode || ''),
|
||||
});
|
||||
}
|
||||
// 加载岗位标签树数据
|
||||
getJobTitleTreeSelect().then((res) => {
|
||||
setJobCategoryTreeData(res.data || []);
|
||||
}).catch(() => {});
|
||||
}
|
||||
}, [form, props.values?.jobId,props.open]);
|
||||
|
||||
@@ -110,6 +116,7 @@ const listEdit: React.FC<ListFormProps> = (props) => {
|
||||
contactPersonPhone: item.contactPersonPhone,
|
||||
position: item.position,
|
||||
})),
|
||||
jobCategory: values.jobCategory,
|
||||
};
|
||||
if (mode === 'edit' && values.jobId) {
|
||||
payload.jobId = values.jobId;
|
||||
@@ -161,6 +168,7 @@ const listEdit: React.FC<ListFormProps> = (props) => {
|
||||
label="岗位类型"
|
||||
valueEnum={jobTypeEnum}
|
||||
/>
|
||||
<ProDescriptions.Item dataIndex="jobCategory" label="岗位标签" />
|
||||
<ProDescriptions.Item
|
||||
dataIndex="description"
|
||||
label="岗位描述"
|
||||
@@ -390,6 +398,21 @@ const listEdit: React.FC<ListFormProps> = (props) => {
|
||||
placeholder="请选择类型"
|
||||
rules={[{ required: true, message: '请选择类型!' }]}
|
||||
/>
|
||||
<ProForm.Item name="jobCategory" label="岗位标签" rules={[{ required: true, message: '请选择岗位标签!' }]}>
|
||||
<TreeSelect
|
||||
showSearch
|
||||
allowClear
|
||||
treeData={jobCategoryTreeData}
|
||||
fieldNames={{ label: 'label', value: 'id', children: 'children' }}
|
||||
filterTreeNode={(inputValue, treeNode) => {
|
||||
if (!inputValue) return true;
|
||||
const title = String(treeNode.title ?? treeNode.label ?? '');
|
||||
return title.toLowerCase().includes(inputValue.toLowerCase());
|
||||
}}
|
||||
placeholder="请搜索或选择岗位标签"
|
||||
style={{ width: '100%' }}
|
||||
/>
|
||||
</ProForm.Item>
|
||||
<ProFormText width="md" name="jobLocation" label="工作地点" placeholder="请输入工作地点" />
|
||||
|
||||
<ProFormTextArea
|
||||
|
||||
@@ -239,6 +239,13 @@ function ManagementList() {
|
||||
align: 'center',
|
||||
hideInSearch: true,
|
||||
},
|
||||
{
|
||||
title: '岗位标签',
|
||||
dataIndex: 'jobCategory',
|
||||
valueType: 'text',
|
||||
align: 'center',
|
||||
hideInSearch: true,
|
||||
},
|
||||
{
|
||||
title: '岗位来源',
|
||||
dataIndex: 'jobType',
|
||||
|
||||
Reference in New Issue
Block a user