diff --git a/config/routes.js b/config/routes.js index eedb4c6..b6355f1 100644 --- a/config/routes.js +++ b/config/routes.js @@ -30,29 +30,17 @@ export default [ name: 'basic', component: './business_basic/basic', }, - // 消防检测报警 - { - path: '/topnavbar00/business/fireWarning', - name: 'fireWarning', - component: './business_firewarning/FireWarning', - }, // 消防重点部位管理 { path: '/topnavbar00/business/firekeynotearea', name: 'firekeynotearea', component: './business_firekeynotearea/FireKeynoteArea', }, - // 安全管理基础信息 - { - path: '/topnavbar00/business/basicinformation', - name: 'basicinformation', - component: './business_basicinformation/BasicInformation', - }, - // 隐患排查 + // 消防检测报警 { - path: '/topnavbar00/business/hiddentrouble', - name: 'hiddentrouble', - component: './business_hiddentrouble/HiddenTrouble', + path: '/topnavbar00/business/fireWarning', + name: 'fireWarning', + component: './business_firewarning/FireWarning', }, ], }, diff --git a/src/pages/business_basicinformation/BasicInformation-Old.js b/src/pages/business_basicinformation/BasicInformation-Old.js deleted file mode 100644 index afaa19d..0000000 --- a/src/pages/business_basicinformation/BasicInformation-Old.js +++ /dev/null @@ -1,1054 +0,0 @@ -import React, { Fragment, PureComponent } from 'react'; -import { - DeleteOutlined, - EditOutlined, - PlusOutlined, - SearchOutlined, - RedoOutlined, - DownOutlined, - ExclamationCircleFilled, - UpOutlined, - SafetyOutlined, - ImportOutlined, - ExportOutlined, - UserOutlined, - TeamOutlined, - SettingOutlined, - FileTextOutlined, - ProjectOutlined, - WarningOutlined, - AlertOutlined, -} from '@ant-design/icons'; -import { connect, history } from '@umijs/max'; -import { Button, Card, Divider, Dropdown, message, Modal, Popconfirm, Space, Switch, Tag, Row, Col, Tabs, Tree, Progress, Input, Select } from 'antd'; -import StandardTable from '@/components/StandardTable'; -import ReactECharts from 'echarts-for-react'; - -import { MyIcon } from "@/components/Icon" -import style from "@/global.less"; -import StaffSheetCreateForm from './form/BasicInfoCreateForm'; //新增表单 -import StaffSheetUpdateForm from './form/BasicInfoUpdateForm'; //修改表单 -import StaffSheetViewForm from './form/BasicInfoViewForm'; //查看表单 -import styles from './BasicInformation.less'; -import datadictionary from "@/utils/dataDictionary"; -import { formatDate } from "@/utils/formatUtils"; -import { formatDictText, checkButtonAuthority } from "@/utils/globalCommon"; - -const { confirm } = Modal; - -//预约类型 -const sex_type = datadictionary.sex -const user_status = datadictionary.user_status -const sys_user_post = datadictionary.sys_user_post - -const mockData = { - list: [ - { - id: '01', - projectName: '安全项目一', - location: '北京朝阳区', - area: '15,000m²', - organization: '安全生产部', - staffCount: 168, - safetyLevel: '高', - }, - { - id: '02', - projectName: '安全项目二', - location: '北京朝阳区', - area: '15,000m²', - organization: '安全生产部', - staffCount: 168, - safetyLevel: '中', - }, - { - id: '03', - projectName: '安全项目三', - location: '北京朝阳区', - area: '15,000m²', - organization: '安全生产部', - staffCount: 168, - safetyLevel: '低', - }, - { - id: '04', - projectName: '安全项目四', - location: '北京朝阳区', - area: '15,000m²', - organization: '安全生产部', - staffCount: 168, - safetyLevel: '低', - }, - { - id: '05', - projectName: '安全项目五', - location: '北京朝阳区', - area: '15,000m²', - organization: '安全生产部', - staffCount: 168, - safetyLevel: '中', - }, - ], - pagination: { - total: 48, - current: 1, - pageSize: 5, - }, -} - -// 组织架构树形数据 -const treeData = [ - { - title: '安全部', - key: '0-0', - icon: , - children: [ - { - title: '安全管理科', - key: '0-0-0', - icon: , - }, - { - title: '生产科', - key: '0-0-1', - icon: , - }, - { - title: '设备科', - key: '0-0-2', - icon: , - }, - ], - }, -]; -@connect(({ staffsheet, loading }) => ({ - staffsheet, - loading: loading.models.staffsheet, -})) - -class BasicInformation extends PureComponent { - state = { - modalVisible: false, - updateModalVisible: false, - viewModalVisible: false, - expandForm: false, - selectedRows: [], - formValues: {}, - updateFormValues: {}, - viewFormValues: {}, - toggleExpand: false, - activeTab: '1', - } - - columns = [ - { - title: '编号', - dataIndex: 'id', - key: 'id', - width: 80, - fixed: 'left', - }, - { - title: '项目名称', - dataIndex: 'projectName', - key: 'projectName', - width: 150, - fixed: 'left', - }, - { - title: '地理信息', - dataIndex: 'location', - key: 'location', - width: 120, - }, - { - title: '占地面积', - dataIndex: 'area', - key: 'area', - width: 100, - }, - { - title: '组织机构', - dataIndex: 'organization', - key: 'organization', - width: 120, - }, - { - title: '职业人数', - dataIndex: 'staffCount', - key: 'staffCount', - width: 100, - render: (text) => `${text} 人`, - }, - { - title: '安全等级', - dataIndex: 'safetyLevel', - key: 'safetyLevel', - width: 100, - render: (text) => { - let color = 'green'; - if (text === '高') color = 'red'; - else if (text === '中') color = 'orange'; - return {text}; - }, - }, - { - title: '操作', - fixed: 'right', - align: 'center', - width: 200, - render: (text, record) => { - return ( - - 详情 - 修改 - 删除 - - ) - } - }, - ] - - componentDidMount() { - // 初始化页面数据 - } - - getPieChartOption = () => { - return { - tooltip: { - trigger: 'item', - formatter: '{a}
{b}: {c}% ({d}%)' - }, - legend: { - orient: 'vertical', - right: '25%', - top: '25%', - itemWidth: 14, - itemHeight: 14, - itemGap: 20, - textStyle: { - fontSize: 14, - color: '#333', - fontWeight: 'normal' - } - }, - series: [ - { - name: '功能区域占比', - type: 'pie', - radius: ['30%', '45%'], - center: ['30%', '45%'], - avoidLabelOverlap: false, - label: { - show: false - }, - emphasis: { - scale: true, - scaleSize: 5 - }, - labelLine: { - show: false - }, - data: [ - { - value: 45, - name: '生产区', - itemStyle: { - color: '#4A90E2' - } - }, - { - value: 20, - name: '仓储区', - itemStyle: { - color: '#7ED321' - } - }, - { - value: 20, - name: '办公区', - itemStyle: { - color: '#9B59B6' - } - }, - { - value: 15, - name: '辅助区', - itemStyle: { - color: '#F5A623' - } - } - ] - } - ] - }; - } - - handleStandardTableChange = (pagination, sorter) => { - const { dispatch } = this.props - const { formValues } = this.state - - const params = { - currentPage: pagination.current, - pageSize: pagination.pageSize, - ...formValues - } - - sorter.field && (params.sorter = `${sorter.field}_${sorter.order}`) - - // dispatch({ - // type: 'prouser/query_page_for_prouser', - // payload: params - // }) - } - - handleFormReset = () => { - const { dispatch } = this.props - this.setState({ - formValues: {} - }) - - // dispatch({ - // type: 'prouser/query_page_for_prouser', - // payload: { - // resetFlag: true - // } - // }) - } - - toggleForm = () => { - const { expandForm } = this.state - this.setState({ - expandForm: !expandForm - }) - } - - handleSelectRows = rows => { - this.setState({ - selectedRows: rows - }) - } - - handleSearch = values => { - const { dispatch } = this.props - const { expandForm } = this.state - - this.setState({ - formValues: values - }) - - // dispatch({ - // type: 'prouser/query_page_for_prouser', - // payload: { - // ...values, - // resetFlag: true, - // expandForm - // } - // }) - } - - handleModalVisible = flag => { - this.setState({ - modalVisible: !!flag - }) - } - - handleUpdateModalVisible = (flag, record) => { - this.setState({ - updateModalVisible: !!flag, - updateFormValues: record || {} - }) - } - - handleViewModalVisible = (flag, record) => { - this.setState({ - viewModalVisible: !!flag, - viewFormValues: record || {} - }) - } - - handleAdd = fields => { - const { dispatch } = this.props - - dispatch({ - type: 'prouser/insert_for_prouser', - payload: { - user_id: fields.user_id, - user_name: fields.user_name, - user_name_cn: fields.user_name_cn, - user_name_en: fields.user_name_en, - password: fields.password, - email: fields.email, - phone: fields.phone, - landline: fields.landline, - sex: fields.sex, - avatar: fields.avatar, - sign: fields.sign, - tags: fields.tags, - id_card: fields.id_card, - birthday: fields.birthday, - job_status: fields.job_status, - hiredate: fields.hiredate, - departure_time: fields.departure_time, - user_type: fields.user_type, - emp_no: fields.emp_no, - access_card_no: fields.access_card_no, - country: fields.country, - province: fields.province, - city: fields.city, - address: fields.address, - work_addr: fields.work_addr, - floor: fields.floor, - inprovince: fields.inprovince, - // dept_code: fields.dept_code, - // dept_name: fields.dept_name, - inner_dept_code: fields.inner_dept_code, - org_code: fields.org_code, - org_name: fields.org_name, - inner_org_code: fields.inner_org_code, - posts: fields.posts, - wx_openid: fields.wx_openid, - wx_mpopenid: fields.wx_mpopenid, - wx_miniopenid: fields.wx_miniopenid, - wx_unionid: fields.wx_unionid, - mobile_imei: fields.mobile_imei, - device_num: fields.device_num, - al_taobao: fields.al_taobao, - al_alipay: fields.al_alipay, - al_dingding: fields.al_dingding, - is_system_user: fields.is_system_user, - mgr_type: fields.mgr_type, - pwd_security_level: fields.pwd_security_level, - pwd_update_date: fields.pwd_update_date, - last_login_ip: fields.last_login_ip, - last_login_date: fields.last_login_date, - freeze_date: fields.freeze_date, - freeze_cause: fields.freeze_cause, - zindex: fields.zindex, - wx_msg: fields.wx_msg, - email_msg: fields.email_msg, - system_msg: fields.system_msg, - remarks: fields.remarks, - status: fields.status, - creator: fields.creator, - create_date: fields.create_date, - updater: fields.updater, - update_date: fields.update_date - }, - callback: (res) => { - if (res.success == true) { - message.success('添加成功') - this.handleModalVisible() - } - } - }) - } - - handleDeleteRecord = record => { - const { dispatch } = this.props - - dispatch({ - type: 'prouser/delete_by_primarykey_for_prouser', - payload: { - recordid: record.user_id - }, - callback: res => { - if (res.success) { - message.success('删除成功') - - this.setState({ - selectedRows: [] - }) - } - } - }) - } - - handleUpdate = fields => { - const { dispatch } = this.props - - dispatch({ - type: 'prouser/update_for_prouser', - payload: { - user_id: fields.user_id, - user_name: fields.user_name, - user_name_cn: fields.user_name_cn, - user_name_en: fields.user_name_en, - password: fields.password, - email: fields.email, - phone: fields.phone, - landline: fields.landline, - sex: fields.sex, - avatar: fields.avatar, - sign: fields.sign, - tags: fields.tags, - id_card: fields.id_card, - birthday: fields.birthday, - job_status: fields.job_status, - hiredate: fields.hiredate, - departure_time: fields.departure_time, - user_type: fields.user_type, - emp_no: fields.emp_no, - access_card_no: fields.access_card_no, - country: fields.country, - province: fields.province, - city: fields.city, - address: fields.address, - work_addr: fields.work_addr, - floor: fields.floor, - inprovince: fields.inprovince, - // dept_code: fields.dept_code, - // dept_name: fields.dept_name, - inner_dept_code: fields.inner_dept_code, - org_code: fields.org_code, - org_name: fields.org_name, - inner_org_code: fields.inner_org_code, - posts: fields.posts, - wx_openid: fields.wx_openid, - wx_mpopenid: fields.wx_mpopenid, - wx_miniopenid: fields.wx_miniopenid, - wx_unionid: fields.wx_unionid, - mobile_imei: fields.mobile_imei, - device_num: fields.device_num, - al_taobao: fields.al_taobao, - al_alipay: fields.al_alipay, - al_dingding: fields.al_dingding, - is_system_user: fields.is_system_user, - mgr_type: fields.mgr_type, - pwd_security_level: fields.pwd_security_level, - pwd_update_date: fields.pwd_update_date, - last_login_ip: fields.last_login_ip, - last_login_date: fields.last_login_date, - freeze_date: fields.freeze_date, - freeze_cause: fields.freeze_cause, - zindex: fields.zindex, - wx_msg: fields.wx_msg, - email_msg: fields.email_msg, - system_msg: fields.system_msg, - remarks: fields.remarks, - status: fields.status, - creator: fields.creator, - create_date: fields.create_date, - updater: fields.updater, - update_date: fields.update_date - }, - callback: (res) => { - if (res.success === true) { - message.success('修改成功') - this.handleUpdateModalVisible() - } - } - }) - } - - // 修改用户状态 - handleUpdateUserStatus = (fields, status, msg) => { - const { dispatch } = this.props - - confirm({ - title: `确定要 ${msg} 当前用户的吗?`, - icon: , - onOk() { - dispatch({ - type: 'prouser/update_for_prouser', - payload: { - user_id: fields.user_id, - status: status, - }, - callback: (res) => { - if (res.success === true) { - message.success('修改成功') - } - } - }) - } - }) - } - - // 修改用户密码 - handleUpdateUserPassword = fields => { - const { dispatch } = this.props - confirm({ - title: '确定要重置当前用户的密码吗?', - icon: , - onOk() { - dispatch({ - type: 'prouser/resetpwd_for_prouser', - payload: { - user_id: fields.user_id - }, - callback: (res) => { - if (res.success === true) { - message.success('重置成功') - } - } - }) - } - }) - } - - handleCollapse = () => { - const { toggleExpand } = this.state - this.setState({ - toggleExpand: !toggleExpand - }) - } - - render() { - const { - staffsheet: { - data, - selectDeptTree, - selectOrganTree - }, - loading, - dispatch - } = this.props - const { - selectedRows, - modalVisible, - updateModalVisible, - viewModalVisible, - updateFormValues, - viewFormValues, - toggleExpand, - activeTab - } = this.state - - const parentMethods = { - handleAdd: this.handleAdd, - handleModalVisible: this.handleModalVisible, - dispatch: dispatch, - loading, - selectDeptTree: selectDeptTree, - selectOrganTree: selectOrganTree - } - - const updateMethods = { - handleUpdateModalVisible: this.handleUpdateModalVisible, - handleUpdate: this.handleUpdate, - dispatch: dispatch, - loading, - selectDeptTree: selectDeptTree, - selectOrganTree: selectOrganTree - } - - const viewMethods = { - handleViewModalVisible: this.handleViewModalVisible - } - - const tabItems = [ - { - key: '1', - label: '基本信息管理', - }, - { - key: '2', - label: '资质证照管理', - }, - { - key: '3', - label: '人员基础信息', - } - ]; - - return ( -
- {/* 顶部标签页 */} -
- this.setState({ activeTab: key })} - items={tabItems} - className="custom-tabs" - style={{ marginBottom: 0 }} - /> -
- - - {/* 主要内容区域 */} - - {/* 左侧:组织机构人员管理 */} - -
-
- - 组织机构与人员管理 -
- - {/* 组织架构图 */} -
- {/* 顶部按钮 */} -
- -
- - {/* 连接线 - 顶部到第一层 */} -
- - {/* 第一层水平连接线 */} -
- - {/* 第一层垂直连接线 */} -
-
-
- - {/* 第一层部门 */} -
-
-
- -
-
安监部
- - {/* 安监部连接线 */} -
-
-
-
-
- -
-
- -
-
生产部
- - {/* 生产部连接线 */} -
-
-
-
-
- -
-
- -
-
设备部
- - {/* 设备部连接线 */} -
-
-
-
-
-
- - {/* 第二层子部门 */} -
- {/* 安监部子部门 */} -
-
-
- -
-
安全监督科
-
-
-
- -
-
风险评估科
-
-
- - {/* 生产部子部门 */} -
-
-
- -
-
生产调度科
-
-
-
- -
-
现场管理科
-
-
- - {/* 设备部子部门 */} -
-
-
- -
-
设备维护科
-
-
-
- -
-
备件管理科
-
-
-
-
-
- - - {/* 中间:功能区域占比 */} - -
-
- - 功能区面积占比 -
- -
- -
-
- - - {/* 右侧:实时风险评估 */} - -
- {/* 顶部装饰性背景层 */} -
- - {/* 底部装饰性背景层 */} -
- - {/* 标题 */} -
- - 实时风险评估 -
- - {/* 主要内容区域 */} -
- {/* 左侧盾牌图标 */} -
-
- - {/* 3D效果的底座 */} -
-
-
- - {/* 右侧内容 */} -
- {/* 风险等级提示框 */} -
- - 当前风险等级: - 重大风险 - -
- - {/* 提示信息 */} -
-
- 💡 -
-
-
- 提示:安全等级分为 红、橙、黄、蓝四级,当前风险等级为红区,存在重大风险 -
-
-
-
-
-
- -
- - {/* 底部表格区域 */} -
-
- - - - - - - - - - - - - - - -
- - `共 ${total} 条`} - /> -
- - {modalVisible && } - - {updateFormValues && Object.keys(updateFormValues).length ? ( - - ) : null} - - {viewFormValues && Object.keys(viewFormValues).length ? ( - - ) : null} - {importModalVisible && ( - - )} -
- ) - } -} - -export default BasicInfoManagement; diff --git a/src/pages/business_basicinformation/components/PersonnelBasicInfo.js b/src/pages/business_basicinformation/components/PersonnelBasicInfo.js deleted file mode 100644 index 1639122..0000000 --- a/src/pages/business_basicinformation/components/PersonnelBasicInfo.js +++ /dev/null @@ -1,780 +0,0 @@ -import React, { PureComponent } from 'react'; -import { - DeleteOutlined, - EditOutlined, - PlusOutlined, - SearchOutlined, - RedoOutlined, - DownOutlined, - ExclamationCircleFilled, - ExclamationCircleOutlined, - UpOutlined, - SafetyOutlined, - ImportOutlined, - ExportOutlined, - UserOutlined, - TeamOutlined, - SettingOutlined, - FileTextOutlined, - ProjectOutlined, - WarningOutlined, - AlertOutlined, -} from '@ant-design/icons'; -import { Button, Card, Divider, Dropdown, message, Modal, Popconfirm, Space, Switch, Tag, Row, Col, Tree, Progress, Input, Select } from 'antd'; -import StandardTable from '@/components/StandardTable'; -import ReactECharts from 'echarts-for-react'; - -import { MyIcon } from "@/components/Icon" -import style from "@/global.less"; -import PersonnelCreateForm from '../form/PersonnelCreateForm'; //新增表单 -import StaffSheetUpdateForm from '../form/BasicInfoUpdateForm'; //修改表单 -import StaffSheetViewForm from '../form/BasicInfoViewForm'; //查看表单 -import styles from '../BasicInformation.less'; -import datadictionary from "@/utils/dataDictionary"; -import { formatDate } from "@/utils/formatUtils"; -import { formatDictText, checkButtonAuthority } from "@/utils/globalCommon"; -import userIcon from '@/assets/basic_information/user.png'; -import contractExpireIcon from '@/assets/basic_information/contract-expire.png'; -import contractOverdueIcon from '@/assets/basic_information/contract-overdue.png'; -import certificateExpireIcon from '@/assets/basic_information/certificate-expire.png'; -// import certificateOverdueIcon from '@/assets/basic_information/certificate-overdue.png'; -import addIcon from '@/assets/basic_information/add.png'; -const { confirm } = Modal; - -//预约类型 -const sex_type = datadictionary.sex -const user_status = datadictionary.user_status -const sys_user_post = datadictionary.sys_user_post - -const mockData = { - list: [ - { - id: '01', - name: '王一一', - idCard: '411***************7659', - company: 'xxxxxxxxxxxxxxxxxxxxxxxxx', - phone: '15278967754', - category: '长期工', - contractStatus: '有效', - contractExpiry: '2025-08-26', - }, - { - id: '02', - name: '刘冰', - idCard: '411***************7659', - company: 'xxxxxxxxxxxxxxxxxxxxxxxxx', - phone: '15278967754', - category: '外包工', - contractStatus: '异常', - contractExpiry: '2025-08-26', - }, - { - id: '03', - name: '赵志远', - idCard: '411***************7659', - company: 'xxxxxxxxxxxxxxxxxxxxxxxxx', - phone: '15278967754', - category: '临时工', - contractStatus: '有效', - contractExpiry: '2025-08-26', - }, - { - id: '04', - name: '王博国', - idCard: '411***************7659', - company: 'xxxxxxxxxxxxxxxxxxxxxxxxx', - phone: '15278967754', - category: '顾问', - contractStatus: '剩余30天', - contractExpiry: '2025-08-26', - }, - { - id: '05', - name: '赵敏敏', - idCard: '411***************7659', - company: 'xxxxxxxxxxxxxxxxxxxxxxxxx', - phone: '15278967754', - category: '外包工', - contractStatus: '剩余30天', - contractExpiry: '2025-08-26', - }, - ], - pagination: { - total: 48, - current: 1, - pageSize: 5, - }, -} - -class PersonnelBasicInfo extends PureComponent { - state = { - modalVisible: false, - updateModalVisible: false, - viewModalVisible: false, - expandForm: false, - selectedRows: [], - formValues: {}, - updateFormValues: {}, - viewFormValues: {}, - toggleExpand: false, - } - - columns = [ - { - title: '编号', - dataIndex: 'id', - key: 'id', - width: 60, - fixed: 'left', - render: (text) => ( - {text} - ), - }, - { - title: '姓名', - dataIndex: 'name', - key: 'name', - width: 80, - fixed: 'left', - render: (text) => ( - {text} - ), - }, - { - title: '身份证号', - dataIndex: 'idCard', - key: 'idCard', - width: 180, - render: (text) => ( - {text} - ), - }, - { - title: '所属公司', - dataIndex: 'company', - key: 'company', - width: 250, - render: (text) => ( - {text} - ), - }, - { - title: '联系方式', - dataIndex: 'phone', - key: 'phone', - width: 120, - render: (text) => ( - {text} - ), - }, - { - title: '人员分类', - dataIndex: 'category', - key: 'category', - width: 100, - render: (text) => ( - {text} - ), - }, - { - title: '合同状态', - dataIndex: 'contractStatus', - key: 'contractStatus', - width: 100, - render: (text) => { - let color = '#2E4CD4'; - let bgColor = '#E6E9FB'; - if (text === '异常') { - color = '#FF3E48'; - bgColor = '#FFE0E2'; - } else if (text === '剩余30天') { - color = '#FF8800'; - bgColor = '#FFF3E9'; - } - return ( - - {text} - - ); - }, - }, - { - title: '合同有效期', - dataIndex: 'contractExpiry', - key: 'contractExpiry', - width: 120, - render: (text) => ( - {text} - ), - }, - { - title: '操作', - fixed: 'right', - align: 'center', - width: 100, - render: (text, record) => ( - 上传附件 - ), - }, - ] - - getPieChartOption = () => { - return { - radar: { - indicator: [ - { name: '{a|培训完成率} {b|85%}', max: 100 }, - { name: '{a|持证率} {b|92%}', max: 100 }, - { name: '{a|注册工程师占比} {b|15%}', max: 100 } - ], - center: ['45%', '50%'], - radius: 80, - splitNumber: 4, - shape: 'polygon', - axisName: { - rich: { - a: { - color: '#333', - fontSize: 12, - fontWeight: 400, - }, - b: { - color: '#2E4CD4', - fontSize: 12, - fontWeight: 400, - } - }, - formatter: function (value) { - // value 形如 "持证率 92%" - // 这里直接返回,ECharts rich 会自动处理 - return value; - } - }, - splitLine: { - lineStyle: { - color: ['#BFCBFF'] - } - }, - splitArea: { - areaStyle: { - color: ['#fff'] - } - }, - axisLine: { - lineStyle: { - color: '#E6EAF5' - } - } - }, - series: [{ - type: 'radar', - data: [ - { - value: [85, 92, 15], - areaStyle: { - color: '#499BFF' - }, - lineStyle: { - color: '#1269FF', - width: 2 - }, - symbol: 'circle', - symbolSize: 6, - itemStyle: { - color: '#2E4CD4', - borderColor: '#fff', - borderWidth: 2 - } - } - ] - }] - } - } - - getPieDepartmentDistributionChartOption = () => { - return { - grid: { - left: 0, - right: 0, - top: 70, - bottom: 0, - containLabel: true - }, - xAxis: { - type: 'category', - data: ['技术部', '销售部', '市场部', '财务部', '人事部'], - axisLine: { lineStyle: { color: '#E6EAF5' } }, - axisTick: { show: false }, - axisLabel: { color: '#666', fontSize: 13 } - }, - yAxis: { - type: 'value', - minInterval: 100, - splitLine: { lineStyle: { color: '#E6EAF5' } }, - axisLabel: { color: '#666', fontSize: 13 } - }, - series: [{ - type: 'bar', - data: [360, 450, 370, 360, 200], - barWidth: 25, - itemStyle: { - color: typeof window !== 'undefined' && window.echarts - ? new window.echarts.graphic.LinearGradient(0, 0, 0, 1, [ - { offset: 0, color: '#3691FF' }, - { offset: 1, color: '#1E68FF' } - ]) - : '#1E68FF' - } - }] - }; - } - - handleStandardTableChange = (pagination, sorter) => { - const { dispatch } = this.props - const { formValues } = this.state - - const params = { - currentPage: pagination.current, - pageSize: pagination.pageSize, - ...formValues - } - - sorter.field && (params.sorter = `${sorter.field}_${sorter.order}`) - } - - handleFormReset = () => { - const { dispatch } = this.props - this.setState({ - formValues: {} - }) - } - - toggleForm = () => { - const { expandForm } = this.state - this.setState({ - expandForm: !expandForm - }) - } - - handleSelectRows = rows => { - this.setState({ - selectedRows: rows - }) - } - - handleSearch = values => { - const { dispatch } = this.props - const { expandForm } = this.state - - this.setState({ - formValues: values - }) - } - - handleModalVisible = flag => { - this.setState({ - modalVisible: !!flag - }) - } - - handleUpdateModalVisible = (flag, record) => { - this.setState({ - updateModalVisible: !!flag, - updateFormValues: record || {} - }) - } - - handleViewModalVisible = (flag, record) => { - this.setState({ - viewModalVisible: !!flag, - viewFormValues: record || {} - }) - } - - handleAdd = fields => { - const { dispatch } = this.props - // 添加逻辑 - } - - handleDeleteRecord = record => { - const { dispatch } = this.props - // 删除逻辑 - } - - handleUpdate = fields => { - const { dispatch } = this.props - // 更新逻辑 - } - - handleCollapse = () => { - const { toggleExpand } = this.state - this.setState({ - toggleExpand: !toggleExpand - }) - } - - render() { - const { - loading, - dispatch - } = this.props - const { - selectedRows, - modalVisible, - updateModalVisible, - viewModalVisible, - updateFormValues, - viewFormValues, - toggleExpand, - } = this.state - - const parentMethods = { - handleAdd: this.handleAdd, - handleModalVisible: this.handleModalVisible, - dispatch: dispatch, - loading, - } - - const updateMethods = { - handleUpdateModalVisible: this.handleUpdateModalVisible, - handleUpdate: this.handleUpdate, - dispatch: dispatch, - loading, - } - - const viewMethods = { - handleViewModalVisible: this.handleViewModalVisible - } - - return ( - - {/* 顶部统计卡片区域 */} - - -
-
-
总人数
-
1456
-
-
- 总人数 -
-
- - -
-
-
合同即将过期
-
357
-
-
- 合同即将过期 -
-
- - -
-
-
合同已过期
-
1456
-
-
- 合同已过期 -
-
- - -
-
-
证件即将过期
-
1456
-
-
- 证件即将过期 -
-
- - -
-
-
证件已过期
-
1456
-
-
- {/* 证件已过期 -
- - -
-
-
本月新增
-
1456
-
-
- 本月新增 -
-
- - - {/* 主要内容区域 */} - - {/* 左侧:人员资质 */} - -
-
- - 人员资质 -
-
- -
-
- - - {/* 中间:部门人员分布 */} - -
-
- - 部门人员分布 -
-
- -
-
- - - {/* 右侧:到期提醒 */} - -
-
- - 到期提醒 -
-
-
- - 沈一撒合同已到期 -
-
- - 赵敏敏合同临期 15 天 -
-
- - 赵敏敏合同临期 15 天 -
-
-
- -
- - {/* 底部表格区域 */} -
-
- - - - - 部门 - - - - - - - - - - -
- - `共 ${total} 条`} - /> -
- - {modalVisible && } - - {updateFormValues && Object.keys(updateFormValues).length ? ( - - ) : null} - - {viewFormValues && Object.keys(viewFormValues).length ? ( - - ) : null} - - ) - } -} - -export default QualificationManagement; diff --git a/src/pages/business_basicinformation/form/BasicInfoCreateForm.js b/src/pages/business_basicinformation/form/BasicInfoCreateForm.js deleted file mode 100644 index bafac8c..0000000 --- a/src/pages/business_basicinformation/form/BasicInfoCreateForm.js +++ /dev/null @@ -1,167 +0,0 @@ -import { useState, useEffect } from 'react' -import { Col, DatePicker, Form, Input, Modal, Row, Select } from 'antd' -import SelectDeptTree from '@/components/SelectDeptTree' -import SelectOrganTree from '@/components/SelectOrganTree' -import datadictionary from '@/utils/dataDictionary' -import { formatDictOptions, verifyPhone } from '@/utils/globalCommon' -import { NumberInput } from '@/components/NumberInput' -import styles from '../BasicInformation.less' -import style from '@/global.less' -import dayjs from 'dayjs' -import { formatDate } from '@/utils/formatUtils' - -const { Item: FormItem } = Form -const { TextArea } = Input -const dictData = datadictionary - -//新增表单 -let getDeptTreeBySelectTree -let getOrganTreeBySelectTree - -const BasicInfoCreateForm = (props => { - const [form] = Form.useForm() - - const { - modalVisible, - handleAdd, - handleModalVisible, - loading, - dispatch, - selectDeptTree, - selectOrganTree - } = props - - // 清空和初始化逻辑可保留 - useEffect(() => { - form.resetFields(); - }, [modalVisible]) - - const okHandle = () => { - form.validateFields() - .then(fieldsValue => { - form.resetFields() - handleAdd(fieldsValue) - }) - .catch(() => { }) - } - - const afterClose = () => { - form.resetFields(); - } - - return ( - handleModalVisible()} - afterClose={afterClose} - confirmLoading={loading} - footer={[ - , - - ]} - > -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- ) -}) - -export default BasicInfoCreateForm diff --git a/src/pages/business_basicinformation/form/BasicInfoImportForm.js b/src/pages/business_basicinformation/form/BasicInfoImportForm.js deleted file mode 100644 index 2b2ef56..0000000 --- a/src/pages/business_basicinformation/form/BasicInfoImportForm.js +++ /dev/null @@ -1,148 +0,0 @@ -import React, { useState } from 'react'; -import { Modal, Upload, message, Progress } from 'antd'; -import { UploadOutlined, ExclamationCircleOutlined } from '@ant-design/icons'; -import styles from '../BasicInformation.less'; -import fileIcon from '@/assets/basic_information/file-icon.png'; -const BasicInfoImportForm = (props) => { - const { modalVisible, handleModalVisible, loading } = props; - const [fileList, setFileList] = useState([ - // 示例数据,实际可根据上传进度动态设置 - // { uid: '1', name: '文件名称', size: 3 * 1024 * 1024, status: 'uploading', percent: 60 }, - // ... - ]); - - const maxFiles = 10; - const maxSize = 100 * 1024 * 1024; // 100M - - const beforeUpload = (file) => { - if (file.size > maxSize) { - message.error('单个文件不能超过100M'); - return Upload.LIST_IGNORE; - } - if (fileList.length >= maxFiles) { - message.error(`最多只能上传${maxFiles}个文件`); - return Upload.LIST_IGNORE; - } - // 模拟上传进度 - file.status = 'uploading'; - file.percent = 60; - return true; - }; - - const handleChange = ({ fileList: newFileList }) => { - // 模拟每个文件60%进度 - const updatedList = newFileList.slice(0, maxFiles).map(file => ({ - ...file, - status: 'uploading', - percent: 60, - })); - setFileList(updatedList); - }; - - const handleRemove = (file) => { - setFileList(fileList.filter(item => item.uid !== file.uid)); - }; - - const handleOk = () => { - handleModalVisible(false); - setFileList([]); - }; - - const handleCancel = () => { - handleModalVisible(false); - setFileList([]); - }; - - // 文件列表渲染 - const renderFileList = () => ( -
- {fileList.map(file => ( -
-
- file -
-
-
{file.name || '文件名称'}
-
- {file.size ? `${(file.size / (1024 * 1024)).toFixed(0)} MB` : '3 MB'} -
- -
-
handleRemove(file)} - > - × -
-
- ))} -
- ); - - return ( - 取消, - - ]} - > -
- {fileList.length > 0 && renderFileList()} -
- -
- -
-
- 添加文件 {fileList.length}/{maxFiles} -
-
-
-
- - 单个文件不超过 100M -
-
-
- ); -}; - -export default BasicInfoImportForm; \ No newline at end of file diff --git a/src/pages/business_basicinformation/form/BasicInfoUpdateForm.js b/src/pages/business_basicinformation/form/BasicInfoUpdateForm.js deleted file mode 100644 index c9b8c90..0000000 --- a/src/pages/business_basicinformation/form/BasicInfoUpdateForm.js +++ /dev/null @@ -1,149 +0,0 @@ -import { useEffect } from 'react' -import { Col, Form, Input, Modal, Row, Select } from 'antd' -import styles from '../BasicInformation.less' - -const BasicInfoUpdateForm = (props => { - const [form] = Form.useForm() - - const { - updateModalVisible, - handleUpdate, - handleUpdateModalVisible, - loading, - values = {} - } = props - - useEffect(() => { - if (updateModalVisible) { - form.setFieldsValue(values) - } - }, [updateModalVisible, values, form]) - - const okHandle = () => { - form.validateFields() - .then(fieldsValue => { - form.resetFields() - handleUpdate(fieldsValue) - }) - .catch(() => { }) - } - - const afterClose = () => { - form.resetFields(); - } - - return ( - handleUpdateModalVisible()} - afterClose={afterClose} - confirmLoading={loading} - footer={[ - , - - ]} - > -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- ) -}) - -export default BasicInfoUpdateForm \ No newline at end of file diff --git a/src/pages/business_basicinformation/form/BasicInfoViewForm.js b/src/pages/business_basicinformation/form/BasicInfoViewForm.js deleted file mode 100644 index 15f6759..0000000 --- a/src/pages/business_basicinformation/form/BasicInfoViewForm.js +++ /dev/null @@ -1,52 +0,0 @@ -import React from 'react'; -import { Modal, Row, Col } from 'antd'; -import styles from '../BasicInformation.less'; - -const BasicInfoViewForm = (props) => { - const { viewModalVisible, handleViewModalVisible, values = {} } = props; - - return ( - handleViewModalVisible(false)} - > - - -
项目名称
-
{values.projectName || '-'}
- - -
地理信息
-
{values.location || '-'}
- - -
占地面积
-
- {values.area ? `${values.area}` : '-'} -
- - -
职业人数
-
{values.staffCount || '-'}
- - -
组织机构
-
{values.organization || '-'}
- - -
安全等级
-
{values.safetyLevel || '-'}
- -
-
- ); -}; - -export default BasicInfoViewForm; \ No newline at end of file diff --git a/src/pages/business_basicinformation/form/PersonnelCreateForm.js b/src/pages/business_basicinformation/form/PersonnelCreateForm.js deleted file mode 100644 index 76b3e56..0000000 --- a/src/pages/business_basicinformation/form/PersonnelCreateForm.js +++ /dev/null @@ -1,152 +0,0 @@ -import { useState, useEffect } from 'react' -import { Col, DatePicker, Form, Input, Modal, Row, Select } from 'antd' -import SelectDeptTree from '@/components/SelectDeptTree' -import SelectOrganTree from '@/components/SelectOrganTree' -import datadictionary from '@/utils/dataDictionary' -import { formatDictOptions, verifyPhone } from '@/utils/globalCommon' -import { NumberInput } from '@/components/NumberInput' -import styles from '../BasicInformation.less' -import style from '@/global.less' -import dayjs from 'dayjs' -import { formatDate } from '@/utils/formatUtils' - -const { Item: FormItem } = Form -const { TextArea } = Input -const dictData = datadictionary - -//新增表单 -let getDeptTreeBySelectTree -let getOrganTreeBySelectTree - -const PersonnelCreateForm = (props => { - const [form] = Form.useForm() - - const { - modalVisible, - handleAdd, - handleModalVisible, - loading, - dispatch, - selectDeptTree, - selectOrganTree - } = props - - // 清空和初始化逻辑可保留 - useEffect(() => { - form.resetFields(); - }, [modalVisible]) - - const okHandle = () => { - form.validateFields() - .then(fieldsValue => { - form.resetFields() - handleAdd(fieldsValue) - }) - .catch(() => { }) - } - - const afterClose = () => { - form.resetFields(); - } - - return ( - handleModalVisible()} - afterClose={afterClose} - confirmLoading={loading} - footer={[ - , - - ]} - > -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- ) -}) - -export default PersonnelCreateForm diff --git a/src/pages/business_basicinformation/form/StaffSheetRenderAdvancedForm.js b/src/pages/business_basicinformation/form/StaffSheetRenderAdvancedForm.js deleted file mode 100644 index 2625938..0000000 --- a/src/pages/business_basicinformation/form/StaffSheetRenderAdvancedForm.js +++ /dev/null @@ -1,113 +0,0 @@ -import { useEffect } from 'react' -import { Button, Col, Form, Input, Row } from 'antd' -import { UpOutlined, SearchOutlined, RedoOutlined } from '@ant-design/icons' -import SelectDeptTree from '@/components/SelectDeptTree' -import SelectOrganTree from '@/components/SelectOrganTree' -import style from '@/global.less' - -const { Item: FormItem } = Form -let getDeptTreeBySelectTree -let getOrganTreeBySelectTree - -const StaffSheetRenderAdvancedForm = (props) => { - const [form] = Form.useForm() - const { dispatch, handleSearch, handleFormReset, toggleForm, selectDeptTree, selectOrganTree, params } = props - - useEffect(() => { - form.setFieldsValue({ - user_name: params?.user_name, - user_name_cn: params?.user_name_cn, - deptname: params?.deptname, - orgname: params?.orgname, - }) - }, [params]) - - const onFinish = values => { - // if (getDeptTreeBySelectTree) { - // values.dept_code = getDeptTreeBySelectTree.dept_code - // values.deptname = getDeptTreeBySelectTree.title - // } - - if (getOrganTreeBySelectTree) { - values.org_code = getOrganTreeBySelectTree.org_code - values.orgname = getOrganTreeBySelectTree.title - } - - handleSearch(values) - } - - const myHandleFormReset = () => { - form.resetFields() - handleFormReset() - } - - const selectedDeptTreeValue = (deptRecord) => { - getDeptTreeBySelectTree = deptRecord - } - - const selectedOrganTreeValue = (orgRecord) => { - getOrganTreeBySelectTree = orgRecord - } - - const parentDeptTreeMethod = { - dispatch: dispatch, - selectDeptTree: selectDeptTree, - selectedDeptTreeValue: selectedDeptTreeValue - } - - const parentOrganTreeMethod = { - dispatch: dispatch, - selectOrganTree: selectOrganTree, - selectedOrganTreeValue: selectedOrganTreeValue - } - - return ( -
- - - - - - - - - - - - - - - - - - - - - - {/**/} - {/* */} - {/* */} - {/* */} - {/**/} - - -
- - - - - toggleForm(form)}> - 收起 - -
- -
-
- ) -} - -export default StaffSheetRenderAdvancedForm diff --git a/src/pages/business_basicinformation/form/StaffSheetRenderSimpleForm.js b/src/pages/business_basicinformation/form/StaffSheetRenderSimpleForm.js deleted file mode 100644 index 0468e76..0000000 --- a/src/pages/business_basicinformation/form/StaffSheetRenderSimpleForm.js +++ /dev/null @@ -1,81 +0,0 @@ -import { useEffect } from 'react' -import {Button, Col, Form, Input, Row, DatePicker, Select} from 'antd' -import {DownOutlined, RedoOutlined, SearchOutlined} from '@ant-design/icons' -import style from '@/global.less' -import dayjs from 'dayjs' -const { Item: FormItem } = Form - -const StaffSheetRenderSimpleForm = (props) => { - const [form] = Form.useForm() - const { handleSearch, handleFormReset, toggleForm, params } = props - - useEffect(() => { - form.setFieldsValue({ - user_name: params?.user_name, - user_name_cn: params?.user_name_cn, - }) - }, [params]) - - const onFinish = values => { - handleSearch(values) - } - - const myHandleFormReset = () => { - form.resetFields() - handleFormReset() - } - - return ( -
- - - - - - - - - - - - - - - - - - - - - -
- - - -
- -
-
- ) -} - -export default StaffSheetRenderSimpleForm diff --git a/src/pages/business_hiddentrouble/HiddenTrouble.js b/src/pages/business_hiddentrouble/HiddenTrouble.js deleted file mode 100644 index 6ea7690..0000000 --- a/src/pages/business_hiddentrouble/HiddenTrouble.js +++ /dev/null @@ -1,32 +0,0 @@ -import MyCard from "@/pages/business_hiddentrouble/component/MyCard"; -import {Col, Row, Tabs} from "antd"; -import HiddenDangerInspection from "@/pages/business_hiddentrouble/component/hiddenDangerInspection/hiddenDangerInspection"; -import styles from './HiddenTrouble.less' -import HiddenDangerRighted from "@/pages/business_hiddentrouble/component/hiddenDangerRighted/hiddenDangerRighted"; -import HiddenDangerCount from "@/pages/business_hiddentrouble/component/hiddenDangerCount/hiddenDangerCount"; - -const items = [ - { - key: '1', - label: '隐患检查', - children: , - }, - { - key: '2', - label: '隐患整改', - children: - }, - { - key: '3', - label: '隐患统计', - children: , - }, -]; -const HiddenTrouble = () => { - return ( - <> - - - ) -} -export default HiddenTrouble diff --git a/src/pages/business_hiddentrouble/HiddenTrouble.less b/src/pages/business_hiddentrouble/HiddenTrouble.less deleted file mode 100644 index 56d8636..0000000 --- a/src/pages/business_hiddentrouble/HiddenTrouble.less +++ /dev/null @@ -1,43 +0,0 @@ -/* 移除下滑线 */ -.custom-tabs .ant-tabs-ink-bar { - display: none !important; -} - -/* 未选中状态 */ -.custom-tabs { - .ant-tabs-tab { - background: #f0f0f0 !important; - border: none !important; - border-radius: 6px !important; - margin-right: 8px !important; - padding: 8px 16px !important; - transition: all 0.3s ease !important; - } -} - -/* 选中状态 - 背景变为蓝色 */ -.custom-tabs { - :global(.ant-tabs-tab-active) { - background: #2E4CD4 !important; - } -} - -/* 选中状态 - 文字变为白色 */ -.custom-tabs :global(.ant-tabs-tab-active .ant-tabs-tab-btn) { - color: white !important; - font-weight: 500 !important; -} - -/* 移除底部边框 */ -.custom-tabs .ant-tabs-nav::before { - border-bottom: none !important; -} - -/* 悬停效果 */ -.custom-tabs .ant-tabs-tab:hover { - background: #e6e6e6 !important; -} - -.custom-tabs .ant-tabs-tab-active:hover { - background: #40a9ff !important; -} diff --git a/src/pages/business_hiddentrouble/component/MyCard.js b/src/pages/business_hiddentrouble/component/MyCard.js deleted file mode 100644 index 568de6f..0000000 --- a/src/pages/business_hiddentrouble/component/MyCard.js +++ /dev/null @@ -1,325 +0,0 @@ -import Icon from "antd/es/icon"; -import {Col, Pagination, Row, Table} from "antd"; -import {Descriptions} from "antd"; -import * as echarts from 'echarts'; -import {useEffect, useRef} from "react"; - -const HourglassSvg=()=>{ - return ( - - hourglass icon - - - ) -} -const HourglassIcon=(props)=>{ - return( - - ) -} - -const MyCard = (props) => { - return ( -
-
-
{props.title}
-
{props.num}
- {props.flag === 1 &&
- {props.grow === 1 ? <>⬆ : <>⬇} {props.data}% 较上周 -
} - {props.flag===2 &&
- {props.grow===1 ? <>⬆:<>⬇} {props.data}% 较上周 -
} - {props.flag===3 &&
- {props.grow===1 ? <>⬆:<>⬇} {props.data}% 较上周 -
} -
-
- -
-
- ) -} - - -// 环形图 -const items = [ - { - key: '1', - children: '设备安全', - color:'#868BF9', - }, - { - key: '2', - children: '电气安全', - color:'#F29629', - }, - { - key: '3', - children: '消防安全', - color:'#FFD85A', - }, - { - key: '4', - children: '工艺安全', - color:'#5ED6BE', - }, - { - key: '5', - children: '储罐专业', - color:'#00AAFF', - }, - { - key: '6', - children: '其他', - color:'#5FDCF7', - }, -]; -export const PieChart=(props)=>{ - const chartRef=useRef(null) - const data=[ - { value: 5, name: '设备安全' ,itemStyle:{color:'#868BF9'}}, - { value: 5, name: '电气安全',itemStyle:{color:'#F29629'} }, - { value: 10, name: '消防安全' ,itemStyle:{color:'#FFD85A'}}, - { value: 20, name: '工艺安全',itemStyle:{color:'#5ED6BE'} }, - { value: 30, name: '储罐专业',itemStyle:{color:'#00AAFF'} }, - { value: 30, name:'其他',itemStyle:{color:'#5FDCF7'}} - ] - useEffect(() => { - const chart=echarts.init(chartRef.current) - const option = { - legend: { - show:false, - orient: 'vertical', - x: 'left', - data: ['设备安全', '电气安全', '消防安全', '工艺安全', '储罐专业','其他'] - }, - grid:{ - top: 20, - bottom: 20, - left: 20, - right: 20, - }, - series: [ - { - type: 'pie', - radius: ['50%', '70%'], - avoidLabelOverlap: false, - label: { - show: true, - formatter: '{d}%', - position: 'outsider', - }, - labelLine: { - show: true - }, - emphasis: { - label: { - show: true, - position:'center', - fontSize: '15', - fontWeight: 'bold', - formatter: function(params) { - return `${params.name}\n${params.percent}%`; - }, - - } - }, - data:data, - }, - ] - }; - chart.setOption(option) - // 响应式调整 - const handleResize = () => { - chart.resize(); - }; - - window.addEventListener('resize', handleResize); - - // 清理函数 - return () => { - window.removeEventListener('resize', handleResize); - chart.dispose(); - }; - }, []); - - return( -
- - - {props.title}} - column={2} - > - {items.map((item)=>{ - return( - -
- - {item.children} -
-
- ) - })} - - -
- - - -
- -
- -
-
- ) -} - -// 柱状图 - -export const BarChart=()=>{ - const chartRef=useRef(null) - const data=[] - useEffect(() => { - const chart =echarts.init(chartRef.current) - const option = { - grid:{ - top:20, - bottom:20, - right:30, - left:30, - }, - xAxis:{ - type: 'category', - data:['每日','每周','每月','每季度','每半年','每年','季节性','专项'], - axisLine:{ - show:true, - lineStyle:{ - color:'#D5E2FF' - } - }, - axisLabel:{ - show:true, - position:'bottom', - color:'#333' - }, - - }, - yAxis:{ - type:'value', - - axisLine:{ - show:true, - min:0, - lineStyle:{ - color:'#D5E2FF' - } - - }, - axisLabel: { - show:true, - color:'#333' - }, - splitLine:{ - show:true, - lineStyle:{ - color:'#D5E2FF', - type:'dashed' - } - }, - nameTextStyle:{ - color:'#000', - fontSize:16, - fontWeight:'600', - } - }, - series:[ - { - name: '数据系列1', - type: 'bar', // 柱状图 - data: [120, 200, 150, 80, 70,123,70,90], // 数据值 - barWidth: '20%', // 柱子宽度 - itemStyle: { - color: '#007BFF', // 柱子颜色 - borderRadius: [4, 4, 0, 0] ,// 柱子圆角 - }, - label: { - show: true, - position: 'top', // 数据标签位置 - color: '#333' - }, - emphasis: { // 高亮样式 - itemStyle: { - color: '#7491db' - } - } - } - ] - - } - chart.setOption(option) - const handleResize = () => { - chart.resize(); - }; - - window.addEventListener('resize', handleResize); - - // 清理函数 - return () => { - window.removeEventListener('resize', handleResize); - chart.dispose(); - }; - }) - return( -
-
检查频次分布
-
- -
-
- - ) -} - -export const MyTable=(props)=>{ - const {dataSource,columns}=props - return ( - <> - '共 25 条', - pageSizeOptions:[5,10,20,50,100], - defaultPageSize:5, - style:{ - marginTop:50 - } - }} - style={{width:'100%'}} - /> - - - ) -} - - -export default MyCard; diff --git a/src/pages/business_hiddentrouble/component/hiddenDangerCount/hiddenDangerCount.js b/src/pages/business_hiddentrouble/component/hiddenDangerCount/hiddenDangerCount.js deleted file mode 100644 index cf9e757..0000000 --- a/src/pages/business_hiddentrouble/component/hiddenDangerCount/hiddenDangerCount.js +++ /dev/null @@ -1,100 +0,0 @@ -import {Col, List, Row} from "antd"; -import MyCard from "@/pages/business_hiddentrouble/component/MyCard"; - -const headerList=[ - { - title:'总隐患数', - num:'1489', - data:'12', - flag:1, - grow:1, - backgroundColor:'#E5EEFE', - color:'#1269FF', - }, - { - title:'已整改隐患', - num:'986', - data:'12', - flag:1, - grow:1, - backgroundColor:'#D9F8E8', - color:'#1DCE74', - }, - { - title:'整改率', - num:'86%', - data:'8', - flag:2, - grow:0, - backgroundColor:'#FFF3E9', - color:'orange', - }, - { - title:'按期整改率', - num:'89%', - data:'2', - flag:3, - grow:0, - backgroundColor:'#FFE6E8', - color:'#FF3E48', - } -] -const data=[ - {name:'Q3设备故障类隐患',tip:'占比最高',num:'45%'}, - {name:'Q2安全防护隐患',tip:'显著下降',num:'32%'}, - {name:'Q4电器隐患',tip:'持续改善',num:'28%'}, - {name:'全年平均整改周期',tip:'同比缩短',num:'7天'}, -] -const TrendAnalysis=()=>{ - return( -
- -
1 - - {data.map((item,index)=>{ - return( -
-
-
{item.name}
-
{item.tip}
-
-
- {item.num} -
-
- ) - })} - - - - ) -} - -const HiddenDangerCount=()=>{ - return ( - <> -
- - {headerList.map((item, index) => { - return
- })} - - -
- -
- - - 1 - - -
- -
2 - 2 - - - - ) -} -export default HiddenDangerCount diff --git a/src/pages/business_hiddentrouble/component/hiddenDangerInspection/hiddenDangerInspection.js b/src/pages/business_hiddentrouble/component/hiddenDangerInspection/hiddenDangerInspection.js deleted file mode 100644 index a82ed49..0000000 --- a/src/pages/business_hiddentrouble/component/hiddenDangerInspection/hiddenDangerInspection.js +++ /dev/null @@ -1,198 +0,0 @@ -import {Card, Col, Row, Input, Space, Select, Upload, Button, message, Tag} from "antd"; -import './hiddenDangerInspection.less' -import MyCard, {BarChart, MyTable, PieChart} from "@/pages/business_hiddentrouble/component/MyCard"; -import {ExportOutlined, UploadOutlined} from "@ant-design/icons"; -import {render} from "react-dom"; -const { Search } = Input; - -const dataList=[ - { - title:'隐患总数', - num:'169', - data:'12', - flag:1, - grow:1, - backgroundColor:'#E5EEFE', - color:'#1269FF', - }, - { - title:'已整改隐患', - num:'169', - data:'12', - flag:1, - grow:1, - backgroundColor:'#D9F8E8', - color:'#1DCE74', - }, - { - title:'整改中隐患', - num:'169', - data:'8', - flag:2, - grow:0, - backgroundColor:'#FFF3E9', - color:'orange', - }, - { - title:'超期未整改', - num:'169', - data:'2', - flag:3, - grow:0, - backgroundColor:'#FFE6E8', - color:'#FF3E48', - } -] -export const Select1=()=>{ - return( - - ) -} -export const Select2=()=>{ - return( - - ) -} -const props = { - name: 'file', - action: 'https://660d2bd96ddfa2943b33731c.mockapi.io/api/upload', - headers: { - authorization: 'authorization-text', - }, - onChange(info) { - if (info.file.status !== 'uploading') { - console.log(info.file, info.fileList); - } - if (info.file.status === 'done') { - message.success(`${info.file.name} file uploaded successfully`); - } else if (info.file.status === 'error') { - message.error(`${info.file.name} file upload failed.`); - } - }, -}; -export const Import=()=>{ - return( - - - - ) - - -} -export const Export=()=>{ - return( - - ) -} -export const levelList= { - '一般隐患':['#DAF3FF','#00AAFA'], - '中等隐患':['#FFF3E9','#FF8800'], - '极高隐患':['#FFE0E2','#FF3E48'], -} - -const columns=[ - {align:'center',title:'检查项',dataIndex:'inspectionItems',key:'inspectionItems'}, - {align:'center',title:'隐患名称',dataIndex:'name',key:'name'}, - {align:'center',title:'隐患等级',dataIndex:'level',key:'level',render:(level)=>{ - - return {level} - }}, - {align:'center',title:'登记时间',dataIndex:'createTime',key:'createTime'}, - {align:'center',title:'隐患来源',dataIndex:'source',key:'source'}, - {align:'center',title:'隐患描述',dataIndex:'description',key:'description',ellipsis:{showTitle:true}}, - {align:'center',title:'治理类型',dataIndex:'type',key:'type'}, - {align:'center',title:'治理期限',dataIndex:'deadline',key:'deadline'}, - {align:'center',title:'整改负责人',dataIndex:'head',key:'head'}, - {align:'center',title:'隐患状态',dataIndex:'state',key:'state',render:(state)=>{return {state}}}, - {align:'center',title:'验收时间',dataIndex:'acceptanceTime',key:'acceptanceTime'}, - {align:'center',title:'操作',dataIndex:'operation',key:'operation',render:(_,record)=>{ - return - }}, -] - -const dataSource=[ - {key:1,inspectionItems:'设备运行温度',name:'D10精馏车间',level:'一般隐患',createTime:'2025-03-01',source:'日常排查',description:'隐患描述111111111111111111111111111111111111',type:'限期整改',deadline:'2025-09-03',head:'张小龙',state:'已验收',acceptanceTime:'2025-09-03'}, - {key:2,inspectionItems:'设备运行温度',name:'D10精馏车间',level:'中等隐患',createTime:'2025-03-01',source:'日常排查',description:'隐患描述',type:'限期整改',deadline:'2025-09-03',head:'张小龙',state:'已验收',acceptanceTime:'2025-09-03'}, - {key:3,inspectionItems:'设备运行温度',name:'D10精馏车间',level:'极高隐患',createTime:'2025-03-01',source:'日常排查',description:'隐患描述',type:'限期整改',deadline:'2025-09-03',head:'张小龙',state:'已验收',acceptanceTime:'2025-09-03'}, - {key:4,inspectionItems:'设备运行温度',name:'D10精馏车间',level:'一般隐患',createTime:'2025-03-01',source:'日常排查',description:'隐患描述',type:'限期整改',deadline:'2025-09-03',head:'张小龙',state:'已验收',acceptanceTime:'2025-09-03'}, - {key:5,inspectionItems:'设备运行温度',name:'D10精馏车间',level:'一般隐患',createTime:'2025-03-01',source:'日常排查',description:'隐患描述',type:'限期整改',deadline:'2025-09-03',head:'张小龙',state:'已验收',acceptanceTime:'2025-09-03'}, - {key:6,inspectionItems:'设备运行温度',name:'D10精馏车间',level:'一般隐患',createTime:'2025-03-01',source:'日常排查',description:'隐患描述',type:'限期整改',deadline:'2025-09-03',head:'张小龙',state:'已验收',acceptanceTime:'2025-09-03'}, - {key:7,inspectionItems:'设备运行温度',name:'D10精馏车间',level:'一般隐患',createTime:'2025-03-01',source:'日常排查',description:'隐患描述',type:'限期整改',deadline:'2025-09-03',head:'张小龙',state:'已验收',acceptanceTime:'2025-09-03'}, - {key:8,inspectionItems:'设备运行温度',name:'D10精馏车间',level:'一般隐患',createTime:'2025-03-01',source:'日常排查',description:'隐患描述',type:'限期整改',deadline:'2025-09-03',head:'张小龙',state:'已验收',acceptanceTime:'2025-09-03'}, - {key:9,inspectionItems:'设备运行温度',name:'D10精馏车间',level:'一般隐患',createTime:'2025-03-01',source:'日常排查',description:'隐患描述',type:'限期整改',deadline:'2025-09-03',head:'张小龙',state:'已验收',acceptanceTime:'2025-09-03'}, - {key:10,inspectionItems:'设备运行温度',name:'D10精馏车间',level:'一般隐患',createTime:'2025-03-01',source:'日常排查',description:'隐患描述',type:'限期整改',deadline:'2025-09-03',head:'张小龙',state:'已验收',acceptanceTime:'2025-09-03'}, - {key:11,inspectionItems:'设备运行温度',name:'D10精馏车间',level:'一般隐患',createTime:'2025-03-01',source:'日常排查',description:'隐患描述',type:'限期整改',deadline:'2025-09-03',head:'张小龙',state:'已验收',acceptanceTime:'2025-09-03'}, - {key:12,inspectionItems:'设备运行温度',name:'D10精馏车间',level:'一般隐患',createTime:'2025-03-01',source:'日常排查',description:'隐患描述',type:'限期整改',deadline:'2025-09-03',head:'张小龙',state:'已验收',acceptanceTime:'2025-09-03'}, - {key:13,inspectionItems:'设备运行温度',name:'D10精馏车间',level:'一般隐患',createTime:'2025-03-01',source:'日常排查',description:'隐患描述',type:'限期整改',deadline:'2025-09-03',head:'张小龙',state:'已验收',acceptanceTime:'2025-09-03'}, - {key:14,inspectionItems:'设备运行温度',name:'D10精馏车间',level:'一般隐患',createTime:'2025-03-01',source:'日常排查',description:'隐患描述',type:'限期整改',deadline:'2025-09-03',head:'张小龙',state:'已验收',acceptanceTime:'2025-09-03'}, - {key:15,inspectionItems:'设备运行温度',name:'D10精馏车间',level:'一般隐患',createTime:'2025-03-01',source:'日常排查',description:'隐患描述',type:'限期整改',deadline:'2025-09-03',head:'张小龙',state:'已验收',acceptanceTime:'2025-09-03'}, - {key:16,inspectionItems:'设备运行温度',name:'D10精馏车间',level:'一般隐患',createTime:'2025-03-01',source:'日常排查',description:'隐患描述',type:'限期整改',deadline:'2025-09-03',head:'张小龙',state:'已验收',acceptanceTime:'2025-09-03'}, - {key:17,inspectionItems:'设备运行温度',name:'D10精馏车间',level:'一般隐患',createTime:'2025-03-01',source:'日常排查',description:'隐患描述',type:'限期整改',deadline:'2025-09-03',head:'张小龙',state:'已验收',acceptanceTime:'2025-09-03'}, - {key:18,inspectionItems:'设备运行温度',name:'D10精馏车间',level:'一般隐患',createTime:'2025-03-01',source:'日常排查',description:'隐患描述',type:'限期整改',deadline:'2025-09-03',head:'张小龙',state:'已验收',acceptanceTime:'2025-09-03'}, - {key:19,inspectionItems:'设备运行温度',name:'D10精馏车间',level:'一般隐患',createTime:'2025-03-01',source:'日常排查',description:'隐患描述',type:'限期整改',deadline:'2025-09-03',head:'张小龙',state:'已验收',acceptanceTime:'2025-09-03'}, - {key:20,inspectionItems:'设备运行温度',name:'D10精馏车间',level:'一般隐患',createTime:'2025-03-01',source:'日常排查',description:'隐患描述',type:'限期整改',deadline:'2025-09-03',head:'张小龙',state:'已验收',acceptanceTime:'2025-09-03'}, - {key:21,inspectionItems:'设备运行温度',name:'D10精馏车间',level:'一般隐患',createTime:'2025-03-01',source:'日常排查',description:'隐患描述',type:'限期整改',deadline:'2025-09-03',head:'张小龙',state:'已验收',acceptanceTime:'2025-09-03'}, - {key:21,inspectionItems:'设备运行温度',name:'D10精馏车间',level:'一般隐患',createTime:'2025-03-01',source:'日常排查',description:'隐患描述',type:'限期整改',deadline:'2025-09-03',head:'张小龙',state:'已验收',acceptanceTime:'2025-09-03'}, - {key:21,inspectionItems:'设备运行温度',name:'D10精馏车间',level:'一般隐患',createTime:'2025-03-01',source:'日常排查',description:'隐患描述',type:'限期整改',deadline:'2025-09-03',head:'张小龙',state:'已验收',acceptanceTime:'2025-09-03'}, - {key:21,inspectionItems:'设备运行温度',name:'D10精馏车间',level:'一般隐患',createTime:'2025-03-01',source:'日常排查',description:'隐患描述',type:'限期整改',deadline:'2025-09-03',head:'张小龙',state:'已验收',acceptanceTime:'2025-09-03'}, - {key:21,inspectionItems:'设备运行温度',name:'D10精馏车间',level:'一般隐患',createTime:'2025-03-01',source:'日常排查',description:'隐患描述',type:'限期整改',deadline:'2025-09-03',head:'张小龙',state:'已验收',acceptanceTime:'2025-09-03'}, - -] - - -const HiddenDangerInspection=()=>{ - return( - < > -
- - {dataList.map((item) => { - return
- })} - - -
- -
- - - - - - - -
-
- - - - 检查频次分布 - - -
- -
-
- - - - - - -
-
- - - -
-
-
- - - - ) -} -export default HiddenDangerInspection diff --git a/src/pages/business_hiddentrouble/component/hiddenDangerInspection/hiddenDangerInspection.less b/src/pages/business_hiddentrouble/component/hiddenDangerInspection/hiddenDangerInspection.less deleted file mode 100644 index b28b04f..0000000 --- a/src/pages/business_hiddentrouble/component/hiddenDangerInspection/hiddenDangerInspection.less +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/pages/business_hiddentrouble/component/hiddenDangerRighted/hiddenDangerRighted.js b/src/pages/business_hiddentrouble/component/hiddenDangerRighted/hiddenDangerRighted.js deleted file mode 100644 index aa61d7a..0000000 --- a/src/pages/business_hiddentrouble/component/hiddenDangerRighted/hiddenDangerRighted.js +++ /dev/null @@ -1,318 +0,0 @@ -import {Button, Card, Col, Input, Row, Space, Steps, Tag} from "antd"; -import MyCard, {MyTable, PieChart} from "@/pages/business_hiddentrouble/component/MyCard"; -import {useEffect, useRef} from "react"; -import img1 from '../../../../assets/img/stepOne.png' -import img2 from '../../../../assets/img/stepTwo.png' -import img3 from '../../../../assets/img/stepThree.png' -import img4 from '../../../../assets/img/stepFour.png' - -import echarts from "echarts/lib/echarts"; -import { - Export, Import, - levelList, - Select1, Select2 -} from "@/pages/business_hiddentrouble/component/hiddenDangerInspection/hiddenDangerInspection"; -import './hiddenDangerRighted.less' -const { Search } = Input; -const dataList=[ - { - title:'待整改隐患', - num:'169', - data:'12', - flag:1, - grow:1, - backgroundColor:'#E5EEFE', - color:'#1269FF', - }, - { - title:'整改中隐患', - num:'169', - data:'12', - flag:1, - grow:1, - backgroundColor:'#D9F8E8', - color:'#1DCE74', - }, - { - title:'已完成整改', - num:'169', - data:'8', - flag:2, - grow:0, - backgroundColor:'#FFF3E9', - color:'orange', - }, - { - title:'整改完成率', - num:'89%', - data:'2', - flag:3, - grow:0, - backgroundColor:'#FFE6E8', - color:'#FF3E48', - } -] - - -const columns=[ - {align:'center',title:'检查项',dataIndex:'inspectionItems',key:'inspectionItems'}, - {align:'center',title:'隐患名称',dataIndex:'name',key:'name'}, - {align:'center',title:'隐患等级',dataIndex:'level',key:'level',render:(level)=>{ - - return {level} - }}, - {align:'center',title:'登记时间',dataIndex:'createTime',key:'createTime'}, - {align:'center',title:'隐患来源',dataIndex:'source',key:'source'}, - {align:'center',title:'隐患描述',dataIndex:'description',key:'description',ellipsis:{showTitle:true}}, - {align:'center',title:'治理类型',dataIndex:'type',key:'type'}, - {align:'center',title:'治理期限',dataIndex:'deadline',key:'deadline'}, - {align:'center',title:'整改负责人',dataIndex:'head',key:'head'}, - {align:'center',title:'隐患状态',dataIndex:'state',key:'state',render:(state)=>{return {state}}}, - {align:'center',title:'验收时间',dataIndex:'acceptanceTime',key:'acceptanceTime'}, - {align:'center',title:'操作',dataIndex:'operation',key:'operation',render:(_,record)=>{ - return
- - -
- }}, -] - -const dataSource=[ - {key:1,inspectionItems:'设备运行温度',name:'D10精馏车间',level:'一般隐患',createTime:'2025-03-01',source:'日常排查',description:'隐患描述111111111111111111111111111111111111',type:'限期整改',deadline:'2025-09-03',head:'张小龙',state:'已验收',acceptanceTime:'2025-09-03'}, - {key:2,inspectionItems:'设备运行温度',name:'D10精馏车间',level:'中等隐患',createTime:'2025-03-01',source:'日常排查',description:'隐患描述',type:'限期整改',deadline:'2025-09-03',head:'张小龙',state:'已验收',acceptanceTime:'2025-09-03'}, - {key:3,inspectionItems:'设备运行温度',name:'D10精馏车间',level:'极高隐患',createTime:'2025-03-01',source:'日常排查',description:'隐患描述',type:'限期整改',deadline:'2025-09-03',head:'张小龙',state:'已验收',acceptanceTime:'2025-09-03'}, - {key:4,inspectionItems:'设备运行温度',name:'D10精馏车间',level:'一般隐患',createTime:'2025-03-01',source:'日常排查',description:'隐患描述',type:'限期整改',deadline:'2025-09-03',head:'张小龙',state:'已验收',acceptanceTime:'2025-09-03'}, - {key:5,inspectionItems:'设备运行温度',name:'D10精馏车间',level:'一般隐患',createTime:'2025-03-01',source:'日常排查',description:'隐患描述',type:'限期整改',deadline:'2025-09-03',head:'张小龙',state:'已验收',acceptanceTime:'2025-09-03'}, - {key:6,inspectionItems:'设备运行温度',name:'D10精馏车间',level:'一般隐患',createTime:'2025-03-01',source:'日常排查',description:'隐患描述',type:'限期整改',deadline:'2025-09-03',head:'张小龙',state:'已验收',acceptanceTime:'2025-09-03'}, - {key:7,inspectionItems:'设备运行温度',name:'D10精馏车间',level:'一般隐患',createTime:'2025-03-01',source:'日常排查',description:'隐患描述',type:'限期整改',deadline:'2025-09-03',head:'张小龙',state:'已验收',acceptanceTime:'2025-09-03'}, - {key:8,inspectionItems:'设备运行温度',name:'D10精馏车间',level:'一般隐患',createTime:'2025-03-01',source:'日常排查',description:'隐患描述',type:'限期整改',deadline:'2025-09-03',head:'张小龙',state:'已验收',acceptanceTime:'2025-09-03'}, - {key:9,inspectionItems:'设备运行温度',name:'D10精馏车间',level:'一般隐患',createTime:'2025-03-01',source:'日常排查',description:'隐患描述',type:'限期整改',deadline:'2025-09-03',head:'张小龙',state:'已验收',acceptanceTime:'2025-09-03'}, - {key:10,inspectionItems:'设备运行温度',name:'D10精馏车间',level:'一般隐患',createTime:'2025-03-01',source:'日常排查',description:'隐患描述',type:'限期整改',deadline:'2025-09-03',head:'张小龙',state:'已验收',acceptanceTime:'2025-09-03'}, - {key:11,inspectionItems:'设备运行温度',name:'D10精馏车间',level:'一般隐患',createTime:'2025-03-01',source:'日常排查',description:'隐患描述',type:'限期整改',deadline:'2025-09-03',head:'张小龙',state:'已验收',acceptanceTime:'2025-09-03'}, - {key:12,inspectionItems:'设备运行温度',name:'D10精馏车间',level:'一般隐患',createTime:'2025-03-01',source:'日常排查',description:'隐患描述',type:'限期整改',deadline:'2025-09-03',head:'张小龙',state:'已验收',acceptanceTime:'2025-09-03'}, - {key:13,inspectionItems:'设备运行温度',name:'D10精馏车间',level:'一般隐患',createTime:'2025-03-01',source:'日常排查',description:'隐患描述',type:'限期整改',deadline:'2025-09-03',head:'张小龙',state:'已验收',acceptanceTime:'2025-09-03'}, - {key:14,inspectionItems:'设备运行温度',name:'D10精馏车间',level:'一般隐患',createTime:'2025-03-01',source:'日常排查',description:'隐患描述',type:'限期整改',deadline:'2025-09-03',head:'张小龙',state:'已验收',acceptanceTime:'2025-09-03'}, - {key:15,inspectionItems:'设备运行温度',name:'D10精馏车间',level:'一般隐患',createTime:'2025-03-01',source:'日常排查',description:'隐患描述',type:'限期整改',deadline:'2025-09-03',head:'张小龙',state:'已验收',acceptanceTime:'2025-09-03'}, - {key:16,inspectionItems:'设备运行温度',name:'D10精馏车间',level:'一般隐患',createTime:'2025-03-01',source:'日常排查',description:'隐患描述',type:'限期整改',deadline:'2025-09-03',head:'张小龙',state:'已验收',acceptanceTime:'2025-09-03'}, - {key:17,inspectionItems:'设备运行温度',name:'D10精馏车间',level:'一般隐患',createTime:'2025-03-01',source:'日常排查',description:'隐患描述',type:'限期整改',deadline:'2025-09-03',head:'张小龙',state:'已验收',acceptanceTime:'2025-09-03'}, - {key:18,inspectionItems:'设备运行温度',name:'D10精馏车间',level:'一般隐患',createTime:'2025-03-01',source:'日常排查',description:'隐患描述',type:'限期整改',deadline:'2025-09-03',head:'张小龙',state:'已验收',acceptanceTime:'2025-09-03'}, - {key:19,inspectionItems:'设备运行温度',name:'D10精馏车间',level:'一般隐患',createTime:'2025-03-01',source:'日常排查',description:'隐患描述',type:'限期整改',deadline:'2025-09-03',head:'张小龙',state:'已验收',acceptanceTime:'2025-09-03'}, - {key:20,inspectionItems:'设备运行温度',name:'D10精馏车间',level:'一般隐患',createTime:'2025-03-01',source:'日常排查',description:'隐患描述',type:'限期整改',deadline:'2025-09-03',head:'张小龙',state:'已验收',acceptanceTime:'2025-09-03'}, - {key:21,inspectionItems:'设备运行温度',name:'D10精馏车间',level:'一般隐患',createTime:'2025-03-01',source:'日常排查',description:'隐患描述',type:'限期整改',deadline:'2025-09-03',head:'张小龙',state:'已验收',acceptanceTime:'2025-09-03'}, - {key:21,inspectionItems:'设备运行温度',name:'D10精馏车间',level:'一般隐患',createTime:'2025-03-01',source:'日常排查',description:'隐患描述',type:'限期整改',deadline:'2025-09-03',head:'张小龙',state:'已验收',acceptanceTime:'2025-09-03'}, - {key:21,inspectionItems:'设备运行温度',name:'D10精馏车间',level:'一般隐患',createTime:'2025-03-01',source:'日常排查',description:'隐患描述',type:'限期整改',deadline:'2025-09-03',head:'张小龙',state:'已验收',acceptanceTime:'2025-09-03'}, - {key:21,inspectionItems:'设备运行温度',name:'D10精馏车间',level:'一般隐患',createTime:'2025-03-01',source:'日常排查',description:'隐患描述',type:'限期整改',deadline:'2025-09-03',head:'张小龙',state:'已验收',acceptanceTime:'2025-09-03'}, - {key:21,inspectionItems:'设备运行温度',name:'D10精馏车间',level:'一般隐患',createTime:'2025-03-01',source:'日常排查',description:'隐患描述',type:'限期整改',deadline:'2025-09-03',head:'张小龙',state:'已验收',acceptanceTime:'2025-09-03'}, - -] - - - -const Qiu=(props)=>{ - return( -
- {props.num} -
- ) -} -const items=[ - {'0': img1}, - {'1': img2}, - {'2': img3}, - {'3': img4}, - -] - -const TrendChart=()=>{ - const TrendChart=useRef(null) - useEffect(() => { - const chart=echarts.init(TrendChart.current); - const option={ - grid:{ - bottom:25, - top:20, - }, - legend:{ - show:true, - left:'50%', - top:0, - icon: 'path://M0,0 L20,0', - itemStyle:{ - color:'#00A0E9', - } - }, - xAxis:{ - type:'category', - data:['3月','4月','5月','6月','7月','8月'], - axisLabel:{ - color:'#000', - }, - axisLine:{ - lineStyle:{ - color:'#00A0E9', - type:'dashed', - } - }, - boundaryGap: false, // 关键 - axisTick: { - show: true, - alignWithLabel: true, // 关键 - inside: true, // 刻度朝外 - length: 100, // 足够长的长度(根据图表高度调整) - lineStyle: { - color: '#cccccc', - width: 1, - type: 'dashed', - } - }, - }, - yAxis:{ - type:'value', - axisLabel:{ - color:'#000', - type:'dashed', - }, - axisLine:{ - show:true, - lineStyle:{ - color:'#00A0E9', - type:'dashed', - } - }, - splitLine:{ - lineStyle:{ - color:'#00A0E9', - type:'dashed' - } - } - }, - series:[ - { - name:'整改完成率', - data:[120,200,150,80,70,110], - type:'line', - smooth:true, - lineStyle:{ - color:'#00A0E9' - }, - areaStyle:{ - color:{ - type:'linear', - x:0, - y:0, - x2:0, - y2:1, - colorStops:[ - {offset:0,color:'#00A0E9'}, - {offset:1,color:'#99D4F5 '} - ] - } - }, - symbol:'none' - } - ] - } - chart.setOption(option) - // 响应式调整 - const handleResize = () => { - chart.resize(); - }; - handleResize() - window.addEventListener('resize', handleResize); - - // 清理函数 - return () => { - window.removeEventListener('resize', handleResize); - chart.dispose(); - }; - }, []); - return( -
-
- 隐患整改进度趋势 -
-
-
-
- ) -} -const Workflow=()=>{ - return( -
-
- 隐患整改流程 -
-
- {items.map((item,index)=>{ - return ( -
-
- -
-
-
-
- ) - })} -
-
- ) -} - -const HiddenDangerRighted = () => { - return ( - <> -
- - {dataList.map((item, index) => { - return
- })} - - -
- -
- - - - - - - - - - -
-
- - - - 隐患整改列表 - - -
- -
-
- - - - - - -
-
- - - -
-
-
- - ) -} -export default HiddenDangerRighted; diff --git a/src/pages/business_hiddentrouble/component/hiddenDangerRighted/hiddenDangerRighted.less b/src/pages/business_hiddentrouble/component/hiddenDangerRighted/hiddenDangerRighted.less deleted file mode 100644 index 8789c1b..0000000 --- a/src/pages/business_hiddentrouble/component/hiddenDangerRighted/hiddenDangerRighted.less +++ /dev/null @@ -1,13 +0,0 @@ -.qiu{ - width: 27px; - height: 27px; - border-radius: 50%; - background-color:blue; - color: #fff; - text-align: center; - line-height: 27px; -} -.box{ - display: flex; - justify-content: center; -} diff --git a/src/pages/nav_system_content/SystemContentList.js b/src/pages/nav_system_content/SystemContentList.js index f5ca059..a04bbbb 100644 --- a/src/pages/nav_system_content/SystemContentList.js +++ b/src/pages/nav_system_content/SystemContentList.js @@ -95,7 +95,7 @@ const SystemContentList = (props) => { path: '/topnavbar00/business/basic', icon: 环保信息管理 { key: "/topnavbar00/business/basic", "label": "基础信息管理" }, - { - path: '/topnavbar00/business/fireWarning', - icon: 消防监测报警, - key: "/topnavbar00/business/fireWarning", - "label": "消防监测报警" - }, { path: '/topnavbar00/business/firekeynotearea', icon: { "label": "消防重点部位管理" }, { - "path": "/topnavbar00/business/basicinformation", - icon: 安全管理基础信息, - "key": "/topnavbar00/business/basicinformation", - "label": "安全管理基础信息" + path: '/topnavbar00/business/fireWarning', + icon: 消防监测报警, + key: "/topnavbar00/business/fireWarning", + "label": "消防监测报警" }, - { - "path": "/topnavbar00/business/hiddentrouble", - icon: 工时仪表盘, - "key": "/topnavbar00/business/hiddentrouble", - "label": "隐患排查" - } ] setMenuItems(fixedMenuItems) // 初始化默认路由 diff --git a/src/pages/topnavbar/TopNavBar.js b/src/pages/topnavbar/TopNavBar.js index 6118e67..82606cd 100644 --- a/src/pages/topnavbar/TopNavBar.js +++ b/src/pages/topnavbar/TopNavBar.js @@ -12,21 +12,13 @@ const menuItem = [ label: '基础信息管理', key: '/topnavbar00/business/basic', }, - { - label: '消防监测报警', - key: '/topnavbar00/business/fireWarning', - }, { label: '消防重点部位管理', key: '/topnavbar00/business/firekeynotearea', }, { - label: '安全管理基础信息', - key: '/topnavbar00/business/basicinformation', - }, - { - label: '隐患排查', - key: '/topnavbar00/business/hiddentrouble', + label: '消防监测报警', + key: '/topnavbar00/business/fireWarning', }, ]