紧凑样式

This commit is contained in:
mmc
2026-05-14 17:23:12 +08:00
parent 6cadb14a9c
commit 995c8c482b
16 changed files with 248 additions and 268 deletions

View File

@@ -97,29 +97,29 @@ const RealTimeMonitorPage = () => {
];
return (
<div style={{ background: '#f8fafc', padding: '16px', minHeight: '100vh', width: '100%', boxSizing: 'border-box' }}>
<div>
<Title level={4} style={{ margin: 0 }}>实时监控中心</Title>
<Text type="secondary">全方位实时掌握电站设备运行状态与发电表现</Text>
<div style={{ background: '#f8fafc', padding: '8px', minHeight: '100vh', width: '100%', boxSizing: 'border-box' }}>
<div style={{ marginBottom: 8 }}>
<Title level={4} style={{ margin: 0, fontSize: 'clamp(14px, 1.2vw, 18px)' }}>实时监控中心</Title>
<Text type="secondary" style={{ fontSize: '12px' }}>全方位实时掌握电站设备运行状态与发电表现</Text>
</div>
<Row gutter={[16, 16]}>
<Row gutter={[8, 8]}>
{/* 左侧大栏 */}
<Col xs={24} xl={16}>
<Space direction="vertical" size={16} style={{ width: '100%' }}>
<Space direction="vertical" size={8} style={{ width: '100%' }}>
{/* 电站拓扑图 */}
<Card
title={<span style={{ fontWeight: 800 }}>电站拓扑图 (实时)</span>}
title={<span style={{ fontWeight: 800, fontSize: 13 }}>电站拓扑图 (实时)</span>}
extra={
<div style={{ display: 'flex', gap: 16, fontSize: 12 }}>
<span style={{ display: 'flex', alignItems: 'center' }}><span style={{ width: 8, height: 8, borderRadius: '50%', background: '#52c41a', marginRight: 4 }}></span>正常</span>
<span style={{ display: 'flex', alignItems: 'center' }}><span style={{ width: 8, height: 8, borderRadius: '50%', background: '#faad14', marginRight: 4 }}></span>告警</span>
<span style={{ display: 'flex', alignItems: 'center' }}><span style={{ width: 8, height: 8, borderRadius: '50%', background: '#888', marginRight: 4 }}></span>离线</span>
<span style={{ display: 'flex', alignItems: 'center' }}><span style={{ color: '#1890ff', marginLeft: 8 }}>•• 通讯中</span></span>
<div style={{ display: 'flex', gap: 12, fontSize: 11 }}>
<span style={{ display: 'flex', alignItems: 'center' }}><span style={{ width: 6, height: 6, borderRadius: '50%', background: '#52c41a', marginRight: 4 }}></span>正常</span>
<span style={{ display: 'flex', alignItems: 'center' }}><span style={{ width: 6, height: 6, borderRadius: '50%', background: '#faad14', marginRight: 4 }}></span>告警</span>
<span style={{ display: 'flex', alignItems: 'center' }}><span style={{ width: 6, height: 6, borderRadius: '50%', background: '#888', marginRight: 4 }}></span>离线</span>
<span style={{ display: 'flex', alignItems: 'center' }}><span style={{ color: '#1890ff', marginLeft: 4 }}>•• 通讯中</span></span>
</div>
}
bordered={false}
style={cardStyle}
bodyStyle={{ padding: 0, position: 'relative', height: 480, overflow: 'hidden' }}
style={{ ...cardStyle, borderRadius: 8 }}
bodyStyle={{ padding: 0, position: 'relative', height: 400, overflow: 'hidden' }}
>
<div style={{ height: "100%", background: '#111827', borderRadius: 8, width: '100%', overflow: 'hidden', position: "relative" }}>
<iframe
@@ -140,19 +140,19 @@ const RealTimeMonitorPage = () => {
{/* 设备实时监控列表 */}
<Card
title={<span style={{ fontWeight: 800 }}>设备实时监控列表</span>}
title={<span style={{ fontWeight: 800, fontSize: 13 }}>设备实时监控列表</span>}
bordered={false}
style={cardStyle}
style={{ ...cardStyle, borderRadius: 8 }}
extra={
<Space>
<span style={{ fontSize: 12, color: '#999' }}>全部 56</span>
<span style={{ fontSize: 12, color: '#52c41a' }}>正常 52</span>
<span style={{ fontSize: 12, color: '#faad14' }}>告警 1</span>
<span style={{ fontSize: 12, color: '#999' }}>离线 3</span>
<Select defaultValue="all" size="small" style={{ width: 100 }}>
<Space size={8}>
<span style={{ fontSize: 11, color: '#999' }}>全部 56</span>
<span style={{ fontSize: 11, color: '#52c41a' }}>正常 52</span>
<span style={{ fontSize: 11, color: '#faad14' }}>告警 1</span>
<span style={{ fontSize: 11, color: '#999' }}>离线 3</span>
<Select defaultValue="all" size="small" style={{ width: 90 }}>
<Option value="all">全部类型</Option>
</Select>
<Input size="small" placeholder="搜索设备名称" prefix={<SearchOutlined />} style={{ width: 150 }} />
<Input size="small" placeholder="搜索设备名称" prefix={<SearchOutlined />} style={{ width: 120 }} />
</Space>
}
>
@@ -161,10 +161,10 @@ const RealTimeMonitorPage = () => {
columns={columns}
dataSource={deviceList}
pagination={false}
size="middle"
size="small"
/>
<div style={{ display: 'flex', justifyContent: 'space-between', marginTop: 16, alignItems: 'center' }}>
<span style={{ color: '#999', fontSize: 12 }}>共 56 条</span>
<div style={{ display: 'flex', justifyContent: 'space-between', marginTop: 12, alignItems: 'center' }}>
<span style={{ color: '#999', fontSize: 11 }}>共 56 条</span>
<Pagination size="small" total={56} current={1} pageSize={10} showSizeChanger />
</div>
</Card>
@@ -173,9 +173,9 @@ const RealTimeMonitorPage = () => {
{/* 右侧小栏 */}
<Col xs={24} xl={8}>
<Space direction="vertical" size={16} style={{ width: '100%' }}>
<Space direction="vertical" size={8} style={{ width: '100%' }}>
{/* 6个统计卡片 */}
<Row gutter={[8, 8]}>
<Row gutter={[4, 4]}>
{[
{ title: '当前总功率', value: '812.6', unit: 'kW', sub: '额定功率 1,000 kW', color: '#165DFF', icon: <ThunderboltOutlined /> },
{ title: '并网状态', value: '并网正常', unit: '', sub: '频率 50.02 Hz', color: '#00B42A', icon: <CheckCircleOutlined /> },
@@ -185,8 +185,8 @@ const RealTimeMonitorPage = () => {
{ title: '环境温度', value: '28.0', unit: '℃', sub: '较昨日 +1.2 ℃', color: '#165DFF', icon: <CloudOutlined /> },
].map((item, idx) => (
<Col span={8} key={idx}>
<Card bordered={false} style={{ ...cardStyle, height: '100%' }} bodyStyle={{ padding: '12px' }}>
<div style={{ display: 'flex', alignItems: 'flex-start', gap: 8 }}>
<Card bordered={false} style={{ ...cardStyle, height: '100%', borderRadius: 8 }} bodyStyle={{ padding: '8px' }}>
<div style={{ display: 'flex', alignItems: 'flex-start', gap: 6 }}>
<div style={{ color: item.color, fontSize: 18 }}>{item.icon}</div>
<div style={{ flex: 1, minWidth: 0 }}>
<div style={{ fontSize: 'clamp(10px, 0.8vw, 11px)', color: '#666', marginBottom: 4, whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}>{item.title}</div>