中英文切换
This commit is contained in:
@@ -17,21 +17,6 @@ import { UniversalLineChart } from "../components/recharts"
|
||||
const { Title, Text } = Typography;
|
||||
|
||||
|
||||
const aiRecommendations = [
|
||||
{ key: '1', measure: '处理热斑组件', priority: '高', expectedGain: '+2.15%', confidence: '92%' },
|
||||
{ key: '2', measure: '排查异常组串', priority: '高', expectedGain: '+1.85%', confidence: '90%' },
|
||||
{ key: '3', measure: '清洗受遮挡区域', priority: '中', expectedGain: '+0.45%', confidence: '78%' },
|
||||
{ key: '4', measure: '跟踪衰减较大组件', priority: '中', expectedGain: '+0.35%', confidence: '86%' },
|
||||
{ key: '5', measure: '持续监控逆变器效率', priority: '低', expectedGain: '+0.10%', confidence: '93%' },
|
||||
];
|
||||
|
||||
const thermalImagingData = [
|
||||
{ name: '方阵 A-05', temp: '71.5℃', id: 'A05', status: 'serious' },
|
||||
{ name: '方阵 A-12', temp: '68.3℃', id: 'A12', status: 'warning' },
|
||||
{ name: '方阵 B-03', temp: '64.8℃', id: 'B03', status: 'warning' },
|
||||
{ name: '方阵 C-07', temp: '67.2℃', id: 'C07', status: 'warning' },
|
||||
];
|
||||
|
||||
const degradationData = [
|
||||
{
|
||||
date: '2024-01',
|
||||
@@ -138,10 +123,25 @@ export default function AIDiagnosisPage() {
|
||||
overflow: 'hidden'
|
||||
};
|
||||
|
||||
const aiRecommendations = [
|
||||
{ key: '1', measure: t('aiAnalysis.handleHotspotComponents'), priority: t('workOrder.high'), expectedGain: '+2.15%', confidence: '92%' },
|
||||
{ key: '2', measure: t('aiAnalysis.checkAbnormalStrings'), priority: t('workOrder.high'), expectedGain: '+1.85%', confidence: '90%' },
|
||||
{ key: '3', measure: t('aiAnalysis.cleanShadedAreas'), priority: t('workOrder.medium'), expectedGain: '+0.45%', confidence: '78%' },
|
||||
{ key: '4', measure: t('aiAnalysis.trackDegradedComponents'), priority: t('workOrder.medium'), expectedGain: '+0.35%', confidence: '86%' },
|
||||
{ key: '5', measure: t('aiAnalysis.monitorInverterEfficiency'), priority: t('workOrder.low'), expectedGain: '+0.10%', confidence: '93%' },
|
||||
];
|
||||
|
||||
const thermalImagingData = [
|
||||
{ name: t('aiAnalysis.arrayLabel', { name: 'A-05' }), temp: '71.5℃', id: 'A05', status: 'serious' },
|
||||
{ name: t('aiAnalysis.arrayLabel', { name: 'A-12' }), temp: '68.3℃', id: 'A12', status: 'warning' },
|
||||
{ name: t('aiAnalysis.arrayLabel', { name: 'B-03' }), temp: '64.8℃', id: 'B03', status: 'warning' },
|
||||
{ name: t('aiAnalysis.arrayLabel', { name: 'C-07' }), temp: '67.2℃', id: 'C07', status: 'warning' },
|
||||
];
|
||||
|
||||
const renderStatusTag = (status: string) => {
|
||||
let color = '';
|
||||
if (status === t('home.abnormal')) color = '#ff4d4f';
|
||||
else if (status === '轻微') color = '#1677ff';
|
||||
else if (status === t('aiAnalysis.minor')) color = '#1677ff';
|
||||
else if (status === t('roles.normal')) color = '#52c41a';
|
||||
return <Tag color={color} style={{ margin: 0, fontWeight: 600 }}>{status}</Tag>;
|
||||
};
|
||||
@@ -149,18 +149,18 @@ export default function AIDiagnosisPage() {
|
||||
// 影响程度标签渲染
|
||||
const renderImpactTag = (impact: string) => {
|
||||
let color = '';
|
||||
if (impact === '高') color = '#ff4d4f';
|
||||
else if (impact === '中') color = '#fa8c16';
|
||||
else if (impact === '低') color = '#52c41a';
|
||||
if (impact === t('workOrder.high')) color = '#ff4d4f';
|
||||
else if (impact === t('workOrder.medium')) color = '#fa8c16';
|
||||
else if (impact === t('workOrder.low')) color = '#52c41a';
|
||||
return <Tag color={color} style={{ margin: 0, fontWeight: 600 }}>{impact}</Tag>;
|
||||
};
|
||||
|
||||
// 优先级标签渲染(建议措施用)
|
||||
const renderPriorityTag = (priority: string) => {
|
||||
let color = '';
|
||||
if (priority === '高') color = '#ff4d4f';
|
||||
else if (priority === '中') color = '#fa8c16';
|
||||
else if (priority === '低') color = '#52c41a';
|
||||
if (priority === t('workOrder.high')) color = '#ff4d4f';
|
||||
else if (priority === t('workOrder.medium')) color = '#fa8c16';
|
||||
else if (priority === t('workOrder.low')) color = '#52c41a';
|
||||
return <Tag color={color} style={{ margin: 0, fontWeight: 600 }}>{priority}</Tag>;
|
||||
};
|
||||
|
||||
@@ -191,24 +191,22 @@ export default function AIDiagnosisPage() {
|
||||
</style>
|
||||
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', paddingBottom: "16px" }}>
|
||||
<Typography.Title level={4} style={{ margin: 0, fontSize: 'clamp(18px, 1.5vw, 24px)', color: '#1D2129' }}>
|
||||
AI 智能诊断与分析中心
|
||||
</Typography.Title>
|
||||
<Typography.Title level={4} style={{ margin: 0, fontSize: 'clamp(18px, 1.5vw, 24px)', color: '#1D2129' }}>{t('aiAnalysis.fixed2Ai2')}</Typography.Title>
|
||||
<Space>
|
||||
<Button icon={<ReloadOutlined />}>刷新数据</Button>
|
||||
<Button type="primary">导出报告</Button>
|
||||
<Button icon={<ReloadOutlined />}>{t('aiAnalysis.fixed2Refresh')}</Button>
|
||||
<Button type="primary">{t('aiAnalysis.fixed2Export')}</Button>
|
||||
</Space>
|
||||
</div>
|
||||
|
||||
{/* 第一排:顶部统计卡片 */}
|
||||
<Row gutter={[8, 8]} style={{ marginBottom: 8 }}>
|
||||
{[
|
||||
{ title: 'PR值 (性能比)', value: '82.6%', trend: '较昨日 -1.3%', icon: <RiseOutlined />, color: '#00B42A', bg: '#E8FFEA', trendColor: '#F53F3F', direction: 'down' },
|
||||
{ title: '发电偏差率', value: '-4.35%', trend: '较昨日 -1.02%', icon: <FallOutlined />, color: '#F53F3F', bg: '#FFF1F0', trendColor: '#F53F3F', direction: 'down' },
|
||||
{ title: '异常组串数量', value: '8', trend: '较昨日 +2 ↑', icon: <AppstoreOutlined />, color: '#1D2129', bg: '#F5F7FA', trendColor: '#F53F3F', direction: 'up' },
|
||||
{ title: '热斑疑似数量', value: '36', trend: '较昨日 +5 ↑', icon: <BellOutlined />, color: '#F53F3F', bg: '#FFF1F0', trendColor: '#F53F3F', direction: 'up' },
|
||||
{ title: '电站健康度评分', value: '86.3', unit: '分', trend: '较昨日 -1.7', icon: <CheckCircleOutlined />, color: '#00B42A', bg: '#E8FFEA', trendColor: '#F53F3F', direction: 'down' },
|
||||
{ title: '预测发电量', value: '4,821', unit: t('home.kWh'), trend: '较昨日 +2.6% ↑', icon: <ThunderboltOutlined />, color: '#165DFF', bg: '#E8F3FF', trendColor: '#00B42A', direction: 'up' },
|
||||
{ title: t('aiAnalysis.prValue'), value: '82.6%', trend: t('devices.vsYesterday', { value: '-1.3%' }), icon: <RiseOutlined />, color: '#00B42A', bg: '#E8FFEA', trendColor: '#F53F3F', direction: 'down' },
|
||||
{ title: t('aiAnalysis.fixed2GenerationDeviation'), value: '-4.35%', trend: t('devices.vsYesterday', { value: '-1.02%' }), icon: <FallOutlined />, color: '#F53F3F', bg: '#FFF1F0', trendColor: '#F53F3F', direction: 'down' },
|
||||
{ title: t('aiAnalysis.fixed2AbnormalStringFixed2QuantityFixed2'), value: '8', trend: t('devices.vsYesterday', { value: '+2 ↑' }), icon: <AppstoreOutlined />, color: '#1D2129', bg: '#F5F7FA', trendColor: '#F53F3F', direction: 'up' },
|
||||
{ title: t('aiAnalysis.fixed2HotspotSuspectFixed2QuantityFixed2'), value: '36', trend: t('devices.vsYesterday', { value: '+5 ↑' }), icon: <BellOutlined />, color: '#F53F3F', bg: '#FFF1F0', trendColor: '#F53F3F', direction: 'up' },
|
||||
{ title: t('aiAnalysis.s25'), value: '86.3', unit: t('aiAnalysis.scoreUnit'), trend: t('devices.vsYesterday', { value: '-1.7' }), icon: <CheckCircleOutlined />, color: '#00B42A', bg: '#E8FFEA', trendColor: '#F53F3F', direction: 'down' },
|
||||
{ title: t('aiAnalysis.fixed2PredictedGeneration'), value: '4,821', unit: t('home.kWh'), trend: t('devices.vsYesterday', { value: '+2.6% ↑' }), icon: <ThunderboltOutlined />, color: '#165DFF', bg: '#E8F3FF', trendColor: '#00B42A', direction: 'up' },
|
||||
].map((item, index) => (
|
||||
<Col key={index} xs={24} sm={12} md={8} xl={4}>
|
||||
<Card
|
||||
@@ -245,8 +243,8 @@ export default function AIDiagnosisPage() {
|
||||
<Row gutter={[12, 12]} style={{ marginBottom: 8 }}>
|
||||
<Col xs={24} lg={10}>
|
||||
<Card
|
||||
title={<span style={{ fontSize: 15, fontWeight: 700, color: '#1D2129' }}>无人机热成像巡检分析<InfoCircleOutlined style={{ marginLeft: 6, color: '#86909C', fontSize: 13 }} /></span>}
|
||||
extra={<Text type="secondary" style={{ fontSize: 12 }}>巡检:2025-05-20 09:30 <CalendarOutlined style={{ marginLeft: 4 }} /></Text>}
|
||||
title={<span style={{ fontSize: 15, fontWeight: 700, color: '#1D2129' }}>{t('aiAnalysis.fixed2UavInspection')}<InfoCircleOutlined style={{ marginLeft: 6, color: '#86909C', fontSize: 13 }} /></span>}
|
||||
extra={<Text type="secondary" style={{ fontSize: 12 }}>{t('aiAnalysis.fixed2Inspection202505200930')}<CalendarOutlined style={{ marginLeft: 4 }} /></Text>}
|
||||
bordered={false}
|
||||
bodyStyle={{ padding: '16px 20px' }}
|
||||
style={{ ...cardStyle, height: '100%' }}
|
||||
@@ -263,7 +261,7 @@ export default function AIDiagnosisPage() {
|
||||
</div>
|
||||
<div style={{ position: 'absolute', top: 6, left: 6 }}>
|
||||
<Tag color={item.status === 'serious' ? 'error' : 'warning'} style={{ margin: 0, fontSize: 9, padding: '0 4px', lineHeight: '14px' }}>
|
||||
{item.status === 'serious' ? '高危' : '注意'}
|
||||
{item.status === 'serious' ? t('aiAnalysis.highDanger') : t('aiAnalysis.attention')}
|
||||
</Tag>
|
||||
</div>
|
||||
</div>
|
||||
@@ -273,11 +271,11 @@ export default function AIDiagnosisPage() {
|
||||
</Row>
|
||||
<div style={{ background: '#f8fafc', padding: '12px 16px', borderRadius: 8, marginTop: 20, display: 'flex', justifyContent: 'space-between', alignItems: 'center', flexWrap: 'wrap', gap: 12 }}>
|
||||
<div style={{ display: 'flex', gap: 16, fontSize: 12 }}>
|
||||
<span style={{ display: 'flex', alignItems: 'center', color: '#1D2129' }}><AimOutlined style={{ color: '#F53F3F', marginRight: 6 }} />热斑疑似点</span>
|
||||
<span style={{ display: 'flex', alignItems: 'center', color: '#1D2129' }}><div style={{ width: 14, height: 10, border: '1.5px dashed #F53F3F', borderRadius: 2, marginRight: 6 }}></div>高温区域</span>
|
||||
<span style={{ display: 'flex', alignItems: 'center', color: '#1D2129' }}><AimOutlined style={{ color: '#F53F3F', marginRight: 6 }} />{t('aiAnalysis.fixed2HotspotSuspect')}</span>
|
||||
<span style={{ display: 'flex', alignItems: 'center', color: '#1D2129' }}><div style={{ width: 14, height: 10, border: '1.5px dashed #F53F3F', borderRadius: 2, marginRight: 6 }}></div>{t('aiAnalysis.areaFixed2')}</span>
|
||||
</div>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 10 }}>
|
||||
<span style={{ fontSize: 12, color: '#86909C' }}>温度分布: 25℃ ~ 85℃</span>
|
||||
<span style={{ fontSize: 12, color: '#86909C' }}>{t('aiAnalysis.fixed2Temperature2585')}</span>
|
||||
<div style={{ width: 120, height: 8, background: 'linear-gradient(to right, #000080, #0000ff, #00ff00, #ffff00, #ff0000)', borderRadius: 4 }} />
|
||||
</div>
|
||||
</div>
|
||||
@@ -285,10 +283,10 @@ export default function AIDiagnosisPage() {
|
||||
</Col>
|
||||
<Col xs={24} lg={14}>
|
||||
<Card
|
||||
title={<span style={{ fontSize: 15, fontWeight: 700, color: '#1D2129' }}>组串实时状态定位图<InfoCircleOutlined style={{ marginLeft: 6, color: '#86909C', fontSize: 13 }} /></span>}
|
||||
title={<span style={{ fontSize: 15, fontWeight: 700, color: '#1D2129' }}>{t('aiAnalysis.status')}<InfoCircleOutlined style={{ marginLeft: 6, color: '#86909C', fontSize: 13 }} /></span>}
|
||||
extra={<Space split={<Divider type="vertical" />} style={{ fontSize: 12, color: '#86909C' }}>
|
||||
<span>总组串: <b style={{ color: '#1D2129' }}>160</b></span>
|
||||
<span>异常: <b style={{ color: '#F53F3F' }}>8</b></span>
|
||||
<span>{t('aiAnalysis.s9')}<b style={{ color: '#1D2129' }}>160</b></span>
|
||||
<span>{t('aiAnalysis.fixed2Abnormal')}<b style={{ color: '#F53F3F' }}>8</b></span>
|
||||
</Space>}
|
||||
bordered={false}
|
||||
bodyStyle={{ padding: '16px 20px' }}
|
||||
@@ -305,20 +303,21 @@ export default function AIDiagnosisPage() {
|
||||
))}
|
||||
{['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H'].map((row) => (
|
||||
<React.Fragment key={row}>
|
||||
<div style={{ fontSize: 11, color: '#86909C', display: 'flex', alignItems: 'center', fontWeight: 600 }}>{row}排</div>
|
||||
<div style={{ fontSize: 11, color: '#86909C', display: 'flex', alignItems: 'center', fontWeight: 600 }}>{row}{t('aiAnalysis.rowUnit')}</div>
|
||||
{Array.from({ length: 20 }).map((_, col) => {
|
||||
let color = '#E8F3FF'; // 正常
|
||||
let color = '#E8F3FF';
|
||||
let icon = null;
|
||||
let tooltip = `组串 ${row}-${col + 1}: 正常`;
|
||||
let statusKey = 'normal';
|
||||
|
||||
// 模拟异常分布
|
||||
if (row === 'B' && col === 3) { color = '#F53F3F'; icon = <div style={{ width: 6, height: 6, background: '#fff', borderRadius: '50%' }} />; tooltip = `组串 ${row}-${col + 1}: 严重异常 (热斑)`; }
|
||||
if (row === 'B' && col === 17) { color = '#F53F3F'; icon = <div style={{ width: 6, height: 6, background: '#fff', borderRadius: '50%' }} />; tooltip = `组串 ${row}-${col + 1}: 严重异常 (断路)`; }
|
||||
if (row === 'C' && col === 15) { color = '#FF7D00'; icon = <div style={{ width: 6, height: 6, background: '#fff', borderRadius: '50%' }} />; tooltip = `组串 ${row}-${col + 1}: 异常 (功率偏差)`; }
|
||||
if (row === 'E' && col === 4) { color = '#FF7D00'; icon = <div style={{ width: 6, height: 6, background: '#fff', borderRadius: '50%' }} />; tooltip = `组串 ${row}-${col + 1}: 异常 (遮挡)`; }
|
||||
if (row === 'F' && col === 11) { color = '#F7BA1E'; icon = <div style={{ width: 6, height: 6, background: '#fff', borderRadius: '50%' }} />; tooltip = `组串 ${row}-${col + 1}: 轻微异常`; }
|
||||
if (row === 'G' && col === 1) { color = '#F7BA1E'; icon = <div style={{ width: 6, height: 6, background: '#fff', borderRadius: '50%' }} />; tooltip = `组串 ${row}-${col + 1}: 轻微异常`; }
|
||||
if (row === 'H' && col === 10) { color = '#86909C'; tooltip = `组串 ${row}-${col + 1}: 离线`; }
|
||||
if (row === 'B' && col === 3) { color = '#F53F3F'; icon = <div style={{ width: 6, height: 6, background: '#fff', borderRadius: '50%' }} />; statusKey = 'seriousHotspot'; }
|
||||
if (row === 'B' && col === 17) { color = '#F53F3F'; icon = <div style={{ width: 6, height: 6, background: '#fff', borderRadius: '50%' }} />; statusKey = 'seriousBreak'; }
|
||||
if (row === 'C' && col === 15) { color = '#FF7D00'; icon = <div style={{ width: 6, height: 6, background: '#fff', borderRadius: '50%' }} />; statusKey = 'abnormalPowerDeviation'; }
|
||||
if (row === 'E' && col === 4) { color = '#FF7D00'; icon = <div style={{ width: 6, height: 6, background: '#fff', borderRadius: '50%' }} />; statusKey = 'abnormalShading'; }
|
||||
if (row === 'F' && col === 11) { color = '#F7BA1E'; icon = <div style={{ width: 6, height: 6, background: '#fff', borderRadius: '50%' }} />; statusKey = 'minor'; }
|
||||
if (row === 'G' && col === 1) { color = '#F7BA1E'; icon = <div style={{ width: 6, height: 6, background: '#fff', borderRadius: '50%' }} />; statusKey = 'minor'; }
|
||||
if (row === 'H' && col === 10) { color = '#86909C'; statusKey = 'offline'; }
|
||||
|
||||
const tooltip = t('aiAnalysis.stringCellTooltip', { row, col: col + 1, status: t(`aiAnalysis.stringStatus.${statusKey}`) });
|
||||
|
||||
return (
|
||||
<Tooltip title={tooltip} key={`${row}-${col}`}>
|
||||
@@ -335,11 +334,11 @@ export default function AIDiagnosisPage() {
|
||||
</div>
|
||||
<div style={{ display: 'flex', gap: 16, marginTop: 20, fontSize: 11, flexWrap: 'wrap', background: '#f8fafc', padding: '8px 12px', borderRadius: 6 }}>
|
||||
{[
|
||||
{ color: '#E8F3FF', label: '运行正常' },
|
||||
{ color: '#F7BA1E', label: '轻微异常' },
|
||||
{ color: '#FF7D00', label: '功率异常' },
|
||||
{ color: '#F53F3F', label: '严重故障' },
|
||||
{ color: '#86909C', label: '设备离线' },
|
||||
{ color: '#E8F3FF', label: t('aiAnalysis.normalFixed2') },
|
||||
{ color: '#F7BA1E', label: t('aiAnalysis.abnormalFixed22') },
|
||||
{ color: '#FF7D00', label: t('aiAnalysis.abnormalFixed2') },
|
||||
{ color: '#F53F3F', label: t('aiAnalysis.fixed2CriticalFixed2ErrorFixed2') },
|
||||
{ color: '#86909C', label: t('aiAnalysis.fixed2DeviceFixed2OfflineFixed2') },
|
||||
].map(item => (
|
||||
<span key={item.label} style={{ display: 'flex', alignItems: 'center', color: '#4E5969' }}>
|
||||
<span style={{ width: 10, height: 10, background: item.color, marginRight: 6, borderRadius: 2 }}></span>
|
||||
@@ -351,14 +350,13 @@ export default function AIDiagnosisPage() {
|
||||
<Col xs={24} md={6}>
|
||||
<div style={{ background: '#f8fafc', padding: 16, borderRadius: 8, height: '100%' }}>
|
||||
<div style={{ fontSize: 13, fontWeight: 700, color: '#1D2129', marginBottom: 16, display: 'flex', alignItems: 'center' }}>
|
||||
<WarningOutlined style={{ marginRight: 8, color: '#F53F3F' }} />异常类型分布
|
||||
</div>
|
||||
<WarningOutlined style={{ marginRight: 8, color: '#F53F3F' }} />{t('aiAnalysis.fixed2AbnormalFixed2Type')}</div>
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: 14 }}>
|
||||
{[
|
||||
{ label: '严重故障', value: 2, color: '#F53F3F', percent: '25%' },
|
||||
{ label: '功率异常', value: 4, color: '#FF7D00', percent: '50%' },
|
||||
{ label: '轻微异常', value: 2, color: '#F7BA1E', percent: '25%' },
|
||||
{ label: '离线组串', value: 0, color: '#86909C', percent: '0%' },
|
||||
{ label: t('aiAnalysis.fixed2CriticalFixed2ErrorFixed2'), value: 2, color: '#F53F3F', percent: '25%' },
|
||||
{ label: t('aiAnalysis.abnormalFixed2'), value: 4, color: '#FF7D00', percent: '50%' },
|
||||
{ label: t('aiAnalysis.abnormalFixed22'), value: 2, color: '#F7BA1E', percent: '25%' },
|
||||
{ label: t('aiAnalysis.fixed2Offline'), value: 0, color: '#86909C', percent: '0%' },
|
||||
].map(item => (
|
||||
<div key={item.label}>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 6 }}>
|
||||
@@ -372,7 +370,7 @@ export default function AIDiagnosisPage() {
|
||||
))}
|
||||
</div>
|
||||
<Divider style={{ margin: '16px 0' }} />
|
||||
<Button block type="dashed" size="small" style={{ fontSize: 12 }}>查看详细定位表</Button>
|
||||
<Button block type="dashed" size="small" style={{ fontSize: 12 }}>{t('aiAnalysis.fixed2View')}</Button>
|
||||
</div>
|
||||
</Col>
|
||||
</Row>
|
||||
@@ -384,14 +382,14 @@ export default function AIDiagnosisPage() {
|
||||
<Row gutter={[12, 12]} style={{ marginBottom: 16 }}>
|
||||
<Col xs={24} lg={7}>
|
||||
<Card
|
||||
title={<span style={{ fontSize: 15, fontWeight: 700, color: '#1D2129' }}>组件衰减趋势分析<InfoCircleOutlined style={{ marginLeft: 6, color: '#86909C', fontSize: 13 }} /></span>}
|
||||
title={<span style={{ fontSize: 15, fontWeight: 700, color: '#1D2129' }}>{t('aiAnalysis.s13')}<InfoCircleOutlined style={{ marginLeft: 6, color: '#86909C', fontSize: 13 }} /></span>}
|
||||
bordered={false}
|
||||
bodyStyle={{ padding: '16px 20px' }}
|
||||
style={{ ...cardStyle, height: '100%' }}
|
||||
>
|
||||
<div style={{ fontSize: 12, color: '#86909C', marginBottom: 16, display: 'flex', justifyContent: 'space-between' }}>
|
||||
<span>衰减率趋势 (%)</span>
|
||||
<span style={{ color: '#F53F3F', fontWeight: 600 }}>当前均值: -5.32%</span>
|
||||
<span>{t('aiAnalysis.degradationTrend')}</span>
|
||||
<span style={{ color: '#F53F3F', fontWeight: 600 }}>{t('aiAnalysis.fixed2Current532')}</span>
|
||||
</div>
|
||||
<UniversalLineChart
|
||||
data={degradationData}
|
||||
@@ -404,19 +402,19 @@ export default function AIDiagnosisPage() {
|
||||
series={[
|
||||
{
|
||||
key: 'average',
|
||||
name: '平均衰减率',
|
||||
name: t('aiAnalysis.averageDegradationRate'),
|
||||
color: '#165DFF',
|
||||
strokeWidth: 3,
|
||||
},
|
||||
{
|
||||
key: 'best',
|
||||
name: '最佳组件',
|
||||
name: t('aiAnalysis.bestComponent'),
|
||||
color: '#00B42A',
|
||||
strokeWidth: 2,
|
||||
},
|
||||
{
|
||||
key: 'worst',
|
||||
name: '最差组件',
|
||||
name: t('aiAnalysis.worstComponent'),
|
||||
color: '#F53F3F',
|
||||
strokeWidth: 2,
|
||||
},
|
||||
@@ -424,8 +422,8 @@ export default function AIDiagnosisPage() {
|
||||
/> <div style={{ marginTop: 16, padding: '12px', background: '#FFF7E8', borderRadius: 8, border: '1px solid #FFE4BA' }}>
|
||||
<div style={{ fontSize: 12, color: '#86909C', display: 'flex', alignItems: 'center' }}>
|
||||
<ExclamationCircleOutlined style={{ color: '#FF7D00', marginRight: 6 }} />
|
||||
<span style={{ color: '#1D2129', fontWeight: 600 }}>衰减预警:</span>
|
||||
<span style={{ marginLeft: 4 }}>12块组件衰减超标, 建议排查。</span>
|
||||
<span style={{ color: '#1D2129', fontWeight: 600 }}>{t('aiAnalysis.s15')}</span>
|
||||
<span style={{ marginLeft: 4 }}>{t('aiAnalysis.12')}</span>
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
@@ -433,14 +431,14 @@ export default function AIDiagnosisPage() {
|
||||
|
||||
<Col xs={24} lg={10}>
|
||||
<Card
|
||||
title={<span style={{ fontSize: 15, fontWeight: 700, color: '#1D2129' }}>实时发电表现深度分析<InfoCircleOutlined style={{ marginLeft: 6, color: '#86909C', fontSize: 13 }} /></span>}
|
||||
title={<span style={{ fontSize: 15, fontWeight: 700, color: '#1D2129' }}>{t('aiAnalysis.generation')}<InfoCircleOutlined style={{ marginLeft: 6, color: '#86909C', fontSize: 13 }} /></span>}
|
||||
bordered={false}
|
||||
bodyStyle={{ padding: '16px 20px' }}
|
||||
style={{ ...cardStyle, height: '100%' }}
|
||||
>
|
||||
<div style={{ display: 'flex', gap: 20 }}>
|
||||
<div style={{ flex: 1 }}>
|
||||
<div style={{ fontSize: 12, color: '#86909C', marginBottom: 16 }}>发电量对比分析 (kWh)</div>
|
||||
<div style={{ fontSize: 12, color: '#86909C', marginBottom: 16 }}>{t('aiAnalysis.generationComparison')}</div>
|
||||
<UniversalLineChart
|
||||
data={generationPerformanceData}
|
||||
xKey="time"
|
||||
@@ -452,19 +450,19 @@ export default function AIDiagnosisPage() {
|
||||
series={[
|
||||
{
|
||||
key: 'actual',
|
||||
name: '实际发电',
|
||||
name: t('aiAnalysis.actualGeneration'),
|
||||
color: '#165DFF',
|
||||
strokeWidth: 3,
|
||||
},
|
||||
{
|
||||
key: 'predict',
|
||||
name: '预测发电',
|
||||
name: t('aiAnalysis.predictedGeneration'),
|
||||
color: '#00B42A',
|
||||
strokeWidth: 2,
|
||||
},
|
||||
{
|
||||
key: 'theory',
|
||||
name: '理论发电',
|
||||
name: t('aiAnalysis.theoreticalGeneration'),
|
||||
color: '#86909C',
|
||||
strokeWidth: 2,
|
||||
},
|
||||
@@ -472,10 +470,10 @@ export default function AIDiagnosisPage() {
|
||||
/> </div>
|
||||
<div style={{ width: 120, display: 'flex', flexDirection: 'column', justifyContent: 'center', gap: 16, flexShrink: 0, paddingLeft: 16, borderLeft: '1px solid #f0f0f0' }}>
|
||||
{[
|
||||
{ label: '当日实际发电', value: '4,752', unit: t('home.kWh'), color: '#165DFF' },
|
||||
{ label: '当日预测发电', value: '4,960', unit: t('home.kWh'), color: '#00B42A' },
|
||||
{ label: '发电偏差率', value: '-4.35%', unit: '', color: '#F53F3F' },
|
||||
{ label: '实时 PR 值', value: '82.6%', unit: '', color: '#1D2129' },
|
||||
{ label: t('aiAnalysis.actualFixed2GenerationFixed2'), value: '4,752', unit: t('home.kWh'), color: '#165DFF' },
|
||||
{ label: t('aiAnalysis.predictedGenerationFixed2'), value: '4,960', unit: t('home.kWh'), color: '#00B42A' },
|
||||
{ label: t('aiAnalysis.fixed2GenerationDeviation'), value: '-4.35%', unit: '', color: '#F53F3F' },
|
||||
{ label: t('aiAnalysis.pr'), value: '82.6%', unit: '', color: '#1D2129' },
|
||||
].map(item => (
|
||||
<div key={item.label}>
|
||||
<div style={{ color: '#86909C', marginBottom: 4, fontSize: 11 }}>{item.label}</div>
|
||||
@@ -496,23 +494,23 @@ export default function AIDiagnosisPage() {
|
||||
{/* AI诊断总结 */}
|
||||
<div style={{ padding: '12px 14px' }}>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 10 }}>
|
||||
<span style={{ fontSize: 14, fontWeight: 700, color: '#1D2129' }}>AI 诊断总结</span>
|
||||
<span style={{ fontSize: 12, color: '#86909C' }}>更新时间: 2025-05-20 09:45</span>
|
||||
<span style={{ fontSize: 14, fontWeight: 700, color: '#1D2129' }}>{t('aiAnalysis.fixed2Ai2')}</span>
|
||||
<span style={{ fontSize: 12, color: '#86909C' }}>{t('aiAnalysis.fixed2UpdatedAt202505200945')}</span>
|
||||
</div>
|
||||
<Table
|
||||
columns={[
|
||||
{ title: '诊断项', dataIndex: 'diagnosis', width: 78 },
|
||||
{ title: t('aiAnalysis.s36'), dataIndex: 'diagnosis', width: 78 },
|
||||
{ title: t('roles.status'), dataIndex: 'status', render: renderStatusTag, },
|
||||
{ title: t('aiAnalysis.confidence'), dataIndex: 'confidence', },
|
||||
{ title: '影响', dataIndex: 'impact', render: renderImpactTag, width: 52 },
|
||||
{ title: '详情', dataIndex: 'detail', ellipsis: true },
|
||||
{ title: t('aiAnalysis.s37'), dataIndex: 'impact', render: renderImpactTag, width: 52 },
|
||||
{ title: t('common.detail'), dataIndex: 'detail', ellipsis: true },
|
||||
]}
|
||||
dataSource={[
|
||||
{ key: '1', diagnosis: t('aiAnalysis.hotspotDetection'), status: t('home.abnormal'), confidence: '92%', impact: '高', detail: '检测到 36 处热斑疑似点' },
|
||||
{ key: '2', diagnosis: '组串失配', status: t('home.abnormal'), confidence: '90%', impact: '高', detail: '8 串组串存在异常' },
|
||||
{ key: '3', diagnosis: '遮挡风险', status: '轻微', confidence: '78%', impact: '中', detail: '局部遮挡影响 2% 发电量' },
|
||||
{ key: '4', diagnosis: '组件衰减', status: t('home.abnormal'), confidence: '86%', impact: '中', detail: '平均衰减率 -5.32%' },
|
||||
{ key: '5', diagnosis: '逆变器异常', status: t('roles.normal'), confidence: '93%', impact: '低', detail: '所有逆变器运行正常' },
|
||||
{ key: '1', diagnosis: t('aiAnalysis.hotspotDetection'), status: t('home.abnormal'), confidence: '92%', impact: t('workOrder.high'), detail: t('aiAnalysis.hotspotDetail') },
|
||||
{ key: '2', diagnosis: t('aiAnalysis.stringMismatch'), status: t('home.abnormal'), confidence: '90%', impact: t('workOrder.high'), detail: t('aiAnalysis.stringMismatchDetail', { count: 8 }) },
|
||||
{ key: '3', diagnosis: t('aiAnalysis.shadingRisk'), status: t('aiAnalysis.minor'), confidence: '78%', impact: t('workOrder.medium'), detail: t('aiAnalysis.shadingDetail') },
|
||||
{ key: '4', diagnosis: t('aiAnalysis.componentDegradation'), status: t('home.abnormal'), confidence: '86%', impact: t('workOrder.medium'), detail: t('aiAnalysis.degradationDetail', { value: '-5.32%' }) },
|
||||
{ key: '5', diagnosis: t('aiAnalysis.inverterAbnormal'), status: t('roles.normal'), confidence: '93%', impact: t('workOrder.low'), detail: t('aiAnalysis.inverterNormalDetail') },
|
||||
]}
|
||||
pagination={false}
|
||||
size="small"
|
||||
@@ -524,14 +522,12 @@ export default function AIDiagnosisPage() {
|
||||
<Divider style={{ margin: 0 }} />
|
||||
|
||||
<div style={{ padding: '12px 14px' }}>
|
||||
<div style={{ fontSize: 14, fontWeight: 700, color: '#1D2129', marginBottom: 10 }}>
|
||||
AI 建议与处置
|
||||
</div>
|
||||
<div style={{ fontSize: 14, fontWeight: 700, color: '#1D2129', marginBottom: 10 }}>{t('aiAnalysis.fixed2Ai')}</div>
|
||||
<Table
|
||||
columns={[
|
||||
{ title: '建议措施', dataIndex: 'measure', ellipsis: true },
|
||||
{ title: t('aiAnalysis.s39'), dataIndex: 'measure', ellipsis: true },
|
||||
{ title: t('workOrder.priority'), dataIndex: 'priority', render: renderPriorityTag, width: 58 },
|
||||
{ title: '收益', dataIndex: 'gain', render: g => <span style={{ color: '#00B42A', fontWeight: 600 }}>{g}</span>, width: 68 },
|
||||
{ title: t('aiAnalysis.s40'), dataIndex: 'gain', render: g => <span style={{ color: '#00B42A', fontWeight: 600 }}>{g}</span>, width: 68 },
|
||||
{ title: t('aiAnalysis.confidence'), dataIndex: 'confidence', width: 60 },
|
||||
{
|
||||
title: t('roles.actions'),
|
||||
@@ -543,17 +539,17 @@ export default function AIDiagnosisPage() {
|
||||
size="small"
|
||||
style={{ fontSize: 11, borderRadius: 4, height: 22, padding: '0 6px' }}
|
||||
>
|
||||
{record.isView ? '详情' : t('workOrder.dispatch')}
|
||||
{record.isView ? t('common.detail') : t('workOrder.dispatch')}
|
||||
</Button>
|
||||
)
|
||||
},
|
||||
]}
|
||||
dataSource={[
|
||||
{ key: '1', measure: '处理热斑组件', priority: '高', gain: '+2.15%', confidence: '92%', isView: false },
|
||||
{ key: '2', measure: '排查异常组串', priority: '高', gain: '+1.85%', confidence: '90%', isView: false },
|
||||
{ key: '3', measure: '清洗受遮挡区域', priority: '中', gain: '+0.45%', confidence: '78%', isView: false },
|
||||
{ key: '4', measure: '跟踪衰减组件', priority: '中', gain: '+0.35%', confidence: '86%', isView: false },
|
||||
{ key: '5', measure: '监控逆变器效率', priority: '低', gain: '+0.10%', confidence: '93%', isView: true },
|
||||
{ key: '1', measure: t('aiAnalysis.handleHotspotComponents'), priority: t('workOrder.high'), gain: '+2.15%', confidence: '92%', isView: false },
|
||||
{ key: '2', measure: t('aiAnalysis.checkAbnormalStrings'), priority: t('workOrder.high'), gain: '+1.85%', confidence: '90%', isView: false },
|
||||
{ key: '3', measure: t('aiAnalysis.cleanShadedAreas'), priority: t('workOrder.medium'), gain: '+0.45%', confidence: '78%', isView: false },
|
||||
{ key: '4', measure: t('aiAnalysis.trackDegradedComponents'), priority: t('workOrder.medium'), gain: '+0.35%', confidence: '86%', isView: false },
|
||||
{ key: '5', measure: t('aiAnalysis.monitorInverterEfficiency'), priority: t('workOrder.low'), gain: '+0.10%', confidence: '93%', isView: true },
|
||||
]}
|
||||
pagination={false}
|
||||
size="small"
|
||||
@@ -567,17 +563,17 @@ export default function AIDiagnosisPage() {
|
||||
|
||||
{/* 底部:数据来源 */}
|
||||
<Card
|
||||
title={<span style={{ fontSize: 15, fontWeight: 700, color: '#1D2129' }}>全栈数据融合来源</span>}
|
||||
title={<span style={{ fontSize: 15, fontWeight: 700, color: '#1D2129' }}>{t('aiAnalysis.sourceFixed2')}</span>}
|
||||
bordered={false}
|
||||
bodyStyle={{ padding: '16px 20px' }}
|
||||
style={cardStyle}
|
||||
>
|
||||
<Row gutter={[16, 16]}>
|
||||
{[
|
||||
{ title: '无人机载荷热成像', time: '2025-05-20 09:30', icon: <ScanOutlined />, status: '同步中' },
|
||||
{ title: 'SCADA 实时遥测数据', time: '2025-05-20 09:45:12', icon: <DatabaseOutlined />, status: t('roles.normal') },
|
||||
{ title: '云端气象分析站', time: '2025-05-20 09:45:00', icon: <CloudOutlined />, status: t('roles.normal') },
|
||||
{ title: '电站运维资产库', time: '最近更新: 2025-05-18', icon: <RestOutlined />, status: t('roles.normal') },
|
||||
{ title: t('aiAnalysis.fixed2Uav'), time: '2025-05-20 09:30', icon: <ScanOutlined />, status: t('aiAnalysis.syncing') },
|
||||
{ title: t('aiAnalysis.scada'), time: '2025-05-20 09:45:12', icon: <DatabaseOutlined />, status: t('roles.normal') },
|
||||
{ title: t('aiAnalysis.s43'), time: '2025-05-20 09:45:00', icon: <CloudOutlined />, status: t('roles.normal') },
|
||||
{ title: t('aiAnalysis.oM'), time: t('aiAnalysis.lastUpdated', { value: '2025-05-18' }), icon: <RestOutlined />, status: t('roles.normal') },
|
||||
].map((source, idx) => (
|
||||
<Col xs={24} sm={12} md={6} key={idx}>
|
||||
<div style={{ background: '#f8fafc', padding: '16px', borderRadius: 12, display: 'flex', alignItems: 'center', gap: 16, border: '1px solid #f0f0f0', transition: 'all 0.3s' }} className="thermal-card">
|
||||
@@ -586,10 +582,10 @@ export default function AIDiagnosisPage() {
|
||||
</div>
|
||||
<div style={{ flex: 1, minWidth: 0 }}>
|
||||
<div style={{ fontSize: 14, fontWeight: 700, color: '#1D2129' }}>{source.title}</div>
|
||||
<div style={{ fontSize: 12, color: '#86909C', marginTop: 4, whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}>数据点: {source.time}</div>
|
||||
<div style={{ fontSize: 12, color: '#86909C', marginTop: 4, whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}>{t('aiAnalysis.dataPoint', { time: source.time })}</div>
|
||||
<div style={{ fontSize: 11, color: source.status === t('roles.normal') ? '#00B42A' : '#165DFF', marginTop: 6, display: 'flex', alignItems: 'center', gap: 6 }}>
|
||||
<div style={{ width: 6, height: 6, background: source.status === t('roles.normal') ? '#00B42A' : '#165DFF', borderRadius: '50%' }}></div>
|
||||
状态: {source.status}
|
||||
{t('aiAnalysis.statusLabel', { status: source.status })}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -112,7 +112,7 @@ export default function Agri() {
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
utils.message.error('获取模型列表失败');
|
||||
utils.message.error(t('page.listFixed2FailedFixed2'));
|
||||
} finally {
|
||||
setLoadingModels(false);
|
||||
}
|
||||
@@ -185,7 +185,7 @@ export default function Agri() {
|
||||
|
||||
const handleSubmitDetect = async () => {
|
||||
if (detectFiles.length === 0) {
|
||||
utils.message.warning('请先上传图片或视频');
|
||||
utils.message.warning(t('page.uploadImageVideoFixed2'));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -215,7 +215,7 @@ export default function Agri() {
|
||||
addToHistory('detect', res.jobId);
|
||||
}
|
||||
} catch (err) {
|
||||
utils.message.error('提交任务失败');
|
||||
utils.message.error(t('aiAnalysis.submitTaskFailed'));
|
||||
setDetectStatus(null);
|
||||
}
|
||||
};
|
||||
@@ -4372,7 +4372,7 @@ export default function Agri() {
|
||||
setHotLoading(false);
|
||||
|
||||
setSegResult(res);
|
||||
utils.message.success('热成像分析完成');
|
||||
utils.message.success(t('aiAnalysis.thermalAnalysisComplete'));
|
||||
addToHistory('segmentation', res.analysisId || 'seg-' + Date.now());
|
||||
|
||||
}).catch(err => { })
|
||||
@@ -4389,7 +4389,7 @@ export default function Agri() {
|
||||
setPolling(false);
|
||||
const resultRes = await getDetectJobResult(jobId);
|
||||
setDetectResult(resultRes);
|
||||
utils.message.success('任务执行成功');
|
||||
utils.message.success(t('devices.taskExecSuccess'));
|
||||
} else if (['failed', 'cancelled'].includes(statusRes.status)) {
|
||||
clearInterval(pollTimer.current);
|
||||
setPolling(false);
|
||||
@@ -4405,7 +4405,7 @@ export default function Agri() {
|
||||
|
||||
const handleSubmitSeg = async () => {
|
||||
if (!thermalFile) {
|
||||
utils.message.warning('请先上传热成像文件');
|
||||
utils.message.warning(t('page.uploadThermal2'));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4422,10 +4422,10 @@ export default function Agri() {
|
||||
try {
|
||||
const res = await submitSegmentationAnalyze(formData);
|
||||
setSegResult(res);
|
||||
utils.message.success('热成像分析完成');
|
||||
utils.message.success(t('aiAnalysis.thermalAnalysisComplete'));
|
||||
addToHistory('segmentation', res.analysisId || 'seg-' + Date.now());
|
||||
} catch (err) {
|
||||
utils.message.error('热成像分析失败');
|
||||
utils.message.error(t('aiAnalysis.thermalAnalysisFailed'));
|
||||
} finally {
|
||||
setSegLoading(false);
|
||||
}
|
||||
@@ -4447,7 +4447,7 @@ export default function Agri() {
|
||||
<Row gutter={[8, 8]} style={{ marginBottom: 8 }}>
|
||||
{[
|
||||
{
|
||||
title: '算法数量',
|
||||
title: t('aiAnalysis.algoCount'),
|
||||
value: '2',
|
||||
unit: '检测 + 分割',
|
||||
icon: <AppstoreOutlined />,
|
||||
@@ -4455,7 +4455,7 @@ export default function Agri() {
|
||||
bg: '#E8F3FF',
|
||||
},
|
||||
{
|
||||
title: '在线服务',
|
||||
title: t('aiAnalysis.onlineServices'),
|
||||
value: '2',
|
||||
unit: 'health 实时检查',
|
||||
icon: <CloudOutlined />,
|
||||
@@ -4463,7 +4463,7 @@ export default function Agri() {
|
||||
bg: '#E8FFEA',
|
||||
},
|
||||
{
|
||||
title: '模型数量',
|
||||
title: t('aiAnalysis.modelCount'),
|
||||
value: models.length || 3,
|
||||
unit: '检测模型 registry',
|
||||
icon: <DatabaseOutlined />,
|
||||
@@ -4471,7 +4471,7 @@ export default function Agri() {
|
||||
bg: '#E8F3FF',
|
||||
},
|
||||
{
|
||||
title: '历史记录',
|
||||
title: t('aiAnalysis.historyRecords'),
|
||||
value: history.length,
|
||||
unit: '本页联调记录',
|
||||
icon: <HistoryOutlined />,
|
||||
@@ -4555,7 +4555,7 @@ export default function Agri() {
|
||||
const renderDetectWorkspace = () => (
|
||||
<div style={{ padding: '0 8px' }}>
|
||||
<div style={{ marginBottom: 16 }}>
|
||||
<Text strong style={{ fontSize: 15 }}>检测模型</Text>
|
||||
<Text strong style={{ fontSize: 15 }}>{t('aiAnalysis.detectModel')}</Text>
|
||||
<Select
|
||||
style={{ width: '100%', marginTop: 8 }}
|
||||
value={detectForm.modelAlias}
|
||||
@@ -4570,25 +4570,25 @@ export default function Agri() {
|
||||
|
||||
<Row gutter={[16, 16]}>
|
||||
<Col span={12}>
|
||||
<Text strong style={{ fontSize: 13, display: 'block', marginBottom: 8 }}>输入类型</Text>
|
||||
<Text strong style={{ fontSize: 13, display: 'block', marginBottom: 8 }}>{t('aiAnalysis.inputType')}</Text>
|
||||
<Radio.Group
|
||||
value={detectForm.inputType}
|
||||
onChange={e => setDetectForm(prev => ({ ...prev, inputType: e.target.value }))}
|
||||
buttonStyle="solid"
|
||||
size="small"
|
||||
>
|
||||
<Radio.Button value="image">图片</Radio.Button>
|
||||
<Radio.Button value="image">{t('aiAnalysis.image')}</Radio.Button>
|
||||
<Radio.Button value="video">{t('constants.sourceVideo')}</Radio.Button>
|
||||
</Radio.Group>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Text strong style={{ fontSize: 13, display: 'block', marginBottom: 8 }}>推理预设</Text>
|
||||
<Text strong style={{ fontSize: 13, display: 'block', marginBottom: 8 }}>{t('aiAnalysis.inferencePreset')}</Text>
|
||||
<Radio.Group
|
||||
value={detectForm.speedPreset}
|
||||
onChange={e => setDetectForm(prev => ({ ...prev, speedPreset: e.target.value }))}
|
||||
size="small"
|
||||
>
|
||||
<Radio.Button value="quality">质量</Radio.Button>
|
||||
<Radio.Button value="quality">{t('aiAnalysis.quality')}</Radio.Button>
|
||||
<Radio.Button value="speed">{t('devices.speed')}</Radio.Button>
|
||||
</Radio.Group>
|
||||
</Col>
|
||||
@@ -4681,8 +4681,8 @@ export default function Agri() {
|
||||
<p className="ant-upload-drag-icon">
|
||||
<InboxOutlined style={{ color: '#1677ff' }} />
|
||||
</p>
|
||||
<p className="ant-upload-text">拖拽文件到此处,或点击选择</p>
|
||||
<p className="ant-upload-hint">支持 jpg/png/webp/mp4 等格式</p>
|
||||
<p className="ant-upload-text">{t('page.fixed2DragFile')}</p>
|
||||
<p className="ant-upload-hint">{t('page.jpgPngWebpMp4')}</p>
|
||||
</Dragger>
|
||||
</div>
|
||||
|
||||
@@ -4699,9 +4699,7 @@ export default function Agri() {
|
||||
icon={<PlayCircleOutlined />}
|
||||
onClick={handleGetTargetDemo}
|
||||
loading={targetLoading}
|
||||
>
|
||||
调用服务器样例
|
||||
</Button> <Button icon={<SyncOutlined />} onClick={fetchModels}>刷新模型</Button>
|
||||
>{t('page.s7')}</Button> <Button icon={<SyncOutlined />} onClick={fetchModels}>{t('aiAnalysis.refreshModels')}</Button>
|
||||
</Space>
|
||||
</div>
|
||||
);
|
||||
@@ -4748,7 +4746,7 @@ export default function Agri() {
|
||||
</Row>
|
||||
|
||||
<div style={{ marginTop: 24 }}>
|
||||
<Text strong style={{ fontSize: 13, display: 'block', marginBottom: 8 }}>热成像文件 thermal_file</Text>
|
||||
<Text strong style={{ fontSize: 13, display: 'block', marginBottom: 8 }}>{t('page.thermalFile')}</Text>
|
||||
<Dragger
|
||||
fileList={thermalFile ? [thermalFile] : []}
|
||||
onChange={info => setThermalFile(info.fileList[0])}
|
||||
@@ -4759,7 +4757,7 @@ export default function Agri() {
|
||||
<p className="ant-upload-drag-icon" style={{ fontSize: 24 }}>
|
||||
<CloudOutlined style={{ color: '#1677ff' }} />
|
||||
</p>
|
||||
<p style={{ fontSize: 12 }}>上传 TIFF / PNG / JPG 热成像文件</p>
|
||||
<p style={{ fontSize: 12 }}>{t('page.fixed2UploadTiffPngJpg')}</p>
|
||||
</Dragger>
|
||||
</div>
|
||||
|
||||
@@ -4770,7 +4768,7 @@ export default function Agri() {
|
||||
beforeUpload={() => false}
|
||||
maxCount={1}
|
||||
>
|
||||
<Button size="small">阵列 mask</Button>
|
||||
<Button size="small">{t('page.mask')}</Button>
|
||||
</Upload>
|
||||
<Upload
|
||||
fileList={geojsonFile ? [geojsonFile] : []}
|
||||
@@ -4778,7 +4776,7 @@ export default function Agri() {
|
||||
beforeUpload={() => false}
|
||||
maxCount={1}
|
||||
>
|
||||
<Button size="small">面板 GeoJSON</Button>
|
||||
<Button size="small">{t('page.geojson')}</Button>
|
||||
</Upload>
|
||||
</Space>
|
||||
|
||||
@@ -4788,16 +4786,12 @@ export default function Agri() {
|
||||
icon={segLoading ? <LoadingOutlined /> : <CheckOutlined />}
|
||||
onClick={handleSubmitSeg}
|
||||
loading={segLoading}
|
||||
>
|
||||
提交热成像分析
|
||||
</Button>
|
||||
>{t('aiAnalysis.submitThermalAnalysis')}</Button>
|
||||
<Button
|
||||
icon={<PlayCircleOutlined />}
|
||||
onClick={handleGetDemo}
|
||||
loading={hotLoading}
|
||||
>
|
||||
调用服务器样例
|
||||
</Button> <Button icon={<HistoryOutlined />}>读取服务器历史</Button>
|
||||
>{t('page.s7')}</Button> <Button icon={<HistoryOutlined />}>{t('aiAnalysis.readServerHistory')}</Button>
|
||||
</Space>
|
||||
</div>
|
||||
);
|
||||
@@ -4809,18 +4803,16 @@ export default function Agri() {
|
||||
|
||||
return (
|
||||
<Card
|
||||
title={<Text strong style={{ fontSize: 14 }}>结果展示</Text>}
|
||||
title={<Text strong style={{ fontSize: 14 }}>{t('page.s15')}</Text>}
|
||||
bordered={false}
|
||||
style={{ marginTop: 12, borderRadius: 8 }}
|
||||
bodyStyle={{ padding: '12px' }}
|
||||
>
|
||||
<Text type="secondary" style={{ fontSize: 11, display: 'block', marginBottom: 12 }}>
|
||||
原始预览、结果图与完整 JSON 同屏查看
|
||||
</Text>
|
||||
<Text type="secondary" style={{ fontSize: 11, display: 'block', marginBottom: 12 }}>{t('page.jsonViewFixed2')}</Text>
|
||||
<Row gutter={12}>
|
||||
{/* 输入预览 */}
|
||||
<Col span={8}>
|
||||
<Card size="small" title="输入预览" style={{ height: 480 }}>
|
||||
<Card size="small" title={t('aiAnalysis.inputPreview')} style={{ height: 480 }}>
|
||||
<div style={{ height: 400, background: '#001529', display: 'flex', alignItems: 'center', justifyContent: 'center', overflow: 'hidden' }}>
|
||||
{inputFile && (
|
||||
detectForm.inputType === 'image' ? (
|
||||
@@ -4843,7 +4835,7 @@ export default function Agri() {
|
||||
|
||||
{/* 结果图/视频 */}
|
||||
<Col span={8}>
|
||||
<Card size="small" title="结果图 / 视频" style={{ height: 480 }}>
|
||||
<Card size="small" title={t('page.videoFixed2')} style={{ height: 480 }}>
|
||||
|
||||
<div style={{ height: 400, display: 'flex', alignItems: 'center', justifyContent: 'center', background: '#fafafa' }}>
|
||||
{hasResult ? (
|
||||
@@ -4861,7 +4853,7 @@ export default function Agri() {
|
||||
/>
|
||||
)
|
||||
) : (
|
||||
<Text type="secondary">任务完成后显示结果</Text>
|
||||
<Text type="secondary">{t('page.fixed2TaskSuspended2Fixed2Complete')}</Text>
|
||||
)}
|
||||
</div>
|
||||
</Card>
|
||||
@@ -4869,12 +4861,12 @@ export default function Agri() {
|
||||
|
||||
{/* 结果JSON */}
|
||||
<Col span={8}>
|
||||
<Card size="small" title="结果 JSON" style={{ height: 480 }}>
|
||||
<Card size="small" title={t('page.json')} style={{ height: 480 }}>
|
||||
<div style={{ height: 400, overflowY: 'auto', background: '#fafafa', padding: 8 }}>
|
||||
{hasResult ? (
|
||||
<pre style={{ fontSize: 10, margin: 0 }}>{JSON.stringify(detectResult, null, 2)}</pre>
|
||||
) : (
|
||||
<Text type="secondary">暂无结果</Text>
|
||||
<Text type="secondary">{t('page.noResultFixed2')}</Text>
|
||||
)}
|
||||
</div>
|
||||
</Card>
|
||||
@@ -4899,19 +4891,17 @@ export default function Agri() {
|
||||
|
||||
return (
|
||||
<Card
|
||||
title={<Text strong style={{ fontSize: 14 }}>结果展示</Text>}
|
||||
title={<Text strong style={{ fontSize: 14 }}>{t('page.s15')}</Text>}
|
||||
bordered={false}
|
||||
style={{ marginTop: 12, borderRadius: 8 }}
|
||||
bodyStyle={{ padding: '12px' }}
|
||||
>
|
||||
<Text type="secondary" style={{ fontSize: 11, display: 'block', marginBottom: 12 }}>
|
||||
原始预览、结果图与完整 JSON 同屏查看
|
||||
</Text>
|
||||
<Text type="secondary" style={{ fontSize: 11, display: 'block', marginBottom: 12 }}>{t('page.jsonViewFixed2')}</Text>
|
||||
|
||||
{/* 顶部统计卡片 */}
|
||||
<div style={{ marginBottom: 16 }}>
|
||||
<Text strong style={{ fontSize: 13, display: 'block', marginBottom: 8 }}>热成像交互分析视图</Text>
|
||||
<Text type="secondary" style={{ fontSize: 11, marginBottom: 12 }}>点击热点或面板查看温度、块号、GPS 与像素溯源信息</Text>
|
||||
<Text strong style={{ fontSize: 13, display: 'block', marginBottom: 8 }}>{t('page.s19')}</Text>
|
||||
<Text type="secondary" style={{ fontSize: 11, marginBottom: 12 }}>{t('page.viewFixed2TemperatureGpsInfoFixed2')}</Text>
|
||||
<Row gutter={8}>
|
||||
<Col span={6}>
|
||||
<Card
|
||||
@@ -4925,7 +4915,7 @@ export default function Agri() {
|
||||
bodyStyle={{ padding: '12px 8px' }}
|
||||
>
|
||||
<Statistic
|
||||
title={<span style={{ fontSize: 15, color: '#86909C' }}>热点数量</span>}
|
||||
title={<span style={{ fontSize: 15, color: '#86909C' }}>{t('page.quantityFixed2')}</span>}
|
||||
value={segResult?.summary?.panel_hotspot_count || 0}
|
||||
|
||||
valueStyle={{ fontSize: 18, fontWeight: 600, color: '#FF4D4F' }}
|
||||
@@ -4945,7 +4935,7 @@ export default function Agri() {
|
||||
bodyStyle={{ padding: '12px 8px' }}
|
||||
>
|
||||
<Statistic
|
||||
title={<span style={{ fontSize: 15, color: '#86909C' }}>面板区域</span>}
|
||||
title={<span style={{ fontSize: 15, color: '#86909C' }}>{t('aiAnalysis.panelArea')}</span>}
|
||||
value={segResult?.summary?.panel_polygon_count || 0}
|
||||
titleStyle={{ fontSize: 12, color: '#333', marginBottom: 4 }}
|
||||
valueStyle={{ fontSize: 18, fontWeight: 600, color: '#1677FF' }}
|
||||
@@ -4985,7 +4975,7 @@ export default function Agri() {
|
||||
bodyStyle={{ padding: '12px 8px' }}
|
||||
>
|
||||
<Statistic
|
||||
title={<span style={{ fontSize: 15, color: '#86909C' }}>分析编号</span>}
|
||||
title={<span style={{ fontSize: 15, color: '#86909C' }}>{t('page.s23')}</span>}
|
||||
value={segResult?.analysis_id?.substring(0, 8) || '-'}
|
||||
titleStyle={{ fontSize: 12, color: '#333', marginBottom: 4 }}
|
||||
valueStyle={{ fontSize: 18, fontWeight: 600, color: '#722ED1' }}
|
||||
@@ -5021,7 +5011,7 @@ export default function Agri() {
|
||||
/>
|
||||
)}
|
||||
{/*{!inputFile && (
|
||||
<Empty description={<span style={{ color: '#fff' }}>请上传热成像文件</span>} image={Empty.PRESENTED_IMAGE_SIMPLE} />
|
||||
<Empty description={<span style={{ color: '#fff' }}>{t('page.uploadThermal')}</span>} image={Empty.PRESENTED_IMAGE_SIMPLE} />
|
||||
)}*/}
|
||||
|
||||
{/* 热点标记点 */}
|
||||
@@ -5070,8 +5060,8 @@ export default function Agri() {
|
||||
<Col span={12}>
|
||||
<Card
|
||||
size="small"
|
||||
title="点位详情"
|
||||
extra={<Text type="secondary" style={{ fontSize: 11 }}>请选择热点或面板</Text>}
|
||||
title={t('page.detailFixed2')}
|
||||
extra={<Text type="secondary" style={{ fontSize: 11 }}>{t('page.fixed2PleaseSelect')}</Text>}
|
||||
style={{ height: 400 }}
|
||||
bodyStyle={{ height: 350 }}
|
||||
>
|
||||
@@ -5099,17 +5089,17 @@ export default function Agri() {
|
||||
<div style={{ marginBottom: 16 }}>
|
||||
<Space>
|
||||
<Text strong style={{ fontSize: 14 }}>热点 {selectedPoint.hotspot_id}</Text>
|
||||
<Tag color="red">热点</Tag>
|
||||
<Tag color="red">{t('page.s26')}</Tag>
|
||||
</Space>
|
||||
</div>
|
||||
|
||||
{[
|
||||
{ label: t('home.temperature'), value: `${selectedPoint.peak_temp_c}℃` },
|
||||
{ label: '块号', value: selectedPoint.panel_id || '-' },
|
||||
{ label: t('page.s49'), value: selectedPoint.panel_id || '-' },
|
||||
{ label: 'GPS', value: selectedPoint.gps?.text || '-' },
|
||||
{ label: '原图像素', value: `${selectedPoint.peak_x}, ${selectedPoint.peak_y}` },
|
||||
{ label: '叠加图像素', value: `${selectedPoint.peak_x}, ${selectedPoint.peak_y}` },
|
||||
{ label: '面积', value: `${selectedPoint.area_px} px` }
|
||||
{ label: t('page.s50'), value: `${selectedPoint.peak_x}, ${selectedPoint.peak_y}` },
|
||||
{ label: t('page.s51'), value: `${selectedPoint.peak_x}, ${selectedPoint.peak_y}` },
|
||||
{ label: t('page.s52'), value: `${selectedPoint.area_px} px` }
|
||||
].map((item, i) => (
|
||||
<div key={i} style={{
|
||||
display: 'flex',
|
||||
@@ -5123,9 +5113,7 @@ export default function Agri() {
|
||||
))}
|
||||
</div>
|
||||
) : (
|
||||
<Text type="secondary" style={{ fontSize: 12, display: 'block' }}>
|
||||
等待分割结果,完成后可点击热点/面板查看详情
|
||||
</Text>
|
||||
<Text type="secondary" style={{ fontSize: 12, display: 'block' }}>{t('page.completeViewDetailsFixed2')}</Text>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -5145,7 +5133,7 @@ export default function Agri() {
|
||||
paddingRight: 4,
|
||||
boxSizing: 'border-box'
|
||||
}}>
|
||||
<Text strong style={{ fontSize: 13, display: 'block', marginBottom: 8 }}>热点/面板列表</Text>
|
||||
<Text strong style={{ fontSize: 13, display: 'block', marginBottom: 8 }}>{t('page.listFixed2')}</Text>
|
||||
{panels.map((p, i) => (
|
||||
<div
|
||||
key={i}
|
||||
@@ -5189,9 +5177,7 @@ export default function Agri() {
|
||||
return (
|
||||
<div style={{ padding: '8px', background: '#f4f7f9', minHeight: '100vh' }}>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', paddingBottom: "16px" }}>
|
||||
<Typography.Title level={4} style={{ margin: 0, fontSize: 'clamp(18px, 1.5vw, 24px)', color: '#1D2129' }}>
|
||||
算法分析中心
|
||||
</Typography.Title>
|
||||
<Typography.Title level={4} style={{ margin: 0, fontSize: 'clamp(18px, 1.5vw, 24px)', color: '#1D2129' }}>{t('page.s29')}</Typography.Title>
|
||||
</div>
|
||||
{renderStats()}
|
||||
|
||||
@@ -5199,11 +5185,11 @@ export default function Agri() {
|
||||
{/* 左侧:算法列表 */}
|
||||
<Col xs={24} sm={12} md={12} lg={4}>
|
||||
<Card
|
||||
title={<Text strong style={{ fontSize: 14 }}>算法列表</Text>}
|
||||
title={<Text strong style={{ fontSize: 14 }}>{t('aiAnalysis.algorithmList')}</Text>}
|
||||
bordered={false}
|
||||
bodyStyle={{ padding: '8px' }}
|
||||
style={{ borderRadius: 8, height: '100%' }}
|
||||
extra={<Text type="secondary" style={{ fontSize: 11 }}>已接入 2 套</Text>}
|
||||
extra={<Text type="secondary" style={{ fontSize: 11 }}>{t('page.2')}</Text>}
|
||||
>
|
||||
{algorithmList.map(algo => (
|
||||
<div
|
||||
@@ -5265,14 +5251,14 @@ export default function Agri() {
|
||||
{/* 右侧:历史记录 */}
|
||||
<Col xs={24} sm={12} md={12} lg={6}>
|
||||
<Card
|
||||
title={<Text strong style={{ fontSize: 14 }}>历史分析记录</Text>}
|
||||
title={<Text strong style={{ fontSize: 14 }}>{t('page.fixed2HistoryAnalysis')}</Text>}
|
||||
bordered={false}
|
||||
bodyStyle={{ padding: '8px' }}
|
||||
style={{ borderRadius: 8, height: '100%' }}
|
||||
extra={<Text type="secondary" style={{ fontSize: 11 }}>{history.length} 条</Text>}
|
||||
>
|
||||
{history.length === 0 ? (
|
||||
<Empty description="暂无历史" image={Empty.PRESENTED_IMAGE_SIMPLE} />
|
||||
<Empty description={t('page.noHistoryFixed2')} image={Empty.PRESENTED_IMAGE_SIMPLE} />
|
||||
) : (
|
||||
history.map(item => (
|
||||
<div
|
||||
|
||||
@@ -6,11 +6,7 @@ import {
|
||||
} from '@ant-design/icons';
|
||||
import { getMenuList } from '../api/mune';
|
||||
import AlarmOverview from '../components/alerts/AlarmOverview';
|
||||
import AlarmRealtime from '../components/alerts/AlarmRealtime';
|
||||
import AlarmHistory from '../components/alerts/AlarmHistory';
|
||||
import AlarmStatistics from '../components/alerts/AlarmStatistics';
|
||||
import AlarmRules from '../components/alerts/AlarmRules';
|
||||
import AlarmSubscription from '../components/alerts/AlarmSubscription';
|
||||
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
|
||||
@@ -39,7 +35,7 @@ export default function AlarmCenterPage() {
|
||||
<div style={{ display: 'flex', paddingBottom: "4px" }}>
|
||||
<div style={{ padding: '8px 12px 0' }}>
|
||||
<Typography.Title level={4} style={{ margin: 0, fontSize: 'clamp(14px, 1.2vw, 18px)' }}>{t('router.alerts')}</Typography.Title>
|
||||
<Text type="secondary" style={{ fontSize: '12px' }}>告警处置闭环、规则管理与事件中心</Text>
|
||||
<Text type="secondary" style={{ fontSize: '12px' }}>{t('alerts.subtitle')}</Text>
|
||||
</div>
|
||||
|
||||
<Header style={{ padding: 0, borderBottom: '1px solid #f0f0f0', position: 'sticky', top: 0, zIndex: 10, height: 40, lineHeight: '40px' }}>
|
||||
|
||||
@@ -37,22 +37,6 @@ const { RangePicker } = DatePicker;
|
||||
const { Option } = Select;
|
||||
|
||||
// 模拟数据
|
||||
const smartCleanPlanData = [
|
||||
{ id: '计划 01', priority: '高', area: '区块 15, 01', boost: '4,250 kWh', weather: '88%' },
|
||||
{ id: '计划 02', priority: '高', area: '区块 02, 11', boost: '3,180 kWh', weather: '85%' },
|
||||
{ id: '计划 03', priority: '中', area: '区块 05, 12', boost: '2,210 kWh', weather: '80%' },
|
||||
{ id: '计划 04', priority: '中', area: '区块 07, 03', boost: '1,620 kWh', weather: '78%' },
|
||||
{ id: '计划 05', priority: '低', area: '区块 17, 13', boost: '1,210 kWh', weather: '82%' },
|
||||
];
|
||||
|
||||
const workOrderPreviewData = [
|
||||
{ area: '区块 15', priority: '高', duration: '4.0 h', handler: '李工', planTime: '2025-05-26 - 05-27', status: '待创建' },
|
||||
{ area: '区块 01', priority: '高', duration: '3.5 h', handler: '李工', planTime: '2025-05-26 - 05-27', status: '待创建' },
|
||||
{ area: '区块 02', priority: '高', duration: '2.8 h', handler: '王工', planTime: '2025-05-28 - 05-29', status: '待创建' },
|
||||
{ area: '区块 11', priority: '高', duration: '2.6 h', handler: '王工', planTime: '2025-05-28 - 05-29', status: '待创建' },
|
||||
{ area: '区块 05', priority: '中', duration: '2.2 h', handler: '赵工', planTime: '2025-05-29 - 05-30', status: '待创建' },
|
||||
];
|
||||
|
||||
const pollutionLineData = [
|
||||
{ date: '05-18', pollution: 78, threshold: 75 },
|
||||
{ date: '05-19', pollution: 72, threshold: 75 },
|
||||
@@ -65,34 +49,6 @@ const pollutionLineData = [
|
||||
|
||||
|
||||
|
||||
const dualAxesData = [
|
||||
[
|
||||
{ date: 'D-7', value: 800, type: '清洗前发电量' },
|
||||
{ date: 'D-7', value: 1200, type: '清洗后发电量' },
|
||||
{ date: 'D-6', value: 850, type: '清洗前发电量' },
|
||||
{ date: 'D-6', value: 1250, type: '清洗后发电量' },
|
||||
{ date: 'D-5', value: 900, type: '清洗前发电量' },
|
||||
{ date: 'D-5', value: 1300, type: '清洗后发电量' },
|
||||
{ date: 'D-4', value: 880, type: '清洗前发电量' },
|
||||
{ date: 'D-4', value: 1280, type: '清洗后发电量' },
|
||||
{ date: 'D-3', value: 920, type: '清洗前发电量' },
|
||||
{ date: 'D-3', value: 1320, type: '清洗后发电量' },
|
||||
{ date: 'D-2', value: 950, type: '清洗前发电量' },
|
||||
{ date: 'D-2', value: 1350, type: '清洗后发电量' },
|
||||
{ date: 'D-1', value: 980, type: '清洗前发电量' },
|
||||
{ date: 'D-1', value: 1380, type: '清洗后发电量' },
|
||||
],
|
||||
[
|
||||
{ date: 'D-7', rate: 35 },
|
||||
{ date: 'D-6', rate: 32 },
|
||||
{ date: 'D-5', rate: 30 },
|
||||
{ date: 'D-4', rate: 28 },
|
||||
{ date: 'D-3', rate: 31 },
|
||||
{ date: 'D-2', rate: 29 },
|
||||
{ date: 'D-1', rate: 33 },
|
||||
],
|
||||
|
||||
];
|
||||
const compareChartData = [
|
||||
{ date: 'D-7', before: 800, after: 1200 },
|
||||
{ date: 'D-6', before: 850, after: 1250 },
|
||||
@@ -113,18 +69,63 @@ export default function CleanOptimizationPage() {
|
||||
overflow: 'hidden'
|
||||
};
|
||||
|
||||
const smartCleanPlanData = [
|
||||
{ id: t('clean.plan', { name: '01' }), priority: t('workOrder.high'), area: t('clean.block', { block: '15, 01' }), boost: '4,250 kWh', weather: '88%' },
|
||||
{ id: t('clean.plan', { name: '02' }), priority: t('workOrder.high'), area: t('clean.block', { block: '02, 11' }), boost: '3,180 kWh', weather: '85%' },
|
||||
{ id: t('clean.plan', { name: '03' }), priority: t('workOrder.medium'), area: t('clean.block', { block: '05, 12' }), boost: '2,210 kWh', weather: '80%' },
|
||||
{ id: t('clean.plan', { name: '04' }), priority: t('workOrder.medium'), area: t('clean.block', { block: '07, 03' }), boost: '1,620 kWh', weather: '78%' },
|
||||
{ id: t('clean.plan', { name: '05' }), priority: t('workOrder.low'), area: t('clean.block', { block: '17, 13' }), boost: '1,210 kWh', weather: '82%' },
|
||||
];
|
||||
|
||||
const workOrderPreviewData = [
|
||||
{ area: t('clean.block', { block: '15' }), priority: t('workOrder.high'), duration: '4.0 h', handler: t('clean.engineer', { name: 'Li' }), planTime: '2025-05-26 - 05-27', status: t('clean.pendingCreate') },
|
||||
{ area: t('clean.block', { block: '01' }), priority: t('workOrder.high'), duration: '3.5 h', handler: t('clean.engineer', { name: 'Li' }), planTime: '2025-05-26 - 05-27', status: t('clean.pendingCreate') },
|
||||
{ area: t('clean.block', { block: '02' }), priority: t('workOrder.high'), duration: '2.8 h', handler: t('clean.engineer', { name: 'Wang' }), planTime: '2025-05-28 - 05-29', status: t('clean.pendingCreate') },
|
||||
{ area: t('clean.block', { block: '11' }), priority: t('workOrder.high'), duration: '2.6 h', handler: t('clean.engineer', { name: 'Wang' }), planTime: '2025-05-28 - 05-29', status: t('clean.pendingCreate') },
|
||||
{ area: t('clean.block', { block: '05' }), priority: t('workOrder.medium'), duration: '2.2 h', handler: t('clean.engineer', { name: 'Zhao' }), planTime: '2025-05-29 - 05-30', status: t('clean.pendingCreate') },
|
||||
];
|
||||
|
||||
const dualAxesData = [
|
||||
[
|
||||
{ date: 'D-7', value: 800, type: t('clean.generationBefore') },
|
||||
{ date: 'D-7', value: 1200, type: t('clean.generationAfter') },
|
||||
{ date: 'D-6', value: 850, type: t('clean.generationBefore') },
|
||||
{ date: 'D-6', value: 1250, type: t('clean.generationAfter') },
|
||||
{ date: 'D-5', value: 900, type: t('clean.generationBefore') },
|
||||
{ date: 'D-5', value: 1300, type: t('clean.generationAfter') },
|
||||
{ date: 'D-4', value: 880, type: t('clean.generationBefore') },
|
||||
{ date: 'D-4', value: 1280, type: t('clean.generationAfter') },
|
||||
{ date: 'D-3', value: 920, type: t('clean.generationBefore') },
|
||||
{ date: 'D-3', value: 1320, type: t('clean.generationAfter') },
|
||||
{ date: 'D-2', value: 950, type: t('clean.generationBefore') },
|
||||
{ date: 'D-2', value: 1350, type: t('clean.generationAfter') },
|
||||
{ date: 'D-1', value: 980, type: t('clean.generationBefore') },
|
||||
{ date: 'D-1', value: 1380, type: t('clean.generationAfter') },
|
||||
],
|
||||
[
|
||||
{ date: 'D-7', rate: 35 },
|
||||
{ date: 'D-6', rate: 32 },
|
||||
{ date: 'D-5', rate: 30 },
|
||||
{ date: 'D-4', rate: 28 },
|
||||
{ date: 'D-3', rate: 31 },
|
||||
{ date: 'D-2', rate: 29 },
|
||||
{ date: 'D-1', rate: 33 },
|
||||
],
|
||||
|
||||
];
|
||||
|
||||
const pieChartData = [
|
||||
{ name: '灰尘积累', value: 6120, color: '#165DFF' },
|
||||
{ name: '鸟粪遮挡', value: 1480, color: '#F53F3F' },
|
||||
{ name: '沙尘沉积', value: 1120, color: '#F7BA1E' },
|
||||
{ name: t('clean.dustAccumulation'), value: 6120, color: '#165DFF' },
|
||||
{ name: t('clean.birdDroppings'), value: 1480, color: '#F53F3F' },
|
||||
{ name: t('clean.sandDeposition'), value: 1120, color: '#F7BA1E' },
|
||||
{ name: t('constants.others'), value: 600, color: '#86909C' },
|
||||
];
|
||||
|
||||
const renderPriorityTag = (priority: string) => {
|
||||
const config: Record<string, any> = {
|
||||
'高': { color: '#ff4d4f', bg: '#fff1f0' },
|
||||
'中': { color: '#faad14', bg: '#fff7e6' },
|
||||
'低': { color: '#52c41a', bg: '#f6ffed' },
|
||||
[t('workOrder.high')]: { color: '#ff4d4f', bg: '#fff1f0' },
|
||||
[t('workOrder.medium')]: { color: '#faad14', bg: '#fff7e6' },
|
||||
[t('workOrder.low')]: { color: '#52c41a', bg: '#f6ffed' },
|
||||
};
|
||||
return <Tag color={config[priority]?.bg} style={{ color: config[priority]?.color, border: `1px solid ${config[priority]?.color}`, margin: 0, borderRadius: 4 }}>{priority}</Tag>;
|
||||
};
|
||||
@@ -166,58 +167,58 @@ export default function CleanOptimizationPage() {
|
||||
>
|
||||
{[
|
||||
{
|
||||
title: '污染指数',
|
||||
title: t('clean.s7'),
|
||||
value: '68.5',
|
||||
unit: '',
|
||||
tag: '中等',
|
||||
tag: t('clean.levelMedium'),
|
||||
tagColor: '#52c41a',
|
||||
trend: '较昨日 ▼ 5.3',
|
||||
trend: t('devices.vsYesterday', { value: '▼ 5.3' }),
|
||||
trendColor: '#ff4d4f',
|
||||
icon: <SunOutlined />,
|
||||
color: '#faad14',
|
||||
bg: '#fff7e6'
|
||||
},
|
||||
{
|
||||
title: '建议清洗区块数',
|
||||
title: t('clean.fixed2RecommendedCleanBlock'),
|
||||
value: '8 / 20',
|
||||
unit: '',
|
||||
trend: '占比 40%',
|
||||
trend: t('clean.share', { value: '40%' }),
|
||||
icon: <LayoutGrid />,
|
||||
color: '#1890ff',
|
||||
bg: '#e6f7ff'
|
||||
},
|
||||
{
|
||||
title: '预计发电提升',
|
||||
title: t('clean.generation'),
|
||||
value: '12,850',
|
||||
unit: t('home.kWh'),
|
||||
trend: '占当前日发电量 14.2%',
|
||||
trend: t('clean.shareOfTodayGeneration', { value: '14.2%' }),
|
||||
icon: <TrendingUp />,
|
||||
color: '#1890ff',
|
||||
bg: '#f0f5ff'
|
||||
},
|
||||
{
|
||||
title: '预计收益提升',
|
||||
title: t('clean.fixed2EstimatedRevenue'),
|
||||
value: '¥ 7,286',
|
||||
unit: '',
|
||||
trend: '按电价 0.568 元/kWh 计算',
|
||||
trend: t('clean.calcByElectricityPrice', { value: `0.568 ${t('clean.kwhFixed2')}` }),
|
||||
icon: <DollarSign />,
|
||||
color: '#faad14',
|
||||
bg: '#fff7e6'
|
||||
},
|
||||
{
|
||||
title: '上次清洗时间',
|
||||
title: t('clean.cleaningFixed2TimeFixed2'),
|
||||
value: '2025-05-12',
|
||||
unit: '',
|
||||
trend: '距今 12 天',
|
||||
trend: t('clean.daysAgo', { days: '12' }),
|
||||
icon: <Calendar />,
|
||||
color: '#1890ff',
|
||||
bg: '#f0f5ff'
|
||||
},
|
||||
{
|
||||
title: '清洗成本预估',
|
||||
title: t('clean.fixed2CleaningCost'),
|
||||
value: '¥ 3,200',
|
||||
unit: '',
|
||||
trend: '预计单次清洗总成本',
|
||||
trend: t('clean.estimatedTotalCostPerClean'),
|
||||
icon: <Droplets />,
|
||||
color: '#1890ff',
|
||||
bg: '#e6f7ff'
|
||||
@@ -280,29 +281,29 @@ export default function CleanOptimizationPage() {
|
||||
{/* 标题与操作栏 */}
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 8 }}>
|
||||
<Space size={8}>
|
||||
<Typography.Title level={4} style={{ margin: 0, fontSize: 'clamp(18px, 1.5vw, 24px)', }}>清洗优化管理</Typography.Title>
|
||||
<Typography.Title level={4} style={{ margin: 0, fontSize: 'clamp(18px, 1.5vw, 24px)', }}>{t('clean.fixed2CleaningOptimization')}</Typography.Title>
|
||||
<InfoCircleOutlined style={{ color: '#86909C' }} />
|
||||
</Space>
|
||||
<Space>
|
||||
<Text type="secondary" style={{ fontSize: 12 }}><ReloadOutlined /> 更新时间:2025-05-24 09:30</Text>
|
||||
<Button icon={<ReloadOutlined />}>刷新数据</Button>
|
||||
<Text type="secondary" style={{ fontSize: 12 }}><ReloadOutlined />{t('clean.fixed2UpdatedAt202505240930')}</Text>
|
||||
<Button icon={<ReloadOutlined />}>{t('aiAnalysis.fixed2Refresh')}</Button>
|
||||
<Select defaultValue="7d" style={{ width: 110 }}>
|
||||
<Option value="7d">最近 7 天</Option>
|
||||
<Option value="30d">最近 30 天</Option>
|
||||
<Option value="7d">{t('clean.7')}</Option>
|
||||
<Option value="30d">{t('clean.30')}</Option>
|
||||
</Select>
|
||||
<Button type="primary" icon={<DownloadOutlined />}>导出报告</Button>
|
||||
<Button type="primary" icon={<DownloadOutlined />}>{t('aiAnalysis.fixed2Export')}</Button>
|
||||
</Space>
|
||||
</div>
|
||||
|
||||
<Row gutter={[8, 8]} style={{ display: 'flex', alignItems: 'stretch' }}>
|
||||
{/* 左侧:分析图表 */}
|
||||
<Col xs={24} xl={6} style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
|
||||
<Card title={<span style={{ fontSize: 14, fontWeight: 700 }}>污染趋势分析</span>} bordered={false} style={cardStyle} bodyStyle={{ padding: 16 }}>
|
||||
<Card title={<span style={{ fontSize: 14, fontWeight: 700 }}>{t('clean.s6')}</span>} bordered={false} style={cardStyle} bodyStyle={{ padding: 16 }}>
|
||||
<div style={{ fontSize: 12, color: '#86909C', marginBottom: 16, display: 'flex', justifyContent: 'space-between' }}>
|
||||
<span>污染指数</span>
|
||||
<span>{t('clean.s7')}</span>
|
||||
<Space size={12}>
|
||||
<span style={{ display: 'flex', alignItems: 'center' }}><div style={{ width: 8, height: 8, background: '#165DFF', marginRight: 4 }}></div>污染指数</span>
|
||||
<span style={{ display: 'flex', alignItems: 'center' }}><div style={{ width: 8, height: 2, borderBottom: '1px dashed #F53F3F', marginRight: 4 }}></div>阈值</span>
|
||||
<span style={{ display: 'flex', alignItems: 'center' }}><div style={{ width: 8, height: 8, background: '#165DFF', marginRight: 4 }}></div>{t('clean.s7')}</span>
|
||||
<span style={{ display: 'flex', alignItems: 'center' }}><div style={{ width: 8, height: 2, borderBottom: '1px dashed #F53F3F', marginRight: 4 }}></div>{t('alerts.threshold')}</span>
|
||||
</Space>
|
||||
</div>
|
||||
<UniversalLineChart
|
||||
@@ -313,13 +314,13 @@ export default function CleanOptimizationPage() {
|
||||
series={[
|
||||
{
|
||||
key: 'pollution',
|
||||
name: '污染指数',
|
||||
name: t('clean.s7'),
|
||||
color: '#1890ff',
|
||||
strokeWidth: 3,
|
||||
},
|
||||
{
|
||||
key: 'threshold',
|
||||
name: '阈值',
|
||||
name: t('alerts.threshold'),
|
||||
color: '#ff4d4f',
|
||||
dashed: true,
|
||||
strokeWidth: 2,
|
||||
@@ -328,7 +329,7 @@ export default function CleanOptimizationPage() {
|
||||
/>
|
||||
</Card>
|
||||
|
||||
<Card title={<span style={{ fontSize: 14, fontWeight: 700 }}>发电损失构成 <Text type="secondary" style={{ fontWeight: 400, fontSize: 12 }}>(近 7 天)</Text></span>} bordered={false} style={cardStyle} bodyStyle={{ padding: 16 }}>
|
||||
<Card title={<span style={{ fontSize: 14, fontWeight: 700 }}>{t('clean.fixed2Generation')}<Text type="secondary" style={{ fontWeight: 400, fontSize: 12 }}>{t('clean.near7Days')}</Text></span>} bordered={false} style={cardStyle} bodyStyle={{ padding: 16 }}>
|
||||
<div style={{ position: 'relative', height: "100%" }}>
|
||||
<UniversalPieChart
|
||||
data={pieChartData}
|
||||
@@ -338,14 +339,14 @@ export default function CleanOptimizationPage() {
|
||||
showLabel={false}
|
||||
/>
|
||||
<div style={{ position: 'absolute', left: '30%', top: '50%', transform: 'translate(-50%, -50%)', textAlign: 'center' }}>
|
||||
<div style={{ fontSize: 10, color: '#86909C' }}>总损失电量</div>
|
||||
<div style={{ fontSize: 10, color: '#86909C' }}>{t('clean.batteryFixed2')}</div>
|
||||
<div style={{ fontSize: 16, fontWeight: 800, color: '#1D2129' }}>9,320</div>
|
||||
<div style={{ fontSize: 10, color: '#86909C' }}>{t('home.kWh')}</div>
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
|
||||
<Card title={<span style={{ fontSize: 14, fontWeight: 700 }}>清洗前后对比分析 <Text type="secondary" style={{ fontWeight: 400, fontSize: 12 }}>(近一次)</Text></span>} bordered={false} style={cardStyle} bodyStyle={{ padding: 16 }}>
|
||||
<Card title={<span style={{ fontSize: 14, fontWeight: 700 }}>{t('clean.fixed2Cleaning2')}<Text type="secondary" style={{ fontWeight: 400, fontSize: 12 }}>{t('clean.nearLast')}</Text></span>} bordered={false} style={cardStyle} bodyStyle={{ padding: 16 }}>
|
||||
<UniversalBarChart
|
||||
data={compareChartData}
|
||||
xKey="date"
|
||||
@@ -354,41 +355,41 @@ export default function CleanOptimizationPage() {
|
||||
series={[
|
||||
{
|
||||
key: 'before',
|
||||
name: '清洗前发电量(kWh)',
|
||||
name: `${t('clean.generationBefore')} (kWh)`,
|
||||
color: '#1890ff',
|
||||
},
|
||||
{
|
||||
key: 'after',
|
||||
name: '清洗后发电量(kWh)',
|
||||
name: `${t('clean.generationAfter')} (kWh)`,
|
||||
color: '#52c41a',
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</Card>
|
||||
|
||||
<Card title={<span style={{ fontSize: 14, fontWeight: 700 }}>清洗收益深度测算</span>} bordered={false} style={cardStyle} bodyStyle={{ padding: 16 }}>
|
||||
<Card title={<span style={{ fontSize: 14, fontWeight: 700 }}>{t('clean.fixed2CleaningFixed2')}</span>} bordered={false} style={cardStyle} bodyStyle={{ padding: 16 }}>
|
||||
<Row gutter={[16, 16]}>
|
||||
<Col span={12}>
|
||||
<div style={{ fontSize: 11, color: '#86909C', marginBottom: 4 }}>预计发电提升</div>
|
||||
<div style={{ fontSize: 11, color: '#86909C', marginBottom: 4 }}>{t('clean.generation')}</div>
|
||||
<div style={{ fontSize: 15, fontWeight: 800 }}>12,850 <span style={{ fontSize: 11, fontWeight: 400 }}>{t('home.kWh')}</span></div>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<div style={{ fontSize: 11, color: '#86909C', marginBottom: 4 }}>电价 (含税)</div>
|
||||
<div style={{ fontSize: 15, fontWeight: 800 }}>0.568 <span style={{ fontSize: 11, fontWeight: 400 }}>元/kWh</span></div>
|
||||
<div style={{ fontSize: 11, color: '#86909C', marginBottom: 4 }}>{t('clean.electricityPrice')}</div>
|
||||
<div style={{ fontSize: 15, fontWeight: 800 }}>0.568 <span style={{ fontSize: 11, fontWeight: 400 }}>{t('clean.kwhFixed2')}</span></div>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<div style={{ fontSize: 11, color: '#86909C', marginBottom: 4 }}>预计净收益</div>
|
||||
<div style={{ fontSize: 15, fontWeight: 800, color: '#00B42A' }}>7,286 <span style={{ fontSize: 11, fontWeight: 400 }}>元</span></div>
|
||||
<div style={{ fontSize: 11, color: '#86909C', marginBottom: 4 }}>{t('clean.netRevenueFixed2')}</div>
|
||||
<div style={{ fontSize: 15, fontWeight: 800, color: '#00B42A' }}>7,286 <span style={{ fontSize: 11, fontWeight: 400 }}>{t('clean.s16')}</span></div>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<div style={{ fontSize: 11, color: '#86909C', marginBottom: 4 }}>ROI (投资回报)</div>
|
||||
<div style={{ fontSize: 11, color: '#86909C', marginBottom: 4 }}>{t('clean.roi')}</div>
|
||||
<div style={{ fontSize: 20, fontWeight: 800, color: '#00B42A' }}>227%</div>
|
||||
</Col>
|
||||
</Row>
|
||||
<Divider style={{ margin: '16px 0' }} />
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', background: '#f8fafc', padding: '10px 16px', borderRadius: 8 }}>
|
||||
<span style={{ fontSize: 12, color: '#86909C' }}>回收周期</span>
|
||||
<span style={{ fontSize: 18, fontWeight: 800 }}>0.44 <Text style={{ fontSize: 12 }}>天</Text></span>
|
||||
<span style={{ fontSize: 12, color: '#86909C' }}>{t('clean.s17')}</span>
|
||||
<span style={{ fontSize: 18, fontWeight: 800 }}>0.44 <Text style={{ fontSize: 12 }}>{t('devices.day')}</Text></span>
|
||||
</div>
|
||||
</Card>
|
||||
</Col>
|
||||
@@ -396,19 +397,19 @@ export default function CleanOptimizationPage() {
|
||||
{/* 中间:地图分布与工单预览 */}
|
||||
<Col xs={24} xl={11} style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
|
||||
<Card
|
||||
title={<span style={{ fontSize: 15, fontWeight: 700 }}>电站污染分布与建议清洗区块分布图</span>}
|
||||
title={<span style={{ fontSize: 15, fontWeight: 700 }}>{t('clean.recommendedCleanBlock')}</span>}
|
||||
bordered={false}
|
||||
style={{ ...cardStyle, }}
|
||||
bodyStyle={{ padding: 0, position: 'relative', overflow: 'hidden', minHeight: 500 }}
|
||||
>
|
||||
<div style={{ background: '#f8fafc', padding: '10px 20px', display: 'flex', justifyContent: 'space-between', borderBottom: '1px solid #f0f0f0', flexWrap: 'wrap', gap: 8 }}>
|
||||
<Space size={16} wrap style={{ fontSize: 11 }}>
|
||||
<span style={{ color: '#86909C' }}>污染等级:</span>
|
||||
<Badge color="#F53F3F" text="优先清洗 (>75)" />
|
||||
<Badge color="#FF7D00" text="较高 (50-75)" />
|
||||
<Badge color="#F7BA1E" text="中等 (25-50)" />
|
||||
<Badge color="#D1FF6B" text="较低 (10-25)" />
|
||||
<Badge color="#00B42A" text="清洁 (<10)" />
|
||||
<span style={{ color: '#86909C' }}>{t('clean.s20')}</span>
|
||||
<Badge color="#F53F3F" text={t('clean.priorityClean')} />
|
||||
<Badge color="#FF7D00" text={t('clean.higherRange')} />
|
||||
<Badge color="#F7BA1E" text={t('clean.mediumRange')} />
|
||||
<Badge color="#D1FF6B" text={t('clean.lowerRange')} />
|
||||
<Badge color="#00B42A" text={t('clean.cleanRange')} />
|
||||
</Space>
|
||||
</div>
|
||||
|
||||
@@ -435,7 +436,7 @@ export default function CleanOptimizationPage() {
|
||||
{ id: '20', score: '17.8', top: '85%', left: '40%', color: '#00B42A' },
|
||||
].map(block => (
|
||||
<div key={block.id} className="map-block" style={{ position: 'absolute', top: block.top, left: block.left, background: block.color, color: '#fff', padding: '4px 10px', borderRadius: 6, border: '1.5px solid #fff', textAlign: 'center', minWidth: 60 }}>
|
||||
<div style={{ fontSize: 9, opacity: 0.9 }}>区块 {block.id}</div>
|
||||
<div style={{ fontSize: 9, opacity: 0.9 }}>{t('clean.block', { block: block.id })}</div>
|
||||
<div style={{ fontSize: 13, fontWeight: 800 }}>{block.score}</div>
|
||||
</div>
|
||||
))}
|
||||
@@ -452,21 +453,21 @@ export default function CleanOptimizationPage() {
|
||||
</Card>
|
||||
|
||||
<Card
|
||||
title={<span style={{ fontSize: 15, fontWeight: 700 }}>清洗工单智能预览</span>}
|
||||
extra={<Button type="link" size="small">查看更多 <ChevronRight size={14} /></Button>}
|
||||
title={<span style={{ fontSize: 15, fontWeight: 700 }}>{t('clean.fixed2Cleaning2')}</span>}
|
||||
extra={<Button type="link" size="small">{t('devices.viewMore')}<ChevronRight size={14} /></Button>}
|
||||
bordered={false}
|
||||
style={cardStyle}
|
||||
bodyStyle={{ padding: 0 }}
|
||||
>
|
||||
<Table
|
||||
columns={[
|
||||
{ title: '区块', dataIndex: 'area', key: 'area' },
|
||||
{ title: t('clean.s45'), dataIndex: 'area', key: 'area' },
|
||||
{ title: t('workOrder.priority'), dataIndex: 'priority', key: 'priority', render: renderPriorityTag },
|
||||
{ title: '预计工时', dataIndex: 'duration', key: 'duration' },
|
||||
{ title: t('clean.s46'), dataIndex: 'duration', key: 'duration' },
|
||||
{ title: t('systemSetting.leader'), dataIndex: 'handler', key: 'handler' },
|
||||
{ title: '计划时间', dataIndex: 'planTime', key: 'planTime' },
|
||||
{ title: t('clean.timeFixed2'), dataIndex: 'planTime', key: 'planTime' },
|
||||
{ title: t('roles.status'), dataIndex: 'status', key: 'status', render: (s) => <Tag color="blue" variant="outline" style={{ borderRadius: 4 }}>{s}</Tag> },
|
||||
{ title: t('roles.actions'), key: 'action', render: () => <Button type="primary" size="small" style={{ borderRadius: 4 }}>创建工单</Button> },
|
||||
{ title: t('roles.actions'), key: 'action', render: () => <Button type="primary" size="small" style={{ borderRadius: 4 }}>{t('clean.s23')}</Button> },
|
||||
]}
|
||||
dataSource={workOrderPreviewData}
|
||||
pagination={false}
|
||||
@@ -478,17 +479,17 @@ export default function CleanOptimizationPage() {
|
||||
|
||||
{/* 右侧:决策建议与参考 */}
|
||||
<Col xs={24} xl={7} style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
|
||||
<Card title={<span style={{ fontSize: 14, fontWeight: 700 }}>智能清洗策略建议</span>} bordered={false} style={cardStyle} bodyStyle={{ padding: 0 }}>
|
||||
<Card title={<span style={{ fontSize: 14, fontWeight: 700 }}>{t('clean.cleaning2')}</span>} bordered={false} style={cardStyle} bodyStyle={{ padding: 0 }}>
|
||||
<div style={{ background: '#f8fafc', padding: '8px 16px', borderBottom: '1px solid #f0f0f0' }}>
|
||||
<Text type="secondary" style={{ fontSize: 11 }}>算法模型:多因子加权综合优化模型 (v2.0)</Text>
|
||||
<Text type="secondary" style={{ fontSize: 11 }}>{t('clean.algorithmModel')}</Text>
|
||||
</div>
|
||||
<Table
|
||||
columns={[
|
||||
{ title: '推荐计划', dataIndex: 'id', key: 'id', width: 85 },
|
||||
{ title: t('workOrder.priority'), dataIndex: 'priority', key: 'priority', render: (p) => <span style={{ color: p === '高' ? '#F53F3F' : '#F7BA1E', fontWeight: 600 }}>{p}</span>, width: 65 },
|
||||
{ title: '建议区块', dataIndex: 'area', key: 'area' },
|
||||
{ title: '预计提升', dataIndex: 'boost', key: 'boost', render: (b) => <span style={{ color: '#00B42A', fontWeight: 600 }}>{b}</span> },
|
||||
{ title: '天气适宜度', dataIndex: 'weather', key: 'weather', render: (w) => <Space size={4}>{w} <SunOutlined style={{ color: '#F7BA1E' }} /></Space> },
|
||||
{ title: t('clean.s48'), dataIndex: 'id', key: 'id', width: 85 },
|
||||
{ title: t('workOrder.priority'), dataIndex: 'priority', key: 'priority', render: (p) => <span style={{ color: p === t('workOrder.high') ? '#F53F3F' : '#F7BA1E', fontWeight: 600 }}>{p}</span>, width: 65 },
|
||||
{ title: t('clean.s49'), dataIndex: 'area', key: 'area' },
|
||||
{ title: t('clean.s50'), dataIndex: 'boost', key: 'boost', render: (b) => <span style={{ color: '#00B42A', fontWeight: 600 }}>{b}</span> },
|
||||
{ title: t('clean.fixed2WeatherAdvice2Fixed2SuitableExec2'), dataIndex: 'weather', key: 'weather', render: (w) => <Space size={4}>{w} <SunOutlined style={{ color: '#F7BA1E' }} /></Space> },
|
||||
]}
|
||||
dataSource={smartCleanPlanData}
|
||||
pagination={false}
|
||||
@@ -497,18 +498,18 @@ export default function CleanOptimizationPage() {
|
||||
/>
|
||||
</Card>
|
||||
|
||||
<Card title={<span style={{ fontSize: 14, fontWeight: 700 }}>清洗技术方案推荐</span>} bordered={false} style={cardStyle} bodyStyle={{ padding: 16 }}>
|
||||
<Card title={<span style={{ fontSize: 14, fontWeight: 700 }}>{t('clean.fixed2Cleaning2')}</span>} bordered={false} style={cardStyle} bodyStyle={{ padding: 16 }}>
|
||||
<Row gutter={12}>
|
||||
<Col span={12}>
|
||||
<div style={{ background: '#F9F0FF', borderRadius: 12, padding: 16, border: '1px solid #D3ADF7', height: '100%' }}>
|
||||
<Space align="center" style={{ marginBottom: 12 }}>
|
||||
<div style={{ width: 32, height: 32, background: '#722ED1', borderRadius: '50%', display: 'flex', alignItems: 'center', justifyContent: 'center' }}><Bot size={18} color="#fff" /></div>
|
||||
<Text strong style={{ fontSize: 13, color: '#391085' }}>智能机器人方案</Text>
|
||||
<Text strong style={{ fontSize: 13, color: '#391085' }}>{t('clean.robot')}</Text>
|
||||
</Space>
|
||||
<div style={{ fontSize: 11, color: '#531DAB', marginBottom: 12, lineHeight: 1.5 }}>全自动清洗,适合大面积平整区块,效率极高。</div>
|
||||
<div style={{ fontSize: 11, color: '#531DAB', marginBottom: 12, lineHeight: 1.5 }}>{t('clean.cleaning')}</div>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', fontSize: 11 }}>
|
||||
<span style={{ color: '#8c8c8c' }}>预计用水:</span>
|
||||
<Text strong>18 吨</Text>
|
||||
<span style={{ color: '#8c8c8c' }}>{t('clean.s28')}</span>
|
||||
<Text strong>{t('clean.18')}</Text>
|
||||
</div>
|
||||
</div>
|
||||
</Col>
|
||||
@@ -516,57 +517,57 @@ export default function CleanOptimizationPage() {
|
||||
<div style={{ background: '#E6F7FF', borderRadius: 12, padding: 16, border: '1px solid #91D5FF', height: '100%' }}>
|
||||
<Space align="center" style={{ marginBottom: 12 }}>
|
||||
<div style={{ width: 32, height: 32, background: '#1890FF', borderRadius: '50%', display: 'flex', alignItems: 'center', justifyContent: 'center' }}><User size={18} color="#fff" /></div>
|
||||
<Text strong style={{ fontSize: 13, color: '#003A8C' }}>人工精细化方案</Text>
|
||||
<Text strong style={{ fontSize: 13, color: '#003A8C' }}>{t('clean.fixed2Manual')}</Text>
|
||||
</Space>
|
||||
<div style={{ fontSize: 11, color: '#0050B3', marginBottom: 12, lineHeight: 1.5 }}>灵活处理遮挡及严重污垢区域,适合复杂地形。</div>
|
||||
<div style={{ fontSize: 11, color: '#0050B3', marginBottom: 12, lineHeight: 1.5 }}>{t('clean.handleCriticalArea')}</div>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', fontSize: 11 }}>
|
||||
<span style={{ color: '#8c8c8c' }}>预计用水:</span>
|
||||
<Text strong>32 吨</Text>
|
||||
<span style={{ color: '#8c8c8c' }}>{t('clean.s28')}</span>
|
||||
<Text strong>{t('clean.32')}</Text>
|
||||
</div>
|
||||
</div>
|
||||
</Col>
|
||||
</Row>
|
||||
</Card>
|
||||
|
||||
<Card title={<span style={{ fontSize: 14, fontWeight: 700 }}>天气与资源环境参考 <Text type="secondary" style={{ fontSize: 12, fontWeight: 400 }}>(计划 01)</Text></span>} bordered={false} style={cardStyle} bodyStyle={{ padding: 16 }}>
|
||||
<Card title={<span style={{ fontSize: 14, fontWeight: 700 }}>{t('clean.fixed2WeatherAdvice2')}<Text type="secondary" style={{ fontSize: 12, fontWeight: 400 }}>({t('clean.plan', { name: '01' })})</Text></span>} bordered={false} style={cardStyle} bodyStyle={{ padding: 16 }}>
|
||||
<Row gutter={12}>
|
||||
<Col span={8}>
|
||||
<div style={{ background: '#f8fafc', padding: '10px 4px', borderRadius: 8, textAlign: 'center', border: '1px solid #f0f0f0' }}>
|
||||
<div style={{ fontSize: 11, color: '#86909C' }}>05-26 (周一)</div>
|
||||
<div style={{ fontSize: 11, color: '#86909C' }}>{`05-26 (${t('common.mondayShort')})`}</div>
|
||||
<SunOutlined style={{ fontSize: 24, color: '#F7BA1E', margin: '8px 0' }} />
|
||||
<div style={{ fontSize: 12, fontWeight: 700 }}>多云 18~28℃</div>
|
||||
<div style={{ fontSize: 12, fontWeight: 700 }}>{t('clean.fixed2Cloudy1828')}</div>
|
||||
</div>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<div style={{ background: '#f8fafc', padding: '10px 4px', borderRadius: 8, textAlign: 'center', border: '1px solid #f0f0f0' }}>
|
||||
<div style={{ fontSize: 11, color: '#86909C' }}>05-27 (周二)</div>
|
||||
<div style={{ fontSize: 11, color: '#86909C' }}>{`05-27 (${t('common.tuesdayShort')})`}</div>
|
||||
<SunOutlined style={{ fontSize: 24, color: '#F7BA1E', margin: '8px 0' }} />
|
||||
<div style={{ fontSize: 12, fontWeight: 700 }}>晴 19~30℃</div>
|
||||
<div style={{ fontSize: 12, fontWeight: 700 }}>{t('clean.1930')}</div>
|
||||
</div>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: 10, justifyContent: 'center', height: '100%' }}>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
|
||||
<Wind size={14} style={{ color: '#86909C' }} /><span style={{ fontSize: 11 }}>风速: <b style={{ color: '#00B42A' }}>2.1m/s (适宜)</b></span>
|
||||
<Wind size={14} style={{ color: '#86909C' }} /><span style={{ fontSize: 11 }}>{t('clean.s36')}<b style={{ color: '#00B42A' }}>{`2.1m/s (${t('clean.suitable')})`}</b></span>
|
||||
</div>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
|
||||
<CloudRain size={14} style={{ color: '#86909C' }} /><span style={{ fontSize: 11 }}>降水: <b style={{ color: '#86909C' }}>10% (低)</b></span>
|
||||
<CloudRain size={14} style={{ color: '#86909C' }} /><span style={{ fontSize: 11 }}>{t('clean.s37')}<b style={{ color: '#86909C' }}>{`10% (${t('clean.low')})`}</b></span>
|
||||
</div>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
|
||||
<Droplets size={14} style={{ color: '#165DFF' }} /><span style={{ fontSize: 11 }}>水源: <b style={{ color: '#165DFF' }}>充足 (50t)</b></span>
|
||||
<Droplets size={14} style={{ color: '#165DFF' }} /><span style={{ fontSize: 11 }}>{t('clean.s38')}<b style={{ color: '#165DFF' }}>{`${t('clean.sufficient')} (50t)`}</b></span>
|
||||
</div>
|
||||
</div>
|
||||
</Col>
|
||||
</Row>
|
||||
</Card>
|
||||
|
||||
<Card title={<span style={{ fontSize: 14, fontWeight: 700 }}>清洗作业影响综合评估</span>} bordered={false} style={cardStyle} bodyStyle={{ padding: 16 }}>
|
||||
<Card title={<span style={{ fontSize: 14, fontWeight: 700 }}>{t('clean.fixed2Cleaning')}</span>} bordered={false} style={cardStyle} bodyStyle={{ padding: 16 }}>
|
||||
<Row gutter={[16, 16]}>
|
||||
{[
|
||||
{ icon: <Droplets size={18} color="#165DFF" />, bg: '#E8F3FF', label: '预计用水量', value: '18 吨', sub: '节水 30% (机器人)', subColor: '#00B42A' },
|
||||
{ icon: <Calendar size={18} color="#165DFF" />, bg: '#E8F3FF', label: '预计总耗时', value: '12 小时', sub: '并行作业 2 组', subColor: '#86909C' },
|
||||
{ icon: <Leaf size={18} color="#00B42A" />, bg: '#E8FFEA', label: '碳减排贡献', value: '6.85 吨', sub: 'CO₂ 减排量', subColor: '#86909C' },
|
||||
{ icon: <ShieldCheck size={18} color="#F7BA1E" />, bg: '#FFF7E8', label: '作业风险评估', value: t('aiAnalysis.lowRisk'), valueColor: '#00B42A', sub: '安全可控', subColor: '#86909C' },
|
||||
{ icon: <Droplets size={18} color="#165DFF" />, bg: '#E8F3FF', label: t('clean.s52'), value: t('clean.tonUnit', { value: '18' }), sub: t('clean.waterSaveWithRobot', { value: '30%' }), subColor: '#00B42A' },
|
||||
{ icon: <Calendar size={18} color="#165DFF" />, bg: '#E8F3FF', label: t('clean.s53'), value: t('clean.hourUnit', { value: '12' }), sub: t('clean.parallelJobs', { count: '2' }), subColor: '#86909C' },
|
||||
{ icon: <Leaf size={18} color="#00B42A" />, bg: '#E8FFEA', label: t('clean.s54'), value: t('clean.tonUnit', { value: '6.85' }), sub: t('clean.co2Reduction'), subColor: '#86909C' },
|
||||
{ icon: <ShieldCheck size={18} color="#F7BA1E" />, bg: '#FFF7E8', label: t('clean.s55'), value: t('aiAnalysis.lowRisk'), valueColor: '#00B42A', sub: t('clean.safeControllable'), subColor: '#86909C' },
|
||||
].map((item, idx) => (
|
||||
<Col span={12} key={idx}>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 12 }}>
|
||||
@@ -582,9 +583,7 @@ export default function CleanOptimizationPage() {
|
||||
</Row>
|
||||
<div style={{ marginTop: 20, padding: 12, background: '#f8fafc', borderRadius: 8, display: 'flex', gap: 8, alignItems: 'flex-start' }}>
|
||||
<InfoCircleOutlined style={{ fontSize: 12, color: '#86909C', marginTop: 2 }} />
|
||||
<Text type="secondary" style={{ fontSize: 10, lineHeight: 1.5 }}>
|
||||
以上决策建议基于历史数据、实时气象及发电损失模型综合计算。实际执行效果可能受天气骤变、现场突发障碍等不确定因素影响。
|
||||
</Text>
|
||||
<Text type="secondary" style={{ fontSize: 10, lineHeight: 1.5 }}>{t('clean.generationActualFixed2ExecuteWeatherAdvice2Ok')}</Text>
|
||||
</div>
|
||||
</Card>
|
||||
</Col>
|
||||
|
||||
@@ -25,7 +25,7 @@ export default function DeviceIndexPage() {
|
||||
|
||||
|
||||
const menuItems = [
|
||||
{ key: 'overview', label: '装备总览', icon: <AppstoreOutlined /> },
|
||||
{ key: 'overview', label: t('devices.equipmentOverview'), icon: <AppstoreOutlined /> },
|
||||
{ key: 'status', label: t('devices.deviceStatus'), icon: <SettingOutlined /> },
|
||||
{ key: 'wayLineTask', label: t('devices.waylineTask'), icon: <AimOutlined /> },
|
||||
{ key: 'robotTask', label: t('devices.robotTask'), icon: <BranchesOutlined /> },
|
||||
@@ -69,7 +69,7 @@ export default function DeviceIndexPage() {
|
||||
return (
|
||||
<Layout style={{ minHeight: '100vh', overflow: 'hidden', scrollbarWidth: "thin", scrollbarColor: '#ccc transparent' }}>
|
||||
<div style={{ padding: '12px 16px 8px', borderBottom: '1px solid #f0f0f0', background: '#fff' }}>
|
||||
<Typography.Title level={4} style={{ margin: 0, fontSize: 'clamp(14px, 1.2vw, 18px)' }}>装备控制</Typography.Title>
|
||||
<Typography.Title level={4} style={{ margin: 0, fontSize: 'clamp(14px, 1.2vw, 18px)' }}>{t('devices.equipmentControl')}</Typography.Title>
|
||||
</div>
|
||||
<Layout>
|
||||
<Sider
|
||||
|
||||
@@ -25,7 +25,7 @@ export default function Downloads() {
|
||||
const { t } = useTranslation();
|
||||
const columns = [
|
||||
{
|
||||
title: '文件详情',
|
||||
title: t('video.fileDetails'),
|
||||
key: 'file',
|
||||
render: (record: any) => (
|
||||
<Space size="middle">
|
||||
@@ -40,13 +40,13 @@ export default function Downloads() {
|
||||
),
|
||||
},
|
||||
{
|
||||
title: '源设备',
|
||||
title: t('video.sourceDevice'),
|
||||
dataIndex: 'deviceName',
|
||||
key: 'deviceName',
|
||||
render: (text: string) => <Text style={{ fontSize: 13 }}>{text}</Text>,
|
||||
},
|
||||
{
|
||||
title: '起止时间',
|
||||
title: t('video.startEndTime'),
|
||||
key: 'duration',
|
||||
render: (record: any) => (
|
||||
<Space direction="vertical" size={0}>
|
||||
@@ -57,7 +57,7 @@ export default function Downloads() {
|
||||
),
|
||||
},
|
||||
{
|
||||
title: '容量',
|
||||
title: t('video.capacity'),
|
||||
dataIndex: 'size',
|
||||
key: 'size',
|
||||
render: (text: string) => <Text type="secondary" style={{ fontSize: 12 }}>{text}</Text>,
|
||||
@@ -72,7 +72,7 @@ export default function Downloads() {
|
||||
icon={<DownloadOutlined />}
|
||||
style={{ fontSize: 11, fontWeight: 'bold' }}
|
||||
>
|
||||
下载
|
||||
{t('common.download')}
|
||||
</Button>
|
||||
),
|
||||
},
|
||||
@@ -81,10 +81,10 @@ export default function Downloads() {
|
||||
return (
|
||||
<div className="space-y-4">
|
||||
<div className="flex items-center justify-between">
|
||||
<Title level={5} style={{ margin: 0 }}>视频回放中心</Title>
|
||||
<Title level={5} style={{ margin: 0 }}>{t('video.videoReplayCenter')}</Title>
|
||||
<Segmented
|
||||
options={['全部录像', '今日录像']}
|
||||
defaultValue="全部录像"
|
||||
options={[t('video.allRecordings'), t('video.todayRecordings')]}
|
||||
defaultValue={t('video.allRecordings')}
|
||||
style={{ borderRadius: 2 }}
|
||||
/>
|
||||
</div>
|
||||
@@ -94,7 +94,7 @@ export default function Downloads() {
|
||||
<Col>
|
||||
<Space>
|
||||
<CalendarOutlined style={{ color: 'rgba(0,0,0,0.45)' }} />
|
||||
<Text strong type="secondary" style={{ fontSize: 11, textTransform: 'uppercase' }}>时间跨度</Text>
|
||||
<Text strong type="secondary" style={{ fontSize: 11, textTransform: 'uppercase' }}>{t('video.timeSpan')}</Text>
|
||||
</Space>
|
||||
</Col>
|
||||
<Col>
|
||||
@@ -102,7 +102,7 @@ export default function Downloads() {
|
||||
</Col>
|
||||
<Col flex="auto" className="text-right">
|
||||
<Button type="primary" size="small" icon={<SearchOutlined />} style={{ borderRadius: 2 }}>
|
||||
联机检索
|
||||
{t('video.onlineSearch')}
|
||||
</Button>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
@@ -101,9 +101,9 @@ export default function StationDashboard() {
|
||||
];
|
||||
|
||||
const aiAnalysis = [
|
||||
{ type: "AI分析", content: "AI发现逆变器温度与组串电流存在轻微异常,建议优先复核A区设备。", desc: "发现2处组件存在异常热斑" },
|
||||
{ type: t('constants.critical'), content: "INV-A02散热检修建议:建议检查INV-A02散热风扇、风道和运行负载,持续高温时转维修工单。", desc: "3个组串存在发电异常" },
|
||||
{ type: t('constants.critical'), content: "A05阵列热斑处置建议:建议现场复核PV-A05-018至PV-A05-020组件接线和旁路二极管状态,必要时更换异常组件。", desc: "整体发电偏差-2.8%" }
|
||||
{ type: "AI分析", content: t('home.fixed2AiInverterFixed2TemperatureAbnormalADevice'), desc: "发现2处组件存在异常热斑" },
|
||||
{ type: t('constants.critical'), content: t('home.invA02MaintenanceInvA02Repair'), desc: "3个组串存在发电异常" },
|
||||
{ type: t('constants.critical'), content: t('home.a05HotspotPvA05018PvA05020StatusAbnormal'), desc: "整体发电偏差-2.8%" }
|
||||
];
|
||||
|
||||
// 图表数据
|
||||
@@ -200,12 +200,12 @@ export default function StationDashboard() {
|
||||
const res = await addWorkOrder(params);
|
||||
|
||||
if (res.code === 0 || res.code === 200) {
|
||||
messageApi.success('✅ 清洗工单生成成功');
|
||||
messageApi.success(t('home.cleaningOrderGeneratedSuccessfullyFixed2'));
|
||||
} else {
|
||||
messageApi.error(res.msg || '❌ 工单生成失败');
|
||||
}
|
||||
} catch (error) {
|
||||
messageApi.error('❌ 工单生成接口调用失败');
|
||||
messageApi.error(t('home.failedFixed2'));
|
||||
console.error(error);
|
||||
}
|
||||
};
|
||||
@@ -222,7 +222,7 @@ export default function StationDashboard() {
|
||||
}
|
||||
|
||||
} catch (err) {
|
||||
messageApi.error('加载失败');
|
||||
messageApi.error(t('common.loadFailed'));
|
||||
} finally {
|
||||
|
||||
}
|
||||
@@ -322,7 +322,7 @@ export default function StationDashboard() {
|
||||
series={[{ key: 'efficiency', name: '效率', color: '#165DFF' }]}
|
||||
/>
|
||||
</Card>
|
||||
<Card title={<span style={{ fontWeight: 800 }}>{t('home.maintenanceProgress')}</span>} extra={<Button type="link" size="small">更多 ></Button>} bordered={false} style={cardStyle} bodyStyle={{ padding: '12px' }}>
|
||||
<Card title={<span style={{ fontWeight: 800 }}>{t('home.maintenanceProgress')}</span>} extra={<Button type="link" size="small">{t('home.fixed2MoreGt')}</Button>} bordered={false} style={cardStyle} bodyStyle={{ padding: '12px' }}>
|
||||
<div style={{ display: 'flex', alignItems: 'center' }}>
|
||||
<UniversalPieChart
|
||||
data={taskProgressData}
|
||||
@@ -334,7 +334,7 @@ export default function StationDashboard() {
|
||||
/>
|
||||
<div style={{ flex: 1, paddingLeft: 12 }}>
|
||||
<div style={{ textAlign: 'center' }}>
|
||||
<div style={{ fontSize: 12, color: '#999' }}>总任务</div>
|
||||
<div style={{ fontSize: 12, color: '#999' }}>{t('home.taskSuspended2Fixed2')}</div>
|
||||
<div style={{ fontSize: 20, fontWeight: 800 }}>12</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -351,10 +351,10 @@ export default function StationDashboard() {
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
|
||||
<span style={{ fontWeight: 800 }}>{t('home.stationOverview')}</span>
|
||||
<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>roles.normal</span>
|
||||
<span style={{ display: 'flex', alignItems: 'center' }}><span style={{ width: 8, height: 8, borderRadius: '50%', background: '#ff4d4f', marginRight: 4 }}></span>constants.sourceAlert</span>
|
||||
<span style={{ display: 'flex', alignItems: 'center' }}><span style={{ width: 8, height: 8, borderRadius: '50%', background: '#888', marginRight: 4 }}></span>devices.offline</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: '#52c41a', marginRight: 4 }}></span>{t('roles.normal')}</span>
|
||||
<span style={{ display: 'flex', alignItems: 'center' }}><span style={{ width: 8, height: 8, borderRadius: '50%', background: '#ff4d4f', marginRight: 4 }}></span>{t('constants.sourceAlert')}</span>
|
||||
<span style={{ display: 'flex', alignItems: 'center' }}><span style={{ width: 8, height: 8, borderRadius: '50%', background: '#888', marginRight: 4 }}></span>{t('devices.offline')}</span>
|
||||
<span style={{ display: 'flex', alignItems: 'center' }}><span style={{ width: 8, height: 8, borderRadius: '50%', background: '#faad14', marginRight: 4 }}></span>{t('home.underMaintenance')}</span>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@@ -368,7 +368,7 @@ export default function StationDashboard() {
|
||||
style={{ width: '100%', height: '100%', border: 'none', borderRadius: '8px', position: "absolute" }}
|
||||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
||||
allowFullScreen
|
||||
title="外部系统"
|
||||
title={t('home.s20')}
|
||||
/>*/}
|
||||
|
||||
<CesiumMap from="other" />
|
||||
@@ -378,16 +378,16 @@ export default function StationDashboard() {
|
||||
|
||||
<Row gutter={16}>
|
||||
<Col span={12}>
|
||||
<Card title={<span style={{ fontWeight: 800 }}>{t('home.recentInspection')}</span>} extra={<Button type="link" size="small">更多 ></Button>} bordered={false} style={{ ...cardStyle, height: "100%" }} bodyStyle={{ padding: '0 12px' }}>
|
||||
<Card title={<span style={{ fontWeight: 800 }}>{t('home.recentInspection')}</span>} extra={<Button type="link" size="small">{t('home.fixed2MoreGt')}</Button>} bordered={false} style={{ ...cardStyle, height: "100%" }} bodyStyle={{ padding: '0 12px' }}>
|
||||
<Table
|
||||
dataSource={patrolRecords}
|
||||
pagination={false}
|
||||
size="small"
|
||||
columns={[
|
||||
{ title: '巡检类型', dataIndex: 'name', key: 'name', ellipsis: true },
|
||||
{ title: '巡检时间', dataIndex: 'time', key: 'time' },
|
||||
{ title: '巡检人员', dataIndex: 'person', key: 'person', render: (t) => t.substring(0, 10) },
|
||||
{ title: t('roles.status'), dataIndex: 'status', key: 'status', render: () => <span style={{ color: '#52c41a', fontSize: 12 }}>● 已完成</span> },
|
||||
{ title: t('home.fixed2InspectionFixed2TypeFixed2'), dataIndex: 'name', key: 'name', ellipsis: true },
|
||||
{ title: t('home.fixed2InspectionFixed2TimeFixed2'), dataIndex: 'time', key: 'time' },
|
||||
{ title: t('home.fixed2Inspection'), dataIndex: 'person', key: 'person', render: (t) => t.substring(0, 10) },
|
||||
{ title: t('roles.status'), dataIndex: 'status', key: 'status', render: () => <span style={{ color: '#52c41a', fontSize: 12 }}>{t('home.completedFixed2')}</span> },
|
||||
]}
|
||||
/>
|
||||
</Card>
|
||||
@@ -401,8 +401,8 @@ export default function StationDashboard() {
|
||||
<ThunderboltOutlined style={{ fontSize: 24, color: '#722ed1' }} />
|
||||
</div>
|
||||
<div>
|
||||
<div style={{ fontSize: 16, fontWeight: 600, color: '#1D2129' }}>热点检测</div>
|
||||
<div style={{ fontSize: 14, color: '#4E5969', marginTop: 4 }}>发现 <span style={{ color: '#165DFF', fontWeight: 600 }}>2</span> 处组件存在异常热斑</div>
|
||||
<div style={{ fontSize: 16, fontWeight: 600, color: '#1D2129' }}>{t('home.detectFixed2')}</div>
|
||||
<div style={{ fontSize: 14, color: '#4E5969', marginTop: 4 }}>{t('home.s4')}<span style={{ color: '#165DFF', fontWeight: 600 }}>2</span>{t('home.abnormalFixed2HotspotFixed2')}</div>
|
||||
</div>
|
||||
</div>
|
||||
<Button type="link" size="small" style={{ color: '#165DFF' }}>{t('common.viewDetail')}</Button>
|
||||
@@ -413,8 +413,8 @@ export default function StationDashboard() {
|
||||
<AppstoreOutlined style={{ fontSize: 24, color: '#52c41a' }} />
|
||||
</div>
|
||||
<div>
|
||||
<div style={{ fontSize: 16, fontWeight: 600, color: '#1D2129' }}>组串异常</div>
|
||||
<div style={{ fontSize: 14, color: '#4E5969', marginTop: 4 }}><span style={{ color: '#165DFF', fontWeight: 600 }}>3</span> 个组串存在发电异常</div>
|
||||
<div style={{ fontSize: 16, fontWeight: 600, color: '#1D2129' }}>{t('home.abnormalFixed2')}</div>
|
||||
<div style={{ fontSize: 14, color: '#4E5969', marginTop: 4 }}><span style={{ color: '#165DFF', fontWeight: 600 }}>3</span>{t('home.generationFixed2AbnormalFixed2')}</div>
|
||||
</div>
|
||||
</div>
|
||||
<Button type="link" size="small" style={{ color: '#165DFF' }}>{t('common.viewDetail')}</Button>
|
||||
@@ -425,8 +425,8 @@ export default function StationDashboard() {
|
||||
<RiseOutlined style={{ fontSize: 24, color: '#165DFF' }} />
|
||||
</div>
|
||||
<div>
|
||||
<div style={{ fontSize: 16, fontWeight: 600, color: '#1D2129' }}>发电偏差分析</div>
|
||||
<div style={{ fontSize: 14, color: '#4E5969', marginTop: 4 }}>整体发电偏差 <span style={{ color: '#165DFF', fontWeight: 600 }}>-2.8%</span></div>
|
||||
<div style={{ fontSize: 16, fontWeight: 600, color: '#1D2129' }}>{t('home.fixed2GenerationDeviation')}</div>
|
||||
<div style={{ fontSize: 14, color: '#4E5969', marginTop: 4 }}>{t('home.generationDeviationFixed2')}<span style={{ color: '#165DFF', fontWeight: 600 }}>-2.8%</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<Button type="link" size="small" style={{ color: '#165DFF' }}>{t('common.viewDetail')}</Button>
|
||||
@@ -441,11 +441,11 @@ export default function StationDashboard() {
|
||||
{/* 右侧 */}
|
||||
<Col xs={24} xl={6}>
|
||||
<Space direction="vertical" size={8} style={{ width: '100%' }}>
|
||||
<Card title={<span style={{ fontWeight: 800 }}>{t('alerts.realtimeAlert')}</span>} extra={<Button type="link" size="small" onClick={() => navigate('/alerts/all')}>更多 ></Button>} bordered={false} style={cardStyle} bodyStyle={{ padding: '12px' }}>
|
||||
<Card title={<span style={{ fontWeight: 800 }}>{t('alerts.realtimeAlert')}</span>} extra={<Button type="link" size="small" onClick={() => navigate('/alerts/all')}>{t('home.fixed2MoreGt')}</Button>} bordered={false} style={cardStyle} bodyStyle={{ padding: '12px' }}>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', marginBottom: 12, padding: '0 4px 8px', borderBottom: '1px solid #f0f0f0', fontSize: 13, color: '#666' }}>
|
||||
<span style={{ flex: 3 }}>告警内容</span>
|
||||
<span style={{ flex: 1, textAlign: 'center' }}>级别</span>
|
||||
<span style={{ flex: 1.5, textAlign: 'right' }}>发生时间</span>
|
||||
<span style={{ flex: 3 }}>{t('alerts.alarmContent')}</span>
|
||||
<span style={{ flex: 1, textAlign: 'center' }}>{t('alerts.level')}</span>
|
||||
<span style={{ flex: 1.5, textAlign: 'right' }}>{t('alerts.occurTime')}</span>
|
||||
</div>
|
||||
{alarmList.slice(0, 2).map((alert, idx) => {
|
||||
let dotColor = alert.alarmLevel === 'ERROR' ? '#ff4d4f' : alert.alarmLevel === 'WARNING' ? '#fa8c16' : '#1677ff';
|
||||
@@ -465,7 +465,7 @@ export default function StationDashboard() {
|
||||
})}
|
||||
</Card>
|
||||
|
||||
<Card title={<span style={{ fontWeight: 800 }}>{t('home.deviceOnlineStatus')}</span>} extra={<Button type="link" size="small">更多 ></Button>} bordered={false} style={cardStyle} bodyStyle={{ padding: '12px' }}>
|
||||
<Card title={<span style={{ fontWeight: 800 }}>{t('home.deviceOnlineStatus')}</span>} extra={<Button type="link" size="small">{t('home.fixed2MoreGt')}</Button>} bordered={false} style={cardStyle} bodyStyle={{ padding: '12px' }}>
|
||||
<Row gutter={[16, 16]}>
|
||||
{[
|
||||
{ name: '组件阵列', count: '320/320', icon: <AppstoreOutlined /> },
|
||||
@@ -490,7 +490,7 @@ export default function StationDashboard() {
|
||||
</Row>
|
||||
</Card>
|
||||
|
||||
<Card title={<span style={{ fontWeight: 800 }}>{t('home.weatherInfo')}</span>} extra={<Button type="link" size="small">详细 ></Button>} bordered={false} style={cardStyle} bodyStyle={{ padding: '12px' }}>
|
||||
<Card title={<span style={{ fontWeight: 800 }}>{t('home.weatherInfo')}</span>} extra={<Button type="link" size="small">{t('home.gt')}</Button>} bordered={false} style={cardStyle} bodyStyle={{ padding: '12px' }}>
|
||||
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'start', gap: 20 }}>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 12 }}>
|
||||
<WeatherDisplay type={weatherType} />
|
||||
@@ -510,7 +510,7 @@ export default function StationDashboard() {
|
||||
{/* ====================================== */}
|
||||
{/* 👇 清洗建议 + 生成工单按钮(已完善) */}
|
||||
{/* ====================================== */}
|
||||
<Card title={<span style={{ fontWeight: 800 }}>{t('clean.cleaningSuggestion')}</span>} extra={<Button type="link" size="small">更多 ></Button>} bordered={false} style={cardStyle} bodyStyle={{ padding: '12px' }}>
|
||||
<Card title={<span style={{ fontWeight: 800 }}>{t('clean.cleaningSuggestion')}</span>} extra={<Button type="link" size="small">{t('home.fixed2MoreGt')}</Button>} bordered={false} style={cardStyle} bodyStyle={{ padding: '12px' }}>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 16, marginBottom: 16 }}>
|
||||
<div style={{ width: 80, height: 80, position: 'relative' }}>
|
||||
<UniversalPieChart
|
||||
@@ -528,9 +528,9 @@ export default function StationDashboard() {
|
||||
/>
|
||||
</div>
|
||||
<div style={{ flex: 1 }}>
|
||||
<div style={{ fontSize: 12, color: '#666', marginBottom: 4 }}>建议清洗时间: <span style={{ color: '#165DFF' }}>3天内</span></div>
|
||||
<div style={{ fontSize: 12, color: '#666', marginBottom: 4 }}>预计提升发电量: <span style={{ color: '#00B42A' }}>2.6 %</span></div>
|
||||
<div style={{ fontSize: 12, color: '#666' }}>预计提升电量: <span style={{ color: '#00B42A' }}>120 kWh/天</span></div>
|
||||
<div style={{ fontSize: 12, color: '#666', marginBottom: 4 }}>{t('home.cleaningFixed2Time')}<span style={{ color: '#165DFF' }}>{t('home.3')}</span></div>
|
||||
<div style={{ fontSize: 12, color: '#666', marginBottom: 4 }}>{t('home.fixed2Battery')}<span style={{ color: '#00B42A' }}>2.6 %</span></div>
|
||||
<div style={{ fontSize: 12, color: '#666' }}>{t('home.battery')}<span style={{ color: '#00B42A' }}>{t('home.120')}</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<Button
|
||||
@@ -538,9 +538,7 @@ export default function StationDashboard() {
|
||||
block
|
||||
style={{ borderRadius: 8, height: 36 }}
|
||||
onClick={handleaddOrder}
|
||||
>
|
||||
生成清洗工单
|
||||
</Button>
|
||||
>{t('home.generateCleanOrder')}</Button>
|
||||
</Card>
|
||||
</Space>
|
||||
</Col>
|
||||
|
||||
@@ -55,10 +55,10 @@ export default function Login() {
|
||||
}
|
||||
navigate('/', { replace: true });
|
||||
} else {
|
||||
message.error('登录失败:' + loginResult.msg);
|
||||
message.error(t('login.loginFailed') + ':' + loginResult.msg);
|
||||
}
|
||||
} catch (err) {
|
||||
message.error('登录失败:' + err.toString());
|
||||
message.error(t('login.loginFailed') + ':' + err.toString());
|
||||
} finally {
|
||||
// 无论成功失败,关闭 loading
|
||||
setLoading(false);
|
||||
@@ -89,7 +89,7 @@ export default function Login() {
|
||||
<div className="md:w-1/2 bg-white p-10 md:p-16 flex flex-col justify-center relative z-10">
|
||||
<motion.div initial={{ opacity: 0, x: -20 }} animate={{ opacity: 1, x: 0 }} transition={{ delay: 0.2 }}>
|
||||
<Title level={2} style={{ marginBottom: 40, color: '#111', fontWeight: 700 }}>
|
||||
光伏电站智能监控与运维系统
|
||||
{t('login.systemName')}
|
||||
</Title>
|
||||
|
||||
<Form name="login" layout="vertical" onFinish={onFinish} autoComplete="off" size="large">
|
||||
@@ -117,7 +117,7 @@ export default function Login() {
|
||||
>
|
||||
<Checkbox>
|
||||
<p style={{ fontSize: 14, color: '#666' }}>
|
||||
我已阅读并同意 <span type="link" style={{ padding: 0, color: '#1677ff' }}>{t('login.userAgreement')}</span> 和 <span type="link" style={{ padding: 0, color: '#1677ff' }}>{t('login.privacyPolicy')}</span>
|
||||
{t('login.agreeText')} <span type="link" style={{ padding: 0, color: '#1677ff' }}>{t('login.userAgreement')}</span> {t('login.and')} <span type="link" style={{ padding: 0, color: '#1677ff' }}>{t('login.privacyPolicy')}</span>
|
||||
</p>
|
||||
</Checkbox>
|
||||
</Form.Item>
|
||||
@@ -139,7 +139,7 @@ export default function Login() {
|
||||
boxShadow: '0 4px 12px rgba(22, 119, 255, 0.25)'
|
||||
}}
|
||||
>
|
||||
登录
|
||||
{t('login.loginButton')}
|
||||
</Button>
|
||||
</Form.Item>
|
||||
</Form>
|
||||
|
||||
@@ -38,6 +38,8 @@ const { TabPane } = Tabs;
|
||||
const { Title } = Typography;
|
||||
|
||||
const Profile: React.FC = () => {
|
||||
const { t } = useTranslation();
|
||||
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [profileData, setProfileData] = useState<any>(null);
|
||||
const { userInfo } = useSelector((state: RootState) => state.user);
|
||||
@@ -80,7 +82,7 @@ const Profile: React.FC = () => {
|
||||
message.error(res.msg || t('profile.modifyFailed'));
|
||||
}
|
||||
} catch (error) {
|
||||
message.error('请求失败');
|
||||
message.error(t('profile.requestFailed'));
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
@@ -101,7 +103,7 @@ const Profile: React.FC = () => {
|
||||
message.error(res.msg || t('profile.modifyFailed'));
|
||||
}
|
||||
} catch (error) {
|
||||
message.error('请求失败');
|
||||
message.error(t('profile.requestFailed'));
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
@@ -136,7 +138,7 @@ const Profile: React.FC = () => {
|
||||
return (
|
||||
<div style={{ padding: '20px 40px', background: '#f5f7fa', minHeight: '100vh' }}>
|
||||
<Title level={4} style={{ marginBottom: 24, fontWeight: 600 }}>
|
||||
个人中心
|
||||
{t('profile.title')}
|
||||
</Title>
|
||||
|
||||
{/* 🔥 关键:给 Row 添加 align="stretch" 让两列自动等高 */}
|
||||
@@ -175,7 +177,7 @@ const Profile: React.FC = () => {
|
||||
borderColor: '#d9d9d9',
|
||||
}}
|
||||
>
|
||||
更换头像
|
||||
{t('profile.changeAvatar')}
|
||||
</Button>
|
||||
</Upload>
|
||||
</div>
|
||||
@@ -187,25 +189,25 @@ const Profile: React.FC = () => {
|
||||
<Space direction="vertical" size="middle" style={{ width: '100%' }}>
|
||||
<div style={{ display: 'flex', alignItems: 'center', fontSize: 14 }}>
|
||||
<UserOutlined style={{ marginRight: 12, color: '#165DFF', fontSize: 16 }} />
|
||||
<span style={{ color: '#666' }}>用户名称:</span>
|
||||
<span style={{ color: '#666' }}>{t('profile.username')}:</span>
|
||||
<strong style={{ marginLeft: 4, color: '#333' }}>{profileData?.userName}</strong>
|
||||
</div>
|
||||
|
||||
<div style={{ display: 'flex', alignItems: 'center', fontSize: 14 }}>
|
||||
<PhoneOutlined style={{ marginRight: 12, color: '#165DFF', fontSize: 16 }} />
|
||||
<span style={{ color: '#666' }}>手机号码:</span>
|
||||
<span style={{ color: '#666' }}>{t('profile.phone')}:</span>
|
||||
<strong style={{ marginLeft: 4, color: '#333' }}>{profileData?.phonenumber || t('profile.notSet')}</strong>
|
||||
</div>
|
||||
|
||||
<div style={{ display: 'flex', alignItems: 'center', fontSize: 14 }}>
|
||||
<MailOutlined style={{ marginRight: 12, color: '#165DFF', fontSize: 16 }} />
|
||||
<span style={{ color: '#666' }}>用户邮箱:</span>
|
||||
<span style={{ color: '#666' }}>{t('profile.email')}:</span>
|
||||
<strong style={{ marginLeft: 4, color: '#333' }}>{profileData?.email || t('profile.notSet')}</strong>
|
||||
</div>
|
||||
|
||||
<div style={{ display: 'flex', alignItems: 'center', fontSize: 14 }}>
|
||||
<SafetyOutlined style={{ marginRight: 12, color: '#165DFF', fontSize: 16 }} />
|
||||
<span style={{ color: '#666' }}>所属角色:</span>
|
||||
<span style={{ color: '#666' }}>{t('profile.role')}:</span>
|
||||
<strong style={{ marginLeft: 4, color: '#333' }}>
|
||||
{profileData?.roles?.map((r: any) => r.roleName).join(', ') || t('profile.notSet')}
|
||||
</strong>
|
||||
@@ -234,7 +236,7 @@ const Profile: React.FC = () => {
|
||||
}}
|
||||
>
|
||||
{/* 基本资料 */}
|
||||
<TabPane tab="基本资料" key="1">
|
||||
<TabPane tab={t('profile.basicInfo')} key="1">
|
||||
<div style={{ maxWidth: 500, margin: '0 auto', padding: '12px 0' }}>
|
||||
<Form
|
||||
form={form}
|
||||
@@ -271,15 +273,15 @@ const Profile: React.FC = () => {
|
||||
name="sex"
|
||||
>
|
||||
<Radio.Group>
|
||||
<Radio value="0"><ManOutlined /> 男</Radio>
|
||||
<Radio value="1"><WomanOutlined /> 女</Radio>
|
||||
<Radio value="0"><ManOutlined /> {t('profile.male')}</Radio>
|
||||
<Radio value="1"><WomanOutlined /> {t('profile.female')}</Radio>
|
||||
</Radio.Group>
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item
|
||||
label={t('users.phoneLabel')}
|
||||
name="phonenumber"
|
||||
rules={[{ pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号码' }]}
|
||||
rules={[{ pattern: /^1[3-9]\d{9}$/, message: t('profile.phoneInvalid') }]}
|
||||
>
|
||||
<Input
|
||||
prefix={<PhoneOutlined />}
|
||||
@@ -291,11 +293,11 @@ const Profile: React.FC = () => {
|
||||
<Form.Item
|
||||
label={t('users.email')}
|
||||
name="email"
|
||||
rules={[{ type: 'email', message: '请输入正确的邮箱格式' }]}
|
||||
rules={[{ type: 'email', message: t('profile.emailInvalid') }]}
|
||||
>
|
||||
<Input
|
||||
prefix={<MailOutlined />}
|
||||
placeholder="请输入邮箱"
|
||||
placeholder={t('profile.emailPlaceholder')}
|
||||
style={{ borderRadius: 6 }}
|
||||
/>
|
||||
</Form.Item>
|
||||
@@ -305,7 +307,7 @@ const Profile: React.FC = () => {
|
||||
name="remark"
|
||||
>
|
||||
<Input.TextArea
|
||||
placeholder="请输入备注"
|
||||
placeholder={t('profile.remarkPlaceholder')}
|
||||
style={{ borderRadius: 6 }}
|
||||
rows={3}
|
||||
/>
|
||||
@@ -323,7 +325,7 @@ const Profile: React.FC = () => {
|
||||
width: 160,
|
||||
}}
|
||||
>
|
||||
保存修改
|
||||
{t('profile.saveChanges')}
|
||||
</Button>
|
||||
</Form.Item>
|
||||
</Form>
|
||||
@@ -331,7 +333,7 @@ const Profile: React.FC = () => {
|
||||
</TabPane>
|
||||
|
||||
{/* 修改密码 */}
|
||||
<TabPane tab="修改密码" key="2">
|
||||
<TabPane tab={t('profile.changePassword')} key="2">
|
||||
<div style={{ maxWidth: 500, margin: '0 auto', padding: '12px 0' }}>
|
||||
<Form
|
||||
form={pwdForm}
|
||||
@@ -342,11 +344,11 @@ const Profile: React.FC = () => {
|
||||
<Form.Item
|
||||
label={t('profile.oldPassword')}
|
||||
name="oldPassword"
|
||||
rules={[{ required: true, message: '请输入旧密码' }]}
|
||||
rules={[{ required: true, message: t('profile.oldPasswordPlaceholder') }]}
|
||||
>
|
||||
<Input.Password
|
||||
prefix={<LockOutlined />}
|
||||
placeholder="请输入旧密码"
|
||||
placeholder={t('profile.oldPasswordPlaceholder')}
|
||||
style={{ borderRadius: 6 }}
|
||||
/>
|
||||
</Form.Item>
|
||||
@@ -355,13 +357,13 @@ const Profile: React.FC = () => {
|
||||
label={t('profile.newPassword')}
|
||||
name="newPassword"
|
||||
rules={[
|
||||
{ required: true, message: '请输入新密码' },
|
||||
{ min: 6, message: '密码长度不能小于6位' },
|
||||
{ required: true, message: t('profile.newPasswordPlaceholder') },
|
||||
{ min: 6, message: t('profile.passwordLengthError') },
|
||||
]}
|
||||
>
|
||||
<Input.Password
|
||||
prefix={<LockOutlined />}
|
||||
placeholder="请输入新密码"
|
||||
placeholder={t('profile.newPasswordPlaceholder')}
|
||||
style={{ borderRadius: 6 }}
|
||||
/>
|
||||
</Form.Item>
|
||||
@@ -369,11 +371,11 @@ const Profile: React.FC = () => {
|
||||
<Form.Item
|
||||
label={t('profile.confirmPassword')}
|
||||
name="confirmPassword"
|
||||
rules={[{ required: true, message: '请确认新密码' }]}
|
||||
rules={[{ required: true, message: t('profile.confirmPasswordRequired') }]}
|
||||
>
|
||||
<Input.Password
|
||||
prefix={<LockOutlined />}
|
||||
placeholder="请再次输入新密码"
|
||||
placeholder={t('profile.confirmPasswordPlaceholder')}
|
||||
style={{ borderRadius: 6 }}
|
||||
/>
|
||||
</Form.Item>
|
||||
@@ -390,7 +392,7 @@ const Profile: React.FC = () => {
|
||||
width: 160,
|
||||
}}
|
||||
>
|
||||
确认修改
|
||||
{t('profile.confirmChange')}
|
||||
</Button>
|
||||
</Form.Item>
|
||||
</Form>
|
||||
|
||||
@@ -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' }}>
|
||||
{/* 简易地图点位 */}
|
||||
|
||||
@@ -27,63 +27,6 @@ const { Option } = Select;
|
||||
const { Text, Title } = Typography;
|
||||
|
||||
// 模拟数据(完全匹配参考图)
|
||||
const overviewCards = [
|
||||
{
|
||||
title: '本月发电量',
|
||||
value: '138.6',
|
||||
unit: 'MWh',
|
||||
trend: '环比 ↑ +6.2%',
|
||||
color: '#00B42A',
|
||||
iconBg: '#E8FFEA',
|
||||
icon: <ThunderboltOutlined style={{ color: '#00B42A', fontSize: 24 }} />
|
||||
},
|
||||
{
|
||||
title: 'PR均值',
|
||||
value: '82.8',
|
||||
unit: '%',
|
||||
trend: '环比 ↑ +1.1%',
|
||||
color: '#165DFF',
|
||||
iconBg: '#E8F3FF',
|
||||
icon: <LineChartOutlined style={{ color: '#165DFF', fontSize: 24 }} />
|
||||
},
|
||||
{
|
||||
title: '运维工单完成率',
|
||||
value: '93.4',
|
||||
unit: '%',
|
||||
trend: '本月累计 126 单',
|
||||
color: '#165DFF',
|
||||
iconBg: '#E8F3FF',
|
||||
icon: <CheckCircleOutlined style={{ color: '#165DFF', fontSize: 24 }} />
|
||||
},
|
||||
{
|
||||
title: '告警闭环率',
|
||||
value: '94.2',
|
||||
unit: '%',
|
||||
trend: '严重告警 8 条',
|
||||
color: '#F53F3F',
|
||||
iconBg: '#FFF1F0',
|
||||
icon: <BellOutlined style={{ color: '#F53F3F', fontSize: 24 }} />
|
||||
},
|
||||
{
|
||||
title: '清洗收益提升',
|
||||
value: '+7.6',
|
||||
unit: '%',
|
||||
trend: '预估增发 12,850 kWh',
|
||||
color: '#00B42A',
|
||||
iconBg: '#E8FFEA',
|
||||
icon: <ThunderboltOutlined style={{ color: '#00B42A', fontSize: 24 }} />
|
||||
},
|
||||
{
|
||||
title: '自动生成报告',
|
||||
value: '24',
|
||||
unit: '份',
|
||||
trend: '本月累计',
|
||||
color: '#722ED1',
|
||||
iconBg: '#F9F0FF',
|
||||
icon: <FileTextOutlined style={{ color: '#722ED1', fontSize: 24 }} />
|
||||
},
|
||||
];
|
||||
|
||||
const monthlyPowerData = [
|
||||
{ date: '05-01', generation: 6, predicted: 8, pr: 105 },
|
||||
{ date: '05-03', generation: 5.5, predicted: 7.8, pr: 102 },
|
||||
@@ -117,34 +60,6 @@ const orderAlarmData = [
|
||||
{ date: '05-26-31', newOrder: 90, completed: 70, alarmCount: 18, closedRate: 92 },
|
||||
];
|
||||
|
||||
const aiAnalysisData = [
|
||||
{ type: '热斑识别', value: 36, color: '#F53F3F', icon: <RiseOutlined /> },
|
||||
{ type: '异常组串', value: 8, color: '#FF7D00', icon: <WarningOutlined /> },
|
||||
{ type: '推荐清洗区块', value: 8, color: '#00B42A', icon: <ThunderboltOutlined /> },
|
||||
{ type: '视频异常事件', value: 6, color: '#722ED1', icon: <EyeOutlined /> },
|
||||
];
|
||||
const aiPieData = aiAnalysisData.map(item => ({
|
||||
name: item.type,
|
||||
value: item.value,
|
||||
color: item.color,
|
||||
}));
|
||||
|
||||
const reportFileList = [
|
||||
{ name: '2025年05月电站月报', status: '已生成' },
|
||||
{ name: '周运维总结', status: '已生成' },
|
||||
{ name: 'AI诊断日报', status: '生成中' },
|
||||
{ name: '告警闭环周报', status: '已生成' },
|
||||
];
|
||||
|
||||
const reportTemplates = [
|
||||
{ name: '月度经营报告', desc: '综合经营分析与收益评估模板', color: '#165DFF', bg: '#E8F3FF', icon: <BarChartOutlined /> },
|
||||
{ name: '设备健康分析报告', desc: '设备健康度与故障分析模板', color: '#165DFF', bg: '#E8F3FF', icon: <FileDoneOutlined /> },
|
||||
{ name: '清洗优化效果报告', desc: '清洗前后对比与收益分析模板', color: '#165DFF', bg: '#E8F3FF', icon: <ThunderboltOutlined /> },
|
||||
{ name: '巡检与机器人作业报告', desc: '巡检与机器人作业统计模板', color: '#722ED1', bg: '#F9F0FF', icon: <RobotOutlined /> },
|
||||
];
|
||||
|
||||
|
||||
|
||||
export default function ReportCenterPage() {
|
||||
const { t } = useTranslation();
|
||||
const [activeTab, setActiveTab] = useState('overview');
|
||||
@@ -152,6 +67,89 @@ export default function ReportCenterPage() {
|
||||
const [reportType, setReportType] = useState('all');
|
||||
const [dateRange, setDateRange] = useState([dayjs('2025-05-01'), dayjs('2025-05-31')]);
|
||||
|
||||
const overviewCards = [
|
||||
{
|
||||
title: t('report.monthlyGeneration'),
|
||||
value: '138.6',
|
||||
unit: 'MWh',
|
||||
trend: t('report.monthOverMonthUp', { value: '+6.2%' }),
|
||||
color: '#00B42A',
|
||||
iconBg: '#E8FFEA',
|
||||
icon: <ThunderboltOutlined style={{ color: '#00B42A', fontSize: 24 }} />
|
||||
},
|
||||
{
|
||||
title: t('report.prAverage'),
|
||||
value: '82.8',
|
||||
unit: '%',
|
||||
trend: t('report.monthOverMonthUp', { value: '+1.1%' }),
|
||||
color: '#165DFF',
|
||||
iconBg: '#E8F3FF',
|
||||
icon: <LineChartOutlined style={{ color: '#165DFF', fontSize: 24 }} />
|
||||
},
|
||||
{
|
||||
title: t('report.workOrderCompletionRate'),
|
||||
value: '93.4',
|
||||
unit: '%',
|
||||
trend: t('report.monthlyTotalOrders', { count: 126 }),
|
||||
color: '#165DFF',
|
||||
iconBg: '#E8F3FF',
|
||||
icon: <CheckCircleOutlined style={{ color: '#165DFF', fontSize: 24 }} />
|
||||
},
|
||||
{
|
||||
title: t('report.alertClosureRate'),
|
||||
value: '94.2',
|
||||
unit: '%',
|
||||
trend: t('report.criticalAlertCount', { count: 8 }),
|
||||
color: '#F53F3F',
|
||||
iconBg: '#FFF1F0',
|
||||
icon: <BellOutlined style={{ color: '#F53F3F', fontSize: 24 }} />
|
||||
},
|
||||
{
|
||||
title: t('report.cleaningRevenueImprovement'),
|
||||
value: '+7.6',
|
||||
unit: '%',
|
||||
trend: t('report.estimatedAdditionalGeneration', { value: '12,850' }),
|
||||
color: '#00B42A',
|
||||
iconBg: '#E8FFEA',
|
||||
icon: <ThunderboltOutlined style={{ color: '#00B42A', fontSize: 24 }} />
|
||||
},
|
||||
{
|
||||
title: t('report.autoGeneratedReports'),
|
||||
value: '24',
|
||||
unit: t('report.unitReport'),
|
||||
trend: t('report.monthlyAccumulated'),
|
||||
color: '#722ED1',
|
||||
iconBg: '#F9F0FF',
|
||||
icon: <FileTextOutlined style={{ color: '#722ED1', fontSize: 24 }} />
|
||||
},
|
||||
];
|
||||
|
||||
const aiAnalysisData = [
|
||||
{ type: t('aiAnalysis.hotspotRecognition'), value: 36, color: '#F53F3F', icon: <RiseOutlined /> },
|
||||
{ type: t('aiAnalysis.abnormalString'), value: 8, color: '#FF7D00', icon: <WarningOutlined /> },
|
||||
{ type: t('aiAnalysis.recommendedCleanBlock'), value: 8, color: '#00B42A', icon: <ThunderboltOutlined /> },
|
||||
{ type: t('aiAnalysis.videoAbnormalEvent'), value: 6, color: '#722ED1', icon: <EyeOutlined /> },
|
||||
];
|
||||
const aiPieData = aiAnalysisData.map(item => ({
|
||||
name: item.type,
|
||||
value: item.value,
|
||||
color: item.color,
|
||||
}));
|
||||
|
||||
const reportFileList = [
|
||||
{ name: t('report.stationMonthlyReportFile'), status: t('report.generated') },
|
||||
{ name: t('report.weeklyOperationSummary'), status: t('report.generated') },
|
||||
{ name: t('report.aiDiagnosisDaily'), status: t('report.generating') },
|
||||
{ name: t('report.alertClosureWeekly'), status: t('report.generated') },
|
||||
];
|
||||
|
||||
const reportTemplates = [
|
||||
{ name: t('report.monthlyOperationReport'), desc: t('report.monthlyOperationReportDesc'), color: '#165DFF', bg: '#E8F3FF', icon: <BarChartOutlined /> },
|
||||
{ name: t('report.deviceHealthReport'), desc: t('report.deviceHealthReportDesc'), color: '#165DFF', bg: '#E8F3FF', icon: <FileDoneOutlined /> },
|
||||
{ name: t('report.cleaningOptimizationReport'), desc: t('report.cleaningEffectReportDesc'), color: '#165DFF', bg: '#E8F3FF', icon: <ThunderboltOutlined /> },
|
||||
{ name: t('report.inspectionRobotReport'), desc: t('report.inspectionRobotReportDesc'), color: '#722ED1', bg: '#F9F0FF', icon: <RobotOutlined /> },
|
||||
];
|
||||
|
||||
const cardStyle = {
|
||||
borderRadius: 12,
|
||||
border: '1px solid #f0f0f0',
|
||||
@@ -159,11 +157,11 @@ export default function ReportCenterPage() {
|
||||
overflow: 'hidden'
|
||||
};
|
||||
const generationRecord = [
|
||||
{ name: '电站月报', time: '2025-05-31 08:15', operator: '张运维', type: '发电报表', status: '已生成' },
|
||||
{ name: '告警周报', time: '2025-05-26 09:10', operator: '系统自动', type: t('report.alertReport'), status: '已生成' },
|
||||
{ name: 'AI诊断日报', time: '2025-05-31 07:30', operator: '系统自动', type: 'AI分析报告', status: '生成中' },
|
||||
{ name: '运维汇总报表', time: '2025-05-31 09:00', operator: '李工程师', type: '运维报表', status: '已生成' },
|
||||
{ name: '清洗效果报告', time: '2025-05-28 10:20', operator: '王运维', type: '运维报表', status: '已生成' },
|
||||
{ name: t('report.stationMonthly'), time: '2025-05-31 08:15', operator: '张运维', type: t('report.generationReport'), status: t('report.generated') },
|
||||
{ name: t('report.alertWeekly'), time: '2025-05-26 09:10', operator: t('report.systemAuto'), type: t('report.alertReport'), status: t('report.generated') },
|
||||
{ name: t('report.aiDiagnosisDaily'), time: '2025-05-31 07:30', operator: t('report.systemAuto'), type: t('report.aiAnalysisReport'), status: t('report.generating') },
|
||||
{ name: t('report.operationSummary'), time: '2025-05-31 09:00', operator: '李工程师', type: t('report.operationReport'), status: t('report.generated') },
|
||||
{ name: t('report.cleaningEffectReport'), time: '2025-05-28 10:20', operator: '王运维', type: t('report.operationReport'), status: t('report.generated') },
|
||||
];
|
||||
|
||||
return (
|
||||
@@ -205,11 +203,11 @@ export default function ReportCenterPage() {
|
||||
|
||||
{/* 页面头部标签 */}
|
||||
<Tabs activeKey={activeTab} onChange={setActiveTab} className="report-tabs">
|
||||
<TabPane tab="报表总览" key="overview" />
|
||||
<TabPane tab="发电报表" key="power" />
|
||||
<TabPane tab="运维报表" key="operation" />
|
||||
<TabPane tab={t('report.overview')} key="overview" />
|
||||
<TabPane tab={t('report.generationReport')} key="power" />
|
||||
<TabPane tab={t('report.operationReport')} key="operation" />
|
||||
<TabPane tab={t('report.alertReport')} key="alarm" />
|
||||
<TabPane tab="AI分析报告" key="ai" />
|
||||
<TabPane tab={t('report.aiAnalysisReport')} key="ai" />
|
||||
</Tabs>
|
||||
</div>
|
||||
|
||||
@@ -270,7 +268,7 @@ export default function ReportCenterPage() {
|
||||
{/* 筛选栏 */}
|
||||
<div style={{ display: 'flex', alignItems: 'center', marginBottom: 8, gap: 20, flexWrap: 'wrap' }}>
|
||||
<div style={{ display: 'flex', alignItems: 'center' }}>
|
||||
<span className="filter-label">报表周期:</span>
|
||||
<span className="filter-label">{t('report.reportCycle')}:</span>
|
||||
<Select value={reportCycle} onChange={setReportCycle} style={{ width: 100 }} size="small">
|
||||
<Option value="day">{t('report.daily')}</Option>
|
||||
<Option value="week">{t('report.weekly')}</Option>
|
||||
@@ -278,17 +276,17 @@ export default function ReportCenterPage() {
|
||||
</Select>
|
||||
</div>
|
||||
<div style={{ display: 'flex', alignItems: 'center' }}>
|
||||
<span className="filter-label">报表类型:</span>
|
||||
<span className="filter-label">{t('report.reportType')}:</span>
|
||||
<Select value={reportType} onChange={setReportType} style={{ width: 120 }} size="small">
|
||||
<Option value="all">{t('common.all')}</Option>
|
||||
<Option value="power">发电报表</Option>
|
||||
<Option value="operation">运维报表</Option>
|
||||
<Option value="power">{t('report.generationReport')}</Option>
|
||||
<Option value="operation">{t('report.operationReport')}</Option>
|
||||
<Option value="alarm">{t('report.alertReport')}</Option>
|
||||
<Option value="ai">AI分析报告</Option>
|
||||
<Option value="ai">{t('report.aiAnalysisReport')}</Option>
|
||||
</Select>
|
||||
</div>
|
||||
<div style={{ display: 'flex', alignItems: 'center' }}>
|
||||
<span className="filter-label">时间范围:</span>
|
||||
<span className="filter-label">{t('report.dateRange')}:</span>
|
||||
<RangePicker
|
||||
value={dateRange}
|
||||
onChange={setDateRange}
|
||||
@@ -299,8 +297,8 @@ export default function ReportCenterPage() {
|
||||
<div style={{ marginLeft: 'auto' }}>
|
||||
<Space size={12}>
|
||||
<Button type="primary" icon={<FileTextOutlined />} size="small" style={{ borderRadius: 6, height: 32, padding: '0 16px' }}>{t('report.generateReport')}</Button>
|
||||
<Button icon={<FilePdfOutlined />} size="small" style={{ borderRadius: 6, height: 32, color: '#F53F3F', borderColor: '#F53F3F' }}>导出PDF</Button>
|
||||
<Button icon={<FileExcelOutlined />} size="small" style={{ borderRadius: 6, height: 32, color: '#00B42A', borderColor: '#00B42A' }}>导出Excel</Button>
|
||||
<Button icon={<FilePdfOutlined />} size="small" style={{ borderRadius: 6, height: 32, color: '#F53F3F', borderColor: '#F53F3F' }}>{t('report.exportPdf')}</Button>
|
||||
<Button icon={<FileExcelOutlined />} size="small" style={{ borderRadius: 6, height: 32, color: '#00B42A', borderColor: '#00B42A' }}>{t('report.exportExcel')}</Button>
|
||||
</Space>
|
||||
</div>
|
||||
</div>
|
||||
@@ -309,12 +307,12 @@ export default function ReportCenterPage() {
|
||||
{/* 左侧主内容区 */}
|
||||
<Col xs={24} xl={16} >
|
||||
{/* 月度综合经营分析 */}
|
||||
<Card bordered={false} style={cardStyle} bodyStyle={{ padding: '20px' }} title={<span style={{ fontSize: 15, fontWeight: 700, color: '#1D2129' }}>月度综合经营分析</span>}>
|
||||
<Card bordered={false} style={cardStyle} bodyStyle={{ padding: '20px' }} title={<span style={{ fontSize: 15, fontWeight: 700, color: '#1D2129' }}>{t('report.monthlyOperationAnalysis')}</span>}>
|
||||
<Row gutter={24}>
|
||||
<Col span={17}>
|
||||
<div style={{ fontSize: 11, color: '#86909C', marginBottom: 16, display: 'flex', justifyContent: 'flex-start', gap: 20 }}>
|
||||
<Space size={4}><div style={{ width: 10, height: 3, background: '#00B42A' }}></div>发电量 (MWh)</Space>
|
||||
<Space size={4}><div style={{ width: 10, height: 1, borderTop: '1.5px dashed #165DFF' }}></div>预测发电 (MWh)</Space>
|
||||
<Space size={4}><div style={{ width: 10, height: 3, background: '#00B42A' }}></div>{t('report.generation')} (MWh)</Space>
|
||||
<Space size={4}><div style={{ width: 10, height: 1, borderTop: '1.5px dashed #165DFF' }}></div>{t('report.predictedGeneration')} (MWh)</Space>
|
||||
<Space size={4}><div style={{ width: 10, height: 1, borderTop: '1.5px solid #FF7D00' }}></div>PR (%)</Space>
|
||||
</div>
|
||||
<UniversalLineChart
|
||||
@@ -324,12 +322,12 @@ export default function ReportCenterPage() {
|
||||
series={[
|
||||
{
|
||||
key: 'generation',
|
||||
name: '发电量(MWh)',
|
||||
name: t('report.generation') + '(MWh)',
|
||||
color: '#52c41a',
|
||||
},
|
||||
{
|
||||
key: 'predicted',
|
||||
name: '预测发电(MWh)',
|
||||
name: t('report.predictedGeneration') + '(MWh)',
|
||||
color: '#1890ff',
|
||||
dashed: true,
|
||||
},
|
||||
@@ -346,11 +344,11 @@ export default function ReportCenterPage() {
|
||||
<div style={{ background: '#f8fafc', padding: '16px', borderRadius: 12, height: '100%' }}>
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: 12 }}>
|
||||
{[
|
||||
{ label: '本月累计发电量', value: '138.6', unit: 'MWh' },
|
||||
{ label: '理论发电量', value: '166.8', unit: 'MWh' },
|
||||
{ label: 'PR均值', value: '82.8', unit: '%' },
|
||||
{ label: '发电偏差', value: '-3.4', unit: '%', color: '#F53F3F' },
|
||||
{ label: '平均辐照度', value: '5.3', unit: 'kWh/㎡/天' },
|
||||
{ label: t('report.monthlyAccumulatedGeneration'), value: '138.6', unit: 'MWh' },
|
||||
{ label: t('report.theoreticalGeneration'), value: '166.8', unit: 'MWh' },
|
||||
{ label: t('report.prAverage'), value: '82.8', unit: '%' },
|
||||
{ label: t('report.generationDeviation'), value: '-3.4', unit: '%', color: '#F53F3F' },
|
||||
{ label: t('report.averageIrradiance'), value: '5.3', unit: t('report.unitIrradiancePerDay') },
|
||||
].map((item, idx) => (
|
||||
<div key={idx} style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
|
||||
<span style={{ fontSize: 12, color: '#4E5969' }}>{item.label}</span>
|
||||
@@ -370,13 +368,13 @@ export default function ReportCenterPage() {
|
||||
bordered={false}
|
||||
style={{ ...cardStyle, height: "100%" }}
|
||||
bodyStyle={{ padding: '16px' }}
|
||||
title={<span style={{ fontSize: 14, fontWeight: 700 }}>发电与气象统计</span>}
|
||||
title={<span style={{ fontSize: 14, fontWeight: 700 }}>{t('report.generationMeteorology')}</span>}
|
||||
>
|
||||
<div style={{ fontSize: 10, color: '#86909C', marginBottom: 12 }}>
|
||||
<Space size={8} wrap>
|
||||
<Badge color="#165DFF" text="发电量 (MWh)" style={{ fontSize: 10 }} />
|
||||
<Badge color="#00B42A" text="辐照度 (kWh/㎡)" style={{ fontSize: 10 }} />
|
||||
<Badge color="#FF7D00" text="温度 (℃)" style={{ fontSize: 10 }} />
|
||||
<Badge color="#165DFF" text={`${t('report.generation')} (MWh)`} style={{ fontSize: 10 }} />
|
||||
<Badge color="#00B42A" text={`${t('home.irradiance')} (kWh/㎡)`} style={{ fontSize: 10 }} />
|
||||
<Badge color="#FF7D00" text={`${t('home.temperature')} (℃)`} style={{ fontSize: 10 }} />
|
||||
</Space>
|
||||
</div>
|
||||
<UniversalBarChart
|
||||
@@ -384,7 +382,7 @@ export default function ReportCenterPage() {
|
||||
xKey="date"
|
||||
height={200}
|
||||
series={[
|
||||
{ key: 'generation', name: '发电量', color: '#1890ff' },
|
||||
{ key: 'generation', name: t('report.generation'), color: '#1890ff' },
|
||||
{ key: 'irradiance', name: t('home.irradiance'), color: '#52c41a' },
|
||||
{ key: 'temp', name: t('home.temperature'), color: '#fa8c16' },
|
||||
]}
|
||||
@@ -397,13 +395,13 @@ export default function ReportCenterPage() {
|
||||
bordered={false}
|
||||
style={{ ...cardStyle, height: "100%" }}
|
||||
bodyStyle={{ padding: '16px' }}
|
||||
title={<span style={{ fontSize: 14, fontWeight: 700 }}>工单与告警闭环分析</span>}
|
||||
title={<span style={{ fontSize: 14, fontWeight: 700 }}>{t('report.workOrderAlertClosure')}</span>}
|
||||
>
|
||||
<div style={{ fontSize: 10, color: '#86909C', marginBottom: 12 }}>
|
||||
<Space size={8} wrap>
|
||||
<Badge color="#165DFF" text="新增工单" style={{ fontSize: 10 }} />
|
||||
<Badge color="#165DFF" text={t('workOrder.newOrders')} style={{ fontSize: 10 }} />
|
||||
<Badge color="#00B42A" text={t('workOrder.completeOrder')} style={{ fontSize: 10 }} />
|
||||
<Badge color="#722ED1" text="闭环率 (%)" style={{ fontSize: 10 }} />
|
||||
<Badge color="#722ED1" text={`${t('report.closureRate')} (%)`} style={{ fontSize: 10 }} />
|
||||
</Space>
|
||||
</div>
|
||||
<UniversalBarChart
|
||||
@@ -411,10 +409,10 @@ export default function ReportCenterPage() {
|
||||
xKey="date"
|
||||
height={200}
|
||||
series={[
|
||||
{ key: 'newOrder', name: '新增工单', color: '#1890ff' },
|
||||
{ key: 'newOrder', name: t('workOrder.newOrders'), color: '#1890ff' },
|
||||
{ key: 'completed', name: t('workOrder.completeOrder'), color: '#52c41a' },
|
||||
{ key: 'alarmCount', name: '告警数', color: '#fa8c16' },
|
||||
{ key: 'closedRate', name: '闭环率', color: '#722ed1' },
|
||||
{ key: 'alarmCount', name: t('report.alarmCount'), color: '#fa8c16' },
|
||||
{ key: 'closedRate', name: t('report.closureRate'), color: '#722ed1' },
|
||||
]}
|
||||
/>
|
||||
</Card>
|
||||
@@ -425,7 +423,7 @@ export default function ReportCenterPage() {
|
||||
bordered={false}
|
||||
style={{ ...cardStyle, height: "100%" }}
|
||||
bodyStyle={{ padding: '16px' }}
|
||||
title={<span style={{ fontSize: 14, fontWeight: 700 }}>AI 分析成果统计</span>}
|
||||
title={<span style={{ fontSize: 14, fontWeight: 700 }}>{t('report.aiAnalysisStatistics')}</span>}
|
||||
>
|
||||
<div style={{ width: '100%', boxSizing: 'border-box' }}>
|
||||
<UniversalPieChart
|
||||
@@ -473,7 +471,7 @@ export default function ReportCenterPage() {
|
||||
whiteSpace: 'nowrap',
|
||||
flexShrink: 0
|
||||
}}>
|
||||
{item.value} <Text type="secondary" style={{ fontSize: 10, fontWeight: 400 }}>个</Text>
|
||||
{item.value} <Text type="secondary" style={{ fontSize: 10, fontWeight: 400 }}>{t('report.unitItem')}</Text>
|
||||
</span>
|
||||
</div>
|
||||
))}
|
||||
@@ -483,16 +481,16 @@ export default function ReportCenterPage() {
|
||||
</Col>
|
||||
</Row>
|
||||
{/* 订阅与分发 */}
|
||||
<Card bordered={false} style={{ ...cardStyle, marginTop: 8 }} bodyStyle={{ padding: '20px' }} title={<span style={{ fontSize: 15, fontWeight: 700, color: '#1D2129' }}>订阅与分发</span>}>
|
||||
<Card bordered={false} style={{ ...cardStyle, marginTop: 8 }} bodyStyle={{ padding: '20px' }} title={<span style={{ fontSize: 15, fontWeight: 700, color: '#1D2129' }}>{t('report.subscriptionDispatch')}</span>}>
|
||||
<Row gutter={[16, 16]} wrap>
|
||||
<Col xs={24} sm={12} md={8}>
|
||||
<div style={{ fontSize: 12, color: '#86909C', marginBottom: 12 }}>订阅人员 (6)</div>
|
||||
<div style={{ fontSize: 12, color: '#86909C', marginBottom: 12 }}>{t('report.subscribers', { count: 6 })}</div>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 8, flexWrap: 'wrap' }}>
|
||||
{[
|
||||
{ name: '张运维', role: '运维主管', img: 'https://img.icons8.com/fluency/48/user-male-circle.png' },
|
||||
{ name: '李工程师', role: '电站工程师', img: 'https://img.icons8.com/fluency/48/user-male-circle.png' },
|
||||
{ name: '王运维', role: '设备运维', img: 'https://img.icons8.com/fluency/48/user-male-circle.png' },
|
||||
{ name: '陈经理', role: '运维经理', img: 'https://img.icons8.com/fluency/48/user-male-circle.png' },
|
||||
{ name: '张运维', role: t('report.roleOmSupervisor'), img: 'https://img.icons8.com/fluency/48/user-male-circle.png' },
|
||||
{ name: '李工程师', role: t('report.roleStationEngineer'), img: 'https://img.icons8.com/fluency/48/user-male-circle.png' },
|
||||
{ name: '王运维', role: t('report.roleDeviceOm'), img: 'https://img.icons8.com/fluency/48/user-male-circle.png' },
|
||||
{ name: '陈经理', role: t('report.roleOmManager'), img: 'https://img.icons8.com/fluency/48/user-male-circle.png' },
|
||||
].map((p, idx) => (
|
||||
<Tooltip title={`${p.name} - ${p.role}`} key={idx}>
|
||||
<Avatar src={p.img} size={32} style={{ border: '2px solid #fff' }} />
|
||||
@@ -503,20 +501,20 @@ export default function ReportCenterPage() {
|
||||
</Col>
|
||||
|
||||
<Col xs={24} sm={12} md={8}>
|
||||
<div style={{ fontSize: 12, color: '#86909C', marginBottom: 12 }}>分发渠道 (可多选)</div>
|
||||
<div style={{ fontSize: 12, color: '#86909C', marginBottom: 12 }}>{t('report.dispatchChannels')}</div>
|
||||
<Space size={12} wrap>
|
||||
<Button size="small" icon={<MailOutlined />} style={{ borderRadius: 6, background: '#E8F3FF', border: 'none', color: '#165DFF' }}>邮件 <CheckCircleFilled style={{ fontSize: 10, marginLeft: 4 }} /></Button>
|
||||
<Button size="small" icon={<MailOutlined />} style={{ borderRadius: 6, background: '#E8F3FF', border: 'none', color: '#165DFF' }}>{t('report.email')} <CheckCircleFilled style={{ fontSize: 10, marginLeft: 4 }} /></Button>
|
||||
<Button size="small" style={{ borderRadius: 6, background: '#E8F3FF', border: 'none', color: '#165DFF' }}>Telegram <CheckCircleFilled style={{ fontSize: 10, marginLeft: 4 }} /></Button>
|
||||
<Button size="small" icon={<BellOutlined />} style={{ borderRadius: 6, background: '#E8F3FF', border: 'none', color: '#165DFF' }}>系统通知 <CheckCircleFilled style={{ fontSize: 10, marginLeft: 4 }} /></Button>
|
||||
<Button size="small" icon={<BellOutlined />} style={{ borderRadius: 6, background: '#E8F3FF', border: 'none', color: '#165DFF' }}>{t('report.systemNotification')} <CheckCircleFilled style={{ fontSize: 10, marginLeft: 4 }} /></Button>
|
||||
</Space>
|
||||
</Col>
|
||||
|
||||
<Col xs={24} sm={24} md={8}>
|
||||
<div style={{ fontSize: 12, color: '#86909C', marginBottom: 12 }}>发送计划</div>
|
||||
<div style={{ fontSize: 12, color: '#86909C', marginBottom: 12 }}>{t('report.sendPlan')}</div>
|
||||
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', background: '#f8fafc', padding: '8px 12px', borderRadius: 8, gap: 8 }}>
|
||||
<Space size={8} wrap>
|
||||
<CalendarOutlined style={{ color: '#165DFF' }} />
|
||||
<span style={{ fontSize: 13, fontWeight: 700 }}>每周一 09:00 自动发送</span>
|
||||
<span style={{ fontSize: 13, fontWeight: 700 }}>{t('report.weeklyAutoSend')}</span>
|
||||
</Space>
|
||||
<Button type="link" size="small" icon={<EditOutlined />} style={{ fontSize: 12, whiteSpace: 'nowrap' }}>{t('roles.edit')}</Button>
|
||||
</div>
|
||||
@@ -528,17 +526,17 @@ export default function ReportCenterPage() {
|
||||
{/* 右侧边栏 */}
|
||||
<Col xs={24} xl={8}>
|
||||
{/* 报表目录 / 快捷下载 */}
|
||||
<Card bordered={false} style={cardStyle} bodyStyle={{ padding: 0 }} title={<span style={{ fontSize: 15, fontWeight: 700 }}>报表目录 / 快捷下载</span>} extra={<Button type="link" size="small">更多 <ChevronRight size={14} /></Button>}>
|
||||
<Card bordered={false} style={cardStyle} bodyStyle={{ padding: 0 }} title={<span style={{ fontSize: 15, fontWeight: 700 }}>{t('report.reportDirectory')}</span>} extra={<Button type="link" size="small">{t('common.more')} <ChevronRight size={14} /></Button>}>
|
||||
<Table
|
||||
rowKey="name"
|
||||
columns={[
|
||||
{
|
||||
title: '报表名称', dataIndex: 'name',
|
||||
title: t('report.reportName'), dataIndex: 'name',
|
||||
render: (text) => <Space size={8}><FilePdfOutlined style={{ color: '#F53F3F' }} />{text}</Space>
|
||||
},
|
||||
{
|
||||
title: t('roles.status'), dataIndex: 'status', width: 80,
|
||||
render: (v) => <Tag color={v === '已生成' ? 'success' : 'warning'} style={{ borderRadius: 4, fontSize: 10, margin: 0 }}>{v}</Tag>
|
||||
render: (v) => <Tag color={v === t('report.generated') ? 'success' : 'warning'} style={{ borderRadius: 4, fontSize: 10, margin: 0 }}>{v}</Tag>
|
||||
},
|
||||
{
|
||||
title: t('roles.actions'), width: 120,
|
||||
@@ -558,7 +556,7 @@ export default function ReportCenterPage() {
|
||||
</Card>
|
||||
|
||||
{/* 模板中心 */}
|
||||
<Card bordered={false} style={{ ...cardStyle, marginTop: 8 }} bodyStyle={{ padding: '16px' }} title={<span style={{ fontSize: 15, fontWeight: 700 }}>模板中心</span>} extra={<Button type="link" size="small">更多 <ChevronRight size={14} /></Button>}>
|
||||
<Card bordered={false} style={{ ...cardStyle, marginTop: 8 }} bodyStyle={{ padding: '16px' }} title={<span style={{ fontSize: 15, fontWeight: 700 }}>{t('report.templateCenter')}</span>} extra={<Button type="link" size="small">{t('common.more')} <ChevronRight size={14} /></Button>}>
|
||||
<Row gutter={[12, 12]}>
|
||||
{reportTemplates.map((tpl, idx) => (
|
||||
<Col span={12} key={idx}>
|
||||
@@ -577,17 +575,17 @@ export default function ReportCenterPage() {
|
||||
</Card>
|
||||
|
||||
{/* 报表生成记录 */}
|
||||
<Card bordered={false} style={{ ...cardStyle, marginTop: 8 }} bodyStyle={{ padding: 0 }} title={<span style={{ fontSize: 15, fontWeight: 700 }}>报表生成记录</span>} extra={<Button type="link" size="small">更多 <ChevronRight size={14} /></Button>}>
|
||||
<Card bordered={false} style={{ ...cardStyle, marginTop: 8 }} bodyStyle={{ padding: 0 }} title={<span style={{ fontSize: 15, fontWeight: 700 }}>{t('report.generationRecords')}</span>} extra={<Button type="link" size="small">{t('common.more')} <ChevronRight size={14} /></Button>}>
|
||||
<Table
|
||||
rowKey="name"
|
||||
columns={[
|
||||
{ title: '报表名称', dataIndex: 'name', width: 100, ellipsis: true },
|
||||
{ title: '生成时间', dataIndex: 'time', width: 130 },
|
||||
{ title: '生成人', dataIndex: 'operator', width: 80 },
|
||||
{ title: t('report.reportName'), dataIndex: 'name', width: 100, ellipsis: true },
|
||||
{ title: t('report.generateTime'), dataIndex: 'time', width: 130 },
|
||||
{ title: t('report.generator'), dataIndex: 'operator', width: 80 },
|
||||
{ title: t('common.type'), dataIndex: 'type', width: 80 },
|
||||
{
|
||||
title: t('roles.status'), dataIndex: 'status', width: 70,
|
||||
render: (v) => <Tag color={v === '已生成' ? 'success' : 'warning'} style={{ borderRadius: 4, fontSize: 10, margin: 0 }}>{v}</Tag>
|
||||
render: (v) => <Tag color={v === t('report.generated') ? 'success' : 'warning'} style={{ borderRadius: 4, fontSize: 10, margin: 0 }}>{v}</Tag>
|
||||
},
|
||||
{
|
||||
title: t('roles.actions'), width: 90,
|
||||
|
||||
@@ -132,7 +132,7 @@ export default function Roles() {
|
||||
};
|
||||
editRoleApi(params).then(res => {
|
||||
if (res.code == 200) {
|
||||
messageApi.success('编辑角色成功');
|
||||
messageApi.success(t('roles.editSuccess'));
|
||||
getRole();
|
||||
setRoleModalVisible(false);
|
||||
} else {
|
||||
@@ -150,7 +150,7 @@ export default function Roles() {
|
||||
};
|
||||
addRole(params).then(res => {
|
||||
if (res.code == 200) {
|
||||
messageApi.success('新增角色成功');
|
||||
messageApi.success(t('roles.addSuccess'));
|
||||
getRole();
|
||||
setRoleModalVisible(false);
|
||||
} else {
|
||||
@@ -176,7 +176,7 @@ export default function Roles() {
|
||||
icon={<PlusOutlined />}
|
||||
onClick={handleAddRole}
|
||||
>
|
||||
新增角色
|
||||
{t('roles.addRole')}
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
@@ -196,7 +196,7 @@ export default function Roles() {
|
||||
onClick={() => handleEditRole(role)}
|
||||
style={{ color: '#1677ff' }}
|
||||
>
|
||||
编辑
|
||||
{t('roles.edit')}
|
||||
</Button>,
|
||||
<Button
|
||||
type="text"
|
||||
@@ -204,10 +204,10 @@ export default function Roles() {
|
||||
onClick={() => console.log('管理成员', role.roleId)}
|
||||
style={{ color: '#00b96b' }}
|
||||
>
|
||||
管理成员
|
||||
{t('roles.manageMembers')}
|
||||
</Button>,
|
||||
<Popconfirm
|
||||
title="确定删除该角色?"
|
||||
title={t('roles.confirmDeleteRole')}
|
||||
onConfirm={() => handleDeleteRole(role.roleId)}
|
||||
>
|
||||
<Button
|
||||
@@ -215,7 +215,7 @@ export default function Roles() {
|
||||
danger
|
||||
icon={<DeleteOutlined />}
|
||||
>
|
||||
删除
|
||||
{t('roles.delete')}
|
||||
</Button>
|
||||
</Popconfirm>
|
||||
]}
|
||||
@@ -224,13 +224,13 @@ export default function Roles() {
|
||||
title={<span style={{ fontWeight: 600 }}>{role.roleName}</span>}
|
||||
description={
|
||||
<Space direction="vertical" size={2} style={{ width: '100%' }}>
|
||||
<Text type="secondary">权限标识:{role.roleKey}</Text>
|
||||
<Text type="secondary">{t('roles.permissionKey')}:{role.roleKey}</Text>
|
||||
<Text type="secondary">
|
||||
状态:{role.status == 1 ? t('roles.normal') : t('roles.stopped')}
|
||||
{t('roles.status')}:{role.status == 1 ? t('roles.normal') : t('roles.stopped')}
|
||||
</Text>
|
||||
<Text type="secondary">
|
||||
{role.admin && '【超级管理员】'}
|
||||
{role.manager && '【机构管理员】'}
|
||||
{role.admin && t('roles.superAdmin')}
|
||||
{role.manager && t('roles.orgAdmin')}
|
||||
</Text>
|
||||
</Space>
|
||||
}
|
||||
@@ -251,7 +251,7 @@ export default function Roles() {
|
||||
pageSize={pagination.pageSize}
|
||||
total={pagination.total}
|
||||
showSizeChanger
|
||||
showTotal={(total) => `共 ${total} 条`}
|
||||
showTotal={(total) => `${t('common.total')} ${total} ${t('common.items')}`}
|
||||
onChange={handlePageChange}
|
||||
style={{ textAlign: 'right' }}
|
||||
/>
|
||||
@@ -259,7 +259,7 @@ export default function Roles() {
|
||||
|
||||
{/* 新增/编辑弹窗 */}
|
||||
<Modal
|
||||
title={editRole ? '编辑角色' : t('roles.addRole')}
|
||||
title={editRole ? t('roles.editRole') : t('roles.addRole')}
|
||||
open={roleModalVisible}
|
||||
onCancel={() => setRoleModalVisible(false)}
|
||||
onOk={handleSaveRole}
|
||||
@@ -268,14 +268,14 @@ export default function Roles() {
|
||||
>
|
||||
<Form form={roleForm} layout="vertical">
|
||||
<Form.Item name="roleName" label={t('roles.roleName')} rules={[{ required: true }]}>
|
||||
<Input placeholder="请输入角色名称" />
|
||||
<Input placeholder={t('roles.roleNamePlaceholder')} />
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item name="roleKey" label="角色权限" rules={[{ required: true }]}>
|
||||
<Input placeholder="例如:admin" />
|
||||
<Form.Item name="roleKey" label={t('roles.rolePermission')} rules={[{ required: true }]}>
|
||||
<Input placeholder={t('roles.roleKeyPlaceholder')} />
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item name="roleSort" label="角色排序">
|
||||
<Form.Item name="roleSort" label={t('roles.roleSortLabel')}>
|
||||
<InputNumber style={{ width: '100%' }} min={1} />
|
||||
</Form.Item>
|
||||
|
||||
@@ -288,7 +288,7 @@ export default function Roles() {
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
<Divider>菜单权限配置</Divider>
|
||||
<Divider>{t('roles.menuPermissionConfig')}</Divider>
|
||||
<Tree
|
||||
checkable
|
||||
treeData={menuTree}
|
||||
|
||||
@@ -64,7 +64,7 @@ export default function SystemSettings() {
|
||||
|
||||
{/*<div style={{ padding: '4px 0px 0' }}>
|
||||
<Typography.Title level={4} style={{ margin: 0, fontSize: 'clamp(14px, 1.2vw, 18px)' }}>{t('router.systemSetting')}</Typography.Title>
|
||||
<Text type="secondary" style={{ fontSize: '12px' }}>告警规则配置、用户角色、通知管理与系统参数设置</Text>
|
||||
<Text type="secondary" style={{ fontSize: '12px' }}>{t('systemSetting.fixed2AlertRulesRoleSettingsFixed2')}</Text>
|
||||
</div>*/}
|
||||
|
||||
|
||||
|
||||
@@ -150,7 +150,7 @@ export default function UserList() {
|
||||
title: t('users.role'),
|
||||
render: (_, record) => {
|
||||
const roles = record.roles || [];
|
||||
if (roles.length === 0) return <Tag>未分配</Tag>;
|
||||
if (roles.length === 0) return <Tag>{t('users.notAssigned')}</Tag>;
|
||||
|
||||
return roles.map(item => (
|
||||
<Tag color="blue" key={item.roleId}>
|
||||
@@ -172,7 +172,7 @@ export default function UserList() {
|
||||
<Space>
|
||||
<Button type="text" icon={<EditOutlined />} onClick={() => handleEdit(r)}>{t('roles.edit')}</Button>
|
||||
<Popconfirm title={t('common.confirmDelete')} onConfirm={() => handleDelete(r.userId)}>
|
||||
<Button type="text" danger>roles.delete</Button>
|
||||
<Button type="text" danger>{t('roles.delete')}</Button>
|
||||
</Popconfirm>
|
||||
</Space>
|
||||
)
|
||||
@@ -185,7 +185,7 @@ export default function UserList() {
|
||||
<Card title={t('router.users')}>
|
||||
<div style={{ marginBottom: 16, display: 'flex', justifyContent: 'space-between' }}>
|
||||
<Button type="primary" icon={<PlusOutlined />} onClick={handleAdd}>
|
||||
新增用户
|
||||
{t('users.addUser')}
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
@@ -198,7 +198,7 @@ export default function UserList() {
|
||||
pageSize: pagination.pageSize,
|
||||
total: pagination.total,
|
||||
showSizeChanger: true,
|
||||
showTotal: t => `共 ${t} 条`
|
||||
showTotal: (total) => `${t('common.total')} ${total} ${t('common.items')}`
|
||||
}}
|
||||
onChange={handleTableChange}
|
||||
bordered
|
||||
@@ -249,7 +249,7 @@ export default function UserList() {
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Form.Item name="language" label={t('users.languageLabel')}>
|
||||
<Select placeholder="请选择语言">
|
||||
<Select placeholder={t('users.languagePlaceholder')}>
|
||||
<Option value="zh-CN">{t('users.chinese')}</Option>
|
||||
<Option value="en">{t('users.english')}</Option>
|
||||
</Select>
|
||||
@@ -261,7 +261,7 @@ export default function UserList() {
|
||||
<Col span={12}>
|
||||
{/* 多角色选择 */}
|
||||
<Form.Item name="roleIds" label={t('users.assignRoleLabel')}>
|
||||
<Select mode="multiple" placeholder="请选择角色">
|
||||
<Select mode="multiple" placeholder={t('users.rolePlaceholder')}>
|
||||
{roles.map(item => (
|
||||
<Option key={item.roleId} value={item.roleId}>
|
||||
{item.roleName || item.roleKey}
|
||||
@@ -280,14 +280,14 @@ export default function UserList() {
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
<Form.Item name="siteId" label="场站ID">
|
||||
<Form.Item name="siteId" label={t('users.siteId')}>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item name="sex" label={t('users.genderLabel')} initialValue="2">
|
||||
<Select>
|
||||
<Option value="0">男</Option>
|
||||
<Option value="1">女</Option>
|
||||
<Option value="0">{t('users.male')}</Option>
|
||||
<Option value="1">{t('users.female')}</Option>
|
||||
<Option value="2">{t('constants.locationUnknown')}</Option>
|
||||
</Select>
|
||||
</Form.Item>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import React, { useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import {
|
||||
Row,
|
||||
Col,
|
||||
@@ -35,6 +36,7 @@ function cn(...classes: string[]) {
|
||||
}
|
||||
|
||||
export default function VideoControl() {
|
||||
const { t } = useTranslation();
|
||||
const [selectedDevice, setSelectedDevice] = useState(DEVICES[0]);
|
||||
const onlineDevices = DEVICES.filter(d => d.status === 'online' || d.status === 'alert');
|
||||
|
||||
@@ -43,20 +45,20 @@ export default function VideoControl() {
|
||||
case '安防型':
|
||||
return {
|
||||
count: 4,
|
||||
labels: ['Front/主前', 'Back/后视', 'Left/左侧', 'Right/右侧'],
|
||||
labels: [t('video.labelMainFront'), t('video.labelRear'), t('video.labelLeft'), t('video.labelRight')],
|
||||
gridClass: 'grid-cols-2 grid-rows-2'
|
||||
};
|
||||
case '运输型':
|
||||
return {
|
||||
count: 5,
|
||||
labels: ['Front/前驱', 'Back/后置', 'Left/左翼', 'Right/右翼', 'Cargo/货舱'],
|
||||
labels: [t('video.labelFrontDrive'), t('video.labelRearMount'), t('video.labelLeftWing'), t('video.labelRightWing'), t('video.labelCargo')],
|
||||
gridClass: 'grid-cols-4 grid-rows-2'
|
||||
};
|
||||
case '巡检型':
|
||||
default:
|
||||
return {
|
||||
count: 3,
|
||||
labels: ['Main/主探', 'Pan/全景', 'Detail/细节'],
|
||||
labels: [t('video.labelMainProbe'), t('video.labelPanorama'), t('video.labelDetail')],
|
||||
gridClass: 'grid-cols-2 grid-rows-2'
|
||||
};
|
||||
}
|
||||
@@ -72,7 +74,7 @@ export default function VideoControl() {
|
||||
<div className="flex items-center justify-between bg-white p-3 rounded shadow-sm border border-gray-100">
|
||||
<Space size="large">
|
||||
<div className="flex flex-col">
|
||||
<Text type="secondary" style={{ fontSize: 10, textTransform: 'uppercase', letterSpacing: 1 }}>当前执勤设备</Text>
|
||||
<Text type="secondary" style={{ fontSize: 10, textTransform: 'uppercase', letterSpacing: 1 }}>{t('video.currentDutyDevice')}</Text>
|
||||
<Select
|
||||
value={selectedDevice.id}
|
||||
onChange={(id) => setSelectedDevice(onlineDevices.find(d => d.id === id)!)}
|
||||
@@ -84,15 +86,15 @@ export default function VideoControl() {
|
||||
</div>
|
||||
<Divider type="vertical" style={{ height: 32 }} />
|
||||
<div className="flex flex-col">
|
||||
<Text type="secondary" style={{ fontSize: 10, textTransform: 'uppercase', letterSpacing: 1 }}>视频流路数</Text>
|
||||
<Text type="secondary" style={{ fontSize: 10, textTransform: 'uppercase', letterSpacing: 1 }}>{t('video.videoStreamChannels')}</Text>
|
||||
<Tag color="processing" style={{ marginTop: 2, fontWeight: 'bold', fontFamily: 'monospace' }}>
|
||||
{config.count} CHANNELS ACTIVE
|
||||
</Tag>
|
||||
</div>
|
||||
</Space>
|
||||
<Space>
|
||||
<Button size="small" icon={<ReloadOutlined />}>刷新信号</Button>
|
||||
<Button size="small" type="primary" ghost>全屏墙</Button>
|
||||
<Button size="small" icon={<ReloadOutlined />}>{t('video.refreshSignal')}</Button>
|
||||
<Button size="small" type="primary" ghost>{t('video.fullScreenWall')}</Button>
|
||||
</Space>
|
||||
</div>
|
||||
|
||||
@@ -131,7 +133,7 @@ export default function VideoControl() {
|
||||
<Card size="small" styles={{ body: { padding: 12 } }}>
|
||||
<Row gutter={16} align="middle">
|
||||
<Col flex="0 0 160px" style={{ borderRight: '1px solid #f0f0f0', paddingRight: 24 }}>
|
||||
<Text strong type="secondary" style={{ fontSize: 10, textTransform: 'uppercase', display: 'block', textAlign: 'center', marginBottom: 8 }}>PTZ 舵机控制</Text>
|
||||
<Text strong type="secondary" style={{ fontSize: 10, textTransform: 'uppercase', display: 'block', textAlign: 'center', marginBottom: 8 }}>{t('video.ptzServoControl')}</Text>
|
||||
<div className="flex flex-col items-center gap-1">
|
||||
<Button type="text" size="small" icon={<CaretUpOutlined />} />
|
||||
<Space>
|
||||
@@ -145,13 +147,13 @@ export default function VideoControl() {
|
||||
|
||||
<Col flex="auto">
|
||||
<div className="flex items-center justify-between mb-4">
|
||||
<Text strong type="secondary" style={{ fontSize: 10, textTransform: 'uppercase' }}>系统集成作业指令 ({selectedDevice.type})</Text>
|
||||
<Text strong type="secondary" style={{ fontSize: 10, textTransform: 'uppercase' }}>{t('video.systemIntegratedCommand', { type: selectedDevice.type })}</Text>
|
||||
<Tag color="success" variant={false} style={{ fontSize: 10, fontWeight: 'bold' }}>SIGNAL: 100% EXCELLENT</Tag>
|
||||
</div>
|
||||
<Space className="w-full" size="middle">
|
||||
<Button icon={<CustomerServiceOutlined />} style={{ borderRadius: 2 }} block>双轴双向对讲</Button>
|
||||
<Button danger icon={<AlertOutlined />} style={{ borderRadius: 2 }} block>触发远程驱逐</Button>
|
||||
<Button type="primary" icon={<EyeOutlined />} style={{ borderRadius: 2 }} block>AI 视觉追踪锁定</Button>
|
||||
<Button icon={<CustomerServiceOutlined />} style={{ borderRadius: 2 }} block>{t('video.twoWayIntercom')}</Button>
|
||||
<Button danger icon={<AlertOutlined />} style={{ borderRadius: 2 }} block>{t('video.triggerRemoteRepellent')}</Button>
|
||||
<Button type="primary" icon={<EyeOutlined />} style={{ borderRadius: 2 }} block>{t('video.aiVisualTracking')}</Button>
|
||||
</Space>
|
||||
</Col>
|
||||
</Row>
|
||||
@@ -161,7 +163,7 @@ export default function VideoControl() {
|
||||
{/* Sidebar Channels */}
|
||||
<Col flex="0 0 260px" className="h-full">
|
||||
<Card
|
||||
title={<Space><MonitorOutlined /><Text strong style={{ fontSize: 13 }}>活跃视频流 ({onlineDevices.length})</Text></Space>}
|
||||
title={<Space><MonitorOutlined /><Text strong style={{ fontSize: 13 }}>{t('video.activeVideoStreams', { count: onlineDevices.length })}</Text></Space>}
|
||||
extra={<Button type="text" size="small" icon={<ReloadOutlined />} />}
|
||||
styles={{ body: { padding: 0 } }}
|
||||
className="h-full flex flex-col overflow-hidden"
|
||||
@@ -204,4 +206,4 @@ export default function VideoControl() {
|
||||
</Col>
|
||||
</Row>
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -39,7 +39,7 @@ export default function VideoMonitorPage() {
|
||||
]);
|
||||
|
||||
const camColumns = [
|
||||
{ title: '摄像头名称', dataIndex: 'name', key: 'name', width: 200 },
|
||||
{ title: t('video.cameraName'), dataIndex: 'name', key: 'name', width: 200 },
|
||||
{ title: t('aiAnalysis.location'), dataIndex: 'position', key: 'position', width: 120 },
|
||||
{
|
||||
title: t('roles.status'), dataIndex: 'status', key: 'status', width: 100,
|
||||
@@ -51,7 +51,7 @@ export default function VideoMonitorPage() {
|
||||
)
|
||||
},
|
||||
{
|
||||
title: '录像状态', dataIndex: 'recStatus', key: 'recStatus', width: 100,
|
||||
title: t('video.statusFixed2'), dataIndex: 'recStatus', key: 'recStatus', width: 100,
|
||||
render: (text: string) => (
|
||||
<Space size={4}>
|
||||
<div style={{ width: 6, height: 6, borderRadius: '50%', background: text === '录制中' ? '#00B42A' : '#86909C' }}></div>
|
||||
@@ -59,7 +59,7 @@ export default function VideoMonitorPage() {
|
||||
</Space>
|
||||
)
|
||||
},
|
||||
{ title: '最后事件时间', dataIndex: 'time', key: 'time', width: 180 },
|
||||
{ title: t('video.lastEventTime'), dataIndex: 'time', key: 'time', width: 180 },
|
||||
{
|
||||
title: t('roles.actions'), key: 'action', width: 60,
|
||||
render: () => (
|
||||
@@ -106,7 +106,7 @@ export default function VideoMonitorPage() {
|
||||
>
|
||||
{[
|
||||
{
|
||||
title: '在线摄像头',
|
||||
title: t('video.onlineCameras'),
|
||||
value: '32',
|
||||
unit: '台',
|
||||
sub: '在线率 ↑ 4.1%',
|
||||
@@ -116,7 +116,7 @@ export default function VideoMonitorPage() {
|
||||
bg: '#E8F3FF'
|
||||
},
|
||||
{
|
||||
title: '离线摄像头',
|
||||
title: t('video.offlineCameras'),
|
||||
value: '2',
|
||||
unit: '台',
|
||||
sub: '离线率 ↑ 5.9%',
|
||||
@@ -126,7 +126,7 @@ export default function VideoMonitorPage() {
|
||||
bg: '#F5F7FA'
|
||||
},
|
||||
{
|
||||
title: '今日告警事件',
|
||||
title: t('video.todayAlertEvents'),
|
||||
value: '6',
|
||||
unit: '起',
|
||||
sub: '较昨日 ↑ 50%',
|
||||
@@ -136,7 +136,7 @@ export default function VideoMonitorPage() {
|
||||
bg: '#FFF7E8'
|
||||
},
|
||||
{
|
||||
title: '周界告警',
|
||||
title: t('video.alertFixed2'),
|
||||
value: '2',
|
||||
unit: '起',
|
||||
sub: '较昨日 ↑ 100%',
|
||||
@@ -146,7 +146,7 @@ export default function VideoMonitorPage() {
|
||||
bg: '#FFF1F0'
|
||||
},
|
||||
{
|
||||
title: '存储使用率',
|
||||
title: t('video.s22'),
|
||||
value: '78.6',
|
||||
unit: 'TB',
|
||||
sub: '使用率 65.5%',
|
||||
@@ -169,8 +169,7 @@ export default function VideoMonitorPage() {
|
||||
<span style={{ fontSize: 24, fontWeight: 700, color: '#333' }}>{item.value}</span>
|
||||
<span style={{ fontSize: 14, marginLeft: 4, color: '#333' }}>{item.unit}</span>
|
||||
</div>
|
||||
<div style={{ fontSize: 12, color: '#999' }}>
|
||||
在线率 <span style={{ color: item.subColor }}>{item.sub.replace('在线率 ', '')}</span>
|
||||
<div style={{ fontSize: 12, color: '#999' }}>{t('devices.statOnlineRate')}<span style={{ color: item.subColor }}>{item.sub.replace('在线率 ', '')}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -195,10 +194,10 @@ export default function VideoMonitorPage() {
|
||||
<Row gutter={[12, 12]} style={{ marginBottom: 8 }}>
|
||||
<Col xs={24} xl={18}>
|
||||
<Card
|
||||
title={<span style={{ fontSize: 16, fontWeight: 800, color: '#1D2129' }}>视频监控中心</span>}
|
||||
title={<span style={{ fontSize: 16, fontWeight: 800, color: '#1D2129' }}>{t('video.videoMonitorCenter')}</span>}
|
||||
extra={
|
||||
<Space size={16}>
|
||||
<Button type="link" size="small" icon={<ExpandOutlined />}>自定义布局</Button>
|
||||
<Button type="link" size="small" icon={<ExpandOutlined />}>{t('video.customLayout')}</Button>
|
||||
<Button type="link" size="small" icon={<FullscreenOutlined />}>{t('video.fullScreen')}</Button>
|
||||
</Space>
|
||||
}
|
||||
@@ -211,7 +210,7 @@ export default function VideoMonitorPage() {
|
||||
<div style={{ position: 'relative', background: '#000', borderRadius: 8, overflow: 'hidden', height: 420 }}>
|
||||
<img src="https://images.unsplash.com/photo-1509391366360-2e959784a276?ixlib=rb-1.2.1&auto=format&fit=crop&w=1200&q=80" style={{ width: '100%', height: '100%', objectFit: 'cover' }} />
|
||||
<div style={{ position: 'absolute', top: 0, left: 0, width: '100%', padding: '10px 16px', background: 'linear-gradient(to bottom, rgba(0,0,0,0.6), transparent)', color: '#fff', display: 'flex', justifyContent: 'space-between' }}>
|
||||
<span style={{ fontSize: 13, fontWeight: 700 }}>主画面:1#阵列区球机</span>
|
||||
<span style={{ fontSize: 13, fontWeight: 700 }}>{t('video.1')}</span>
|
||||
<span style={{ fontSize: 11, opacity: 0.8 }}>2025-05-20 10:24:15</span>
|
||||
</div>
|
||||
<div style={{ position: 'absolute', bottom: 0, left: 0, width: '100%', padding: '12px 16px', background: 'linear-gradient(to top, rgba(0,0,0,0.6), transparent)', display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
|
||||
@@ -235,12 +234,12 @@ export default function VideoMonitorPage() {
|
||||
<Col span={10}>
|
||||
<Row gutter={[8, 8]}>
|
||||
{[
|
||||
{ title: '2#逆变器室', img: 'https://images.unsplash.com/photo-1581094794329-c8112a89af12?auto=format&fit=crop&w=400&q=60' },
|
||||
{ title: '3#电站大门', img: 'https://images.unsplash.com/photo-1541888946425-d81bb19480c5?auto=format&fit=crop&w=400&q=60' },
|
||||
{ title: '4#周界北侧', img: 'https://images.unsplash.com/photo-1504384308090-c894fdcc538d?auto=format&fit=crop&w=400&q=60' },
|
||||
{ title: '5#气象站', img: 'https://images.unsplash.com/photo-1534088568595-a066f7104211?auto=format&fit=crop&w=400&q=60' },
|
||||
{ title: '6#设备区', img: 'https://images.unsplash.com/photo-1581092160562-40aa08e78837?auto=format&fit=crop&w=400&q=60' },
|
||||
{ title: '7#储能电池舱', img: 'https://images.unsplash.com/photo-1593941707882-a5bba14938c7?auto=format&fit=crop&w=400&q=60' },
|
||||
{ title: t('video.2Inverter'), img: 'https://images.unsplash.com/photo-1581094794329-c8112a89af12?auto=format&fit=crop&w=400&q=60' },
|
||||
{ title: t('video.3'), img: 'https://images.unsplash.com/photo-1541888946425-d81bb19480c5?auto=format&fit=crop&w=400&q=60' },
|
||||
{ title: t('video.4'), img: 'https://images.unsplash.com/photo-1504384308090-c894fdcc538d?auto=format&fit=crop&w=400&q=60' },
|
||||
{ title: t('video.5Fixed2'), img: 'https://images.unsplash.com/photo-1534088568595-a066f7104211?auto=format&fit=crop&w=400&q=60' },
|
||||
{ title: t('video.6Device'), img: 'https://images.unsplash.com/photo-1581092160562-40aa08e78837?auto=format&fit=crop&w=400&q=60' },
|
||||
{ title: t('video.7'), img: 'https://images.unsplash.com/photo-1593941707882-a5bba14938c7?auto=format&fit=crop&w=400&q=60' },
|
||||
].map((v, i) => (
|
||||
<Col span={12} key={i}>
|
||||
<div className="video-item" style={{ position: 'relative', background: '#000', borderRadius: 6, overflow: 'hidden', height: 135 }}>
|
||||
@@ -248,7 +247,7 @@ export default function VideoMonitorPage() {
|
||||
<div style={{ position: 'absolute', top: 0, left: 0, width: '100%', padding: '4px 8px', background: 'rgba(0,0,0,0.4)', color: '#fff', fontSize: 10 }}>{v.title}</div>
|
||||
<div style={{ position: 'absolute', bottom: 4, right: 8, display: 'flex', alignItems: 'center', gap: 4 }}>
|
||||
<div style={{ width: 6, height: 6, borderRadius: '50%', background: '#00B42A' }}></div>
|
||||
<span style={{ color: '#fff', fontSize: 9 }}>直播中</span>
|
||||
<span style={{ color: '#fff', fontSize: 9 }}>{t('video.fixed2LiveMedium')}</span>
|
||||
</div>
|
||||
<div className="video-mask" style={{ position: 'absolute', top: 0, left: 0, width: '100%', height: '100%', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
|
||||
<PlayCircleOutlined style={{ color: '#fff', fontSize: 32, cursor: 'pointer' }} />
|
||||
@@ -264,19 +263,19 @@ export default function VideoMonitorPage() {
|
||||
|
||||
<Col xs={24} xl={6}>
|
||||
<Card
|
||||
title={<span style={{ fontSize: 16, fontWeight: 800, color: '#1D2129' }}>AI 视频智能分析</span>}
|
||||
extra={<Button type="link" size="small">设置 <ChevronRight size={14} /></Button>}
|
||||
title={<span style={{ fontSize: 16, fontWeight: 800, color: '#1D2129' }}>{t('video.fixed2AiVideoIntelligentAnalysisFixed2')}</span>}
|
||||
extra={<Button type="link" size="small">{t('common.settings')}<ChevronRight size={14} /></Button>}
|
||||
bordered={false}
|
||||
style={{ ...cardStyle, height: '100%' }}
|
||||
bodyStyle={{ padding: '16px 20px' }}
|
||||
>
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: 16 }}>
|
||||
{[
|
||||
{ icon: <img src="https://img.icons8.com/fluency/48/alarm.png" style={{ width: 24 }} />, bg: '#FFF1F0', title: '周界入侵检测', desc: '识别翻越、攀爬、破坏围栏等行为', count: 2, color: '#F53F3F' },
|
||||
{ icon: <img src="https://img.icons8.com/fluency/48/user-male-circle.png" style={{ width: 24 }} />, bg: '#E8F3FF', title: '人员闯入', desc: '识别未经授权人员进入区域', count: 1, color: '#165DFF' },
|
||||
{ icon: <svg t="1778729206689" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4980" width="24" height="24"><path d="M336.349867 969.728c42.564267 14.199467 56.746667-24.814933 39.0144-38.997333-56.746667-39.0144-85.128533-109.943467-63.829334-173.7728 21.265067-70.929067 78.011733-99.310933 78.011734-205.704534 0 0 70.929067 53.1968 56.746666 134.775467 70.929067-81.578667 39.0144-187.972267 24.814934-237.6192 180.872533 95.744 336.930133 304.9984 156.0576 482.321067-21.282133 17.749333 0 49.664 31.914666 39.0144 492.970667-280.1664 120.576-698.658133 56.746667-748.305067 21.282133 49.646933 24.832 127.658667-17.732267 166.673067C623.616 107.946667 442.743467 51.2 442.743467 51.2c21.282133 145.408-81.578667 301.448533-177.322667 422.0416-3.549867-60.296533-7.099733-99.310933-35.464533-152.507733-7.099733 102.843733-88.661333 187.972267-109.943467 294.365866C91.648 756.957867 141.312 859.8016 336.349867 969.728z" fill="#f33b24" p-id="4981"></path></svg>, bg: '#FFF7E8', title: '烟火识别', desc: '识别烟雾、明火等异常情况', count: 0, color: '#86909C' },
|
||||
{ icon: <svg t="1778729276274" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6131" width="24" height="24"><path d="M0 0m0 0l1024 0q0 0 0 0l0 1024q0 0 0 0l-1024 0q0 0 0 0l0-1024q0 0 0 0Z" fill="#E8EFF8" p-id="6132"></path><path d="M139.636364 558.545455a23.272727 23.272727 0 0 1 23.272727-23.272728h698.181818a23.272727 23.272727 0 0 1 23.272727 23.272728v116.363636a23.272727 23.272727 0 0 1-23.272727 23.272727H162.909091a23.272727 23.272727 0 0 1-23.272727-23.272727v-116.363636z" fill="#247ADE" p-id="6133"></path><path d="M372.363636 616.727273a58.181818 58.181818 0 1 1-116.363636 0 58.181818 58.181818 0 0 1 116.363636 0zM558.545455 616.727273a58.181818 58.181818 0 1 1-116.363637 0 58.181818 58.181818 0 0 1 116.363637 0zM744.727273 616.727273a58.181818 58.181818 0 1 1-116.363637 0 58.181818 58.181818 0 0 1 116.363637 0zM139.636364 325.818182a23.272727 23.272727 0 0 1 23.272727-23.272727h698.181818a23.272727 23.272727 0 0 1 23.272727 23.272727v116.363636a23.272727 23.272727 0 0 1-23.272727 23.272727H162.909091a23.272727 23.272727 0 0 1-23.272727-23.272727v-116.363636z" fill="#9DBCF3" p-id="6134"></path><path d="M372.363636 384a58.181818 58.181818 0 1 1-116.363636 0 58.181818 58.181818 0 0 1 116.363636 0zM558.545455 384a58.181818 58.181818 0 1 1-116.363637 0 58.181818 58.181818 0 0 1 116.363637 0zM744.727273 384a58.181818 58.181818 0 1 1-116.363637 0 58.181818 58.181818 0 0 1 116.363637 0z" fill="#2479DC" p-id="6135"></path></svg>, bg: '#FFF7E8', title: '设备区域滞留', desc: '识别人员在设备区滞留行为', count: 1, color: '#F7BA1E' },
|
||||
{ icon: <img src="https://img.icons8.com/fluency/48/motion-detector.png" style={{ width: 24 }} />, bg: '#E8FFEA', title: '运动检测', desc: '识别画面异常运动目标', count: 2, color: '#00B42A' },
|
||||
{ icon: <img src="https://img.icons8.com/fluency/48/alarm.png" style={{ width: 24 }} />, bg: '#FFF1F0', title: t('video.detectFixed2'), desc: '识别翻越、攀爬、破坏围栏等行为', count: 2, color: '#F53F3F' },
|
||||
{ icon: <img src="https://img.icons8.com/fluency/48/user-male-circle.png" style={{ width: 24 }} />, bg: '#E8F3FF', title: t('video.s30'), desc: '识别未经授权人员进入区域', count: 1, color: '#165DFF' },
|
||||
{ icon: <svg t="1778729206689" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4980" width="24" height="24"><path d="M336.349867 969.728c42.564267 14.199467 56.746667-24.814933 39.0144-38.997333-56.746667-39.0144-85.128533-109.943467-63.829334-173.7728 21.265067-70.929067 78.011733-99.310933 78.011734-205.704534 0 0 70.929067 53.1968 56.746666 134.775467 70.929067-81.578667 39.0144-187.972267 24.814934-237.6192 180.872533 95.744 336.930133 304.9984 156.0576 482.321067-21.282133 17.749333 0 49.664 31.914666 39.0144 492.970667-280.1664 120.576-698.658133 56.746667-748.305067 21.282133 49.646933 24.832 127.658667-17.732267 166.673067C623.616 107.946667 442.743467 51.2 442.743467 51.2c21.282133 145.408-81.578667 301.448533-177.322667 422.0416-3.549867-60.296533-7.099733-99.310933-35.464533-152.507733-7.099733 102.843733-88.661333 187.972267-109.943467 294.365866C91.648 756.957867 141.312 859.8016 336.349867 969.728z" fill="#f33b24" p-id="4981"></path></svg>, bg: '#FFF7E8', title: t('video.s31'), desc: '识别烟雾、明火等异常情况', count: 0, color: '#86909C' },
|
||||
{ icon: <svg t="1778729276274" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6131" width="24" height="24"><path d="M0 0m0 0l1024 0q0 0 0 0l0 1024q0 0 0 0l-1024 0q0 0 0 0l0-1024q0 0 0 0Z" fill="#E8EFF8" p-id="6132"></path><path d="M139.636364 558.545455a23.272727 23.272727 0 0 1 23.272727-23.272728h698.181818a23.272727 23.272727 0 0 1 23.272727 23.272728v116.363636a23.272727 23.272727 0 0 1-23.272727 23.272727H162.909091a23.272727 23.272727 0 0 1-23.272727-23.272727v-116.363636z" fill="#247ADE" p-id="6133"></path><path d="M372.363636 616.727273a58.181818 58.181818 0 1 1-116.363636 0 58.181818 58.181818 0 0 1 116.363636 0zM558.545455 616.727273a58.181818 58.181818 0 1 1-116.363637 0 58.181818 58.181818 0 0 1 116.363637 0zM744.727273 616.727273a58.181818 58.181818 0 1 1-116.363637 0 58.181818 58.181818 0 0 1 116.363637 0zM139.636364 325.818182a23.272727 23.272727 0 0 1 23.272727-23.272727h698.181818a23.272727 23.272727 0 0 1 23.272727 23.272727v116.363636a23.272727 23.272727 0 0 1-23.272727 23.272727H162.909091a23.272727 23.272727 0 0 1-23.272727-23.272727v-116.363636z" fill="#9DBCF3" p-id="6134"></path><path d="M372.363636 384a58.181818 58.181818 0 1 1-116.363636 0 58.181818 58.181818 0 0 1 116.363636 0zM558.545455 384a58.181818 58.181818 0 1 1-116.363637 0 58.181818 58.181818 0 0 1 116.363637 0zM744.727273 384a58.181818 58.181818 0 1 1-116.363637 0 58.181818 58.181818 0 0 1 116.363637 0z" fill="#2479DC" p-id="6135"></path></svg>, bg: '#FFF7E8', title: t('video.fixed2DeviceFixed2Area'), desc: '识别人员在设备区滞留行为', count: 1, color: '#F7BA1E' },
|
||||
{ icon: <img src="https://img.icons8.com/fluency/48/motion-detector.png" style={{ width: 24 }} />, bg: '#E8FFEA', title: t('aiAnalysis.motionDetection'), desc: '识别画面异常运动目标', count: 2, color: '#00B42A' },
|
||||
].map((item, idx) => (
|
||||
<div key={idx} style={{ display: 'flex', alignItems: 'center', gap: 16 }}>
|
||||
<div style={{ width: 44, height: 44, background: item.bg, borderRadius: 10, display: 'flex', alignItems: 'center', justifyContent: 'center', flexShrink: 0 }}>
|
||||
@@ -298,12 +297,12 @@ export default function VideoMonitorPage() {
|
||||
<Row gutter={[12, 12]}>
|
||||
<Col xs={24} xl={10}>
|
||||
<Card
|
||||
title={<span style={{ fontSize: 15, fontWeight: 800, color: '#1D2129' }}>摄像头设备列表</span>}
|
||||
title={<span style={{ fontSize: 15, fontWeight: 800, color: '#1D2129' }}>{t('video.cameraDeviceList')}</span>}
|
||||
extra={
|
||||
<Space>
|
||||
<Input placeholder="搜索摄像头名称/位置" prefix={<SearchOutlined />} style={{ width: 200 }} size="small" />
|
||||
<Select defaultValue="全部状态" size="small" style={{ width: 120 }}>
|
||||
<Option value="全部状态">全部状态</Option>
|
||||
<Input placeholder={t('video.fixed2SearchFixed2CameraNameLocationFixed2')} prefix={<SearchOutlined />} style={{ width: 200 }} size="small" />
|
||||
<Select defaultValue={t('video.allStatuses')} size="small" style={{ width: 120 }}>
|
||||
<Option value="全部状态">{t('video.allStatuses')}</Option>
|
||||
<Option value={t('devices.online')}>{t('devices.online')}</Option>
|
||||
<Option value={t('devices.offline')}>{t('devices.offline')}</Option>
|
||||
</Select>
|
||||
@@ -326,19 +325,19 @@ export default function VideoMonitorPage() {
|
||||
|
||||
<Col xs={24} xl={7}>
|
||||
<Card
|
||||
title={<span style={{ fontSize: 15, fontWeight: 800, color: '#1D2129' }}>事件时间线</span>}
|
||||
extra={<Select defaultValue="全部类型" size="small" style={{ width: 100 }}><Option value="全部类型">全部类型</Option></Select>}
|
||||
title={<span style={{ fontSize: 15, fontWeight: 800, color: '#1D2129' }}>{t('video.eventTimeline')}</span>}
|
||||
extra={<Select defaultValue={t('devices.allTypes')} size="small" style={{ width: 100 }}><Option value="全部类型">{t('devices.allTypes')}</Option></Select>}
|
||||
bordered={false}
|
||||
style={cardStyle}
|
||||
bodyStyle={{ padding: '16px 20px' }}
|
||||
>
|
||||
<Timeline style={{ marginTop: 8 }}>
|
||||
{[
|
||||
{ time: '10:23:41', title: '周界入侵检测', desc: '周界北侧区域检测到翻越围栏事件', color: '#F53F3F' },
|
||||
{ time: '10:18:09', title: '人员闯入', desc: '设备区检测到人员闯入', color: '#F7BA1E' },
|
||||
{ time: '10:05:33', title: '设备区域滞留', desc: '逆变器区人员滞留超过5分钟', color: '#F7BA1E' },
|
||||
{ time: '09:52:17', title: '运动检测', desc: '气象站区域检测到异常运动', color: '#165DFF' },
|
||||
{ time: '09:41:28', title: '周界入侵检测', desc: '周界南侧区域检测到攀爬事件', color: '#F53F3F' },
|
||||
{ time: '10:23:41', title: t('video.detectFixed2'), desc: '周界北侧区域检测到翻越围栏事件', color: '#F53F3F' },
|
||||
{ time: '10:18:09', title: t('video.s30'), desc: '设备区检测到人员闯入', color: '#F7BA1E' },
|
||||
{ time: '10:05:33', title: t('video.fixed2DeviceFixed2Area'), desc: '逆变器区人员滞留超过5分钟', color: '#F7BA1E' },
|
||||
{ time: '09:52:17', title: t('aiAnalysis.motionDetection'), desc: '气象站区域检测到异常运动', color: '#165DFF' },
|
||||
{ time: '09:41:28', title: t('video.detectFixed2'), desc: '周界南侧区域检测到攀爬事件', color: '#F53F3F' },
|
||||
].map((item, idx) => (
|
||||
<Timeline.Item key={idx} label={<span style={{ fontSize: 11, color: '#86909C' }}>{item.time}</span>} dot={<div style={{ width: 8, height: 8, borderRadius: '50%', background: item.color }}></div>}>
|
||||
<div style={{ marginLeft: 8 }}>
|
||||
@@ -349,25 +348,25 @@ export default function VideoMonitorPage() {
|
||||
))}
|
||||
</Timeline>
|
||||
<div style={{ textAlign: 'center', marginTop: 16 }}>
|
||||
<Button type="link" size="small">查看更多</Button>
|
||||
<Button type="link" size="small">{t('devices.viewMore')}</Button>
|
||||
</div>
|
||||
</Card>
|
||||
</Col>
|
||||
|
||||
<Col xs={24} xl={7}>
|
||||
<Card
|
||||
title={<span style={{ fontSize: 15, fontWeight: 800, color: '#1D2129' }}>最近告警快照</span>}
|
||||
extra={<Button type="link" size="small">查看更多 <ChevronRight size={14} /></Button>}
|
||||
title={<span style={{ fontSize: 15, fontWeight: 800, color: '#1D2129' }}>{t('video.alert')}</span>}
|
||||
extra={<Button type="link" size="small">{t('devices.viewMore')}<ChevronRight size={14} /></Button>}
|
||||
bordered={false}
|
||||
style={cardStyle}
|
||||
bodyStyle={{ padding: '16px 20px' }}
|
||||
>
|
||||
<div style={{ display: 'flex', flexWrap: "wrap", gap: 12, paddingBottom: 8 }} >
|
||||
{[
|
||||
{ title: '周界北侧', time: '10:23:41', type: '周界入侵', img: 'https://images.unsplash.com/photo-1504384308090-c894fdcc538d?auto=format&fit=crop&w=300&q=60', boxColor: '#F53F3F' },
|
||||
{ title: '设备区', time: '10:18:09', type: '人员闯入', img: 'https://images.unsplash.com/photo-1581092160562-40aa08e78837?auto=format&fit=crop&w=300&q=60', boxColor: '#F7BA1E' },
|
||||
{ title: '逆变器室', time: '10:05:33', type: '设备区域滞留', img: 'https://images.unsplash.com/photo-1581094794329-c8112a89af12?auto=format&fit=crop&w=300&q=60', boxColor: '#F7BA1E' },
|
||||
//{ title: '气象站', time: '09:52:17', type: '运动检测', img: 'https://images.unsplash.com/photo-1534088568595-a066f7104211?auto=format&fit=crop&w=300&q=60', boxColor: '#165DFF' },
|
||||
{ title: t('video.s34'), time: '10:23:41', type: '周界入侵', img: 'https://images.unsplash.com/photo-1504384308090-c894fdcc538d?auto=format&fit=crop&w=300&q=60', boxColor: '#F53F3F' },
|
||||
{ title: t('video.fixed2Device'), time: '10:18:09', type: '人员闯入', img: 'https://images.unsplash.com/photo-1581092160562-40aa08e78837?auto=format&fit=crop&w=300&q=60', boxColor: '#F7BA1E' },
|
||||
{ title: t('video.fixed2Inverter'), time: '10:05:33', type: '设备区域滞留', img: 'https://images.unsplash.com/photo-1581094794329-c8112a89af12?auto=format&fit=crop&w=300&q=60', boxColor: '#F7BA1E' },
|
||||
//{ title: t('video.s0'), time: '09:52:17', type: '运动检测', img: 'https://images.unsplash.com/photo-1534088568595-a066f7104211?auto=format&fit=crop&w=300&q=60', boxColor: '#165DFF' },
|
||||
].map((item, idx) => (
|
||||
<div key={idx} style={{ minWidth: 140, flex: '0 0 140px' }}>
|
||||
<div style={{ position: 'relative', borderRadius: 8, overflow: 'hidden', height: 160 }}>
|
||||
@@ -384,7 +383,7 @@ export default function VideoMonitorPage() {
|
||||
<div style={{ display: 'flex', justifyContent: 'center', gap: 8, marginTop: 10 }}>
|
||||
<Tooltip title={t('video.play')}><Button type="text" icon={<PlayCircleOutlined />} size="small" /></Tooltip>
|
||||
<Tooltip title={t('common.download')}><Button type="text" icon={<DownloadOutlined />} size="small" /></Tooltip>
|
||||
<Tooltip title="详情"><Button type="text" icon={<Eye />} size="small" /></Tooltip>
|
||||
<Tooltip title={t('common.detail')}><Button type="text" icon={<Eye />} size="small" /></Tooltip>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
|
||||
@@ -57,12 +57,6 @@ const { Text, Title } = Typography;
|
||||
const { RangePicker } = DatePicker;
|
||||
const FormItem = Form.Item;
|
||||
|
||||
// 优先级数字映射 1高 2中 3低
|
||||
const priorityConfig = {
|
||||
ERROR: { label: '高', color: '#ff4d4f', bg: '#fff1f0', border: '#ff4d4f' },
|
||||
WARNING: { label: '中', color: '#faad14', bg: '#fff7e6', border: '#faad14' },
|
||||
INFO: { label: '低', color: '#52c41a', bg: '#f6ffed', border: '#52c41a' }
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -104,9 +98,9 @@ const WorkOrderPage = () => {
|
||||
|
||||
// 优先级选项
|
||||
const priorityOptions = [
|
||||
{ value: 1, label: '高' },
|
||||
{ value: 2, label: '中' },
|
||||
{ value: 3, label: '低' }
|
||||
{ value: 1, label: t('workOrder.high') },
|
||||
{ value: 2, label: t('workOrder.medium') },
|
||||
{ value: 3, label: t('workOrder.low') }
|
||||
];
|
||||
const orderStatusConfig = {
|
||||
1: { label: t('constants.pending'), textColor: '#1890ff' },
|
||||
@@ -129,6 +123,13 @@ const WorkOrderPage = () => {
|
||||
current: 1,
|
||||
pageSize: 10,
|
||||
});
|
||||
// 优先级数字映射 1高 2中 3低
|
||||
const priorityConfig = {
|
||||
ERROR: { label: t('workOrder.high'), color: '#ff4d4f', bg: '#fff1f0', border: '#ff4d4f' },
|
||||
WARNING: { label: t('workOrder.medium'), color: '#faad14', bg: '#fff7e6', border: '#faad14' },
|
||||
INFO: { label: t('workOrder.low'), color: '#52c41a', bg: '#f6ffed', border: '#52c41a' }
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -239,14 +240,14 @@ const WorkOrderPage = () => {
|
||||
};
|
||||
const res = await dispatchWorkOrder(params);
|
||||
if (res.code === 200) {
|
||||
messageApi.success('工单派单成功');
|
||||
messageApi.success(t('workOrder.fixed2DispatchOrderFixed2SuccessFixed2'));
|
||||
setDispatchUserModalVisible(false);
|
||||
dispatchForm.resetFields();
|
||||
} else {
|
||||
messageApi.error(res.msg || '派单失败');
|
||||
}
|
||||
} catch (err) {
|
||||
messageApi.error('派单请求异常');
|
||||
messageApi.error(t('workOrder.fixed2DispatchAbnormalFixed2'));
|
||||
console.error(err);
|
||||
}
|
||||
};
|
||||
@@ -417,7 +418,7 @@ const WorkOrderPage = () => {
|
||||
|
||||
const stats = [
|
||||
{
|
||||
title: '今日新增工单',
|
||||
title: t('workOrder.fixed2TodayRecordingsFixed2AddNew'),
|
||||
value: orderStat.todayAdd,
|
||||
subValue: orderStat.todayAddDiff,
|
||||
subText: '较昨日',
|
||||
@@ -425,7 +426,7 @@ const WorkOrderPage = () => {
|
||||
bg: '#e6f7ff'
|
||||
},
|
||||
{
|
||||
title: '待处理工单',
|
||||
title: t('workOrder.pendingOrders'),
|
||||
value: orderStat.pending,
|
||||
subValue: orderStat.pendingHigh,
|
||||
subText: '高优先级',
|
||||
@@ -433,7 +434,7 @@ const WorkOrderPage = () => {
|
||||
bg: '#fff1f0'
|
||||
},
|
||||
{
|
||||
title: '执行中工单',
|
||||
title: t('workOrder.fixed2InProgress'),
|
||||
value: orderStat.running,
|
||||
subValue: `${orderStat.finishRate}%`,
|
||||
subText: '按时率',
|
||||
@@ -441,7 +442,7 @@ const WorkOrderPage = () => {
|
||||
bg: '#f6ffed'
|
||||
},
|
||||
{
|
||||
title: '已完成工单',
|
||||
title: t('workOrder.completedOrders'),
|
||||
value: orderStat.finishedMonth,
|
||||
subValue: '',
|
||||
subText: '本月累计',
|
||||
@@ -449,7 +450,7 @@ const WorkOrderPage = () => {
|
||||
bg: '#f6ffed'
|
||||
},
|
||||
{
|
||||
title: '平均处理时长',
|
||||
title: t('workOrder.handle'),
|
||||
value: orderStat.avgHandleHour,
|
||||
unit: '小时',
|
||||
subValue: orderStat.avgDiff,
|
||||
@@ -458,7 +459,7 @@ const WorkOrderPage = () => {
|
||||
bg: '#e6f7ff'
|
||||
},
|
||||
{
|
||||
title: 'AI建议生成',
|
||||
title: t('workOrder.fixed2Ai'),
|
||||
value: orderStat.aiCreate,
|
||||
unit: '单',
|
||||
subValue: '',
|
||||
@@ -511,7 +512,7 @@ const WorkOrderPage = () => {
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
messageApi.error('获取工单列表失败');
|
||||
messageApi.error(t('workOrder.listFixed2Fixed2FailedFixed2'));
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
@@ -588,7 +589,7 @@ const WorkOrderPage = () => {
|
||||
};
|
||||
// 打开完成工单弹窗
|
||||
const openCompleteModal = () => {
|
||||
if (!selectedRowKey) return messageApi.warning('请先选择工单');
|
||||
if (!selectedRowKey) return messageApi.warning(t('workOrder.s3'));
|
||||
completeForm.setFieldsValue({
|
||||
id: currentDetail?.id,
|
||||
orderNo: currentDetail?.orderNo,
|
||||
@@ -640,12 +641,12 @@ const WorkOrderPage = () => {
|
||||
// 4. 请求方法 completeWorkOrder 必须修改:传 formData,删除 headers 的 Content-Type
|
||||
await completeWorkOrder(formData);
|
||||
|
||||
messageApi.success('工单已完成');
|
||||
messageApi.success(t('workOrder.completedFixed2'));
|
||||
setCompleteModalVisible(false);
|
||||
getWorkOrderList();
|
||||
getWorkOrderDetail(selectedRowKey);
|
||||
} catch (err) {
|
||||
messageApi.error('工单完成失败');
|
||||
messageApi.error(t('workOrder.completeFailFixed2'));
|
||||
console.error(err);
|
||||
}
|
||||
};
|
||||
@@ -659,7 +660,7 @@ const WorkOrderPage = () => {
|
||||
setCurrentDetail(res.data);
|
||||
}
|
||||
} catch (error) {
|
||||
messageApi.error('获取工单详情失败');
|
||||
messageApi.error(t('workOrder.detailFixed2Fixed2FailedFixed2'));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -676,7 +677,7 @@ const WorkOrderPage = () => {
|
||||
|
||||
// 打开修改工单弹窗
|
||||
const openEditModal = () => {
|
||||
if (!selectedRowKey) return messageApi.warning('请先选择一条工单');
|
||||
if (!selectedRowKey) return messageApi.warning(t('workOrder.s7'));
|
||||
const levelText = levelNum2Text[currentDetail?.priorityLevel]; //数字转字符串
|
||||
form.setFieldsValue({
|
||||
orderTitle: currentDetail?.orderTitle,
|
||||
@@ -700,7 +701,7 @@ const WorkOrderPage = () => {
|
||||
orderIds: [selectedRowKey]
|
||||
});
|
||||
} else {
|
||||
return messageApi.warning('请先选择一条工单');
|
||||
return messageApi.warning(t('workOrder.s7'));
|
||||
}
|
||||
|
||||
setDispatchModalVisible(true);
|
||||
@@ -719,12 +720,12 @@ const WorkOrderPage = () => {
|
||||
taskDescription: values.taskDescription,
|
||||
};
|
||||
await updateWorkOrder(params);
|
||||
messageApi.success('修改工单成功');
|
||||
messageApi.success(t('workOrder.fixed2ModifyOrderFixed2SuccessFixed2'));
|
||||
setEditModalVisible(false);
|
||||
getWorkOrderList();
|
||||
getWorkOrderDetail(selectedRowKey);
|
||||
} catch (error) {
|
||||
messageApi.error('修改工单失败');
|
||||
messageApi.error(t('workOrder.fixed2ModifyOrderFixed2FailedFixed2'));
|
||||
console.error(error);
|
||||
}
|
||||
};
|
||||
@@ -742,7 +743,7 @@ const WorkOrderPage = () => {
|
||||
};
|
||||
const res = await startWorkOrder(params);
|
||||
if (res.code == 200) {
|
||||
messageApi.success('工单执行成功');
|
||||
messageApi.success(t('workOrder.executeSuccessFixed2'));
|
||||
setDispatchModalVisible(false);
|
||||
setSelectedRowKeys([]); // 清空选中
|
||||
getWorkOrderList();
|
||||
@@ -751,26 +752,26 @@ const WorkOrderPage = () => {
|
||||
}
|
||||
|
||||
} catch (error) {
|
||||
messageApi.error('工单执行失败');
|
||||
messageApi.error(t('workOrder.executeFailFixed2'));
|
||||
console.error(error);
|
||||
}
|
||||
};
|
||||
|
||||
// 挂起工单
|
||||
const handleSuspend = async () => {
|
||||
if (!selectedRowKey) return messageApi.warning('请选择工单');
|
||||
if (!selectedRowKey) return messageApi.warning(t('workOrder.pleaseSelectOrder'));
|
||||
try {
|
||||
await suspendWorkOrder(selectedRowKey);
|
||||
messageApi.success('工单已挂起');
|
||||
messageApi.success(t('workOrder.suspendedFixed2'));
|
||||
getWorkOrderList();
|
||||
} catch (e) {
|
||||
messageApi.error('挂起失败');
|
||||
messageApi.error(t('workOrder.fixed2SuspendFixed2FailedFixed2'));
|
||||
}
|
||||
};
|
||||
|
||||
// 删除单行
|
||||
const handleDelete = async (record) => {
|
||||
if (!record?.id) return messageApi.warning('无效工单');
|
||||
if (!record?.id) return messageApi.warning(t('workOrder.invalidOrder'));
|
||||
try {
|
||||
await deleteWorkOrder(record.id);
|
||||
messageApi.success(t('common.deleteSuccess'));
|
||||
@@ -784,7 +785,7 @@ const WorkOrderPage = () => {
|
||||
// 批量删除
|
||||
// 批量删除 - 传给后端 id数组
|
||||
const handleBatchDelete = async () => {
|
||||
if (selectedRowKeys.length === 0) return messageApi.warning('请选择要删除的工单');
|
||||
if (selectedRowKeys.length === 0) return messageApi.warning(t('workOrder.fixed2PleaseSelectDelete'));
|
||||
|
||||
try {
|
||||
await deleteWorkOrder(selectedRowKeys);
|
||||
@@ -792,7 +793,7 @@ const WorkOrderPage = () => {
|
||||
setSelectedRowKeys([]); // 清空选中
|
||||
getWorkOrderList(); // 刷新列表
|
||||
} catch (e) {
|
||||
messageApi.error('批量删除失败');
|
||||
messageApi.error(t('workOrder.batchDeleteFail'));
|
||||
console.error(e);
|
||||
}
|
||||
};
|
||||
@@ -821,7 +822,7 @@ const WorkOrderPage = () => {
|
||||
|
||||
// 表格列
|
||||
const columns = [
|
||||
{ title: '工单编号', dataIndex: 'orderNo', key: 'orderNo', width: 150 },
|
||||
{ title: t('workOrder.orderNo'), dataIndex: 'orderNo', key: 'orderNo', width: 150 },
|
||||
{ title: t('workOrder.orderTitle'), dataIndex: 'orderTitle', key: 'orderTitle', width: 200, ellipsis: true },
|
||||
{
|
||||
title: t('workOrder.source'),
|
||||
@@ -848,7 +849,7 @@ const WorkOrderPage = () => {
|
||||
</Tag>
|
||||
)
|
||||
},
|
||||
{ title: '设备', dataIndex: 'deviceId', key: 'deviceId', width: 160, ellipsis: true },
|
||||
{ title: t('devices.device'), dataIndex: 'deviceId', key: 'deviceId', width: 160, ellipsis: true },
|
||||
{ title: t('common.createTime'), dataIndex: 'createTime', key: 'createTime', width: 160 },
|
||||
{
|
||||
title: t('roles.status'),
|
||||
@@ -872,9 +873,7 @@ const WorkOrderPage = () => {
|
||||
<Button type="link" size="small" icon={<EyeOutlined />} onClick={() => handleRowSelect(record)}>{t('common.view')}</Button>
|
||||
<Button type="link" size="small" icon={<EditOutlined />} onClick={() => { handleRowSelect(record); openEditModal(); }}>{t('workOrder.modify')}</Button>
|
||||
<Popconfirm title={t('common.confirmDelete')} onConfirm={() => handleDelete(record)}>
|
||||
<Button type="link" size="small" danger icon={<DeleteOutlined />}>
|
||||
删除
|
||||
</Button>
|
||||
<Button type="link" size="small" danger icon={<DeleteOutlined />}>{t('common.delete')}</Button>
|
||||
</Popconfirm>
|
||||
</Space>
|
||||
)
|
||||
@@ -906,9 +905,9 @@ const WorkOrderPage = () => {
|
||||
|
||||
{/* 顶部标题和页签 */}
|
||||
<div style={{ display: 'flex', alignItems: 'center', marginBottom: 8 }}>
|
||||
<Title level={4} style={{ margin: '0 32px 0 0' }}>工单任务管理</Title>
|
||||
<Title level={4} style={{ margin: '0 32px 0 0' }}>{t('workOrder.fixed2WorkOrders')}</Title>
|
||||
<Tabs activeKey={activeTab} onChange={setActiveTab} items={[
|
||||
{ key: '1', label: '工单总览' },
|
||||
{ key: '1', label: t('workOrder.s49') },
|
||||
]} tabBarStyle={{ marginBottom: 0 }} />
|
||||
</div>
|
||||
|
||||
@@ -953,7 +952,7 @@ const WorkOrderPage = () => {
|
||||
<Select style={{ width: 120 }} size="small" options={errorLevelOptions} allowClear />
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item name="timeRange" label="时间范围">
|
||||
<Form.Item name="timeRange" label={t('common.timeRange')}>
|
||||
<RangePicker style={{ width: 320 }} size="small" />
|
||||
</Form.Item>
|
||||
|
||||
@@ -961,8 +960,8 @@ const WorkOrderPage = () => {
|
||||
<Select style={{ width: 120 }} size="small" options={statusOptions} allowClear />
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item name="keyword" label="关键词">
|
||||
<Input placeholder="请输入工单编号/标题" prefix={<SearchOutlined />} size="small" />
|
||||
<Form.Item name="keyword" label={t('workOrder.keyword')}>
|
||||
<Input placeholder={t('workOrder.fixed2PleaseEnterFixed2OrderNo')} prefix={<SearchOutlined />} size="small" />
|
||||
</Form.Item>
|
||||
<Form.Item>
|
||||
<Space>
|
||||
@@ -980,7 +979,7 @@ const WorkOrderPage = () => {
|
||||
bordered={false}
|
||||
title={
|
||||
<Space size={8}>
|
||||
<Text strong style={{ fontSize: 15, color: '#1D2129' }}>工单列表</Text>
|
||||
<Text strong style={{ fontSize: 15, color: '#1D2129' }}>{t('workOrder.listFixed2')}</Text>
|
||||
<Text type="secondary" style={{ fontSize: 12 }}>(共 {workOrderTotal} 条)</Text>
|
||||
{selectedRowKeys.length > 0 && (
|
||||
<>
|
||||
@@ -988,9 +987,7 @@ const WorkOrderPage = () => {
|
||||
title={`确定删除已选中的 ${selectedRowKeys.length} 条工单吗?`}
|
||||
onConfirm={handleBatchDelete}
|
||||
>
|
||||
<Button size="small" danger icon={<DeleteOutlined />}>
|
||||
批量删除
|
||||
</Button>
|
||||
<Button size="small" danger icon={<DeleteOutlined />}>{t('common.batchDelete')}</Button>
|
||||
</Popconfirm>
|
||||
<Button
|
||||
type="primary"
|
||||
@@ -1040,7 +1037,7 @@ const WorkOrderPage = () => {
|
||||
|
||||
<Row gutter={[12, 12]}>
|
||||
<Col xs={24} md={9}>
|
||||
<Card bordered={false} title={<Text strong style={{ fontSize: 14 }}>工单状态分布</Text>} style={{ ...cardStyle, height: 380 }}>
|
||||
<Card bordered={false} title={<Text strong style={{ fontSize: 14 }}>{t('workOrder.fixed2OrderStatus')}</Text>} style={{ ...cardStyle, height: 380 }}>
|
||||
<div style={{ height: 300, position: 'relative' }}>
|
||||
<Pie
|
||||
data={pieData}
|
||||
@@ -1054,7 +1051,7 @@ const WorkOrderPage = () => {
|
||||
height={260}
|
||||
/>
|
||||
<div style={{ position: 'absolute', top: '45%', left: '50%', textAlign: 'center', transform: 'translate(-50%, -50%)' }}>
|
||||
<div style={{ fontSize: 12, color: '#86909C' }}>总数</div>
|
||||
<div style={{ fontSize: 12, color: '#86909C' }}>{t('workOrder.s5')}</div>
|
||||
<div style={{ fontSize: 28, fontWeight: 800, color: '#1D2129' }}>{workOrderTotal}</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1063,14 +1060,13 @@ const WorkOrderPage = () => {
|
||||
<Col xs={24} md={15}>
|
||||
<Card
|
||||
bordered={false}
|
||||
title={<Text strong style={{ fontSize: 14 }}>任务排班 / 日历视图</Text>}
|
||||
title={<Text strong style={{ fontSize: 14 }}>{t('workOrder.fixed2TaskSuspended2')}</Text>}
|
||||
extra={
|
||||
<Button
|
||||
type="link"
|
||||
size="small"
|
||||
onClick={() => setScheduleModalVisible(true)}
|
||||
>
|
||||
更多 <ChevronRight size={14} />
|
||||
>{t('common.more')}<ChevronRight size={14} />
|
||||
</Button>
|
||||
}
|
||||
style={{ ...cardStyle, height: 380 }}
|
||||
@@ -1170,10 +1166,10 @@ const WorkOrderPage = () => {
|
||||
rowKey="id"
|
||||
size="small"
|
||||
columns={[
|
||||
{ title: '工单编号', dataIndex: 'orderNo', width: 260 },
|
||||
{ title: t('workOrder.orderNo'), dataIndex: 'orderNo', width: 260 },
|
||||
{ title: t('workOrder.orderTitle'), dataIndex: 'orderTitle', ellipsis: true },
|
||||
{
|
||||
title: '计划执行时间',
|
||||
title: t('workOrder.executionTimeFixed2'),
|
||||
dataIndex: 'planStartTime',
|
||||
render: t => dayjs(t).format('YYYY-MM-DD HH:mm')
|
||||
},
|
||||
@@ -1212,8 +1208,8 @@ const WorkOrderPage = () => {
|
||||
<Col xs={24} xl={9}>
|
||||
<Card bordered={false} style={cardStyle} bodyStyle={{ padding: '20px' }}>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 8 }}>
|
||||
<Text strong style={{ fontSize: 16, color: '#1D2129' }}>工单详情</Text>
|
||||
<Text type="secondary" style={{ fontSize: 12 }}>工单编号: <span style={{ color: '#4E5969', fontWeight: 600 }}>{currentDetail?.orderNo || '--'}</span></Text>
|
||||
<Text strong style={{ fontSize: 16, color: '#1D2129' }}>{t('workOrder.detailFixed2')}</Text>
|
||||
<Text type="secondary" style={{ fontSize: 12 }}>{t('workOrder.fixed2OrderNo')}<span style={{ color: '#4E5969', fontWeight: 600 }}>{currentDetail?.orderNo || '--'}</span></Text>
|
||||
</div>
|
||||
|
||||
<div style={{ marginBottom: 8 }}>
|
||||
@@ -1228,35 +1224,35 @@ const WorkOrderPage = () => {
|
||||
|
||||
<Row gutter={[16, 16]} style={{ background: '#f8fafc', padding: 16, borderRadius: 12, marginBottom: 20 }}>
|
||||
<Col span={12}>
|
||||
<span style={{ fontSize: 12 }}>来源:</span>
|
||||
<span style={{ fontSize: 12 }}>{t('workOrder.fixed2Source')}</span>
|
||||
<span style={{ fontSize: 12, fontWeight: 500 }}>{sourceTypeMap[currentDetail?.sourceType] || '--'}</span>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<span style={{ fontSize: 12 }}>工单类型:</span>
|
||||
<span style={{ fontSize: 12 }}>{t('workOrder.fixed2OrderType')}</span>
|
||||
<span style={{ fontSize: 12, fontWeight: 500 }}>{getWorkOrderTypeText(currentDetail?.orderType)}</span>
|
||||
</Col>
|
||||
<Col span={24}>
|
||||
<span style={{ fontSize: 12 }}>执行开始时间:</span>
|
||||
<span style={{ fontSize: 12 }}>{t('workOrder.fixed2ExecutionStartTime')}</span>
|
||||
<span style={{ fontSize: 12, fontWeight: 500 }}>
|
||||
{currentDetail?.actualStartTime || '--'}
|
||||
</span>
|
||||
</Col>
|
||||
<Col span={24}>
|
||||
<span style={{ fontSize: 12 }}>关联设备:</span>
|
||||
<span style={{ fontSize: 12 }}>{t('workOrder.fixed2RelatedDevice')}</span>
|
||||
<span style={{ fontSize: 12, color: '#165DFF', fontWeight: 600 }}>{currentDetail?.deviceName || '无'}</span>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<span style={{ fontSize: 12 }}>关联区域:</span>
|
||||
<span style={{ fontSize: 12 }}>{t('workOrder.fixed2RelatedArea')}</span>
|
||||
<span style={{ fontSize: 12, fontWeight: 500 }}>{currentDetail?.siteName || '无'}</span>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<span style={{ fontSize: 12 }}>当前状态:</span>
|
||||
<span style={{ fontSize: 12 }}>{t('workOrder.fixed2CurrentStatus')}</span>
|
||||
<Tag color="blue" style={{ borderRadius: 4, fontWeight: 600, border: 'none', background: '#E8F3FF', color: '#165DFF' }}>
|
||||
{orderStatusConfig[currentDetail?.orderStatus]?.label || '--'}
|
||||
</Tag>
|
||||
</Col>
|
||||
<Col span={24}>
|
||||
<span style={{ fontSize: 12 }}>任务描述:</span>
|
||||
<span style={{ fontSize: 12 }}>{t('workOrder.fixed2TaskDescription')}</span>
|
||||
<div style={{ fontSize: 12, color: '#4E5969', marginTop: 4, lineHeight: 1.6 }}>
|
||||
{getRelatedAlarmInfo(currentDetail?.alarmId)}
|
||||
|
||||
@@ -1269,7 +1265,7 @@ const WorkOrderPage = () => {
|
||||
(currentDetail?.videoUrl && currentDetail.videoUrl.length > 0)
|
||||
) && (
|
||||
<Col span={24}>
|
||||
<div style={{ fontSize: 12, marginBottom: 8 }}>附件素材:</div>
|
||||
<div style={{ fontSize: 12, marginBottom: 8 }}>{t('workOrder.fixed2Attachments')}</div>
|
||||
<div style={{ display: 'flex', gap: 12, flexWrap: 'wrap' }}>
|
||||
{/* 图片预览组,支持点击放大 */}
|
||||
{currentDetail?.imgUrl?.length > 0 && (
|
||||
@@ -1431,9 +1427,7 @@ const WorkOrderPage = () => {
|
||||
onClick={openExecuteModal}
|
||||
style={{ borderRadius: 8, height: 36, fontWeight: 600 }}
|
||||
icon={<PlayCircleFilled />}
|
||||
>
|
||||
执行工单
|
||||
</Button>
|
||||
>{t('workOrder.execute')}</Button>
|
||||
</div>
|
||||
<div style={{ flex: 1 }}>
|
||||
<Button icon={<EditOutlined />} block onClick={openEditModal} style={{ borderRadius: 8, height: 36, fontWeight: 600 }}>{t('workOrder.modify')}</Button>
|
||||
@@ -1524,16 +1518,14 @@ const WorkOrderPage = () => {
|
||||
</Col>
|
||||
<Col span={11}>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 12 }}>
|
||||
<div style={{ fontSize: 12, fontWeight: 700, color: '#1D2129' }}>关联告警列表 <Text type="secondary" style={{ fontSize: 11, fontWeight: 400 }}>(近 3 条)</Text></div>
|
||||
<div style={{ fontSize: 12, fontWeight: 700, color: '#1D2129' }}>{t('workOrder.relatedAlertList')}<Text type="secondary" style={{ fontSize: 11, fontWeight: 400 }}>(近 3 条)</Text></div>
|
||||
{weekAlarmList.length > 3 && (
|
||||
<Button
|
||||
type="link"
|
||||
size="small"
|
||||
style={{ fontSize: 11, padding: 0 }}
|
||||
onClick={() => setAlarmAllModalVisible(true)}
|
||||
>
|
||||
查看全部
|
||||
</Button>
|
||||
>{t('common.viewAll')}</Button>
|
||||
)} </div>
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: 10 }}>
|
||||
{latestThreeAlarm.length === 0 ? (
|
||||
@@ -1610,8 +1602,8 @@ const WorkOrderPage = () => {
|
||||
<Select options={errorLevelOptions} allowClear />
|
||||
</Form.Item>
|
||||
</FormItem>
|
||||
<FormItem name="taskDescription" label={t('workOrder.taskDescription')} rules={[{ required: true, message: '请输入任务描述' }]}>
|
||||
<Input.TextArea rows={4} placeholder="请输入任务描述" />
|
||||
<FormItem name="taskDescription" label={t('workOrder.taskDescription')} rules={[{ required: true, message: t('workOrder.pleaseInputTaskDesc') }]}>
|
||||
<Input.TextArea rows={4} placeholder={t('workOrder.pleaseInputTaskDesc')} />
|
||||
</FormItem>
|
||||
<FormItem style={{ textAlign: 'right', marginBottom: 0 }}>
|
||||
<Button onClick={() => setEditModalVisible(false)}>{t('common.cancel')}</Button>
|
||||
@@ -1629,10 +1621,10 @@ const WorkOrderPage = () => {
|
||||
width={520}
|
||||
>
|
||||
<Form form={dispatchForm} layout="vertical" onFinish={submitDispatchWorkOrder}>
|
||||
<FormItem name="id" label="工单ID" hidden>
|
||||
<FormItem name="id" label={t('workOrder.id')} hidden>
|
||||
<Input />
|
||||
</FormItem>
|
||||
<FormItem label="待派单工单">
|
||||
<FormItem label={t('workOrder.dispatch2')}>
|
||||
<div style={{
|
||||
padding: 8,
|
||||
background: '#f8fafc',
|
||||
@@ -1650,7 +1642,7 @@ const WorkOrderPage = () => {
|
||||
rules={[{ required: true, message: t('workOrder.pleaseSelectDispatcher') }]}
|
||||
>
|
||||
<Select
|
||||
placeholder="请选择人员"
|
||||
placeholder={t('workOrder.pleaseSelectPerson')}
|
||||
showSearch
|
||||
style={{ width: '100%' }}
|
||||
optionFilterProp="label"
|
||||
@@ -1674,8 +1666,8 @@ const WorkOrderPage = () => {
|
||||
{/* 执行工单弹窗 */}
|
||||
<Modal title={t('workOrder.executeOrder')} open={dispatchModalVisible} onCancel={() => setDispatchModalVisible(false)} footer={null} width={550}>
|
||||
<Form form={form} layout="vertical" onFinish={submitExecute}>
|
||||
<FormItem name="orderIds" label="工单ID" hidden><Input /></FormItem>
|
||||
<FormItem label="选中工单">
|
||||
<FormItem name="orderIds" label={t('workOrder.id')} hidden><Input /></FormItem>
|
||||
<FormItem label={t('workOrder.s32')}>
|
||||
<div style={{
|
||||
padding: 8,
|
||||
background: '#f8fafc',
|
||||
@@ -1702,7 +1694,7 @@ const WorkOrderPage = () => {
|
||||
>
|
||||
{/*<Select
|
||||
style={{ width: "80%", marginBottom: 8 }}
|
||||
placeholder="请选择设备"
|
||||
placeholder={t('workOrder.selectDeviceFixed2')}
|
||||
value={selectedDevice?.device_sn || selectedDevice?.serialNumber}
|
||||
onChange={handleDeviceChange}
|
||||
size="small"
|
||||
@@ -1719,7 +1711,7 @@ const WorkOrderPage = () => {
|
||||
/>*/}
|
||||
|
||||
<Select
|
||||
placeholder="请选择执行设备"
|
||||
placeholder={t('devices.selectExecuteDevice')}
|
||||
showSearch
|
||||
style={{ width: "100%" }}
|
||||
// 自定义筛选逻辑:输入文字匹配别名、序列号、无人机呼号
|
||||
@@ -1765,7 +1757,7 @@ const WorkOrderPage = () => {
|
||||
<DatePicker
|
||||
showTime
|
||||
format="YYYY-MM-DD HH:mm:ss"
|
||||
placeholder="请选择执行开始时间"
|
||||
placeholder={t('workOrder.fixed2PleaseSelectFixed2ExecutionStartTimeFixed2')}
|
||||
style={{ width: '100%' }}
|
||||
/>
|
||||
</FormItem>*/}
|
||||
@@ -1780,13 +1772,13 @@ const WorkOrderPage = () => {
|
||||
<Modal title={t('workOrder.completeOrder')} open={completeModalVisible} onCancel={() => setCompleteModalVisible(false)} footer={null} width={500}>
|
||||
<Form form={completeForm} layout="vertical" onFinish={submitComplete}>
|
||||
<Form.Item name="id" hidden><Input /></Form.Item>
|
||||
<Form.Item name="orderNo" label="工单编号"><Input disabled /></Form.Item>
|
||||
<Form.Item name="handleResult" label={t('alerts.handleResult')} rules={[{ required: true, message: '请输入处理结果' }]}>
|
||||
<Select placeholder="请选择处理结果">
|
||||
<Option value="已处理完成">已处理完成</Option><Option value="已修复">已修复</Option><Option value="无需处理">无需处理</Option><Option value="问题已闭环">问题已闭环</Option>
|
||||
<Form.Item name="orderNo" label={t('workOrder.orderNo')}><Input disabled /></Form.Item>
|
||||
<Form.Item name="handleResult" label={t('alerts.handleResult')} rules={[{ required: true, message: t('workOrder.fixed2PleaseEnterFixed2HandleResultFixed2') }]}>
|
||||
<Select placeholder={t('alerts.pleaseSelectHandleResult')}>
|
||||
<Option value="已处理完成">{t('workOrder.fixed2HandledFixed2CompleteFixed2')}</Option><Option value="已修复">{t('workOrder.s22')}</Option><Option value="无需处理">{t('workOrder.handleFixed2')}</Option><Option value="问题已闭环">{t('workOrder.s24')}</Option>
|
||||
</Select>
|
||||
</Form.Item>
|
||||
<Form.Item name="handleRemark" label={t('alerts.handleRemark')}><Input.TextArea rows={4} placeholder="请填写处理详情、备注信息" /></Form.Item>
|
||||
<Form.Item name="handleRemark" label={t('alerts.handleRemark')}><Input.TextArea rows={4} placeholder={t('workOrder.handleFixed2DetailRemarkFixed2InfoFixed2')} /></Form.Item>
|
||||
<Form.Item style={{ textAlign: 'right', marginBottom: 0 }}>
|
||||
<Button onClick={() => setCompleteModalVisible(false)}>{t('common.cancel')}</Button>
|
||||
<Button type="primary" htmlType="submit" style={{ marginLeft: 8 }}>{t('workOrder.confirmComplete')}</Button>
|
||||
@@ -1811,12 +1803,12 @@ const WorkOrderPage = () => {
|
||||
})()}
|
||||
columns={[
|
||||
{
|
||||
title: '告警编号',
|
||||
title: t('alerts.alarmNo'),
|
||||
dataIndex: 'alarmNo',
|
||||
width: 140
|
||||
},
|
||||
{
|
||||
title: '告警标题',
|
||||
title: t('alerts.alarmTitle'),
|
||||
dataIndex: 'alarmTitle',
|
||||
ellipsis: true
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user