From 629011944813413838eab2faecbf83cd784dcf0e Mon Sep 17 00:00:00 2001 From: bin <719488417@qq.com> Date: Tue, 2 Dec 2025 14:58:19 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=80=E5=8E=86=E8=AF=A6=E6=83=85=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E6=A0=87=E7=AD=BE=E5=B1=95=E7=A4=BA=20=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E5=88=86=E6=9E=90style?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app.tsx | 1 + .../Analysis/User/components/AreaStatics.tsx | 43 +------ src/pages/ResumeLibrary/ResumeList/detail.tsx | 115 ++++++++++++++---- 3 files changed, 95 insertions(+), 64 deletions(-) diff --git a/src/app.tsx b/src/app.tsx index 81a51e9..04903e1 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -318,6 +318,7 @@ export const request = { try { // 解密响应数据 const decryptedData = decrypt(data.encryptedData); + // console.log(decryptedData) response.data = typeof decryptedData === 'string' ? JSON.parse(decryptedData) : decryptedData; } catch (error) { diff --git a/src/pages/Analysis/User/components/AreaStatics.tsx b/src/pages/Analysis/User/components/AreaStatics.tsx index 38b88bd..9861f99 100644 --- a/src/pages/Analysis/User/components/AreaStatics.tsx +++ b/src/pages/Analysis/User/components/AreaStatics.tsx @@ -57,44 +57,11 @@ export default function AreaStatics({ data }) { style:{ columnWidthRatio: 0.4, }, - color: color, - xAxis: { - label: { - style: { - fontSize: 12, - fill: '#666', - }, - formatter: (text: string) => { - return text.length > 4 ? `${text.substring(0, 4)}...` : text; - }, - }, - grid: { - line: { - style: { - stroke: '#e8e8e8', - lineWidth: 1, - lineDash: [3, 3], - }, - }, - alignTick: true, - }, - }, - yAxis: { - label: { - style: { - fontSize: 12, - fill: '#666', - }, - }, - grid: { - line: { - style: { - stroke: '#e8e8e8', - lineWidth: 1, - lineDash: [3, 3], - }, - }, - alignTick: true, + axis: { + x: { + labelFontSize:11, + labelAutoRotate:true, + labelFormatter:(str)=>str.replace('(含)','') }, }, tooltip: { diff --git a/src/pages/ResumeLibrary/ResumeList/detail.tsx b/src/pages/ResumeLibrary/ResumeList/detail.tsx index 07485e9..95536b7 100644 --- a/src/pages/ResumeLibrary/ResumeList/detail.tsx +++ b/src/pages/ResumeLibrary/ResumeList/detail.tsx @@ -1,5 +1,5 @@ import { ModalForm, ProDescriptions } from '@ant-design/pro-components'; -import { Image, Card, Divider, Row, Col, Tag, Timeline, Empty } from 'antd'; +import { Image, Card, Divider, Row, Col, Tag, Timeline, Empty,Avatar } from 'antd'; import React, { useEffect, useState } from 'react'; import { getDictValueEnum } from '@/services/system/dict'; import DictTag from '@/components/DictTag'; @@ -11,6 +11,35 @@ export type ResumeDetailProps = { values?: any; }; +// 标签颜色 +const TAG_COLORS = [ + 'magenta', + 'red', + 'volcano', + 'orange', + 'gold', + 'lime', + 'green', + 'cyan', + 'blue', + 'geekblue', + 'purple', + '#f50', + '#2db7f5', + '#87d068', + '#108ee9', +]; + +// 标签颜色 基于文本hash +const getTagColor = (tag: string) => { + let hash = 0; + for (let i = 0; i < tag.length; i++) { + hash = tag.charCodeAt(i) + ((hash << 5) - hash); + } + const index = Math.abs(hash) % TAG_COLORS.length; + return TAG_COLORS[index]; +}; + const ResumeDetail: React.FC = (props) => { const [sexEnum, setSexEnum] = useState([]); const [educationEnum, setEducationEnum] = useState([]); @@ -60,9 +89,49 @@ const ResumeDetail: React.FC = (props) => { /> ); + // 渲染标签组 + const renderTags = () => { + const tags = values?.indices || []; + + if (!tags || tags.length === 0) { + return null; + } + + return ( +
+
+ {tags.map((tag: string, index: number) => ( + + {tag} + + ))} +
+
+ ); + }; + return ( = (props) => {
- {values?.avatar ? ( - ) : ( -
- 暂无头像 -
+ {values?.name?.charAt(0) || 'U'} + )}

{values?.name || '未填写'} @@ -126,12 +186,15 @@ const ResumeDetail: React.FC = (props) => { {values?.jobTitle?.join(' / ') || '暂无期望岗位'}

+ + {renderTags()} - + + @@ -206,7 +269,7 @@ const ResumeDetail: React.FC = (props) => {
- {/* 个人介绍与求职意向 */} + {/* 个人介绍与求职意向 */} = (props) => { ); }; -export default ResumeDetail; +export default ResumeDetail; \ No newline at end of file