diff --git a/public/img/avatar.jpg b/public/img/avatar.jpg new file mode 100644 index 0000000..a3d075e Binary files /dev/null and b/public/img/avatar.jpg differ diff --git a/public/img/avatar1.jpg b/public/img/avatar1.jpg new file mode 100644 index 0000000..378fe5d Binary files /dev/null and b/public/img/avatar1.jpg differ diff --git a/public/img/card.jpg b/public/img/card.jpg new file mode 100644 index 0000000..800e314 Binary files /dev/null and b/public/img/card.jpg differ diff --git a/src/assets/img/avatar.jpg b/src/assets/img/avatar.jpg new file mode 100644 index 0000000..a3d075e Binary files /dev/null and b/src/assets/img/avatar.jpg differ diff --git a/src/pages/attendancemanage_attendancedata/attendancemanageAttendancedata.js b/src/pages/attendancemanage_attendancedata/attendancemanageAttendancedata.js index 0d5951d..af98105 100644 --- a/src/pages/attendancemanage_attendancedata/attendancemanageAttendancedata.js +++ b/src/pages/attendancemanage_attendancedata/attendancemanageAttendancedata.js @@ -1,14 +1,576 @@ -import React, {Fragment, PureComponent} from 'react'; -import styles from './attendancemanageAttendancedata.less'; -class attendancemanageAttendancedata extends PureComponent { +import React, { PureComponent } from 'react'; +import { + Card, + Tree, + Button, + Select, + Space, + Row, + Col, + Pagination +} from 'antd'; +import { history } from 'umi'; +import { + ExpandOutlined, + UserOutlined, + TeamOutlined, + ApartmentOutlined, + SyncOutlined, + DollarOutlined, + SettingOutlined, + DownloadOutlined, + UserAddOutlined, + EditOutlined, + DeleteOutlined +} from '@ant-design/icons'; +import styles from './AttendancemanageAttendancedata.less'; +import StandardTable from '@/components/StandardTable'; +import AttendancedataAdd from './form/AttendancedataAdd'; +import AttendancedataAddRenderSimpleForm from "./form/AttendancedataAddRenderSimpleForm" //表单 + +const { Option } = Select; + +class AttendancemanageAttendancedata 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', + employeeId: 'EMP001', + employeeName: '张三', + date: '2024-01-15', + unit: '飞利信科技有限公司', + department: '技术部', + attendanceStatus: '正常', + clockInTime: '09:00:00', + clockOutTime: '18:00:00' + }, + { + key: '2', + employeeId: 'EMP002', + employeeName: '李四', + date: '2024-01-15', + unit: '飞利信科技有限公司', + department: '产品部', + attendanceStatus: '迟到', + clockInTime: '09:15:00', + clockOutTime: '18:00:00' + }, + { + key: '3', + employeeId: 'EMP003', + employeeName: '王五', + date: '2024-01-15', + unit: '飞利信科技有限公司', + department: '运营部', + attendanceStatus: '早退', + clockInTime: '09:00:00', + clockOutTime: '17:30:00' + }, + { + key: '4', + employeeId: 'EMP004', + employeeName: '赵六', + date: '2024-01-15', + unit: '飞利信科技有限公司', + department: '财务部', + attendanceStatus: '正常', + clockInTime: '08:55:00', + clockOutTime: '18:05:00' + }, + { + key: '5', + employeeId: 'EMP005', + employeeName: '陈七', + date: '2024-01-15', + unit: '飞利信科技有限公司', + department: '人事部', + attendanceStatus: '缺勤', + clockInTime: '--', + clockOutTime: '--' + }, + ], + pagination: { + current: 1, + pageSize: 5, + total: 356, + } + }; + + // 默认列配置 + this.defaultColumns = [ + { + title: '员工ID', + dataIndex: 'employeeId', + key: 'employeeId', + width: 100, + align: 'center', + }, + { + title: '员工姓名', + dataIndex: 'employeeName', + key: 'employeeName', + width: 100, + align: 'center', + }, + { + title: '日期', + dataIndex: 'date', + key: 'date', + width: 120, + align: 'center', + }, + { + title: '单位', + dataIndex: 'unit', + key: 'unit', + width: 180, + ellipsis: true, + }, + { + title: '部门', + dataIndex: 'department', + key: 'department', + width: 100, + align: 'center', + }, + { + title: '考勤状态', + dataIndex: 'attendanceStatus', + key: 'attendanceStatus', + width: 100, + align: 'center', + render: (text) => { + const statusColors = { + '正常': '#52c41a', + '迟到': '#faad14', + '早退': '#ff7875', + '缺勤': '#f50', + '请假': '#1890ff' + }; + return ( + + {text} + + ); + } + }, + { + title: '上班时间', + dataIndex: 'clockInTime', + key: 'clockInTime', + width: 100, + align: 'center', + }, + { + title: '下班时间', + dataIndex: 'clockOutTime', + key: 'clockOutTime', + width: 100, + align: 'center', + }, + { + title: '操作', + key: 'action', + align: 'center', + width: 80, + render: (_, record) => ( + +