Compare commits

...

2 Commits

Author SHA1 Message Date
wangyunfei 0a7149a8b9 消防 1 week ago
wangyunfei ab7646fd20 页面 2 weeks ago

@ -0,0 +1,4 @@
<svg width="34" height="34" viewBox="0 0 34 34" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="34" height="34" rx="4" fill="#EA4336"/>
<path d="M21.7176 13.3842C30.1381 23.6868 18.2476 26.6263 18.2476 26.6263C18.2476 26.6263 20.7228 23.19 18.2476 21.2353C15.7728 19.2805 16.266 17.2942 16.266 17.2942C9.82757 21.2353 14.7781 26.6111 14.7781 26.6111C4.86967 22.2126 9.83599 16.3247 12.3107 14.3621C14.786 12.3989 15.2791 7 15.2791 7C20.2297 8.96316 20.2297 14.8821 20.2297 14.8821L21.7176 13.3847V13.3842Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 542 B

@ -0,0 +1,16 @@
<svg width="34" height="34" viewBox="0 0 34 34" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="34" height="34" rx="4" fill="#F9AA00"/>
<g clip-path="url(#clip0_1547_21889)">
<g clip-path="url(#clip1_1547_21889)">
<path d="M25.5683 25.5412C25.1939 25.2135 24.8639 24.9068 24.4794 24.6635C23.3939 23.9746 23.0439 24.0079 22.1705 24.9079L22.1383 24.9412C20.8939 26.2035 19.2839 26.2079 18.045 24.9546C16.9983 23.8935 16.9883 23.8868 15.9183 24.9646C15.3572 25.5279 14.7161 25.8701 13.8628 25.8757C12.8383 25.8757 12.1783 25.3312 11.5661 24.6646C11.0572 24.109 10.7783 24.0568 10.0461 24.309C9.70331 24.4274 9.39181 24.6219 9.13498 24.8779C8.89276 25.1146 8.65387 25.3546 8.41609 25.5935C7.86943 25.2524 7.51387 24.789 7.00054 24.5068L6.99609 24.4179C7.27276 24.169 7.55054 23.9212 7.82498 23.6701C8.41392 23.1146 9.14687 22.7354 9.94054 22.5757C11.0772 22.3468 12.0728 22.5424 12.8416 23.4257C13.7439 24.4612 14.0739 24.4135 14.9094 23.4301C15.8128 22.3524 17.4728 22.1679 18.6183 23.0179C18.7905 23.1457 18.9439 23.2924 19.0772 23.4557C19.9039 24.4401 20.2772 24.4001 21.0805 23.4668C21.8828 22.5324 22.9072 22.3157 24.0994 22.6112C24.1883 22.6324 24.1039 22.6301 24.2194 22.6557V21.039H21.4416V19.4224H24.2194V16.7301H21.4416V15.1135H24.2194V12.4201H21.4416V10.8035H25.8861C25.8861 10.8035 25.9172 18.6812 25.8861 23.1946C25.8861 23.809 26.4661 24.1112 26.9972 24.4168V24.5079L25.5683 25.5412ZM14.8116 19.6935C13.0183 20.2624 11.375 19.9335 10.015 18.6924C8.67721 17.4701 8.26498 15.9568 8.8672 14.2924C9.70943 11.9646 11.2339 10.0357 13.025 8.27458C13.0989 8.21331 13.1773 8.1576 13.2594 8.10791C13.3572 8.16902 13.4494 8.23569 13.5372 8.30791C15.275 10.029 16.7616 11.9112 17.6139 14.1668C18.4883 16.4912 17.2483 18.919 14.8105 19.6935H14.8116Z" fill="white"/>
</g>
</g>
<defs>
<clipPath id="clip0_1547_21889">
<rect width="20" height="20" fill="white" transform="translate(7 7)"/>
</clipPath>
<clipPath id="clip1_1547_21889">
<rect width="20" height="20" fill="white" transform="translate(7 7)"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

@ -0,0 +1,4 @@
<svg width="34" height="34" viewBox="0 0 34 34" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="34" height="34" rx="4" fill="#EA4336"/>
<path d="M26.3576 22.7827L18.404 8.94745C18.2687 8.71308 18.074 8.51845 17.8396 8.38309C17.6053 8.24773 17.3394 8.1764 17.0687 8.17627C16.5193 8.17627 16.0111 8.47039 15.7346 8.94745L7.79051 22.7822C7.65713 23.0106 7.58782 23.2707 7.58989 23.5352C7.59196 23.7997 7.66533 24.0588 7.80228 24.2851C7.93852 24.5108 8.13363 24.6952 8.36668 24.8185C8.59973 24.9419 8.86194 24.9994 9.12522 24.9851H25.024C25.2874 24.9995 25.5498 24.942 25.7829 24.8187C26.0161 24.6954 26.2113 24.5109 26.3476 24.2851C26.4845 24.0588 26.5579 23.7997 26.56 23.5352C26.562 23.2707 26.4927 23.0106 26.3593 22.7822L26.3576 22.7833V22.7827ZM17.1299 23.0145C16.9768 23.014 16.8253 22.9833 16.6841 22.9242C16.5428 22.8651 16.4146 22.7788 16.3067 22.6701C16.1988 22.5615 16.1134 22.4326 16.0553 22.291C15.9972 22.1493 15.9676 21.9976 15.9682 21.8445C15.9682 21.1992 16.4893 20.6763 17.1317 20.6763C17.4338 20.6879 17.7196 20.8164 17.9288 21.0346C18.138 21.2529 18.2542 21.5439 18.2529 21.8463C18.2532 22.1484 18.1363 22.4388 17.9267 22.6564C17.7171 22.874 17.4313 23.0018 17.1293 23.0127L17.1299 23.0145ZM18.3087 18.4298C18.3089 18.7386 18.1867 19.0349 17.9688 19.2538C17.7509 19.4726 17.4552 19.5962 17.1464 19.5974C16.9959 19.5965 16.8471 19.5653 16.7089 19.5058C16.5707 19.4463 16.4458 19.3597 16.3417 19.251C16.2371 19.1419 16.1553 19.0132 16.1011 18.8722C16.0469 18.7312 16.0213 18.5808 16.0258 18.4298V13.5233C16.021 13.3722 16.0465 13.2216 16.1006 13.0804C16.1547 12.9392 16.2365 12.8102 16.3411 12.701C16.4453 12.592 16.5703 12.5052 16.7088 12.4456C16.8472 12.3859 16.9962 12.3548 17.147 12.3539C17.7882 12.3539 18.3087 12.8774 18.3105 13.5233V18.4304H18.3087V18.4298Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

@ -0,0 +1,4 @@
<svg width="34" height="34" viewBox="0 0 34 34" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="34" height="34" rx="4" fill="#F9AA00"/>
<path d="M25.785 14.611C25.3102 13.4594 24.6205 12.411 23.7526 11.5215C22.8803 10.6428 21.8469 9.9424 20.7061 9.46115C19.5352 8.95411 18.274 8.69415 17 8.6963C15.726 8.69415 14.4649 8.95411 13.294 9.46115C12.1553 9.94454 11.1219 10.6449 10.2496 11.5215C9.38165 12.411 8.69201 13.4594 8.21935 14.611C7.71661 15.799 7.4588 17.0795 7.46095 18.3707C7.46095 19.7092 7.71876 20.9789 8.22794 22.1713C8.72638 23.3465 9.44826 24.41 10.357 25.3037H23.643C24.5518 24.41 25.2758 23.3465 25.7721 22.1713C26.2834 20.9725 26.5434 19.677 26.5369 18.3707C26.5434 17.0795 26.2856 15.8012 25.785 14.611ZM19.258 15.9645L18.4158 20.0551C18.6522 20.4912 18.6908 21.0348 18.4695 21.5225C18.1043 22.3281 17.1762 22.6783 16.3963 22.3024C15.6143 21.9264 15.277 20.9682 15.6422 20.1604C15.8635 19.6727 16.2889 19.3547 16.7658 19.2602L19.258 15.9645ZM25.2393 20.1088C25.2393 20.5084 24.9149 20.835 24.5152 20.835H22.4184C22.0188 20.835 21.6943 20.5106 21.6943 20.1088C21.6943 19.7092 22.0188 19.3826 22.4184 19.3826H24.5152C24.9149 19.3826 25.2393 19.7092 25.2393 20.1088ZM21.7652 16.4199C21.4817 16.7035 21.024 16.7035 20.7404 16.4199C20.4568 16.1363 20.4568 15.6766 20.7404 15.3951L22.2229 13.9106C22.5065 13.627 22.9641 13.627 23.2477 13.9106C23.5313 14.1942 23.5313 14.6539 23.2477 14.9354L21.7652 16.4199ZM16.334 13.9277V11.8287C16.334 11.4291 16.6584 11.1026 17.058 11.1026C17.4576 11.1026 17.782 11.427 17.782 11.8287V13.9277C17.782 14.3274 17.4576 14.6539 17.058 14.6539C16.6584 14.6539 16.334 14.3274 16.334 13.9277ZM13.3735 15.3908C13.657 15.6744 13.657 16.1342 13.3735 16.4156C13.0899 16.6992 12.6322 16.6992 12.3486 16.4156L10.8662 14.9311C10.5826 14.6475 10.5826 14.1877 10.8662 13.9063C11.1498 13.6227 11.6074 13.6227 11.891 13.9063L13.3735 15.3908ZM12.4174 20.1045C12.4174 20.5041 12.093 20.8307 11.6934 20.8307H9.5965C9.19689 20.8307 8.87247 20.5063 8.87247 20.1045C8.87247 19.7049 9.19689 19.3783 9.5965 19.3783H11.6934C12.093 19.3805 12.4174 19.7049 12.4174 20.1045Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

@ -1,28 +1,24 @@
import React, { useEffect, useRef, useState } from 'react'; import React, { useEffect, useRef, useState } from 'react';
import { Card, Result, Select, Button, Segmented } from 'antd'; import { Card, Result, Select, Button, Segmented ,Input} from 'antd';
import { CheckCircleOutlined, ExportOutlined } from '@ant-design/icons'; import { CheckCircleOutlined, ExportOutlined, SearchOutlined } from '@ant-design/icons';
import * as echarts from 'echarts'; import * as echarts from 'echarts';
import StandardTable from '@/components/StandardTable'; import StandardTable from '@/components/StandardTable';
import styles from './RealtimeMonitoring.less'; import styles from './RealtimeMonitoring.less';
// import './RealtimeMonitoring.less';
import eqicon1 from '@/assets/business_basic/eqicon1.png'; import eqicon1 from '@/assets/business_basic/eqicon1.png';
// import eqicon2 from '@/assets/business_basic/eqicon2.png';
// import eqicon3 from '@/assets/business_basic/eqicon3.png';
// import eqicon4 from '@/assets/business_basic/eqicon4.png';
import eqicon2 from '@/assets/business_basic/iconre1.svg'; import eqicon2 from '@/assets/business_basic/iconre1.svg';
import eqicon3 from '@/assets/business_basic/iconre2.svg'; import eqicon3 from '@/assets/business_basic/iconre2.svg';
import eqicon4 from '@/assets/business_basic/iconre3.svg'; import eqicon4 from '@/assets/business_basic/iconre3.svg';
// import eqicon4 from '@/assets/business_basic/iconre1.svg';
import ssbj1 from '@/assets/business_basic/ssbj1.svg';
import ssbj2 from '@/assets/business_basic/ssbj2.svg';
import ssbj3 from '@/assets/business_basic/ssbj3.svg';
import ssbj4 from '@/assets/business_basic/ssbj4.svg';
const RealtimeMonitoring = () => { const RealtimeMonitoring = () => {
const chartRef = useRef(null); const chartRef = useRef(null);
const pieChartRef = useRef(null); const pieChartRef = useRef(null);
const faultPieChartRef = useRef(null);
const [selectedRowKeys, setSelectedRowKeys] = useState([]); const [selectedRowKeys, setSelectedRowKeys] = useState([]);
const [selectedRows, setSelectedRows] = useState([]); const [selectedRows, setSelectedRows] = useState([]);
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
@ -100,73 +96,6 @@ const RealtimeMonitoring = () => {
} }
}, []); }, []);
// 故障类型饼图初始化
useEffect(() => {
if (faultPieChartRef.current) {
const faultPieChart = echarts.init(faultPieChartRef.current);
const faultPieOption = {
color: ['#FF3E48', '#FF8800', '#FFC403'],
legend: {
orient: 'vertical',
right: '10%',
top: 'center',
itemWidth: 8,
itemHeight: 8,
textStyle: {
fontSize: 12,
color: '#333'
}
},
series: [{
name: '设备故障类型',
type: 'pie',
radius: '70%',
center: ['35%', '50%'],
avoidLabelOverlap: false,
label: {
show: true,
position: 'outside',
formatter: '{b}: {c}',
fontSize: 12
},
emphasis: {
label: {
show: true,
fontSize: '14',
fontWeight: 'bold'
}
},
labelLine: {
show: true
},
data: [
{ value: 120, name: '紧急' },
{ value: 80, name: '重要' },
{ value: 60, name: '一般' }
]
}]
};
faultPieChart.setOption(faultPieOption);
// 响应式调整
const handleFaultPieResize = () => {
if (faultPieChart && !faultPieChart.isDisposed()) {
faultPieChart.resize();
}
};
window.addEventListener('resize', handleFaultPieResize);
return () => {
window.removeEventListener('resize', handleFaultPieResize);
if (faultPieChart && !faultPieChart.isDisposed()) {
faultPieChart.dispose();
}
};
}
}, []);
useEffect(() => { useEffect(() => {
if (chartRef.current) { if (chartRef.current) {
@ -204,25 +133,38 @@ const RealtimeMonitoring = () => {
xAxis: { xAxis: {
type: 'category', type: 'category',
boundaryGap: false, boundaryGap: false,
data: ['9:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00', '17:00', '18:00', '19:00', '20:00'], data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
axisLabel: { axisLabel: {
fontSize: 10 fontSize: 10
},
splitLine: {
show: true,
lineStyle: {
type: 'dashed'
}
} }
}, },
yAxis: { yAxis: {
type: 'value', type: 'value',
min: 0, min: 0,
max: 30, max: 10,
interval: 2,
axisLabel: { axisLabel: {
formatter: '{value}', formatter: '{value}',
fontSize: 10 fontSize: 10
},
splitLine: {
show: true,
lineStyle: {
type: 'dashed'
}
} }
}, },
series: [ series: [
{ {
name: '消防水泵1', name: '故障报警',
type: 'line', type: 'line',
smooth: false, smooth: true,
lineStyle: { lineStyle: {
width: 2, width: 2,
color: '#8979FF' color: '#8979FF'
@ -247,15 +189,15 @@ const RealtimeMonitoring = () => {
borderColor: '#8979FF', borderColor: '#8979FF',
borderWidth: 1 borderWidth: 1
}, },
data: [12, 15, 18, 14, 16, 20, 22, 19, 17, 21, 23, 25] data: [3, 5, 4, 6, 7, 5, 4]
}, },
{ {
name: '消防水泵2', name: '火灾报警',
type: 'line', type: 'line',
smooth: false, smooth: true,
lineStyle: { lineStyle: {
width: 2, width: 2,
color: '#3CC3DF' color: '#FF928A'
}, },
areaStyle: { areaStyle: {
color: { color: {
@ -265,8 +207,8 @@ const RealtimeMonitoring = () => {
x2: 0, x2: 0,
y2: 1, y2: 1,
colorStops: [ colorStops: [
{ offset: 0, color: 'rgba(60, 195, 223, 0.3)' }, { offset: 0, color: 'rgba(255, 146, 138, 0.3)' },
{ offset: 1, color: 'rgba(60, 195, 223, 0.05)' } { offset: 1, color: 'rgba(255, 146, 138, 0.05)' }
] ]
} }
}, },
@ -274,10 +216,10 @@ const RealtimeMonitoring = () => {
symbolSize: 4, symbolSize: 4,
itemStyle: { itemStyle: {
color: '#fff', color: '#fff',
borderColor: '#3CC3DF', borderColor: '#FF928A',
borderWidth: 1 borderWidth: 1
}, },
data: [8, 11, 14, 10, 13, 17, 19, 16, 14, 18, 20, 22] data: [2, 3, 4, 3, 5, 4, 3]
} }
] ]
}; };
@ -397,13 +339,7 @@ const RealtimeMonitoring = () => {
width: 110, width: 110,
}, },
{ {
title: '型号规格', title: '所在位置',
dataIndex: 'modelSpec',
key: 'modelSpec',
width: 140,
},
{
title: '安装位置',
dataIndex: 'installLocation', dataIndex: 'installLocation',
key: 'installLocation', key: 'installLocation',
width: 200, width: 200,
@ -445,20 +381,9 @@ const RealtimeMonitoring = () => {
width: 140, width: 140,
render: (_, record) => ( render: (_, record) => (
<div> <div>
<Button type="link" size="small" style={{ <Button type="link" size="small" style={{
padding: '2px 8px', padding: '2px 8px',
fontSize: 12,
marginRight: 8,
border: '1px solid #E6E9FB',
backgroundColor: 'transparent',
borderRadius: '4px'
}}>
编辑
</Button>
<Button type="link" size="small" style={{
padding: '2px 8px',
fontSize: 12, fontSize: 12,
border: '1px solid #E6E9FB',
backgroundColor: 'transparent', backgroundColor: 'transparent',
borderRadius: '4px' borderRadius: '4px'
}}> }}>
@ -474,9 +399,8 @@ const RealtimeMonitoring = () => {
{ {
key: '1', key: '1',
id: '001', id: '001',
deviceId: 'HQ-XF-01-001', deviceId: 'DEV2024001',
deviceName: '消防水泵', deviceName: '烟雾探测器',
modelSpec: 'XBD5.0/30-125',
installLocation: '总部大楼1层大厅', installLocation: '总部大楼1层大厅',
status: '故障', status: '故障',
lastMaintenance: '2025-09-10', lastMaintenance: '2025-09-10',
@ -484,9 +408,8 @@ const RealtimeMonitoring = () => {
{ {
key: '2', key: '2',
id: '002', id: '002',
deviceId: 'HQ-XF-01-001', deviceId: 'DEV2024002',
deviceName: '消防水泵', deviceName: '烟雾探测器',
modelSpec: 'XBD5.0/30-125',
installLocation: '总部大楼3层 东区', installLocation: '总部大楼3层 东区',
status: '预警', status: '预警',
lastMaintenance: '2025-09-10', lastMaintenance: '2025-09-10',
@ -494,9 +417,8 @@ const RealtimeMonitoring = () => {
{ {
key: '3', key: '3',
id: '003', id: '003',
deviceId: 'HQ-XF-01-001', deviceId: 'DEV2024003',
deviceName: '消防水泵', deviceName: '消防栓',
modelSpec: 'XBD5.0/30-125',
installLocation: '总部大楼地下一层', installLocation: '总部大楼地下一层',
status: '正常', status: '正常',
lastMaintenance: '2025-09-10', lastMaintenance: '2025-09-10',
@ -504,9 +426,8 @@ const RealtimeMonitoring = () => {
{ {
key: '4', key: '4',
id: '004', id: '004',
deviceId: 'HQ-XF-01-001', deviceId: 'DEV2024001',
deviceName: '消防水泵', deviceName: '消防水泵',
modelSpec: 'XBD5.0/30-125',
installLocation: '总部大楼地下一层', installLocation: '总部大楼地下一层',
status: '故障', status: '故障',
lastMaintenance: '2025-09-10', lastMaintenance: '2025-09-10',
@ -514,9 +435,8 @@ const RealtimeMonitoring = () => {
{ {
key: '5', key: '5',
id: '005', id: '005',
deviceId: 'HQ-XF-01-001', deviceId: 'DEV2024005',
deviceName: '消防水泵', deviceName: '消防水泵',
modelSpec: 'XBD5.0/30-125',
installLocation: '总部大楼地下一层', installLocation: '总部大楼地下一层',
status: '正常', status: '正常',
lastMaintenance: '2025-09-10', lastMaintenance: '2025-09-10',
@ -524,9 +444,8 @@ const RealtimeMonitoring = () => {
{ {
key: '6', key: '6',
id: '006', id: '006',
deviceId: 'HQ-XF-01-001', deviceId: 'DEV2024006',
deviceName: '消防水泵', deviceName: '消防水泵',
modelSpec: 'XBD5.0/30-125',
installLocation: '总部大楼地下一层', installLocation: '总部大楼地下一层',
status: '预警', status: '预警',
lastMaintenance: '2025-09-10', lastMaintenance: '2025-09-10',
@ -534,9 +453,8 @@ const RealtimeMonitoring = () => {
{ {
key: '7', key: '7',
id: '007', id: '007',
deviceId: 'HQ-XF-01-001', deviceId: 'DEV2024007',
deviceName: '消防水泵', deviceName: '消防水泵',
modelSpec: 'XBD5.0/30-125',
installLocation: '总部大楼地下一层', installLocation: '总部大楼地下一层',
status: '故障', status: '故障',
lastMaintenance: '2025-09-10', lastMaintenance: '2025-09-10',
@ -544,9 +462,8 @@ const RealtimeMonitoring = () => {
{ {
key: '8', key: '8',
id: '008', id: '008',
deviceId: 'HQ-XF-01-001', deviceId: 'DEV2024008',
deviceName: '消防水泵', deviceName: '消防水泵',
modelSpec: 'XBD5.0/30-125',
installLocation: '总部大楼地下一层', installLocation: '总部大楼地下一层',
status: '正常', status: '正常',
lastMaintenance: '2025-09-10', lastMaintenance: '2025-09-10',
@ -554,9 +471,8 @@ const RealtimeMonitoring = () => {
{ {
key: '9', key: '9',
id: '009', id: '009',
deviceId: 'HQ-XF-01-001', deviceId: 'DEV2024009',
deviceName: '消防水泵', deviceName: '消防水泵',
modelSpec: 'XBD5.0/30-125',
installLocation: '总部大楼地下一层', installLocation: '总部大楼地下一层',
status: '预警', status: '预警',
lastMaintenance: '2025-09-10', lastMaintenance: '2025-09-10',
@ -564,9 +480,8 @@ const RealtimeMonitoring = () => {
{ {
key: '10', key: '10',
id: '010', id: '010',
deviceId: 'HQ-XF-01-001', deviceId: 'DEV2024010',
deviceName: '消防水泵', deviceName: '消防水泵',
modelSpec: 'XBD5.0/30-125',
installLocation: '总部大楼地下一层', installLocation: '总部大楼地下一层',
status: '故障', status: '故障',
lastMaintenance: '2025-09-10', lastMaintenance: '2025-09-10',
@ -574,9 +489,8 @@ const RealtimeMonitoring = () => {
{ {
key: '11', key: '11',
id: '011', id: '011',
deviceId: 'HQ-XF-01-001', deviceId: 'DEV2024011',
deviceName: '消防水泵', deviceName: '消防水泵',
modelSpec: 'XBD5.0/30-125',
installLocation: '总部大楼地下一层', installLocation: '总部大楼地下一层',
status: '正常', status: '正常',
lastMaintenance: '2025-09-10', lastMaintenance: '2025-09-10',
@ -584,9 +498,8 @@ const RealtimeMonitoring = () => {
{ {
key: '12', key: '12',
id: '012', id: '012',
deviceId: 'HQ-XF-01-001', deviceId: 'DEV2024012',
deviceName: '消防水泵', deviceName: '消防水泵',
modelSpec: 'XBD5.0/30-125',
installLocation: '总部大楼地下一层', installLocation: '总部大楼地下一层',
status: '预警', status: '预警',
lastMaintenance: '2025-09-10', lastMaintenance: '2025-09-10',
@ -708,39 +621,58 @@ const RealtimeMonitoring = () => {
<div className={styles.realtimeTitleIcon}></div> <div className={styles.realtimeTitleIcon}></div>
设备状态分布 设备状态分布
</div> </div>
</div> </div>
{/* 设备状态饼图 */} {/* 设备状态饼图 */}
<div className={styles.realtimeDeviceStatusChart} ref={pieChartRef}> <div className={styles.realtimeDeviceStatusChart} ref={pieChartRef}>
</div> </div>
</div> </div>
<div className={styles.realtimeMiddleBlock12}> <div className={styles.realtimeMiddleBlock12}>
<div className={styles.realtimeBlock1Header}> <div className={styles.parameterTitle}>
<div className={styles.realtimeBlock1Title}> <div className={styles.realtimeTitleIcon}></div>
<div className={styles.realtimeTitleIcon}></div> 参数实时监测
设备故障类型分布
</div>
<Select
className={styles.realtimeCustomSelect}
style={{
width: 120,
display: 'flex',
alignItems: 'center'
}}
defaultValue="全部区域"
options={[
{ value: '全部区域', label: '全部区域' },
{ value: '部分区域', label: '部分区域' },
]}
/>
</div> </div>
{/* 设备故障类型饼图 */} <div className={styles.parameterGridContainer}>
<div className={styles.realtimeDeviceStatusChart} ref={faultPieChartRef}> <div className={styles.parameterRow}>
<div className={styles.parameterBlock1}>
<div className={styles.warningBadge}>预警</div>
<div className={styles.blockContent}>
<div className={styles.parameterName}>消防水池水位</div>
<div className={styles.parameterValue}>2.35m</div>
<div className={styles.parameterRange}>正常范围: 2.5-4.0m</div>
</div>
</div>
<div className={styles.parameterBlock2}>
<div className={styles.warningBadge}>正常</div>
<div className={styles.blockContent}>
<div className={styles.parameterName}>管网水压</div>
<div className={styles.parameterValue}>0.68MPa</div>
<div className={styles.parameterRange}>正常范围: 0.6-0.8 Mpa</div>
</div>
</div>
</div>
<div className={styles.parameterRow}>
<div className={styles.parameterBlock3}>
<div className={styles.warningBadge}>正常</div>
<div className={styles.blockContent}>
<div className={styles.parameterName}>电器线路电流</div>
<div className={styles.parameterValue}>125 A</div>
<div className={styles.parameterRange}>正常范围: 0-150 A</div>
</div>
</div>
<div className={styles.parameterBlock4}>
<div className={styles.warningBadge}>故障</div>
<div className={styles.blockContent}>
<div className={styles.parameterName}>排烟系统风速</div>
<div className={styles.parameterValue}>8,2m/s</div>
<div className={styles.parameterRange}>正常范围: 10-15 m/s</div>
</div>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -753,44 +685,55 @@ const RealtimeMonitoring = () => {
{/* 第一行块 - 蓝色方块加标题 */} {/* 第一行块 - 蓝色方块加标题 */}
<div className={styles.realtimeLeftBlockTitle}> <div className={styles.realtimeLeftBlockTitle}>
<div className={styles.realtimeTitleIcon}></div> <div className={styles.realtimeTitleIcon}></div>
<div>警信息</div> <div>实时报警信息</div>
</div> </div>
<div className={styles.realtimeDevelopmentContainer}> <div className={styles.realtimeDevelopmentContainer}>
<div className={styles.realtimeDevelopmentBlock1}>
{/* 块A */}
<div className={styles.realtimeDevelopmentBlockA}>
<img src={ssbj1} alt="ssbj1" style={{ width: '30px', height: '30px', marginRight: "10px" }} />
<div className={styles.realtimeLeftContent}> <div className={styles.realtimeLeftContent}>
<div className={styles.realtimeMainText}>灭火器压力不足</div> <div className={styles.realtimeMainText}>灭火器压力不足</div>
<div className={styles.realtimeSubText}>2号楼3层 15分钟前</div> <div className={styles.realtimeSubText} style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
</div> <span>2号楼3层 15分钟前</span>
<div className={styles.realtimeRightContent}> <span style={{ color: '#999', fontSize: '11px' }}>10:23:34</span>
<div className={styles.realtimeImportantTag}>重要</div> </div>
</div> </div>
</div> </div>
<div className={styles.realtimeDevelopmentBlock1}>
{/* 块B */}
<div className={styles.realtimeDevelopmentBlockB}>
<img src={ssbj2} alt="ssbj1" style={{ width: '30px', height: '30px', marginRight: "10px" }} />
<div className={styles.realtimeLeftContent}> <div className={styles.realtimeLeftContent}>
<div className={styles.realtimeMainText}>烟雾探测器电池低电量</div> <div className={styles.realtimeMainText}>烟雾探测器电池低电量</div>
<div className={styles.realtimeSubText}>1号楼5层 1小时前</div> <div className={styles.realtimeSubText} style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
</div> <span>1号楼5层 1小时前</span>
<div className={styles.realtimeRightContent}> <span style={{ color: '#999', fontSize: '11px' }}>09:15:22</span>
<div className={styles.realtimeImportantTag}>重要</div> </div>
</div> </div>
</div> </div>
<div className={styles.realtimeDevelopmentBlock1}>
{/* 块C */}
<div className={styles.realtimeDevelopmentBlockC}>
<img src={ssbj3} alt="ssbj1" style={{ width: '30px', height: '30px', marginRight: "10px" }} />
<div className={styles.realtimeLeftContent}> <div className={styles.realtimeLeftContent}>
<div className={styles.realtimeMainText}>消防栓维护到期</div> <div className={styles.realtimeMainText}>消防栓维护到期</div>
<div className={styles.realtimeSubText}>3号楼1层 2小时前</div> <div className={styles.realtimeSubText} style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
</div> <span>3号楼1层 2小时前</span>
<div className={styles.realtimeRightContent}> <span style={{ color: '#999', fontSize: '11px' }}>08:45:18</span>
<div className={styles.realtimeNormalTag}>一般</div> </div>
</div> </div>
</div> </div>
<div className={styles.realtimeDevelopmentBlock1}>
{/* 块D */}
<div className={styles.realtimeDevelopmentBlockD}>
<img src={ssbj4} alt="ssbj1" style={{ width: '30px', height: '30px', marginRight: "10px" }} />
<div className={styles.realtimeLeftContent}> <div className={styles.realtimeLeftContent}>
<div className={styles.realtimeMainText}>应急照明故障</div> <div className={styles.realtimeMainText}>应急照明故障</div>
<div className={styles.realtimeSubText}>地下停车场 3小时前</div> <div className={styles.realtimeSubText} style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
</div> <span>地下停车场 3小时前</span>
<div className={styles.realtimeRightContent}> <span style={{ color: '#999', fontSize: '11px' }}>07:30:45</span>
<div className={styles.realtimeNormalTag}>一般</div> </div>
</div> </div>
</div> </div>
</div> </div>
@ -801,13 +744,27 @@ const RealtimeMonitoring = () => {
<div className={styles.realtimeTableHeader}> <div className={styles.realtimeTableHeader}>
<div className={styles.realtimeTableTitle}> <div className={styles.realtimeTableTitle}>
<div className={styles.realtimeTitleIcon}></div> <div className={styles.realtimeTitleIcon}></div>
<div>消防设备台账</div> <div>实时监控数据</div>
</div> </div>
<div className={styles.realtimeTableActions}> <div className={styles.realtimeTableActions}>
<button className={styles.realtimeActionButton} onClick={handleAddDevice}> <Input
placeholder="搜索设备..."
style={{ width: 180, fontSize: 12, borderRadius: '2px' }}
suffix={<SearchOutlined style={{ color: '#999' }} />}
/>
<button
className={styles.realtimeActionButton}
onClick={handleAddDevice}
style={{
backgroundColor: '#2E4CD4',
color: '#fff',
border: '1px solid #2E4CD4',
borderRadius: '2px'
}}
>
<span className={styles.realtimeButtonIcon}>+</span> <span className={styles.realtimeButtonIcon}>+</span>
<span>新增设备</span> <span>添加设备</span>
</button> </button>
<button className={styles.realtimeActionButton} onClick={handleExportData}> <button className={styles.realtimeActionButton} onClick={handleExportData}>
<span className={styles.realtimeButtonIcon}><ExportOutlined /></span> <span className={styles.realtimeButtonIcon}><ExportOutlined /></span>
@ -835,7 +792,7 @@ const RealtimeMonitoring = () => {
showTotal: (total, range) => showTotal: (total, range) =>
`${total}`, `${total}`,
}} }}
// scroll={{ x: 1200 }} // scroll={{ x: 1200 }}
/> />
</div> </div>
</div> </div>

@ -153,34 +153,7 @@
} }
} }
// .realtimeBlock1Segmented {
// padding: 0;
// margin: 0;
// border: 1px solid #E3E3E3;
// border-radius: 4px;
// height: 28px;
// :global(.ant-segmented) {
// padding: 0;
// margin: 0;
// height: 28px;
// }
// :global(.ant-segmented-item) {
// font-size: 12px;
// padding: 2px 8px;
// height: 26px;
// line-height: 26px;
// display: flex;
// align-items: center;
// justify-content: center;
// }
// :global(.ant-segmented-item-selected) {
// background-color: #1890ff;
// color: #fff;
// }
// }
} }
.realtimeDeviceStatusChart { .realtimeDeviceStatusChart {
@ -194,96 +167,257 @@
} }
.realtimeMiddleBlock12 { .realtimeMiddleBlock12 {
// flex: 1;
width: 30%; width: 30%;
height: 100%; height: 100%;
background-color: #fff; background-color: #fff;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
font-family: PingFang SC;
font-size: 14px;
color: #333333;
padding: 5px 10px 5px 10px;
position: relative;
.realtimeBlock1Header { .parameterTitle {
position: absolute;
top: 5px;
left: 10px;
right: 10px;
display: flex; display: flex;
justify-content: space-between;
align-items: center; align-items: center;
z-index: 10; gap: 8px;
padding: 5px 10px 10px 10px;
font-size: 14px;
font-weight: 500;
color: #333;
.realtimeBlock1Title { .realtimeTitleIcon {
width: 3px;
height: 14px;
background-color: #2E4CD4;
}
}
.parameterGridContainer {
display: flex;
flex-direction: column;
gap: 10px;
margin: 0 10px 10px 10px;
height: 100%; // 减去title高度和margin
.parameterRow {
display: flex; display: flex;
align-items: center; gap: 10px;
gap: 8px; flex: 1;
font-weight: 500;
font-size: 14px;
color: #333333;
.realtimeTitleIcon { .parameterBlock1 {
width: 3px; flex: 1 1 50%;
height: 14px; background-color: #FFF5E9;
background-color: #2E4CD4; border: 1px solid #ECEDFC;
} border-radius: 2px;
} position: relative;
display: flex;
flex-direction: column;
justify-content: center;
padding: 10px;
.warningBadge {
position: absolute;
top: 0;
right: 0;
width: 35px;
height: 20px;
background-color: #FF8800;
border-radius: 2px;
display: flex;
align-items: center;
justify-content: center;
font-size: 12px;
color: #fff;
font-weight: 420;
}
.realtimeBlock1Segmented { .blockContent {
padding: 0; display: flex;
margin: 0; flex-direction: column;
border: 1px solid #E3E3E3; gap: 5px;
border-radius: 4px; margin-left: 5px;
height: 28px; font-family: PingFang SC;
:global(.ant-segmented) { .parameterName {
padding: 0; font-size: 10px;
margin: 0; color: #666666;
height: 28px; font-weight: 400;
}
.parameterValue {
font-size: 16px;
color: #333333;
font-weight: 500;
}
.parameterRange {
font-size: 10px;
color: #666666;
font-weight: 400;
}
}
} }
:global(.ant-segmented-item) { .parameterBlock2 {
font-size: 12px; flex: 1 1 50%;
padding: 2px 8px; background-color: #F3FFF6;
height: 26px; border: 1px solid #ECEDFC;
line-height: 26px; border-radius: 2px;
position: relative;
display: flex; display: flex;
align-items: center; flex-direction: column;
justify-content: center; justify-content: center;
} padding: 10px;
.warningBadge {
position: absolute;
top: 0;
right: 0;
width: 35px;
height: 20px;
background-color: #44BB5F;
border-radius: 2px;
display: flex;
align-items: center;
justify-content: center;
font-size: 12px;
color: #fff;
font-weight: 420;
}
.blockContent {
display: flex;
flex-direction: column;
gap: 5px;
margin-left: 5px;
font-family: PingFang SC;
:global(.ant-segmented-item-selected) { .parameterName {
background-color: #1890ff; font-size: 10px;
color: #fff; color: #666666;
font-weight: 400;
}
.parameterValue {
font-size: 16px;
color: #333333;
font-weight: 500;
}
.parameterRange {
font-size: 10px;
color: #666666;
font-weight: 400;
}
}
} }
}
.realtimeCustomSelect { .parameterBlock3 {
:global(.ant-select-single:not(.ant-select-customize-input) .ant-select-selector) { flex: 1;
height: 26px !important; background-color: #F3FFF6;
display: flex !important; border: 1px solid #ECEDFC;
align-items: center !important; border-radius: 2px;
position: relative;
display: flex;
flex-direction: column;
justify-content: center;
padding: 10px;
.warningBadge {
position: absolute;
top: 0;
right: 0;
width: 35px;
height: 20px;
background-color: #44BB5F;
border-radius: 2px;
display: flex;
align-items: center;
justify-content: center;
font-size: 12px;
color: #fff;
font-weight: 420;
}
.blockContent {
display: flex;
flex-direction: column;
gap: 5px;
margin-left: 5px;
font-family: PingFang SC;
.parameterName {
font-size: 10px;
color: #666666;
font-weight: 400;
}
.parameterValue {
font-size: 16px;
color: #333333;
font-weight: 500;
}
.parameterRange {
font-size: 10px;
color: #666666;
font-weight: 400;
}
}
} }
:global(.ant-select-selection-item) { .parameterBlock4 {
line-height: 24px !important; flex: 1;
// height: 24px !important; background-color: #FFF2F1;
display: flex !important; border: 1px solid #ECEDFC;
align-items: center !important; border-radius: 2px;
position: relative;
display: flex;
flex-direction: column;
justify-content: center;
padding: 10px;
.warningBadge {
position: absolute;
top: 0;
right: 0;
width: 35px;
height: 20px;
background-color: #FF2526;
border-radius: 2px;
display: flex;
align-items: center;
justify-content: center;
font-size: 12px;
color: #fff;
font-weight: 400;
}
.blockContent {
display: flex;
flex-direction: column;
gap: 5px;
margin-left: 5px;
.parameterName {
font-size: 10px;
color: #666666;
font-weight: 400;
}
.parameterValue {
font-size: 16px;
color: #333333;
font-weight: 500;
}
.parameterRange {
font-size: 10px;
color: #666666;
font-weight: 400;
}
}
} }
} }
} }
.realtimeDeviceStatusChart {
position: absolute;
top: 35px;
left: 10px;
right: 10px;
bottom: 10px;
z-index: 10;
}
} }
.realtimeMiddleBlock2 { .realtimeMiddleBlock2 {
@ -303,6 +437,13 @@
align-items: center; align-items: center;
// margin-bottom: 10px; // margin-bottom: 10px;
.realtimeTitleIcon {
width: 3px;
height: 14px;
background-color: #2E4CD4;
}
.realtimeTitleLeft { .realtimeTitleLeft {
display: flex; display: flex;
align-items: center; align-items: center;
@ -311,11 +452,6 @@
font-size: 14px; font-size: 14px;
color: #333333; color: #333333;
.realtimeTitleIcon {
width: 3px;
height: 14px;
background-color: #2E4CD4;
}
} }
} }
@ -386,6 +522,16 @@
display: flex; display: flex;
align-items: center; align-items: center;
width: 100%; width: 100%;
}
.realtimeDevelopmentBlockA {
flex: 1;
background-color: #FFF0EF;
border-radius: 4px;
padding: 15px 20px;
display: flex;
align-items: center;
width: 100%;
.realtimeLeftContent { .realtimeLeftContent {
flex: 1; flex: 1;
@ -413,43 +559,117 @@
} }
} }
.realtimeRightContent { }
flex: 0 0 auto;
.realtimeDevelopmentBlockB {
flex: 1;
background-color: #FFF3DA;
border-radius: 4px;
padding: 15px 20px;
display: flex;
align-items: center;
width: 100%;
.realtimeLeftContent {
flex: 1;
display: flex; display: flex;
justify-content: flex-end; flex-direction: column;
align-items: center; gap: 8px;
padding-right: 10px; min-width: 0;
min-width: 80px;
.realtimeImportantTag { .realtimeMainText {
background-color: #FFE0E2; color: #333333;
color: #FF3E48;
font-size: 14px; font-size: 14px;
font-weight: 500; font-weight: 500;
font-family: PingFang SC; font-family: PingFang SC;
width: 45px; width: 100%;
height: 25px; max-width: 500px;
display: flex; }
align-items: center;
justify-content: center; .realtimeSubText {
border-radius: 4px; color: #666666;
font-size: 12px;
font-weight: 400;
font-family: PingFang SC;
width: 100%;
max-width: 400px;
}
}
}
.realtimeDevelopmentBlockC {
flex: 1;
background-color: #FFF0EF;
border-radius: 4px;
padding: 15px 20px;
display: flex;
align-items: center;
width: 100%;
.realtimeLeftContent {
flex: 1;
display: flex;
flex-direction: column;
gap: 8px;
min-width: 0;
.realtimeMainText {
color: #333333;
font-size: 14px;
font-weight: 500;
font-family: PingFang SC;
width: 100%;
max-width: 500px;
}
.realtimeSubText {
color: #666666;
font-size: 12px;
font-weight: 400;
font-family: PingFang SC;
width: 100%;
max-width: 400px;
} }
}
}
.realtimeNormalTag { .realtimeDevelopmentBlockD {
background-color: #DAF3FF; flex: 1;
color: #00AAFA; background-color: #FFF3DA;
border-radius: 4px;
padding: 15px 20px;
display: flex;
align-items: center;
width: 100%;
.realtimeLeftContent {
flex: 1;
display: flex;
flex-direction: column;
gap: 8px;
min-width: 0;
.realtimeMainText {
color: #333333;
font-size: 14px; font-size: 14px;
font-weight: 500; font-weight: 500;
font-family: PingFang SC; font-family: PingFang SC;
width: 45px; width: 100%;
height: 25px; max-width: 500px;
}
display: flex; .realtimeSubText {
align-items: center; color: #666666;
justify-content: center; font-size: 12px;
border-radius: 4px; font-weight: 400;
font-family: PingFang SC;
width: 100%;
max-width: 400px;
} }
} }
} }
} }
} }
@ -495,9 +715,9 @@
gap: 4px; gap: 4px;
height: 28px; height: 28px;
border: 1px solid #DFE4F6; border: 1px solid #DFE4F6;
border-radius: 4px; border-radius: 2px;
color: #2E4CD4; color: #2E4CD4;
font-weight: 500; font-weight: 400;
font-size: 12px; font-size: 12px;
padding: 0px 8px; padding: 0px 8px;
background: transparent; background: transparent;

@ -59,6 +59,7 @@ const CustomMenuItem = ({ item, selectedKeys }) => {
return renderMenuItem(item); return renderMenuItem(item);
}; };
const SystemContentList = (props) => { const SystemContentList = (props) => {
const dynamicRoute = window.dynamicRoute const dynamicRoute = window.dynamicRoute
console.log(dynamicRoute) console.log(dynamicRoute)
@ -157,6 +158,11 @@ const SystemContentList = (props) => {
history.replace(curKey) history.replace(curKey)
} }
const selectChange = (value) => {
console.log(value)
window.location.href = 'http://localhost:8888/'
}
// 切换菜单收缩状态 // 切换菜单收缩状态
const toggleMenu = () => { const toggleMenu = () => {
setIsMenuCollapsed(!isMenuCollapsed); setIsMenuCollapsed(!isMenuCollapsed);
@ -228,7 +234,7 @@ const SystemContentList = (props) => {
}}> }}>
<Select <Select
value={systemType} value={systemType}
onChange={setSystemType} onChange={selectChange}
style={{ style={{
width: 192, width: 192,
height: 42, height: 42,

Loading…
Cancel
Save