From b7ec8f0473ab261b223859032fe1f9d63966e70b Mon Sep 17 00:00:00 2001 From: jiangxucong Date: Thu, 23 Oct 2025 16:07:39 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/defaultSettings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/defaultSettings.js b/config/defaultSettings.js index 2e1f29a..46abff1 100644 --- a/config/defaultSettings.js +++ b/config/defaultSettings.js @@ -3,6 +3,6 @@ export default { menu: { locale: true, }, - title: '智能巡检系统', + title: '应急管理系统', iconfontUrl: '//at.alicdn.com/t/font_2163129_p3ldyoksz3s.js' } From 559ff884f09659d4a96266fd2d2930e8a0eaf91e Mon Sep 17 00:00:00 2001 From: jiangxucong Date: Thu, 23 Oct 2025 16:09:30 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=B6=89=E5=8D=B1=E5=8C=96=E5=93=81?= =?UTF-8?q?=E4=BC=81=E4=B8=9A=E9=A1=B5=E9=9D=A2=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business_emergencyPlan/EmergencyPlan.js | 18 +- ...pqy.js => HazardousChemicalsEnterprise.js} | 174 +++++++++--------- ...less => HazardousChemicalsEnterprise.less} | 65 +++---- 3 files changed, 120 insertions(+), 137 deletions(-) rename src/pages/business_emergencyPlan/components/{swhpqy.js => HazardousChemicalsEnterprise.js} (63%) rename src/pages/business_emergencyPlan/components/{swhpqy.less => HazardousChemicalsEnterprise.less} (67%) diff --git a/src/pages/business_emergencyPlan/EmergencyPlan.js b/src/pages/business_emergencyPlan/EmergencyPlan.js index 8f2fa94..b59d30e 100644 --- a/src/pages/business_emergencyPlan/EmergencyPlan.js +++ b/src/pages/business_emergencyPlan/EmergencyPlan.js @@ -1,10 +1,10 @@ import React, { useState } from 'react'; import { Card, Row, Col, Statistic, Progress, Button, Space } from 'antd'; import styles from './EmergencyPlan.less'; -import Swhpqy from './components/swhpqy'; //涉危化品企业 -import Whp from './components/whp'; //危化品 -import Sgla from './components/sgla'; //事故案例 -import Flfg from './components/flfg'; //法律法规 +import HazardousChemicalsEnterprise from './components/HazardousChemicalsEnterprise'; //涉危化品企业 +import HazardousChemicals from './components/HazardousChemicals'; //危化品 +import AccidentCases from './components/AccidentCases'; //事故案例 +import LawsAndRegulations from './components/LawsAndRegulations'; //法律法规 import FrameSvg from '@/assets/img/Frame.svg'; import Backg01Png from '@/assets/img/backg01.png'; @@ -20,15 +20,15 @@ const SafeMajorHazardList = () => { const renderContent = () => { switch(activeTab) { case 'swhpqy': - return ; + return ; case 'whp': - return ; + return ; case 'sgla': - return ; + return ; case 'flfg': - return ; + return ; default: - return ; + return ; } }; diff --git a/src/pages/business_emergencyPlan/components/swhpqy.js b/src/pages/business_emergencyPlan/components/HazardousChemicalsEnterprise.js similarity index 63% rename from src/pages/business_emergencyPlan/components/swhpqy.js rename to src/pages/business_emergencyPlan/components/HazardousChemicalsEnterprise.js index cc36fed..9773537 100644 --- a/src/pages/business_emergencyPlan/components/swhpqy.js +++ b/src/pages/business_emergencyPlan/components/HazardousChemicalsEnterprise.js @@ -1,12 +1,12 @@ import React, { useState, useEffect } from 'react'; -import { Input, Button, Select, message, Modal } from 'antd'; +import { Input, Button, Select, message, Modal, Form } from 'antd'; import { SearchOutlined, PlusOutlined, DeleteOutlined, EditOutlined } from '@ant-design/icons'; import StandardTable from '@/components/StandardTable'; -import styles from './swhpqy.less'; +import styles from './HazardousChemicalsEnterprise.less'; const { Option } = Select; -const Swhpqy = () => { +const HazardousChemicalsEnterprise = () => { const [loading, setLoading] = useState(false); const [selectedRowKeys, setSelectedRowKeys] = useState([]); const [searchValue, setSearchValue] = useState(''); @@ -23,136 +23,122 @@ const Swhpqy = () => { const [dataSource, setDataSource] = useState([ { key: '1', - number: '01', unitName: '文登市兴文新材料有限公司', - name: '国云海', - position: '生产班长', + industry: '石油化工', + region: '--', + contact: '吴静', mobile: '17898786567', - email: '1878967633@qq.com', - dutyTime: '夜班', + dangerousGoods: '高锰酸钾', }, { key: '2', - number: '02', unitName: '文登市兴文新材料有限公司', - name: '陈志强', - position: '生产班长', + industry: '化学纤维', + region: '--', + contact: '李美斯', mobile: '17898786567', - email: '1878967633@qq.com', - dutyTime: '白班', + dangerousGoods: '次氯酸钠', }, { key: '3', - number: '03', unitName: '合湾新材科技有限公司', - name: '侯文涛', - position: '班长', + industry: '石油化工', + region: '--', + contact: '何见瑶', mobile: '17898786567', - email: '1878967633@qq.com', - dutyTime: '白班', + dangerousGoods: '氯氧化钠', }, { key: '4', - number: '04', unitName: '山东万图高分子材料股份有限公司', - name: '宋东', - position: '班长', + industry: '化学纤维', + region: '--', + contact: '李冬娟', mobile: '17898786567', - email: '1878967633@qq.com', - dutyTime: '夜班', + dangerousGoods: '硫酸', }, { key: '5', - number: '05', unitName: '合鸿新材科技有限公司', - name: '王一声', - position: '班长', + industry: '化学纤维', + region: '--', + contact: '王千英', mobile: '17898786567', - email: '1878967633@qq.com', - dutyTime: '夜班', + dangerousGoods: '油漆稀释剂', }, { key: '6', - number: '06', unitName: '山东万图高分子材料股份有限公司', - name: '赵小敏', - position: '班长', + industry: '石油化工', + region: '--', + contact: '李勇', mobile: '17898786567', - email: '1878987633@qq.com', - dutyTime: '夜班', + dangerousGoods: '次氯酸钠', }, ]); // 表格列配置 const columns = [ { - title: '编号', - dataIndex: 'number', - key: 'number', - width: 80, - }, - { - title: '单位名称', + title: '企业名称', dataIndex: 'unitName', key: 'unitName', width: 200, }, { - title: '姓名', - dataIndex: 'name', - key: 'name', - width: 100, + title: '所属行业', + dataIndex: 'industry', + key: 'industry', + width: 120, }, { - title: '职务', - dataIndex: 'position', - key: 'position', + title: '所属园区', + dataIndex: 'region', + key: 'region', width: 120, }, { - title: '手机号', + title: '安全联系人', + dataIndex: 'contact', + key: 'contact', + width: 120, + }, + { + title: '联系方式', dataIndex: 'mobile', key: 'mobile', width: 130, }, { - title: '邮箱', - dataIndex: 'email', - key: 'email', + title: '危险品', + dataIndex: 'dangerousGoods', + key: 'dangerousGoods', width: 180, }, - { - title: '值班时间', - dataIndex: 'dutyTime', - key: 'dutyTime', - width: 100, - }, - { - title: '操作', - key: 'action', - width: 120, - render: (text, record) => ( -
- - -
- ), - }, + // { + // title: '操作', + // key: 'action', + // width: 120, + // render: (text, record) => ( + //
+ // + // + //
+ // ), + // }, ]; // 搜索处理 @@ -214,31 +200,37 @@ const Swhpqy = () => { {/* 页面标题 */}
-

危化品

+

涉危化品企业

{/* 搜索和操作区域 */} -
-
+
+ setSearchValue(e.target.value)} allowClear className={styles.searchInput} /> + + -
-
+ + {/* 数据表格 */}
@@ -259,4 +251,4 @@ const Swhpqy = () => { ); }; -export default Swhpqy; +export default HazardousChemicalsEnterprise; diff --git a/src/pages/business_emergencyPlan/components/swhpqy.less b/src/pages/business_emergencyPlan/components/HazardousChemicalsEnterprise.less similarity index 67% rename from src/pages/business_emergencyPlan/components/swhpqy.less rename to src/pages/business_emergencyPlan/components/HazardousChemicalsEnterprise.less index 9e46a34..ac0aafc 100644 --- a/src/pages/business_emergencyPlan/components/swhpqy.less +++ b/src/pages/business_emergencyPlan/components/HazardousChemicalsEnterprise.less @@ -1,7 +1,7 @@ .container { padding: 20px; background: #fff; - height:100vh; + height: 100vh; width: 100%; box-sizing: border-box; margin: 0; @@ -12,14 +12,14 @@ display: flex; align-items: center; margin-bottom: 15px; - + .titleBar { width: 3px; height: 16px; background: #2E4CD4; margin-right: 12px; } - + .title { margin: 0; font-size: 14px; @@ -29,47 +29,38 @@ } .searchBar { - display: flex; - justify-content: space-between; - align-items: center; margin-bottom: 10px; padding: 5px; - - .searchLeft { - display: flex; - align-items: center; - gap: 12px; - - .searchInput { - border-radius: 4px !important; - } - - .searchButton { - background-color: #2E4CD4 !important; - border-color: #2E4CD4 !important; - border-radius: 4px !important; - - &:hover { - background-color: #1e3bb8 !important; - border-color: #1e3bb8 !important; - } + + .searchInput { + border-radius: 4px !important; + } + + .searchButton { + background-color: #2E4CD4 !important; + border-color: #2E4CD4 !important; + border-radius: 4px !important; + + &:hover { + background-color: #1e3bb8 !important; + border-color: #1e3bb8 !important; } } - + } .tableContainer { background: #fff; border-radius: 0px; overflow: hidden; - + .actionButtons { display: flex; gap: 8px; font-size: 10px; justify-content: center; - + .ant-btn-link { padding: 0; height: auto; @@ -81,40 +72,40 @@ // 表格样式优化 .tableContainer { :global { - .ant-table-thead > tr > th { + .ant-table-thead>tr>th { background: #F5F5FA; font-weight: 500; color: #333333; font-size: 14px; text-align: center; } - - .ant-table-tbody > tr > td { + + .ant-table-tbody>tr>td { color: #666666; font-size: 13px; text-align: center; } - - .ant-table-tbody > tr:hover > td { + + .ant-table-tbody>tr:hover>td { background: #f5f5f5; } - + .ant-pagination { margin-top: 10px; text-align: right; } - + // 覆盖操作列按钮样式 .ant-btn.ant-btn-sm { font-size: 13px !important; height: 20px !important; padding: 0px 4px !important; } - + .ant-btn-link.ant-btn-sm { font-size: 13px !important; height: auto !important; padding: 0 !important; } } -} +} \ No newline at end of file From b26199632856fc3887ea0bddb6c82db25debe08b Mon Sep 17 00:00:00 2001 From: jiangxucong Date: Thu, 23 Oct 2025 16:09:59 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=8D=B1=E5=8C=96=E5=93=81=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/HazardousChemicals.js | 194 ++++++++++++++++++ .../components/HazardousChemicals.less | 111 ++++++++++ .../business_emergencyPlan/components/whp.js | 15 -- .../components/whp.less | 21 -- 4 files changed, 305 insertions(+), 36 deletions(-) create mode 100644 src/pages/business_emergencyPlan/components/HazardousChemicals.js create mode 100644 src/pages/business_emergencyPlan/components/HazardousChemicals.less delete mode 100644 src/pages/business_emergencyPlan/components/whp.js delete mode 100644 src/pages/business_emergencyPlan/components/whp.less diff --git a/src/pages/business_emergencyPlan/components/HazardousChemicals.js b/src/pages/business_emergencyPlan/components/HazardousChemicals.js new file mode 100644 index 0000000..f304e44 --- /dev/null +++ b/src/pages/business_emergencyPlan/components/HazardousChemicals.js @@ -0,0 +1,194 @@ +import React, { useState, useEffect } from 'react'; +import { Input, Button, Select, message, Modal, Form } from 'antd'; +import { SearchOutlined, PlusOutlined, DeleteOutlined, EditOutlined } from '@ant-design/icons'; +import StandardTable from '@/components/StandardTable'; +import styles from './HazardousChemicals.less'; + +const { Option } = Select; + +const HazardousChemicals = () => { + const [loading, setLoading] = useState(false); + const [selectedRowKeys, setSelectedRowKeys] = useState([]); + const [searchValue, setSearchValue] = useState(''); + const [pagination, setPagination] = useState({ + current: 1, + pageSize: 10, + total: 48, + showSizeChanger: true, + showQuickJumper: true, + showTotal: (total, range) => `共${total}条`, + }); + + // 模拟数据 + const [dataSource, setDataSource] = useState([ + { + key: '1', + name: '浓硫酸', + type: '化学品', + info: '浓硫酸是一种在工业和实验室中不可或缺的基础化学品,但它同时具有极强腐蚀性...', + }, + { + key: '2', + name: '二氧化碳', + type: '有毒品', + info: '二氧化碳是碳酸盐分解(如汽油、木材、煤炭)在不完全燃烧时产生的气体...', + }, + { + key: '3', + name: '氯氧化钠', + type: '有毒品', + info: '氯氧化钠是一种强氧化剂,俗称“漂粉精”、“火碱”或“烧碱”,它在工业上具有多种用途...', + }, + { + key: '4', + name: '硫酸', + type: '腐蚀品', + info: '硫酸是一种在工业和实验室中不可或缺的基础化学品,但它同时具有极强腐蚀性...', + }, + { + key: '5', + name: '二氧甲烷', + type: '有毒品', + info: '二氧甲烷一种不可燃、易爆易溶的气体或液体,因此对水的溶解能力和活性...', + }, + { + key: '6', + name: '次氯酸钠', + type: '有毒品', + info: '次氯酸钠是一种强氧化剂,具有高效的消毒、漂白和杀菌能力和活性...', + }, + ]); + + // 表格列配置 + const columns = [ + { + title: '危化品名称', + dataIndex: 'name', + key: 'name', + width: 200, + }, + { + title: '危化品类型', + dataIndex: 'type', + key: 'type', + width: 120, + }, + { + title: '危化品信息', + dataIndex: 'info', + key: 'info', + width: 500, + }, + ]; + + // 搜索处理 + const handleSearch = () => { + setLoading(true); + // 模拟搜索请求 + setTimeout(() => { + setLoading(false); + message.success('查询完成'); + }, 1000); + }; + + // 新增处理 + const handleAdd = () => { + message.info('新增功能待实现'); + }; + + // 批量删除处理 + const handleBatchDelete = () => { + if (selectedRowKeys.length === 0) { + message.warning('请选择要删除的数据'); + return; + } + Modal.confirm({ + title: '确认删除', + content: `确定要删除选中的 ${selectedRowKeys.length} 条数据吗?`, + onOk() { + setDataSource(dataSource.filter(item => !selectedRowKeys.includes(item.key))); + setSelectedRowKeys([]); + message.success('删除成功'); + }, + }); + }; + + // 编辑处理 + const handleEdit = (record) => { + message.info(`编辑 ${record.name} 的信息`); + }; + + // 删除处理 + const handleDelete = (record) => { + Modal.confirm({ + title: '确认删除', + content: `确定要删除 ${record.name} 吗?`, + onOk() { + setDataSource(dataSource.filter(item => item.key !== record.key)); + message.success('删除成功'); + }, + }); + }; + + // 分页处理 + const handleTableChange = (pagination) => { + setPagination(pagination); + }; + + return ( +
+ {/* 页面标题 */} +
+
+

危化品

+
+ + {/* 搜索和操作区域 */} +
+ + setSearchValue(e.target.value)} + allowClear + className={styles.searchInput} + /> + + + + +
+ + {/* 数据表格 */} +
+ +
+
+ ); +}; + +export default HazardousChemicals; diff --git a/src/pages/business_emergencyPlan/components/HazardousChemicals.less b/src/pages/business_emergencyPlan/components/HazardousChemicals.less new file mode 100644 index 0000000..ac0aafc --- /dev/null +++ b/src/pages/business_emergencyPlan/components/HazardousChemicals.less @@ -0,0 +1,111 @@ +.container { + padding: 20px; + background: #fff; + height: 100vh; + width: 100%; + box-sizing: border-box; + margin: 0; + max-width: none; +} + +.header { + display: flex; + align-items: center; + margin-bottom: 15px; + + .titleBar { + width: 3px; + height: 16px; + background: #2E4CD4; + margin-right: 12px; + } + + .title { + margin: 0; + font-size: 14px; + font-weight: 500; + color: #333; + } +} + +.searchBar { + margin-bottom: 10px; + padding: 5px; + + + .searchInput { + border-radius: 4px !important; + } + + .searchButton { + background-color: #2E4CD4 !important; + border-color: #2E4CD4 !important; + border-radius: 4px !important; + + &:hover { + background-color: #1e3bb8 !important; + border-color: #1e3bb8 !important; + } + } + +} + +.tableContainer { + background: #fff; + border-radius: 0px; + overflow: hidden; + + .actionButtons { + display: flex; + gap: 8px; + font-size: 10px; + justify-content: center; + + .ant-btn-link { + padding: 0; + height: auto; + font-size: 10px; + } + } +} + +// 表格样式优化 +.tableContainer { + :global { + .ant-table-thead>tr>th { + background: #F5F5FA; + font-weight: 500; + color: #333333; + font-size: 14px; + text-align: center; + } + + .ant-table-tbody>tr>td { + color: #666666; + font-size: 13px; + text-align: center; + } + + .ant-table-tbody>tr:hover>td { + background: #f5f5f5; + } + + .ant-pagination { + margin-top: 10px; + text-align: right; + } + + // 覆盖操作列按钮样式 + .ant-btn.ant-btn-sm { + font-size: 13px !important; + height: 20px !important; + padding: 0px 4px !important; + } + + .ant-btn-link.ant-btn-sm { + font-size: 13px !important; + height: auto !important; + padding: 0 !important; + } + } +} \ No newline at end of file diff --git a/src/pages/business_emergencyPlan/components/whp.js b/src/pages/business_emergencyPlan/components/whp.js deleted file mode 100644 index 623383b..0000000 --- a/src/pages/business_emergencyPlan/components/whp.js +++ /dev/null @@ -1,15 +0,0 @@ -import React from 'react'; -import styles from './whp.less'; - -const Whp = () => { - return ( -
-
-

危化品

-

内容待开发

-
-
- ); -}; - -export default Whp; diff --git a/src/pages/business_emergencyPlan/components/whp.less b/src/pages/business_emergencyPlan/components/whp.less deleted file mode 100644 index 4c5baa2..0000000 --- a/src/pages/business_emergencyPlan/components/whp.less +++ /dev/null @@ -1,21 +0,0 @@ -.container { - padding: 20px; - - .content { - background: #fff; - border-radius: 8px; - padding: 20px; - box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); - - h3 { - margin-bottom: 16px; - color: #333; - font-size: 18px; - } - - p { - color: #666; - font-size: 14px; - } - } -}