diff --git a/config/routes.js b/config/routes.js index 946cab9..a1007da 100644 --- a/config/routes.js +++ b/config/routes.js @@ -63,6 +63,12 @@ export default [ name: 'staffresume', component: './staffmanage_staffresume/StaffResume', }, + { + path: '/topnavbar00/staffmanage/particulars', + // icon: 'bank', + name: 'particulars', + component: './staffmanage_particulars/Particulars', + }, ], }, // 组织管理 diff --git a/src/pages/staffmanage_particulars/Particulars.js b/src/pages/staffmanage_particulars/Particulars.js new file mode 100644 index 0000000..079cd95 --- /dev/null +++ b/src/pages/staffmanage_particulars/Particulars.js @@ -0,0 +1,241 @@ + +import React, { PureComponent } from 'react'; +import { Card, Avatar, Breadcrumb, Tag, Descriptions, Table, Row, Col, Button, Divider } from 'antd'; +import { UserOutlined, HomeOutlined, TeamOutlined, MailOutlined, PhoneOutlined, IdcardOutlined, ApartmentOutlined, HistoryOutlined, BookOutlined, ArrowLeftOutlined, EditOutlined, PrinterOutlined } from '@ant-design/icons'; +import { history } from 'umi'; +import styles from './Particulars.less'; +import girlAvatar from './girl.png'; + +const careerTableData = [ + { + key: '1', + company: '上海科技有限公司', + position: '高级产品经理', + duration: '2018-06-15 至今 · 5年4个月', + description: '主导公司核心产品线的规划与设计,带领5人产品团队,成功推出3款市场领先产品,用户增长300%', + status: 'current', + }, + { + key: '2', + company: '北京云创科技', + position: '产品经理', + duration: '2015-07-01 至 2018-05-30 · 2年11个月', + description: '负责企业级SaaS产品的设计与迭代,成功将产品NPS从35提升至72,客户续费率提升至85%', + status: '', + }, + { + key: '3', + company: '深圳创新科技', + position: '产品助理', + duration: '2013-09-01 至 2015-06-30 · 1年10个月', + description: '协助产品经理完成需求分析、原型设计,参与3个移动端项目从0到1的全过程', + status: '', + }, +]; + +const educationTableData = [ + { + key: '1', + school: '复旦大学', + degree: '硕士', + major: '计算机科学与技术', + duration: '2011-09 ~ 2013-07', + }, + { + key: '2', + school: '华东理工大学', + degree: '本科', + major: '软件工程', + duration: '2007-09 ~ 2011-07', + }, +]; + +class Particulars extends PureComponent { + handleGoBack = () => { + // 跳转到人员管理页面 + history.push('/topnavbar00/staffmanage'); + }; + + render() { + return ( +
+ + {/* 面包屑导航 */} + + + {/* 返回按钮 */} + + + {/* 个人信息卡片 */} + + + + + + +
+
+ 林晓梅 + 高级产品经理 + 产品研发中心 +
+
+ + +
+ 员工编号 + EMP20230085 +
+ + +
+ 入职日期 + 2018-06-15 +
+ + +
+ 工作年限 + 5年4个月 +
+ + +
+ 员工状态 + 在职 +
+ +
+
+
+ + +
+ + +
+ +
+
+ + {/* 个人信息区 */} + 个人信息}> + + 310******19900823**** + 已婚 + 138****5678 + linxiaomei@company.com + 上海市浦东新区张江高科技园区科苑路88号 + + + + {/* 工作信息区 */} + 工作信息}> + + 产品研发中心 - 产品设计部 + 张伟(产品研发中心总监) + 负责公司核心产品线的规划与设计,主导产品全生命周期管理,协调跨部门资源推动产品落地 + + + + {/* 职业履历表格 */} + 职业履历}> +
+ + + + + {/* 职业履历时间轴(自定义实现) */} + {/* 职业履历时间轴}> +
+ {careerTableData.map((item, idx) => ( +
+
+
+
+ {item.company} + {item.status === 'current' && 当前公司} +
+
{item.position}
+
{item.duration}
+
{item.description}
+
+
+ ))} +
+
*/} + + {/* 教育经历表格 */} + 教育经历}> +
+
+ + + + {/* 组织架构图 */} + {/* 组织架构}> +
+ 组织架构图 +
+
*/} + + {/* 页脚 */} + +
+ +
© 2023 人力资源管理系统 版权所有
+
+ + ); + } +} + +export default Particulars; diff --git a/src/pages/staffmanage_particulars/Particulars.less b/src/pages/staffmanage_particulars/Particulars.less new file mode 100644 index 0000000..9da9f56 --- /dev/null +++ b/src/pages/staffmanage_particulars/Particulars.less @@ -0,0 +1,334 @@ + +.particularsContainer { + background: #f5f6fa; + min-width: 70vw; + min-height: 100vh; + max-height: 100vh; + overflow-y: auto; + overflow-x: hidden; + padding: 16px 24px 32px 24px; +} + +.announcementBar { + background: #fff; + box-shadow: 0 2px 8px #f0f1f2; + padding: 8px 24px; + font-size: 14px; + color: #666; + display: flex; + align-items: center; + gap: 24px; +} +.announcementTitle { + color: #2d5cf6; + font-weight: 500; + margin-right: 8px; +} +.announcementItem { + margin-right: 16px; +} + +.breadcrumb { + margin: 24px 0 8px 0; + font-size: 13px; +} +.backBtn { + margin-bottom: 12px; +} + +.profileCard { + margin-bottom: 24px; + border-radius: 12px; + box-shadow: 0 2px 8px #f0f1f2; +} +.avatarCol { + display: flex; + align-items: center; + justify-content: center; +} +.profileInfoHeader { + padding: 8px 0; +} +.nameSection { + display: flex; + align-items: center; + gap: 12px; + margin-bottom: 16px; +} +.profileName { + font-size: 24px; + font-weight: bold; + color: #222; +} +.profileDept { + color: #888; + font-size: 15px; + margin-left: 4px; +} +.profileDetails { + margin-top: 8px; +} +.detailItem { + display: flex; + flex-direction: column; + gap: 4px; +} +.detailLabel { + font-size: 13px; + color: #888; + font-weight: 500; +} +.detailValue { + font-size: 15px; + color: #333; + font-weight: 600; +} +.statusTag { + margin: 0; + font-weight: 500; +} +.actionCol { + display: flex; + align-items: center; + justify-content: center; +} +.actionButtons { + display: flex; + flex-direction: column; + gap: 12px; + width: 100%; + max-width: 120px; +} +.editBtn { + width: 100%; + height: 40px; + border-radius: 8px; + font-weight: 500; +} +.printBtn { + width: 100%; + height: 40px; + border-radius: 8px; + font-weight: 500; +} + +@media (max-width: 768px) { + .actionButtons { + flex-direction: row; + max-width: none; + } + .nameSection { + flex-wrap: wrap; + gap: 8px; + } +} + +.infoCard { + margin-bottom: 24px; + border-radius: 12px; + box-shadow: 0 2px 8px #f0f1f2; + + // 表格包装器样式 + .tableWrapper { + margin-top: 16px; + border-radius: 8px; + overflow: hidden; + box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05); + + // 自定义滚动条样式 + &::-webkit-scrollbar { + width: 6px; + height: 6px; + } + + &::-webkit-scrollbar-track { + background: #f5f5f5; + border-radius: 3px; + } + + &::-webkit-scrollbar-thumb { + background: #d9d9d9; + border-radius: 3px; + + &:hover { + background: #bfbfbf; + } + } + } + + // 自定义表格样式 + .customTable { + .ant-table-wrapper { + .ant-table-thead > tr > th { + background-color: #2c3e50 !important; + color: #ecf0f1 !important; + font-weight: 600; + border-bottom: 1px solid #34495e; + position: sticky; + top: 0; + z-index: 1; + text-align: center; + font-size: 14px; + padding: 16px 12px; + letter-spacing: 0.5px; + } + + .ant-table-tbody > tr { + &:hover > td { + background-color: #f8f9ff !important; + } + + &:nth-child(even) { + background-color: #fafbfc; + } + + > td { + border-bottom: 1px solid #e8e8e8; + padding: 14px 12px; + font-size: 13px; + color: #333; + vertical-align: top; + line-height: 1.6; + } + } + + .ant-table { + border-radius: 8px; + overflow: hidden; + border: 1px solid #e8e8e8; + } + + .ant-table-container { + border-radius: 8px; + } + } + } + + // 表格通用样式(为了向后兼容) + .ant-table-wrapper { + .ant-table-thead > tr > th { + background-color: #2c3e50 !important; + color: #ecf0f1 !important; + font-weight: 600; + border-bottom: 1px solid #34495e; + position: sticky; + top: 0; + z-index: 1; + text-align: center; + font-size: 13px; + } + + .ant-table-tbody > tr { + &:hover > td { + background-color: #f8f9ff !important; + } + + > td { + border-bottom: 1px solid #e8e8e8; + padding: 12px 8px; + font-size: 13px; + color: #333; + vertical-align: top; + } + } + + .ant-table { + border-radius: 8px; + overflow: hidden; + } + } +} + +.careerTimeline { + margin-top: 16px; + padding-left: 12px; + border-left: 2px solid #2d5cf6; +} +.timelineItem { + position: relative; + margin-bottom: 32px; + padding-left: 24px; +} +.timelineDot { + position: absolute; + left: -13px; + top: 8px; + width: 12px; + height: 12px; + background: #d9d9d9; + border-radius: 50%; + border: 2px solid #fff; + box-shadow: 0 0 0 2px #2d5cf6; +} +.timelineDotActive { + background: #2d5cf6; + box-shadow: 0 0 0 2px #2d5cf6; +} +.timelineContent { + margin-left: 8px; +} +.timelineHeader { + display: flex; + align-items: center; + gap: 8px; + font-weight: 500; + font-size: 16px; +} +.timelineCompany { + color: #222; +} +.timelinePosition { + color: #555; + font-size: 15px; + margin-top: 2px; +} +.timelineDuration { + color: #888; + font-size: 13px; + margin-top: 2px; +} +.timelineDescription { + color: #444; + font-size: 14px; + margin-top: 4px; +} + +.orgChartWrapper { + display: flex; + align-items: center; + justify-content: center; + background: #f5f6fa; + border-radius: 8px; + padding: 16px; + min-height: 180px; +} +.orgChartImg { + max-width: 100%; + max-height: 220px; + object-fit: contain; +} + +.footer { + margin-top: 32px; + text-align: center; + color: #888; + font-size: 13px; +} +.footerLinks { + margin-bottom: 8px; + display: flex; + flex-wrap: wrap; + gap: 16px; + justify-content: center; +} +.footerLinks a { + color: #888; + text-decoration: none; + transition: color 0.2s; +} +.footerLinks a:hover { + color: #2d5cf6; +} +.footerCopyright { + margin-top: 4px; +} diff --git a/src/pages/staffmanage_particulars/girl.png b/src/pages/staffmanage_particulars/girl.png new file mode 100644 index 0000000..44ff8f5 Binary files /dev/null and b/src/pages/staffmanage_particulars/girl.png differ diff --git a/src/pages/staffmanage_staffinfo/StaffInfo.js b/src/pages/staffmanage_staffinfo/StaffInfo.js index 9f2025a..5641bc7 100644 --- a/src/pages/staffmanage_staffinfo/StaffInfo.js +++ b/src/pages/staffmanage_staffinfo/StaffInfo.js @@ -1,13 +1,658 @@ -import React, {Fragment, PureComponent} from 'react'; +import React, { PureComponent } from 'react'; +import { + Card, + Tree, + Input, + Button, + Table, + Select, + Space, + Pagination, + Row, + Col, + Form, +} from 'antd'; +import { history } from 'umi'; +import { + SearchOutlined, + ExpandOutlined, + DownloadOutlined, + UserOutlined, + TeamOutlined, + ApartmentOutlined, + SyncOutlined, + DollarOutlined, + SettingOutlined, + ClearOutlined, + UserAddOutlined, + EditOutlined, + DeleteOutlined +} from '@ant-design/icons'; import styles from './StaffInfo.less'; +import StaffInfoAdd from './from/StaffInfoadd'; + +const { Option } = Select; + class StaffInfo extends PureComponent { + constructor(props) { + super(props); + this.state = { + searchForm: {}, + selectedKeys: [], + expandedKeys: ['0-0', '0-0-0', '0-0-1', '0-0-2'], + addModalVisible: false, // 新增弹窗显示状态 + addLoading: false, // 新增loading状态 + organizationData: [ + { + title: '飞利信科技有限公司', + key: '0-0', + count: 356, + children: [ + { + title: '技术部', + key: '0-0-0', + count: 120, + children: [ + { title: '前端组', key: '0-0-0-0', count: 45 }, + { title: '后端组', key: '0-0-0-1', count: 52 }, + { title: '测试组', key: '0-0-0-2', count: 23 } + ], + }, + { + title: '产品部', + key: '0-0-1', + count: 68, + children: [ + { title: '产品设计组', key: '0-0-1-0', count: 28 }, + { title: '用户体验组', key: '0-0-1-1', count: 25 }, + { title: '产品运营组', key: '0-0-1-2', count: 15 } + ], + }, + { + title: '运营部', + key: '0-0-2', + count: 52, + children: [ + { title: '市场营销组', key: '0-0-2-0', count: 22 }, + { title: '客户服务组', key: '0-0-2-1', count: 18 }, + { title: '商务合作组', key: '0-0-2-2', count: 12 } + ], + }, + { + title: '财务部', + key: '0-0-3', + count: 32, + children: [ + { title: '会计组', key: '0-0-3-0', count: 18 }, + { title: '审计组', key: '0-0-3-1', count: 14 } + ], + }, + { + title: '人事部', + key: '0-0-4', + count: 84, + children: [ + { title: 'HR专员组', key: '0-0-4-0', count: 25 }, + { title: '招聘组', key: '0-0-4-1', count: 22 }, + { title: '培训组', key: '0-0-4-2', count: 18 }, + { title: '薪酬组', key: '0-0-4-3', count: 19 } + ], + }, + ], + }, + ], + tableData: [ + { + key: '1', + id: 1, + name: '张三', + phone: 28, // 年龄 + idCard: '技术部', // 部门 + department: '高级工程师', // 岗位 + position: '全职', // 工作性质 + status: '138****1234', // 电话 + entryDate: '2020-03-15' + }, + { + key: '2', + id: 2, + name: '李四', + phone: 30, // 年龄 + idCard: '产品部', // 部门 + department: '产品经理', // 岗位 + position: '全职', // 工作性质 + status: '139****5678', // 电话 + entryDate: '2019-08-20' + }, + { + key: '3', + id: 3, + name: '王五', + phone: 25, // 年龄 + idCard: '运营部', // 部门 + department: '运营专员', // 岗位 + position: '全职', // 工作性质 + status: '136****9999', // 电话 + entryDate: '2021-05-10' + }, + { + key: '4', + id: 4, + name: '赵六', + phone: 32, // 年龄 + idCard: '财务部', // 部门 + department: '会计', // 岗位 + position: '全职', // 工作性质 + status: '137****8888', // 电话 + entryDate: '2018-12-01' + }, + { + key: '5', + id: 5, + name: '陈七', + phone: 26, // 年龄 + idCard: '人事部', // 部门 + department: 'HR专员', // 岗位 + position: '全职', // 工作性质 + status: '135****7777', // 电话 + entryDate: '2022-01-15' + }, + ], + pagination: { + current: 1, + pageSize: 5, + total: 356, + } + }; + } + + // 获取处理后的树形数据 + getTreeData = () => { + const { organizationData } = this.state; + + const processNode = (node) => ({ + key: node.key, + title: ( + + {this.getNodeIcon(node.title)} + {node.title} + ({node.count}) + + ), + children: node.children ? node.children.map(processNode) : undefined + }); + + return organizationData.map(processNode); + }; + + // 获取节点图标 + getNodeIcon = (title) => { + if (title.includes('公司') || title.includes('集团')) return ; + if (title.includes('技术') || title.includes('开发') || title.includes('测试')) return ; + if (title.includes('产品') || title.includes('设计') || title.includes('体验')) return ; + if (title.includes('运营') || title.includes('市场') || title.includes('客户') || title.includes('商务')) return ; + if (title.includes('财务') || title.includes('会计') || title.includes('审计')) return ; + if (title.includes('人事') || title.includes('HR') || title.includes('招聘') || title.includes('培训') || title.includes('薪酬')) return ; + return ; + }; + + // 组织架构树数据 (保留原始数据以备后用) + treeData = [ + { + title: '飞利信科技有限公司', + key: '0-0', + icon: , + children: [ + { + title: '技术部', + key: '0-0-0', + icon: , + children: [ + { + title: '前端组', + key: '0-0-0-0', + icon: + }, + { + title: '后端组', + key: '0-0-0-1', + icon: + }, + ], + }, + { + title: '产品部', + key: '0-0-1', + icon: , + children: [ + { + title: '产品设计组', + key: '0-0-1-0', + icon: + }, + ], + }, + { + title: '运营部', + key: '0-0-2', + icon: , + }, + { + title: '财务部', + key: '0-0-3', + icon: , + }, + { + title: '人事部', + key: '0-0-4', + icon: , + }, + ], + }, + ]; + + // 表格列配置 + columns = [ + { + title: '序号', + dataIndex: 'id', + key: 'id', + width: 60, + align: 'center', + }, + { + title: '姓名', + dataIndex: 'name', + key: 'name', + width: 60, + render: (text, record) => ( + + ), + }, + { + title: '年龄', + dataIndex: 'phone', + key: 'phone', + width: 50, + }, + { + title: '部门', + dataIndex: 'idCard', + key: 'idCard', + width: 70, + }, + { + title: '岗位', + dataIndex: 'department', + key: 'department', + width: 80, + }, + { + title: '工作性质', + dataIndex: 'position', + key: 'position', + width: 50, + }, + { + title: '电话', + dataIndex: 'status', + key: 'status', + width: 100, + }, + { + title: '操作', + key: 'action', + width: 80, + render: (_, record) => ( + +