简历详情新增标签展示 统计分析style
This commit is contained in:
@@ -318,6 +318,7 @@ export const request = {
|
|||||||
try {
|
try {
|
||||||
// 解密响应数据
|
// 解密响应数据
|
||||||
const decryptedData = decrypt(data.encryptedData);
|
const decryptedData = decrypt(data.encryptedData);
|
||||||
|
// console.log(decryptedData)
|
||||||
response.data =
|
response.data =
|
||||||
typeof decryptedData === 'string' ? JSON.parse(decryptedData) : decryptedData;
|
typeof decryptedData === 'string' ? JSON.parse(decryptedData) : decryptedData;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@@ -57,44 +57,11 @@ export default function AreaStatics({ data }) {
|
|||||||
style:{
|
style:{
|
||||||
columnWidthRatio: 0.4,
|
columnWidthRatio: 0.4,
|
||||||
},
|
},
|
||||||
color: color,
|
axis: {
|
||||||
xAxis: {
|
x: {
|
||||||
label: {
|
labelFontSize:11,
|
||||||
style: {
|
labelAutoRotate:true,
|
||||||
fontSize: 12,
|
labelFormatter:(str)=>str.replace('(含)','')
|
||||||
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,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { ModalForm, ProDescriptions } from '@ant-design/pro-components';
|
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 React, { useEffect, useState } from 'react';
|
||||||
import { getDictValueEnum } from '@/services/system/dict';
|
import { getDictValueEnum } from '@/services/system/dict';
|
||||||
import DictTag from '@/components/DictTag';
|
import DictTag from '@/components/DictTag';
|
||||||
@@ -11,6 +11,35 @@ export type ResumeDetailProps = {
|
|||||||
values?: any;
|
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<ResumeDetailProps> = (props) => {
|
const ResumeDetail: React.FC<ResumeDetailProps> = (props) => {
|
||||||
const [sexEnum, setSexEnum] = useState<any>([]);
|
const [sexEnum, setSexEnum] = useState<any>([]);
|
||||||
const [educationEnum, setEducationEnum] = useState<any>([]);
|
const [educationEnum, setEducationEnum] = useState<any>([]);
|
||||||
@@ -60,9 +89,49 @@ const ResumeDetail: React.FC<ResumeDetailProps> = (props) => {
|
|||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// 渲染标签组
|
||||||
|
const renderTags = () => {
|
||||||
|
const tags = values?.indices || [];
|
||||||
|
|
||||||
|
if (!tags || tags.length === 0) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
marginTop: 2,
|
||||||
|
padding: '8px 16px',
|
||||||
|
borderRadius: 8,
|
||||||
|
border: '1px dashed #eaeaeaff'
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div style={{ display: 'flex', flexWrap: 'wrap', gap: 8 , justifyContent:"center" }}>
|
||||||
|
{tags.map((tag: string, index: number) => (
|
||||||
|
<Tag
|
||||||
|
key={index}
|
||||||
|
color={getTagColor(tag)}
|
||||||
|
style={{
|
||||||
|
padding: '4px 12px',
|
||||||
|
fontSize: '13px',
|
||||||
|
fontWeight: 500,
|
||||||
|
borderRadius: 12,
|
||||||
|
boxShadow: '0 2px 4px rgba(0,0,0,0.1)',
|
||||||
|
border: 'none',
|
||||||
|
cursor: 'default',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{tag}
|
||||||
|
</Tag>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ModalForm
|
<ModalForm
|
||||||
title="求职者简历详情"
|
title="人才信息详情"
|
||||||
open={props.open}
|
open={props.open}
|
||||||
width={1000}
|
width={1000}
|
||||||
modalProps={{
|
modalProps={{
|
||||||
@@ -89,35 +158,26 @@ const ResumeDetail: React.FC<ResumeDetailProps> = (props) => {
|
|||||||
<Col span={6}>
|
<Col span={6}>
|
||||||
<div style={{ textAlign: 'center' }}>
|
<div style={{ textAlign: 'center' }}>
|
||||||
{values?.avatar ? (
|
{values?.avatar ? (
|
||||||
<Image
|
<Avatar
|
||||||
width={100}
|
size={100}
|
||||||
height={100}
|
|
||||||
src={values.avatar}
|
src={values.avatar}
|
||||||
style={{
|
style={{
|
||||||
borderRadius: '50%',
|
borderRadius: '50%',
|
||||||
marginBottom: 12,
|
border: '4px solid #e8f4fd',
|
||||||
border: '2px solid #e8f4fd',
|
|
||||||
}}
|
}}
|
||||||
preview={false}
|
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<div
|
<Avatar
|
||||||
|
size={100}
|
||||||
style={{
|
style={{
|
||||||
width: 100,
|
backgroundColor: '#1890ff',
|
||||||
height: 100,
|
fontSize: 36,
|
||||||
borderRadius: '50%',
|
borderRadius: '50%',
|
||||||
backgroundColor: '#f0f0f0',
|
border: '4px solid #e8f4fd',
|
||||||
display: 'flex',
|
|
||||||
alignItems: 'center',
|
|
||||||
justifyContent: 'center',
|
|
||||||
margin: '0 auto 12px',
|
|
||||||
fontSize: 12,
|
|
||||||
color: '#999',
|
|
||||||
border: '2px solid #e8f4fd',
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
暂无头像
|
{values?.name?.charAt(0) || 'U'}
|
||||||
</div>
|
</Avatar>
|
||||||
)}
|
)}
|
||||||
<h3 style={{ margin: '8px 0 4px 0', color: '#1890ff' }}>
|
<h3 style={{ margin: '8px 0 4px 0', color: '#1890ff' }}>
|
||||||
{values?.name || '未填写'}
|
{values?.name || '未填写'}
|
||||||
@@ -126,12 +186,15 @@ const ResumeDetail: React.FC<ResumeDetailProps> = (props) => {
|
|||||||
{values?.jobTitle?.join(' / ') || '暂无期望岗位'}
|
{values?.jobTitle?.join(' / ') || '暂无期望岗位'}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{renderTags()}
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={18}>
|
|
||||||
|
<Col span={18} style={{display:'flex',alignItems:'center'}}>
|
||||||
<ProDescriptions
|
<ProDescriptions
|
||||||
column={3}
|
column={3}
|
||||||
dataSource={values || {}}
|
dataSource={values || {}}
|
||||||
size="small"
|
size="default"
|
||||||
labelStyle={{ fontWeight: 'bold', color: '#333' }}
|
labelStyle={{ fontWeight: 'bold', color: '#333' }}
|
||||||
contentStyle={{ color: '#666' }}
|
contentStyle={{ color: '#666' }}
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user