main
wangyunfei 2 weeks ago
parent f311f38761
commit 5519a41cf5

@ -0,0 +1,4 @@
<svg width="52" height="57" viewBox="0 0 52 57" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M25.1981 1.76172C16.3504 1.76172 9.14648 8.99392 9.14648 17.8824C9.14648 26.7655 16.3451 34.0004 25.1981 34.0004C34.0484 34.0004 41.2523 26.7655 41.2523 17.8824C41.2523 8.99392 34.0484 1.76172 25.1981 1.76172Z" fill="#D4EED0"/>
<path d="M37.571 33.6348C34.1509 36.3499 29.8918 38.0321 25.1993 38.0321C20.5067 38.0321 16.2503 36.3447 12.8223 33.6348C6.33263 37.7844 1.81402 45.0715 1.19336 53.5112C3.4656 53.8215 7.50907 54.1553 13.2794 54.1553H37.1087C42.8817 54.1553 46.9277 53.8215 49.2027 53.5112C48.5871 45.0661 44.0686 37.7844 37.571 33.6348Z" fill="#D4EED0"/>
</svg>

After

Width:  |  Height:  |  Size: 678 B

@ -2,7 +2,7 @@
import React, { useState, useEffect } from 'react';
import moment from 'moment';
import { Card, Result, Select, Button, Drawer, Upload, Input, Modal, Form, DatePicker, Row, Col } from 'antd';
import { CheckCircleOutlined, ExportOutlined, PlusOutlined, UploadOutlined } from '@ant-design/icons';
import { CheckCircleOutlined, ExportOutlined, PlusOutlined, UploadOutlined, UserOutlined } from '@ant-design/icons';
import StandardTable from '@/components/StandardTable';
import styles from './EnvironmentalPersonnelManagement.less';
// import './EnvironmentalPersonnelManagement.less';
@ -21,6 +21,7 @@ import eqicon4 from '@/assets/business_basic/eqicon4.png';
import viewIcon from '@/assets/business_envinformation/viewicon.svg';
import editIcon from '@/assets/business_envinformation/editicon.svg';
import deleteIcon from '@/assets/business_envinformation/deleteicon.svg';
import personnelIcon from '@/assets/business_envinformation/personnel.svg';
@ -388,8 +389,10 @@ const EnvironmentalPersonnelManagement = () => {
// 打开编辑抽屉
const handleEdit = (record) => {
console.log('点击编辑按钮,记录:', record);
setSelectedRecord(record);
setEditDrawerVisible(true);
console.log('设置编辑抽屉可见:', true);
// 设置表单初始值
editForm.setFieldsValue({
name: record.name,
@ -444,7 +447,7 @@ const EnvironmentalPersonnelManagement = () => {
{/* 块2 */}
<div className={`${styles.blockItem} ${styles.block2}`}>
<div className={styles.blockLeft}>
<div className={styles.blockTitle}>环保总人数</div>
<div className={styles.blockTitle}>管理岗人数</div>
<div className={`${styles.blockNumber} ${styles.number58}`}>58</div>
<div className={styles.blockTime}>截止到 2025-09-11 07:35</div>
</div>
@ -453,7 +456,7 @@ const EnvironmentalPersonnelManagement = () => {
{/* 块3 */}
<div className={`${styles.blockItem} ${styles.block3}`}>
<div className={styles.blockLeft}>
<div className={styles.blockTitle}>需要维护</div>
<div className={styles.blockTitle}>污水运行人数</div>
<div className={`${styles.blockNumber} ${styles.number51}`}>51</div>
<div className={styles.blockTime}>截止到 2025-09-11 07:35</div>
</div>
@ -462,7 +465,7 @@ const EnvironmentalPersonnelManagement = () => {
{/* 块4 */}
<div className={`${styles.blockItem} ${styles.block4}`}>
<div className={styles.blockLeft}>
<div className={styles.blockTitle}>环保总人数</div>
<div className={styles.blockTitle}>污水化验人数</div>
<div className={`${styles.blockNumber} ${styles.number28}`}>28</div>
<div className={styles.blockTime}>截止到 2025-09-11 07:35</div>
</div>
@ -471,7 +474,7 @@ const EnvironmentalPersonnelManagement = () => {
{/* 块5 */}
<div className={`${styles.blockItem} ${styles.block5}`}>
<div className={styles.blockLeft}>
<div className={styles.blockTitle}>环保总人数</div>
<div className={styles.blockTitle}>危废管理人员</div>
<div className={`${styles.blockNumber} ${styles.number50}`}>50</div>
<div className={styles.blockTime}>截止到 2025-09-11 07:35</div>
</div>
@ -480,7 +483,7 @@ const EnvironmentalPersonnelManagement = () => {
{/* 块6 */}
<div className={`${styles.blockItem} ${styles.block6}`}>
<div className={styles.blockLeft}>
<div className={styles.blockTitle}>环保总人数</div>
<div className={styles.blockTitle}>一般固体废物管理人员</div>
<div className={`${styles.blockNumber} ${styles.number58Second}`}>58</div>
<div className={styles.blockTime}>截止到 2025-09-11 07:35</div>
</div>
@ -544,15 +547,16 @@ const EnvironmentalPersonnelManagement = () => {
{/* 侧边抽屉 */}
<Drawer
title="查看"
title={<span style={{ color: '#C3C3C3', fontWeight: 500, fontSize: '16px' }}>查看</span>}
placement="right"
onClose={handleCloseDrawer}
open={drawerVisible}
width={600}
closable={true}
bodyStyle={{ fontSize: '12px' }}
>
{selectedRecord && (
<div style={{ padding: '20px 0' }}>
<div style={{ padding: '10px 0' }}>
{/* 姓名和头像区域 */}
<div style={{ display: 'flex', justifyContent: 'space-between', marginBottom: '30px' }}>
<div style={{ flex: 1 }}>
@ -607,20 +611,20 @@ const EnvironmentalPersonnelManagement = () => {
</div>
{/* 头像上传区域 */}
<div style={{
width: '120px',
height: '120px',
backgroundColor: '#f0f0f0',
border: '2px dashed #d9d9d9',
borderRadius: '8px',
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
marginLeft: '20px'
}}>
<div style={{ fontSize: '24px', color: '#999', marginBottom: '8px' }}>👤</div>
<div style={{ fontSize: '12px', color: '#999' }}>上传</div>
<div style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', marginTop: '20px' }}>
<div style={{
width: '90px',
height: '90px',
backgroundColor: '#D7FED2',
borderRadius: '4px',
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center'
}}>
<img src={personnelIcon} style={{ width: '45px', height: '51px' }} alt="personnel" />
</div>
<div style={{ fontSize: '12px', color: '#3AD327', fontWeight: 500, marginTop: '5px' }}>上传</div>
</div>
</div>
@ -629,7 +633,7 @@ const EnvironmentalPersonnelManagement = () => {
<div style={{
fontWeight: 'bold',
marginBottom: '10px',
fontSize: '14px'
fontSize: '12px'
}}>
岗位职责
</div>
@ -646,7 +650,7 @@ const EnvironmentalPersonnelManagement = () => {
<div style={{
fontWeight: 'bold',
marginBottom: '10px',
fontSize: '14px'
fontSize: '12px'
}}>
其他
</div>
@ -693,7 +697,7 @@ const EnvironmentalPersonnelManagement = () => {
{/* 左侧列 */}
<Col span={12}>
<Form.Item
label={<span style={{ fontSize: '14px', fontWeight: '500' }}>姓名</span>}
label={<span style={{ fontSize: '12px', fontWeight: '500' }}>姓名</span>}
name="name"
rules={[{ required: true, message: '请输入姓名' }]}
>
@ -701,7 +705,7 @@ const EnvironmentalPersonnelManagement = () => {
</Form.Item>
<Form.Item
label={<span style={{ fontSize: '14px', fontWeight: '500' }}>工号</span>}
label={<span style={{ fontSize: '12px', fontWeight: '500' }}>工号</span>}
name="employeeId"
rules={[{ required: true, message: '请输入工号' }]}
>
@ -709,7 +713,7 @@ const EnvironmentalPersonnelManagement = () => {
</Form.Item>
<Form.Item
label={<span style={{ fontSize: '14px', fontWeight: '500' }}>部门</span>}
label={<span style={{ fontSize: '12px', fontWeight: '500' }}>部门</span>}
name="department"
rules={[{ required: true, message: '请选择部门' }]}
>
@ -722,7 +726,7 @@ const EnvironmentalPersonnelManagement = () => {
</Form.Item>
<Form.Item
label={<span style={{ fontSize: '14px', fontWeight: '500' }}>岗位</span>}
label={<span style={{ fontSize: '12px', fontWeight: '500' }}>岗位</span>}
name="position"
rules={[{ required: true, message: '请选择岗位' }]}
>
@ -736,7 +740,7 @@ const EnvironmentalPersonnelManagement = () => {
</Form.Item>
<Form.Item
label={<span style={{ fontSize: '14px', fontWeight: '500' }}>性别</span>}
label={<span style={{ fontSize: '12px', fontWeight: '500' }}>性别</span>}
name="gender"
rules={[{ required: true, message: '请选择性别' }]}
>
@ -747,7 +751,7 @@ const EnvironmentalPersonnelManagement = () => {
</Form.Item>
<Form.Item
label={<span style={{ fontSize: '14px', fontWeight: '500' }}>住址</span>}
label={<span style={{ fontSize: '12px', fontWeight: '500' }}>住址</span>}
name="address"
rules={[{ required: true, message: '请输入住址' }]}
>
@ -758,7 +762,7 @@ const EnvironmentalPersonnelManagement = () => {
{/* 右侧列 */}
<Col span={12}>
<Form.Item
label={<span style={{ fontSize: '14px', fontWeight: '500' }}>出生日期</span>}
label={<span style={{ fontSize: '12px', fontWeight: '500' }}>出生日期</span>}
name="birthDate"
rules={[{ required: true, message: '请选择出生日期' }]}
>
@ -770,7 +774,7 @@ const EnvironmentalPersonnelManagement = () => {
</Form.Item>
<Form.Item
label={<span style={{ fontSize: '14px', fontWeight: '500' }}>入职时间</span>}
label={<span style={{ fontSize: '12px', fontWeight: '500' }}>入职时间</span>}
name="joinDate"
rules={[{ required: true, message: '请选择入职时间' }]}
>
@ -782,7 +786,7 @@ const EnvironmentalPersonnelManagement = () => {
</Form.Item>
<Form.Item
label={<span style={{ fontSize: '14px', fontWeight: '500' }}>身份证号</span>}
label={<span style={{ fontSize: '12px', fontWeight: '500' }}>身份证号</span>}
name="idCard"
rules={[{ required: true, message: '请输入身份证号' }]}
>
@ -790,7 +794,7 @@ const EnvironmentalPersonnelManagement = () => {
</Form.Item>
<Form.Item
label={<span style={{ fontSize: '14px', fontWeight: '500' }}>联系方式</span>}
label={<span style={{ fontSize: '12px', fontWeight: '500' }}>联系方式</span>}
name="contact"
rules={[{ required: true, message: '请输入联系方式' }]}
>
@ -799,7 +803,7 @@ const EnvironmentalPersonnelManagement = () => {
{/* 照片上传 */}
<Form.Item
label={<span style={{ fontSize: '14px', fontWeight: '500' }}>照片</span>}
label={<span style={{ fontSize: '12px', fontWeight: '500' }}>照片</span>}
name="photo"
>
<Upload
@ -818,7 +822,7 @@ const EnvironmentalPersonnelManagement = () => {
color: '#52c41a',
marginBottom: '8px'
}} />
<div style={{ fontSize: '14px', color: '#666' }}>上传</div>
<div style={{ fontSize: '12px', color: '#666' }}>上传</div>
</div>
</Upload>
</Form.Item>
@ -827,26 +831,26 @@ const EnvironmentalPersonnelManagement = () => {
{/* 岗位职责 */}
<Form.Item
label={<span style={{ fontSize: '14px', fontWeight: '500' }}>岗位职责</span>}
label={<span style={{ fontSize: '12px', fontWeight: '500', color: '#999999' }}>岗位职责</span>}
name="responsibility"
rules={[{ required: true, message: '请输入岗位职责' }]}
>
<Input.TextArea
rows={4}
placeholder="请输入岗位职责"
style={{ fontSize: '14px' }}
style={{ fontSize: '12px', color: '#333333' }}
/>
</Form.Item>
{/* 其他 */}
<Form.Item
label={<span style={{ fontSize: '14px', fontWeight: '500' }}>其他</span>}
label={<span style={{ fontSize: '12px', fontWeight: '500', color: '#999999' }}>其他</span>}
name="other"
>
<Input.TextArea
rows={3}
placeholder="暂无"
style={{ fontSize: '14px' }}
style={{ fontSize: '12px', color: '#333333' }}
/>
</Form.Item>
</Form>
@ -860,6 +864,7 @@ const EnvironmentalPersonnelManagement = () => {
open={editDrawerVisible}
width={600}
closable={true}
destroyOnClose={true}
footer={[
<Button key="cancel" onClick={handleCloseEditDrawer} style={{
backgroundColor: '#f5f5f5',
@ -882,6 +887,7 @@ const EnvironmentalPersonnelManagement = () => {
layout="vertical"
style={{ padding: '20px 0' }}
>
{console.log('编辑抽屉状态:', editDrawerVisible, '选中记录:', selectedRecord)}
{/* 姓名和头像区域 */}
<div style={{ display: 'flex', justifyContent: 'space-between', marginBottom: '30px' }}>
<div style={{ flex: 1 }}>
@ -908,15 +914,15 @@ const EnvironmentalPersonnelManagement = () => {
<Row gutter={24}>
<Col span={12}>
<Form.Item
label={<span style={{ fontSize: '14px', fontWeight: '500', color: '#666' }}>工号</span>}
label={<span style={{ fontSize: '12px', fontWeight: '500', color: '#666' }}>工号</span>}
name="employeeId"
rules={[{ required: true, message: '请输入工号' }]}
>
<Input placeholder="请输入" style={{ height: '32px', fontSize: '14px' }} />
<Input placeholder="请输入" style={{ height: '32px', fontSize: '12px' }} />
</Form.Item>
<Form.Item
label={<span style={{ fontSize: '14px', fontWeight: '500', color: '#666' }}>部门</span>}
label={<span style={{ fontSize: '12px', fontWeight: '500', color: '#666' }}>部门</span>}
name="department"
rules={[{ required: true, message: '请选择部门' }]}
>
@ -929,7 +935,7 @@ const EnvironmentalPersonnelManagement = () => {
</Form.Item>
<Form.Item
label={<span style={{ fontSize: '14px', fontWeight: '500', color: '#666' }}>岗位</span>}
label={<span style={{ fontSize: '12px', fontWeight: '500', color: '#666' }}>岗位</span>}
name="position"
rules={[{ required: true, message: '请选择岗位' }]}
>
@ -943,7 +949,7 @@ const EnvironmentalPersonnelManagement = () => {
</Form.Item>
<Form.Item
label={<span style={{ fontSize: '14px', fontWeight: '500', color: '#666' }}>性别</span>}
label={<span style={{ fontSize: '12px', fontWeight: '500', color: '#666' }}>性别</span>}
name="gender"
rules={[{ required: true, message: '请选择性别' }]}
>
@ -954,17 +960,17 @@ const EnvironmentalPersonnelManagement = () => {
</Form.Item>
<Form.Item
label={<span style={{ fontSize: '14px', fontWeight: '500', color: '#666' }}>住址</span>}
label={<span style={{ fontSize: '12px', fontWeight: '500', color: '#666' }}>住址</span>}
name="address"
rules={[{ required: true, message: '请输入住址' }]}
>
<Input placeholder="请输入" style={{ height: '32px', fontSize: '14px' }} />
<Input placeholder="请输入" style={{ height: '32px', fontSize: '12px' }} />
</Form.Item>
</Col>
<Col span={12}>
<Form.Item
label={<span style={{ fontSize: '14px', fontWeight: '500', color: '#666' }}>出生日期</span>}
label={<span style={{ fontSize: '12px', fontWeight: '500', color: '#666' }}>出生日期</span>}
name="birthDate"
rules={[{ required: true, message: '请选择出生日期' }]}
>
@ -976,7 +982,7 @@ const EnvironmentalPersonnelManagement = () => {
</Form.Item>
<Form.Item
label={<span style={{ fontSize: '14px', fontWeight: '500', color: '#666' }}>入职时间</span>}
label={<span style={{ fontSize: '12px', fontWeight: '500', color: '#666' }}>入职时间</span>}
name="joinDate"
rules={[{ required: true, message: '请选择入职时间' }]}
>
@ -988,19 +994,19 @@ const EnvironmentalPersonnelManagement = () => {
</Form.Item>
<Form.Item
label={<span style={{ fontSize: '14px', fontWeight: '500', color: '#666' }}>身份证号</span>}
label={<span style={{ fontSize: '12px', fontWeight: '500', color: '#666' }}>身份证号</span>}
name="idCard"
rules={[{ required: true, message: '请输入身份证号' }]}
>
<Input placeholder="请输入" style={{ height: '32px', fontSize: '14px' }} />
<Input placeholder="请输入" style={{ height: '32px', fontSize: '12px' }} />
</Form.Item>
<Form.Item
label={<span style={{ fontSize: '14px', fontWeight: '500', color: '#666' }}>联系方式</span>}
label={<span style={{ fontSize: '12px', fontWeight: '500', color: '#666' }}>联系方式</span>}
name="contact"
rules={[{ required: true, message: '请输入联系方式' }]}
>
<Input placeholder="请输入" style={{ height: '32px', fontSize: '14px' }} />
<Input placeholder="请输入" style={{ height: '32px', fontSize: '12px' }} />
</Form.Item>
</Col>
</Row>
@ -1026,26 +1032,26 @@ const EnvironmentalPersonnelManagement = () => {
{/* 岗位职责 */}
<Form.Item
label={<span style={{ fontSize: '14px', fontWeight: '500', color: '#666' }}>岗位职责</span>}
label={<span style={{ fontSize: '12px', fontWeight: '500', color: '#666' }}>岗位职责</span>}
name="responsibility"
rules={[{ required: true, message: '请输入岗位职责' }]}
>
<Input.TextArea
rows={4}
placeholder="请输入岗位职责"
style={{ fontSize: '14px' }}
style={{ fontSize: '12px', color: '#333333' }}
/>
</Form.Item>
{/* 其他 */}
<Form.Item
label={<span style={{ fontSize: '14px', fontWeight: '500', color: '#666' }}>其他</span>}
label={<span style={{ fontSize: '12px', fontWeight: '500', color: '#999999' }}>其他</span>}
name="other"
>
<Input.TextArea
rows={3}
placeholder="暂无"
style={{ fontSize: '14px' }}
style={{ fontSize: '12px', color: '#333333' }}
/>
</Form.Item>
</Form>

@ -1,3 +1,6 @@
.Rcontainer {
padding: 8px 6px 0px 6px;
height: 100%;

Loading…
Cancel
Save