中英文切换
This commit is contained in:
@@ -77,9 +77,9 @@ const RealTimeMonitorPage = () => {
|
||||
},
|
||||
{ title: t('common.type'), dataIndex: 'type', render: (t) => <span style={{ fontSize: 13, color: '#666' }}>{t}</span> },
|
||||
{ title: t('workOrder.currentStatus'), dataIndex: 'status', render: getStatusTag },
|
||||
{ title: '实时功率/数据', dataIndex: 'data', render: (d) => <span style={{ fontSize: 13, fontWeight: 500 }}>{d}</span> },
|
||||
{ title: t('page.fixed2RealtimePower'), dataIndex: 'data', render: (d) => <span style={{ fontSize: 13, fontWeight: 500 }}>{d}</span> },
|
||||
{
|
||||
title: '通讯状态', dataIndex: 'communication',
|
||||
title: t('page.statusFixed2'), dataIndex: 'communication',
|
||||
render: (c) => (
|
||||
<Space size={4}>
|
||||
<span style={{ fontSize: 13 }}>{c}</span>
|
||||
@@ -103,8 +103,8 @@ const RealTimeMonitorPage = () => {
|
||||
return (
|
||||
<div style={{ background: '#f8fafc', padding: '8px 0px', 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>
|
||||
<Title level={4} style={{ margin: 0, fontSize: 'clamp(14px, 1.2vw, 18px)' }}>{t('router.realtimeMonitorCenter')}</Title>
|
||||
<Text type="secondary" style={{ fontSize: '12px' }}>{t('page.deviceFixed2StatusAndGeneration')}</Text>
|
||||
</div>
|
||||
<Row gutter={[8, 8]}>
|
||||
{/* 左侧大栏 */}
|
||||
@@ -115,10 +115,10 @@ const RealTimeMonitorPage = () => {
|
||||
title={<span style={{ fontWeight: 800, fontSize: 13 }}>电站拓扑图 (实时)</span>}
|
||||
extra={
|
||||
<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>roles.normal</span>
|
||||
<span style={{ display: 'flex', alignItems: 'center' }}><span style={{ width: 6, height: 6, borderRadius: '50%', background: '#faad14', marginRight: 4 }}></span>constants.sourceAlert</span>
|
||||
<span style={{ display: 'flex', alignItems: 'center' }}><span style={{ width: 6, height: 6, borderRadius: '50%', background: '#888', marginRight: 4 }}></span>devices.offline</span>
|
||||
<span style={{ display: 'flex', alignItems: 'center' }}><span style={{ color: '#1890ff', marginLeft: 4 }}>•• 通讯中</span></span>
|
||||
<span style={{ display: 'flex', alignItems: 'center' }}><span style={{ width: 6, height: 6, borderRadius: '50%', background: '#52c41a', marginRight: 4 }}></span>{t('roles.normal')}</span>
|
||||
<span style={{ display: 'flex', alignItems: 'center' }}><span style={{ width: 6, height: 6, borderRadius: '50%', background: '#faad14', marginRight: 4 }}></span>{t('constants.sourceAlert')}</span>
|
||||
<span style={{ display: 'flex', alignItems: 'center' }}><span style={{ width: 6, height: 6, borderRadius: '50%', background: '#888', marginRight: 4 }}></span>{t('devices.offline')}</span>
|
||||
<span style={{ display: 'flex', alignItems: 'center' }}><span style={{ color: '#1890ff', marginLeft: 4 }}>{t('page.s2')}</span></span>
|
||||
</div>
|
||||
}
|
||||
bordered={false}
|
||||
@@ -137,7 +137,7 @@ const RealTimeMonitorPage = () => {
|
||||
}}
|
||||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
||||
allowFullScreen
|
||||
title="外部系统"
|
||||
title={t('home.s20')}
|
||||
/>*/}
|
||||
|
||||
|
||||
@@ -148,19 +148,19 @@ const RealTimeMonitorPage = () => {
|
||||
|
||||
{/* 设备实时监控列表 */}
|
||||
<Card
|
||||
title={<span style={{ fontWeight: 800, fontSize: 13 }}>设备实时监控列表</span>}
|
||||
title={<span style={{ fontWeight: 800, fontSize: 13 }}>{t('page.fixed2DeviceFixed2RealtimeMonitorListFixed2')}</span>}
|
||||
bordered={false}
|
||||
style={{ ...cardStyle, borderRadius: 8 }}
|
||||
extra={
|
||||
<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>
|
||||
<span style={{ fontSize: 11, color: '#999' }}>{t('page.fixed2AllRecordings56')}</span>
|
||||
<span style={{ fontSize: 11, color: '#52c41a' }}>{t('page.fixed2Normal52')}</span>
|
||||
<span style={{ fontSize: 11, color: '#faad14' }}>{t('page.fixed2Alert1')}</span>
|
||||
<span style={{ fontSize: 11, color: '#999' }}>{t('page.fixed2Offline3')}</span>
|
||||
<Select defaultValue="all" size="small" style={{ width: 90 }}>
|
||||
<Option value="all">全部类型</Option>
|
||||
<Option value="all">{t('devices.allTypes')}</Option>
|
||||
</Select>
|
||||
<Input size="small" placeholder="搜索设备名称" prefix={<SearchOutlined />} style={{ width: 120 }} />
|
||||
<Input size="small" placeholder={t('devices.searchDeviceName')} prefix={<SearchOutlined />} style={{ width: 120 }} />
|
||||
</Space>
|
||||
}
|
||||
>
|
||||
@@ -172,7 +172,7 @@ const RealTimeMonitorPage = () => {
|
||||
size="small"
|
||||
/>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', marginTop: 12, alignItems: 'center' }}>
|
||||
<span style={{ color: '#999', fontSize: 11 }}>共 56 条</span>
|
||||
<span style={{ color: '#999', fontSize: 11 }}>{t('page.56')}</span>
|
||||
<Pagination size="small" total={56} current={1} pageSize={10} showSizeChanger />
|
||||
</div>
|
||||
</Card>
|
||||
@@ -185,12 +185,12 @@ const RealTimeMonitorPage = () => {
|
||||
{/* 6个统计卡片 */}
|
||||
<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 /> },
|
||||
{ title: '电网电压', value: '380.2', unit: 'V', sub: 'A相 380.1 V', color: '#165DFF', icon: <BarChartOutlined /> },
|
||||
{ title: '今日累计发电量', value: '4,752', unit: t('home.kWh'), sub: '昨日 5,000 kWh', color: '#00B42A', icon: <RiseOutlined /> },
|
||||
{ title: '当前辐照度', value: '815', unit: 'W/m²', sub: '较昨日 +5.6%', color: '#faad14', icon: <SunOutlined /> },
|
||||
{ title: '环境温度', value: '28.0', unit: '℃', sub: '较昨日 +1.2 ℃', color: '#165DFF', icon: <CloudOutlined /> },
|
||||
{ title: t('page.fixed2CurrentFixed2TotalPowerFixed2'), value: '812.6', unit: 'kW', sub: '额定功率 1,000 kW', color: '#165DFF', icon: <ThunderboltOutlined /> },
|
||||
{ title: t('page.statusFixed2'), value: '并网正常', unit: '', sub: '频率 50.02 Hz', color: '#00B42A', icon: <CheckCircleOutlined /> },
|
||||
{ title: t('home.gridVoltage'), value: '380.2', unit: 'V', sub: 'A相 380.1 V', color: '#165DFF', icon: <BarChartOutlined /> },
|
||||
{ title: t('page.fixed2TodayAccumulatedBatteryFixed2'), value: '4,752', unit: t('home.kWh'), sub: '昨日 5,000 kWh', color: '#00B42A', icon: <RiseOutlined /> },
|
||||
{ title: t('home.currentIrradiance'), value: '815', unit: 'W/m²', sub: '较昨日 +5.6%', color: '#faad14', icon: <SunOutlined /> },
|
||||
{ title: t('home.ambientTemperature'), 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%', borderRadius: 8 }} bodyStyle={{ padding: '8px' }}>
|
||||
@@ -211,7 +211,7 @@ const RealTimeMonitorPage = () => {
|
||||
</Row>
|
||||
|
||||
{/* 实时功率曲线 */}
|
||||
<Card title={<span style={{ fontWeight: 800 }}>实时功率曲线</span>} extra={<Select defaultValue="today" size="small"><Option value="today">今天</Option></Select>} bordered={false} style={cardStyle} bodyStyle={{ padding: '12px' }}>
|
||||
<Card title={<span style={{ fontWeight: 800 }}>{t('page.powerCurveFixed2')}</span>} extra={<Select defaultValue="today" size="small"><Option value="today">{t('page.s11')}</Option></Select>} bordered={false} style={cardStyle} bodyStyle={{ padding: '12px' }}>
|
||||
<UniversalLineChart
|
||||
height={180}
|
||||
data={powerTrendData}
|
||||
@@ -253,7 +253,7 @@ const RealTimeMonitorPage = () => {
|
||||
{/* 热力图与在线率 */}
|
||||
<Row gutter={8}>
|
||||
<Col span={12}>
|
||||
<Card title={<span style={{ fontWeight: 800 }}>组串电流热力图 (单位: A)</span>} extra={<Select defaultValue="a" size="small" style={{ width: 60 }}><Option value="a">电流</Option></Select>} bordered={false} style={cardStyle} bodyStyle={{ padding: '12px' }}>
|
||||
<Card title={<span style={{ fontWeight: 800 }}>组串电流热力图 (单位: A)</span>} extra={<Select defaultValue="a" size="small" style={{ width: 60 }}><Option value="a">{t('page.s12')}</Option></Select>} bordered={false} style={cardStyle} bodyStyle={{ padding: '12px' }}>
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: 4 }}>
|
||||
{['INV-01', 'INV-02', 'INV-03', 'INV-04', 'INV-05'].map((name, i) => (
|
||||
<div key={i} style={{ display: 'flex', alignItems: 'center', gap: 4 }}>
|
||||
@@ -292,7 +292,7 @@ const RealTimeMonitorPage = () => {
|
||||
</Card>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Card title={<span style={{ fontWeight: 800 }}>设备在线率</span>} bordered={false} style={{ ...cardStyle, height: "100%" }} bodyStyle={{ padding: '12px' }}>
|
||||
<Card title={<span style={{ fontWeight: 800 }}>{t('devices.deviceOnlineRate')}</span>} bordered={false} style={{ ...cardStyle, height: "100%" }} bodyStyle={{ padding: '12px' }}>
|
||||
<div style={{ position: 'relative', height: 160 }}>
|
||||
<UniversalPieChart
|
||||
height={160}
|
||||
@@ -321,14 +321,14 @@ const RealTimeMonitorPage = () => {
|
||||
/>
|
||||
<div style={{ position: 'absolute', top: '50%', left: '50%', transform: 'translate(-50%, -50%)', textAlign: 'center' }}>
|
||||
<div style={{ fontSize: 16, fontWeight: 800 }}>92.1%</div>
|
||||
<div style={{ fontSize: 10, color: '#999' }}>在线率</div>
|
||||
<div style={{ fontSize: 10, color: '#999' }}>{t('devices.statOnlineRate')}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style={{ fontSize: 10, display: 'flex', flexWrap: 'wrap', gap: 8, marginTop: 8 }}>
|
||||
<span style={{ display: 'flex', alignItems: 'center' }}><span style={{ width: 6, height: 6, borderRadius: '50%', background: '#52c41a', marginRight: 4 }}></span>在线 52 (92.1%)</span>
|
||||
<span style={{ display: 'flex', alignItems: 'center' }}><span style={{ width: 6, height: 6, borderRadius: '50%', background: '#f5f5f5', marginRight: 4 }}></span>离线 3 (5.3%)</span>
|
||||
<span style={{ display: 'flex', alignItems: 'center' }}><span style={{ width: 6, height: 6, borderRadius: '50%', background: '#faad14', marginRight: 4 }}></span>告警 1 (1.8%)</span>
|
||||
<span style={{ display: 'flex', alignItems: 'center' }}><span style={{ width: 6, height: 6, borderRadius: '50%', background: '#999', marginRight: 4 }}></span>总数 56</span>
|
||||
<span style={{ display: 'flex', alignItems: 'center' }}><span style={{ width: 6, height: 6, borderRadius: '50%', background: '#999', marginRight: 4 }}></span>{t('page.56')}</span>
|
||||
</div>
|
||||
<div style={{ width: '100%', height: '100%', background: `url(${bgMain}) center/cover no-repeat`, position: 'relative' }}>
|
||||
{/* 简易地图点位 */}
|
||||
|
||||
Reference in New Issue
Block a user