feat: 优化岗位系统功能和界面
- 添加已投递岗位展示功能,与企业岗位列表集成 - 修复简历版本选择独立状态管理bug - 统一岗位卡片和详情页面的标签样式 - 为未投递岗位添加剩余数量显示和警告图标 - 优化雷达图和仪表盘的显示效果 - 调整岗位详情弹窗的背景和宽度 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -18,11 +18,12 @@ export default ({ visible, onClose, data, directToResume = false, hideDeliverBut
|
||||
const [resumeModalShow, setResumeModalShow] = useState(directToResume);
|
||||
const [resumeInfoModalShow, setResumeInfoModalShow] = useState(false);
|
||||
const [resumeInfoData, setResumeInfoData] = useState(null);
|
||||
const [currentResumeId, setCurrentResumeId] = useState(null); // 当前查看的简历ID
|
||||
const [resumeList, setResumeList] = useState([]); // 简历列表
|
||||
const [listPage, setListPage] = useState(1);
|
||||
const [listHasMore, setListHasMore] = useState(true);
|
||||
const [permissionModalVisible, setPermissionModalVisible] = useState(false);
|
||||
const [selectedVersion, setSelectedVersion] = useState("2"); // 默认选择个人修改版
|
||||
const [selectedVersions, setSelectedVersions] = useState({}); // 每个简历的版本选择,使用简历ID作为key
|
||||
|
||||
// 处理directToResume参数变化
|
||||
useEffect(() => {
|
||||
@@ -84,12 +85,12 @@ export default ({ visible, onClose, data, directToResume = false, hideDeliverBut
|
||||
resumeTitle: item.title,
|
||||
jobPosition: data?.position,
|
||||
company: data?.company,
|
||||
resumeVersion: selectedVersion // 添加版本信息
|
||||
resumeVersion: selectedVersions[item.id] || "2" // 添加版本信息
|
||||
});
|
||||
|
||||
if (result.success) {
|
||||
// 投递成功,显示成功提示
|
||||
const versionText = selectedVersion === "1" ? "原始版" : "个人修改版";
|
||||
const versionText = (selectedVersions[item.id] || "2") === "1" ? "原始版" : "个人修改版";
|
||||
toast.success(`简历"${item.title}"(${versionText})投递成功!`);
|
||||
|
||||
// 关闭模态框
|
||||
@@ -148,13 +149,14 @@ export default ({ visible, onClose, data, directToResume = false, hideDeliverBut
|
||||
resumeTitle: item.title,
|
||||
position: item.position,
|
||||
industry: item.industry,
|
||||
selectedVersion: selectedVersion,
|
||||
selectedVersion: selectedVersions[item.id] || "2",
|
||||
hasContent: !!positionTemplate?.content,
|
||||
hasOriginal: !!positionTemplate?.content?.original,
|
||||
hasModified: !!positionTemplate?.content?.modified
|
||||
});
|
||||
|
||||
setResumeInfoData(resumeData);
|
||||
setCurrentResumeId(item.id); // 记录当前简历ID
|
||||
setResumeInfoModalShow(true);
|
||||
} else {
|
||||
toast.error('加载简历数据失败');
|
||||
@@ -198,9 +200,14 @@ export default ({ visible, onClose, data, directToResume = false, hideDeliverBut
|
||||
<div className="version-selector">
|
||||
<Select
|
||||
placeholder="选择版本"
|
||||
value={selectedVersion}
|
||||
value={selectedVersions[item.id] || "2"}
|
||||
style={{ width: 120, fontSize: '12px' }}
|
||||
onChange={(value) => setSelectedVersion(value)}
|
||||
onChange={(value) => {
|
||||
setSelectedVersions(prev => ({
|
||||
...prev,
|
||||
[item.id]: value
|
||||
}));
|
||||
}}
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
>
|
||||
<Select.Option value="1">原始版</Select.Option>
|
||||
@@ -231,13 +238,22 @@ export default ({ visible, onClose, data, directToResume = false, hideDeliverBut
|
||||
</span>
|
||||
{/* 岗位相关标签 */}
|
||||
{(data?.jobCategoryTag || data?.jobCategory) && (
|
||||
<span className="job-category-tag">
|
||||
<span
|
||||
className="job-category-tag"
|
||||
data-category={data?.jobCategoryTag || data?.jobCategory}
|
||||
>
|
||||
{data?.jobCategoryTag || data?.jobCategory}
|
||||
</span>
|
||||
)}
|
||||
<span className="job-info-modal-content-position-info-num">
|
||||
该岗位仅剩{data?.remainingPositions}人
|
||||
</span>
|
||||
|
||||
{/* 岗位剩余量 - 仅未投递岗位显示 */}
|
||||
{!data?.isDelivered && data?.remainingPositions && (
|
||||
<span className="job-remaining-positions">
|
||||
<i className="warning-icon">!</i>
|
||||
岗位招聘数量仅剩{data?.remainingPositions}名
|
||||
</span>
|
||||
)}
|
||||
|
||||
<span className="job-info-modal-content-position-info-salary">
|
||||
{data?.salary}
|
||||
</span>
|
||||
@@ -314,10 +330,11 @@ export default ({ visible, onClose, data, directToResume = false, hideDeliverBut
|
||||
<ResumeInfoModal
|
||||
visible={resumeInfoModalShow}
|
||||
data={resumeInfoData}
|
||||
initialVersion={selectedVersion}
|
||||
initialVersion={selectedVersions[currentResumeId] || "2"}
|
||||
onClose={() => {
|
||||
setResumeInfoModalShow(false);
|
||||
setResumeInfoData(null);
|
||||
setCurrentResumeId(null);
|
||||
}}
|
||||
/>
|
||||
<PermissionModal
|
||||
|
||||
Reference in New Issue
Block a user