feat: 优化简历详情显示和版本管理
- 删除38个没有真实修改版岗位的modified字段 - 保留10个有真实修改版岗位的original和modified字段 - 修复ResumeInfoModal组件,支持只有original字段的岗位显示 - 所有岗位显示版本切换按钮,无修改版的只显示原始版按钮 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -104,8 +104,10 @@ export default ({ visible, onClose, data, initialVersion = "2" }) => {
|
|||||||
|
|
||||||
if (data?.content) {
|
if (data?.content) {
|
||||||
// 新的数据结构 - 来自resume-interview页面
|
// 新的数据结构 - 来自resume-interview页面
|
||||||
if (data.content.original && data.content.modified) {
|
if (data.content.original) {
|
||||||
const selectedContent = version === "1" ? data.content.original : data.content.modified;
|
// 有original字段,可能有或没有modified字段
|
||||||
|
const hasModified = !!data.content.modified;
|
||||||
|
const selectedContent = (!hasModified || version === "1") ? data.content.original : data.content.modified;
|
||||||
|
|
||||||
// 如果是markdown格式的字符串,使用解析器
|
// 如果是markdown格式的字符串,使用解析器
|
||||||
if (typeof selectedContent === 'string') {
|
if (typeof selectedContent === 'string') {
|
||||||
@@ -224,7 +226,7 @@ export default ({ visible, onClose, data, initialVersion = "2" }) => {
|
|||||||
<Modal visible={visible} onClose={handleCloseModal}>
|
<Modal visible={visible} onClose={handleCloseModal}>
|
||||||
<div className="resume-info-modal" onClick={(e) => e.stopPropagation()}>
|
<div className="resume-info-modal" onClick={(e) => e.stopPropagation()}>
|
||||||
<i className="close-icon" onClick={handleCloseModal} />
|
<i className="close-icon" onClick={handleCloseModal} />
|
||||||
{data?.content?.original && data?.content?.modified && (
|
{data?.content?.original && (
|
||||||
<div className="resume-info-modal-header">
|
<div className="resume-info-modal-header">
|
||||||
<Radio.Group
|
<Radio.Group
|
||||||
type="button"
|
type="button"
|
||||||
@@ -235,7 +237,9 @@ export default ({ visible, onClose, data, initialVersion = "2" }) => {
|
|||||||
onClick={(e) => e.stopPropagation()}
|
onClick={(e) => e.stopPropagation()}
|
||||||
>
|
>
|
||||||
<Radio value="1">原始版</Radio>
|
<Radio value="1">原始版</Radio>
|
||||||
|
{data?.content?.modified && (
|
||||||
<Radio value="2">个人修改版</Radio>
|
<Radio value="2">个人修改版</Radio>
|
||||||
|
)}
|
||||||
</Radio.Group>
|
</Radio.Group>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user