import React, { PureComponent } from 'react'; import { Card, Input, Button, Select, Row, Col, Avatar, Rate, message } from 'antd'; import { SearchOutlined, ReloadOutlined, SaveOutlined, RollbackOutlined, UserOutlined } from '@ant-design/icons'; import { history } from 'umi'; import styles from './PerformanceAssess.less'; const { TextArea } = Input; const { Option } = Select; class PerformanceAssess extends PureComponent { constructor(props) { super(props); this.state = { // 筛选条件 searchForm: { name: '', phone: '', idCard: '', performancePlan: '2025年度' }, // 员工信息 employeeInfo: { gender: '男', age: 32, department: '技术研发中心', position: '高级软件工程师', planName: '2025年度技术岗绩效计划' }, // 绩效数据 performanceData: { totalScore: 92, status: '已确认', objective: { codeLines: '15,672', docWords: '28,500', trainings: '8', projectAmount: '¥1,250,000', projectRatio: '35%', workHours: '1,850' }, subjective: { execution: { score: 4.0, comment: '该员工能够高效执行分配的任务,在项目开发过程中表现出色,能够按时保质完成工作。在团队协作中主动承担责任,遇到问题能够积极寻求解决方案。' }, loyalty: { score: 4.5, comment: '该员工高度认同公司文化和价值观,积极参与公司组织的各项活动。在日常工作中能够主动传播正能量,对新员工起到良好的示范作用。对公司发展战略有深刻理解并积极支持。' } } } }; } // 处理搜索表单变化 handleSearchFormChange = (field, value) => { this.setState(prevState => ({ searchForm: { ...prevState.searchForm, [field]: value } })); }; // 处理主观评价变化 handleSubjectiveChange = (type, field, value) => { this.setState(prevState => ({ performanceData: { ...prevState.performanceData, subjective: { ...prevState.performanceData.subjective, [type]: { ...prevState.performanceData.subjective[type], [field]: value } } } })); }; // 查询按钮处理 handleSearch = () => { message.success('查询成功'); }; // 重置按钮处理 handleReset = () => { this.setState({ searchForm: { name: '', phone: '', idCard: '', performancePlan: '2025年度' } }); message.info('已重置查询条件'); }; // 保存评价 handleSave = () => { message.success('评价已保存'); }; // 返回列表 handleBack = () => { history.push('/topnavbar00/performancemanage/performancelist'); }; render() { const { searchForm, employeeInfo, performanceData } = this.state; return (