优化代码消除 控制台的报错信息

This commit is contained in:
mmc
2026-08-31 10:30:21 +08:00
parent 674721504d
commit a1922cdeaf
23 changed files with 259 additions and 214 deletions

View File

@@ -1,4 +1,4 @@
import React, { useState, useEffect } from 'react';
import React, { useState, useEffect } from 'react';
import { Outlet, useNavigate, useLocation } from 'react-router-dom';
import {
Layout, Menu, Button, Space, Select, Avatar, Card, Tag
@@ -86,7 +86,6 @@ export default function AppLayout() {
list.forEach(item => {
map.set(item.menuId, {
...item,
key: item.path,
label: item.menuName,
icon: getIcon(item.path),

View File

@@ -651,9 +651,9 @@ const CesiumMap = React.forwardRef(({ ifClear, ifClearPlanLine, ifClearNavLine,
const layerIdentifier = `${workspace}:${layerName}`;
let baseUrl = wmsUrl;
const cesiumLayers = [];
if (index == 2 && from == "other") {
flyToLayer(layerIdentifier, baseUrl, 100);
}
//if (index == 2 && from == "other") {
// //flyToLayer(layerIdentifier, baseUrl, 100);
//}
//if (index == 0 && from == "other") {
// flyToLayer(layerIdentifier, baseUrl, 100);
//}
@@ -1246,8 +1246,17 @@ const CesiumMap = React.forwardRef(({ ifClear, ifClearPlanLine, ifClearNavLine,
if (viewer) {
if (planLineRef.current) {
viewer.entities.remove(planLineRef.current);
planLineRef.current = null;
}
if (polygonRef.current) {
viewer.entities.remove(polygonRef.current);
polygonRef.current = null;
}
viewer.scene.requestRender();
}
prevIfClearPlanLine.current = ifClearPlanLine;

View File

@@ -1,4 +1,4 @@
import React, { useState } from 'react';
import React, { useState } from 'react';
import {
Form,
Input,
@@ -180,7 +180,7 @@ const BasicSettings = () => {
<Row gutter={[8, 8]} style={{ marginBottom: 8 }}>
{topCards.map((item, idx) => (
<Col key={idx} style={{ minWidth: '168px', flex: '1 0 auto', maxWidth: "250px" }}>
<AntdCard bordered={false} bodyStyle={{ padding: '12px 16px' }} style={{ borderRadius: 10, boxShadow: '0 2px 8px rgba(0,0,0,0.04)' }}>
<AntdCard variant="borderless" styles={{ body: { padding: '12px 16px' } }} style={{ borderRadius: 10, boxShadow: '0 2px 8px rgba(0,0,0,0.04)' }}>
<div style={{ display: 'flex', alignItems: 'center', gap: 10 }}>
<div style={{ width: 40, height: 40, borderRadius: 10, background: item.bg, display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
{React.cloneElement(item.icon as React.ReactElement, { size: 20, style: item.icon.props.style ? { ...item.icon.props.style, fontSize: 20 } : { fontSize: 20 } })}
@@ -205,9 +205,9 @@ const BasicSettings = () => {
{/* 基础配置 */}
<AntdCard
title={<Space><SettingOutlined style={{ color: '#1677ff' }} /><b>{t('systemSetting.basicSettings')}</b></Space>}
bordered={false}
variant="borderless"
style={{ borderRadius: 10, marginBottom: 8, boxShadow: '0 2px 8px rgba(0,0,0,0.04)' }}
bodyStyle={{ padding: '16px' }}
styles={{ body: { padding: '16px' } }}
>
<Form form={form} layout="vertical">
<Row gutter={16}>
@@ -286,9 +286,9 @@ const BasicSettings = () => {
{/* 通知与告警策略 */}
<AntdCard
title={<Space><BellOutlined style={{ color: '#1677ff' }} /><b>{t('systemSetting.alert2')}</b></Space>}
bordered={false}
variant="borderless"
style={{ borderRadius: 10, marginBottom: 8, boxShadow: '0 2px 8px rgba(0,0,0,0.04)' }}
bodyStyle={{ padding: '16px' }}
styles={{ body: { padding: '16px' } }}
>
<Row gutter={[12, 12]} style={{ marginBottom: 8 }}>
{[
@@ -329,9 +329,9 @@ const BasicSettings = () => {
{/* 用户与权限预览 */}
<AntdCard
title={<Space><Users size={16} style={{ color: '#1677ff' }} /><b>{t('systemSetting.fixed2RolePermissionFixed2OverviewFixed2')}</b></Space>}
bordered={false}
variant="borderless"
style={{ borderRadius: 10, boxShadow: '0 2px 8px rgba(0,0,0,0.04)', marginBottom: 0 }}
bodyStyle={{ padding: '12px' }}
styles={{ body: { padding: '12px' } }}
>
<Table
size="small"
@@ -340,6 +340,7 @@ const BasicSettings = () => {
empty={false}
rowKey="name"
pagination={{ size: 'small', total: 4, pageSize: 4, showTotal: (total) => `共 ${total} 条` }}
columns={[
{ title: t('systemSetting.s36'), dataIndex: 'name', key: 'name', fixed: 'left', width: 80 },
@@ -356,7 +357,7 @@ const BasicSettings = () => {
'数据分析师': { color: '#722ed1', bg: '#f9f0ff' },
};
const s = config[role] || { color: '#8c8c8c', bg: '#f5f5f5' };
return <Tag bordered={false} style={{ color: s.color, background: s.bg, fontSize: 10, margin: 0 }}>{role}</Tag>;
return <Tag variant="borderless" style={{ color: s.color, background: s.bg, fontSize: 10, margin: 0 }}>{role}</Tag>;
}
},
{ title: t('users.phone'), dataIndex: 'phone', key: 'phone', width: 110 },
@@ -397,9 +398,9 @@ const BasicSettings = () => {
{/* 角色权限概览 */}
<AntdCard
title={<Space><Users size={16} style={{ color: '#1677ff' }} /><b>{t('systemSetting.fixed2RolePermissionFixed2OverviewFixed2')}</b></Space>}
bordered={false}
variant="borderless"
style={{ borderRadius: 10, marginBottom: 8, boxShadow: '0 2px 8px rgba(0,0,0,0.04)' }}
bodyStyle={{ padding: '10px' }}
styles={{ body: { padding: '10px' } }}
>
<Row gutter={[8, 8]}>
{roleOverview.map((role, idx) => (
@@ -428,9 +429,9 @@ const BasicSettings = () => {
<AntdCard
title={<Space><ApiOutlined style={{ color: '#1677ff' }} /><b>{t('systemSetting.fixed2DeviceAccessFixed2StatusFixed2')}</b></Space>}
extra={<Button type="link" size="small" style={{ fontSize: 11, padding: 0 }}>{t('common.detail')}<RightOutlined style={{ fontSize: 9 }} /></Button>}
bordered={false}
variant="borderless"
style={{ borderRadius: 10, marginBottom: 8, boxShadow: '0 2px 8px rgba(0,0,0,0.04)' }}
bodyStyle={{ padding: '12px' }}
styles={{ body: { padding: '12px' } }}
>
<div style={{ display: 'flex', gap: 12 }}>
<div style={{ flex: '0 0 90px' }}>
@@ -487,9 +488,9 @@ const BasicSettings = () => {
{/* 数据与安全 */}
<AntdCard
title={<Space><Shield size={16} style={{ color: '#1677ff' }} /><b>{t('systemSetting.dataSafety')}</b></Space>}
bordered={false}
variant="borderless"
style={{ borderRadius: 10, marginBottom: 8, boxShadow: '0 2px 8px rgba(0,0,0,0.04)' }}
bodyStyle={{ padding: '12px' }}
styles={{ body: { padding: '12px' } }}
>
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(120px, 1fr))', gap: '10px 16px' }}>
{[
@@ -518,9 +519,9 @@ const BasicSettings = () => {
<AntdCard
title={<Space><Wrench size={16} style={{ color: '#1677ff' }} /><b>{t('systemSetting.systemMaintenance')}</b></Space>}
extra={<Button type="link" size="small" danger style={{ fontSize: 10, padding: 0 }}>{t('systemSetting.s192')}</Button>}
bordered={false}
variant="borderless"
style={{ borderRadius: 10, boxShadow: '0 2px 8px rgba(0,0,0,0.04)' }}
bodyStyle={{ padding: '12px' }}
styles={{ body: { padding: '12px' } }}
>
<Row gutter={[8, 8]}>
{[

View File

@@ -104,7 +104,7 @@ const LogManagement = () => {
<Text type="secondary" style={{ fontSize: 12 }}>{t('systemSetting.equipmentControlActionsSuperAdminViewFixed2')}</Text>
</div>
<AntdCard bordered={false} style={{ borderRadius: 10, marginBottom: 8, boxShadow: '0 2px 8px rgba(0,0,0,0.04)' }} bodyStyle={{ padding: 12 }}>
<AntdCard variant="borderless" style={{ borderRadius: 10, marginBottom: 8, boxShadow: '0 2px 8px rgba(0,0,0,0.04)' }} styles={{ body: { padding: 12 } }}>
<Row gutter={[8, 8]} align="middle">
<Col xs={24} sm={8} md={5}>
<Select
@@ -142,7 +142,7 @@ const LogManagement = () => {
</Row>
</AntdCard>
<AntdCard bordered={false} style={{ borderRadius: 10, boxShadow: '0 2px 8px rgba(0,0,0,0.04)' }} bodyStyle={{ padding: 4 }}>
<AntdCard variant="borderless" style={{ borderRadius: 10, boxShadow: '0 2px 8px rgba(0,0,0,0.04)' }} styles={{ body: { padding: 4 } }}>
<Table
size="small"
rowKey="id"

View File

@@ -102,7 +102,7 @@ const OnlineUserPage = () => {
{/* ====================== Tab 1:在线用户 ====================== */}
{activeTab === 'onlineUser' && (
<Card bordered={false} style={{ borderRadius: 8 }}>
<Card variant="borderless" style={{ borderRadius: 8 }}>
{/* 搜索栏 */}
<div style={{ display: 'flex', alignItems: 'center', gap: 16, marginBottom: 20 }}>
<div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>
@@ -140,14 +140,14 @@ const OnlineUserPage = () => {
showTotal: (total) => `${t('common.total')} ${total} ${t('common.items')}`,
showQuickJumper: true
}}
bordered={false}
variant="borderless"
/>
</Card>
)}
{/* ====================== Tab 2:其他页面(你可以随便改内容) ====================== */}
{activeTab === 'other' && (
<Card bordered={false} style={{ borderRadius: 8, padding: '40px 0', textAlign: 'center' }}>
<Card variant="borderless" style={{ borderRadius: 8, padding: '40px 0', textAlign: 'center' }}>
<h2>{t('systemSetting.fixed2OthersContentFixed2')}</h2>
<p>{t('systemSetting.statusCpuContentFixed2')}</p>
</Card>

View File

@@ -185,7 +185,7 @@ const VideoManagement = () => {
</div>
<Card bordered={false} style={{ borderRadius: 10, marginBottom: 8 }} bodyStyle={{ padding: 12 }}>
<Card variant="borderless" style={{ borderRadius: 10, marginBottom: 8 }} styles={{ body: { padding: 12 } }}>
<Row gutter={[8, 8]} align="middle">
<Col xs={24} sm={10} md={7}>
<Text style={{ fontSize: 12, color: '#666' }}>{t('systemSetting.s0')}</Text>
@@ -225,7 +225,7 @@ const VideoManagement = () => {
</Row>
</Card>
<Card bordered={false} style={{ borderRadius: 10 }} bodyStyle={{ padding: 4 }}>
<Card variant="borderless" style={{ borderRadius: 10 }} styles={{ body: { padding: 4 } }}>
{loading ? (
<div style={{ textAlign: 'center', padding: 40 }}><Spin /></div>
) : !channel ? (

View File

@@ -618,8 +618,8 @@ export default function AlarmCenterPage() {
].map((item, idx) => (
<Col key={idx} style={{ minWidth: '200px', flex: '1 1 auto', maxWidth: "400px" }}>
<Card
bordered={false}
bodyStyle={{ padding: '16px 20px' }}
variant="borderless"
styles={{ body: { padding: '16px 20px' } }}
style={{ borderRadius: 8, height: 120 }}
>
<Row align="middle" gutter={16} style={{ height: '100%' }}>
@@ -658,7 +658,7 @@ export default function AlarmCenterPage() {
</Row>
<Row gutter={8} style={{ marginBottom: 8 }}>
<Col span={24}>
<Card bordered={false} bodyStyle={{ padding: '16px 24px' }} style={{ borderRadius: 8 }}>
<Card variant="borderless" styles={{ body: { padding: '16px 24px' } }} style={{ borderRadius: 8 }}>
<Row gutter={[8, 8]} align="middle">
<Col>
<div style={{ fontSize: 12, color: '#4E5969', marginBottom: 4 }}>{t('alerts.alertLevel')}</div>
@@ -747,7 +747,7 @@ export default function AlarmCenterPage() {
{/* 表格 */}
<Row gutter={16} style={{ marginBottom: 8 }}>
<Col flex="auto" style={{ minWidth: 0 }}>
<Card bordered={false} bodyStyle={{ padding: '16px 24px' }} style={{ borderRadius: 8 }}>
<Card variant="borderless" styles={{ body: { padding: '16px 24px' } }} style={{ borderRadius: 8 }}>
<Spin spinning={loading}>
<Table
rowKey="id"
@@ -774,7 +774,7 @@ export default function AlarmCenterPage() {
{/* 三个图表 */}
<Row gutter={16}>
<Col span={8}>
<Card bordered={false} title={t('alerts.alertTrend')} style={{ borderRadius: 8 }}>
<Card variant="borderless" title={t('alerts.alertTrend')} style={{ borderRadius: 8 }}>
<UniversalLineChart
data={getAlarmTrendData()}
xKey="date"
@@ -807,7 +807,7 @@ export default function AlarmCenterPage() {
</Card>
</Col>
<Col span={8}>
<Card bordered={false} title={t('alerts.alertTypeProportion')} style={{ borderRadius: 8 }}>
<Card variant="borderless" title={t('alerts.alertTypeProportion')} style={{ borderRadius: 8 }}>
<UniversalPieChart
data={pieData}
height={220}
@@ -818,7 +818,7 @@ export default function AlarmCenterPage() {
</Card>
</Col>
<Col span={8}>
<Card bordered={false} title={t('alerts.alertStatusStatistics')} style={{ borderRadius: 8 }}>
<Card variant="borderless" title={t('alerts.alertStatusStatistics')} style={{ borderRadius: 8 }}>
<UniversalBarChart
data={[
{

View File

@@ -99,7 +99,7 @@ const AlarmStatistics = () => {
return (
<div style={{ padding: 24, background: '#f5f7fa', minHeight: '100vh' }}>
<Card title={t('alerts.alertOverview')} bordered={false} style={{ marginBottom: 24, borderRadius: 8 }}>
<Card title={t('alerts.alertOverview')} variant="borderless" style={{ marginBottom: 24, borderRadius: 8 }}>
<Row gutter={16} align="middle">
<Col xs={24} sm={12} md={6}>
<Space size={16}>
@@ -153,13 +153,13 @@ const AlarmStatistics = () => {
<Row gutter={16}>
<Col xs={24} md={12}>
<Card bordered={false} style={{ borderRadius: 8 }}>
<Card variant="borderless" style={{ borderRadius: 8 }}>
<div ref={barChartRef} style={{ width: '100%', height: 360 }} />
</Card>
</Col>
<Col xs={24} md={12}>
<Card bordered={false} style={{ borderRadius: 8 }}>
<Card variant="borderless" style={{ borderRadius: 8 }}>
<div ref={pieChartRef} style={{ width: '100%', height: 360 }} />
</Card>
</Col>

View File

@@ -586,8 +586,8 @@ export default function DeviceOverviewPage() {
{dynamicTopCards.map((card, idx) => (
<Col key={idx} style={{ minWidth: '200px', flex: '1 0 auto', maxWidth: "260px" }}>
<Card
bordered={false}
bodyStyle={{ padding: '20px 20px', display: 'flex', alignItems: 'flex-start', justifyContent: 'space-between' }}
variant="borderless"
styles={{ body: { padding: '20px 20px', display: 'flex', alignItems: 'flex-start', justifyContent: 'space-between' } }}
style={{ borderRadius: 8, boxShadow: '0 2px 8px rgba(0,0,0,0.06)', height: 101 }}
>
{/* 左侧文字区域 */}
@@ -627,7 +627,7 @@ export default function DeviceOverviewPage() {
<Row gutter={[8, 8]}>
<Col xs={24} lg={14}>
<Card title={<><EnvironmentOutlined />{t('devices.fixed2Equipment')}</>} extra={<Button type="text" icon={<SettingOutlined />} />} bordered={false} style={{ borderRadius: 8, marginBottom: 8 }} bodyStyle={{ padding: 0 }}>
<Card title={<><EnvironmentOutlined />{t('devices.fixed2Equipment')}</>} extra={<Button type="text" icon={<SettingOutlined />} />} variant="borderless" style={{ borderRadius: 8, marginBottom: 8 }} styles={{ body: { padding: 0 } }}>
<div style={{ width: '100%', height: 350, borderRadius: 8, position: 'relative', overflow: 'hidden' }}>
<div style={{ position: 'absolute', zIndex: 9999, top: 12, left: 12, background: 'rgba(255,255,255,0.95)', borderRadius: 6, padding: 8 }}>
<div style={{ fontSize: 11, fontWeight: 60, marginBottom: 4 }}>{t('devices.s22')}</div>
@@ -645,7 +645,7 @@ export default function DeviceOverviewPage() {
</div>
</Card>
<Card title={<><SettingOutlined />{t('devices.fixed2EquipmentListFixed2')}</>} bordered={false} style={{ borderRadius: 8, marginBottom: 8 }}>
<Card title={<><SettingOutlined />{t('devices.fixed2EquipmentListFixed2')}</>} variant="borderless" style={{ borderRadius: 8, marginBottom: 8 }}>
<Table rowKey={(record) => record.id || record.serialNumber || record.device_sn} size="small" pagination={false}
columns={[
{ title: t('devices.fixed2EquipmentFixed2NameFixed2'), dataIndex: 'name', width: 140 },
@@ -720,7 +720,7 @@ export default function DeviceOverviewPage() {
/>
</Card>
<Card title={<><SettingOutlined /> <span >{t('devices.fixed2ControlFixed2LogDesc6Alert')}</span></>} bordered={false} style={{ borderRadius: 8 }} extra={<div style={{ display: 'flex', alignItems: 'center', gap: 8 }}><Button size="small" style={{ borderRadius: 4, border: '1px solid #d9d9d9' }}>{t('devices.fixed2AllLevels')}</Button></div>}>
<Card title={<><SettingOutlined /> <span >{t('devices.fixed2ControlFixed2LogDesc6Alert')}</span></>} variant="borderless" style={{ borderRadius: 8 }} extra={<div style={{ display: 'flex', alignItems: 'center', gap: 8 }}><Button size="small" style={{ borderRadius: 4, border: '1px solid #d9d9d9' }}>{t('devices.fixed2AllLevels')}</Button></div>}>
<Table rowKey="time" size="small" pagination={false} dataSource={logs} scroll={{ x: 'max-content' }}
columns={[
{ title: t('common.time'), dataIndex: 'time', width: 90, render: t => <span style={{ fontSize: 13 }}>{t}</span> },
@@ -736,7 +736,7 @@ export default function DeviceOverviewPage() {
<Col xs={24} lg={10}>
<Card title={<><SettingOutlined style={{ marginRight: 6, }} />{t('devices.deviceControlPanel')}</>} bordered={false} style={{ borderRadius: 8, marginBottom: 8 }} bodyStyle={{ padding: 12, paddingBottom: 0 }}>
<Card title={<><SettingOutlined style={{ marginRight: 6, }} />{t('devices.deviceControlPanel')}</>} variant="borderless" style={{ borderRadius: 8, marginBottom: 8 }} styles={{ body: { padding: 12, paddingBottom: 0 } }}>
<Select
style={{ width: "80%", marginBottom: 8 }}
placeholder={t('workOrder.selectDeviceFixed2')}
@@ -946,7 +946,7 @@ export default function DeviceOverviewPage() {
)}
</Card>
<Card title={<><ApiOutlined />{t('devices.fixed2AiActions')}</>} bordered={false} style={{ borderRadius: 12, marginBottom: 8 }}>
<Card title={<><ApiOutlined />{t('devices.fixed2AiActions')}</>} variant="borderless" style={{ borderRadius: 12, marginBottom: 8 }}>
<Row gutter={16} style={{ marginBottom: 8 }}>
<Col span={6}><div style={{ display: 'flex', alignItems: 'center', gap: 10, padding: '6px 12px 4px', borderRadius: 12, border: '1px solid #e8e8e8' }}><div style={{ width: 30, height: 30, borderRadius: '50%', background: 'rgba(255,77,79,0.15)', display: 'flex', alignItems: 'center', justifyContent: 'center', color: '#ff4d4f', fontSize: 20 }}><span role="img" aria-label="hotspot">🔥</span></div><div><div style={{ fontSize: 11, color: '#666' }}>{t('devices.hotspotSuspect')}</div><div style={{ fontSize: 22, fontWeight: 700, color: '#222' }}>2 <span style={{ fontSize: 12 }}>{t('devices.s32')}</span></div></div></div></Col>
<Col span={6}><div style={{ display: 'flex', alignItems: 'center', gap: 10, padding: '6px 12px 4px', borderRadius: 12, border: '1px solid #e8e8e8' }}><div style={{ width: 30, height: 30, borderRadius: '50%', background: 'rgba(82,196,26,0.15)', display: 'flex', alignItems: 'center', justifyContent: 'center', color: '#52c41a', fontSize: 16 }}><BranchesOutlined /></div><div><div style={{ fontSize: 11, color: '#666' }}>{t('devices.s33')}</div><div style={{ fontSize: 22, fontWeight: 700, color: '#222' }}>3 <span style={{ fontSize: 12 }}>{t('devices.s34')}</span></div></div></div></Col>
@@ -977,7 +977,7 @@ export default function DeviceOverviewPage() {
</Card>
{(selectedDevice?.productName?.includes(t('constants.uav')) || selectedDevice?.device_sn) && (
<Card title={t('devices.s60')} bordered={false} style={{ borderRadius: 12, marginBottom: 8 }}>
<Card title={t('devices.s60')} variant="borderless" style={{ borderRadius: 12, marginBottom: 8 }}>
<div style={{ display: "flex", justifyContent: "space-between", gap: 12, alignItems: "center" }}>
<div style={{ display: "flex", border: "1px solid #e8e8e8", borderRadius: 12, overflow: "hidden", flex: 1 }}>
<div style={{ flex: 1, textAlign: 'center', whiteSpace: "nowrap", padding: "12px 4px", borderRight: "1px solid #e8e8e8" }}><div style={{ fontSize: 11, color: '#666', fontWeight: 600 }}>{t('devices.s44')}</div><div style={{ fontSize: 14, fontWeight: 700, color: '#222', marginTop: 2 }}>{fix2(realtimeDevice?.wind_speed)} m/s</div></div>
@@ -997,7 +997,7 @@ export default function DeviceOverviewPage() {
)}
{(!selectedDevice?.productName?.includes(t('constants.uav')) && !selectedDevice?.device_sn) && (
<Card title={<div style={{ display: 'flex', alignItems: 'center', gap: 8, fontSize: 14, fontWeight: 600 }}><RobotOutlined style={{ color: '#165DFF' }} />{t('devices.fixed2RobotStatusFixed2')}</div>} bordered={false} style={{ borderRadius: 12, marginBottom: 8, boxShadow: '0 2px 8px rgba(0,0,0,0.06)', border: '1px solid #f0f0f0' }}>
<Card title={<div style={{ display: 'flex', alignItems: 'center', gap: 8, fontSize: 14, fontWeight: 600 }}><RobotOutlined style={{ color: '#165DFF' }} />{t('devices.fixed2RobotStatusFixed2')}</div>} variant="borderless" style={{ borderRadius: 12, marginBottom: 8, boxShadow: '0 2px 8px rgba(0,0,0,0.06)', border: '1px solid #f0f0f0' }}>
<Row gutter={16} style={{ alignItems: 'center' }}>
<Col span={8}>
<div style={{ padding: '12px 16px', borderRadius: 10, background: '#F7F8FA', textAlign: 'center', border: '1px solid transparent', transition: 'all 0.2s' }}
@@ -1060,7 +1060,7 @@ export default function DeviceOverviewPage() {
</Card>
)}
<Card title={<><ClockCircleOutlined />{t('devices.fixed2TaskSuspended2Fixed2ExecutionTime')}</>} bordered={false} style={{ borderRadius: 12 }} extra={<div style={{ fontSize: 12, color: '#666' }}></div>}>
<Card title={<><ClockCircleOutlined />{t('devices.fixed2TaskSuspended2Fixed2ExecutionTime')}</>} variant="borderless" style={{ borderRadius: 12 }} extra={<div style={{ fontSize: 12, color: '#666' }}></div>}>
<Timeline mode="left">
{taskTimeline.map((item, idx) => (
<Timeline.Item key={idx} color={item.color} label={<div style={{ fontSize: 11, color: '#999' }}>{item.time}</div>}>

View File

@@ -997,9 +997,9 @@ export default function DeviceStatusPage() {
{t('devices.stationVideo')}
</>
}
bordered={false}
variant="borderless"
style={{ borderRadius: 12, marginBottom: 8 }}
bodyStyle={{ padding: 12 }}
styles={{ body: { padding: 12 } }}
>
<div style={{ borderRadius: 8, overflow: 'hidden', height: 300 }}>
<DroneVideoPlayer
@@ -1041,13 +1041,13 @@ export default function DeviceStatusPage() {
setClearPlanLine((v) => v + 1);
}}
>
{t('devices.clearPlannedRoute')}
{t('devices.clearPlanRoute')}
</Button>
</Space>
}
bordered={false}
variant="borderless"
style={{ borderRadius: 12 }}
bodyStyle={{ padding: 12, height: 400 }}
styles={{ body: { padding: 12, height: 400 } }}
>
<CesiumMap
ref={mapRef}
@@ -1077,9 +1077,9 @@ export default function DeviceStatusPage() {
{t('devices.droneVideo')}
</>
}
bordered={false}
variant="borderless"
style={{ borderRadius: 12, marginBottom: 8 }}
bodyStyle={{ padding: 12 }}
styles={{ body: { padding: 12 } }}
>
<div style={{ borderRadius: 8, overflow: 'hidden', height: "100%" }}>
<DroneVideoPlayer
@@ -1106,9 +1106,9 @@ export default function DeviceStatusPage() {
{t('devices.realtimeVideoMonitor')}
</>
}
bordered={false}
variant="borderless"
style={{ borderRadius: 12, marginBottom: 8 }}
bodyStyle={{ padding: 12, height: 'calc(100vh - 220px)', minHeight: 500 }}
styles={{ body: { padding: 12, height: 'calc(100vh - 220px)', minHeight: 500 } }}
extra={
<Button
@@ -1329,13 +1329,13 @@ export default function DeviceStatusPage() {
setClearPlanLine((v) => v + 1);
}}
>
{t('devices.clearPlannedRoute')}
{t('devices.clearPlanRoute')}
</Button>
</Space>
}
bordered={false}
variant="borderless"
style={{ borderRadius: 12, marginBottom: 8, flex: 1, minHeight: 280 }}
bodyStyle={{ padding: 12, height: 'calc((100vh - 260px) / 2)', minHeight: 280 }}
styles={{ body: { padding: 12, height: 'calc((100vh - 260px) / 2)', minHeight: 280 } }}
>
<CesiumMap
ref={mapRef}
@@ -1360,10 +1360,12 @@ export default function DeviceStatusPage() {
{t('devices.remoteControl')}
</>
}
bordered={false}
variant="borderless"
style={{ borderRadius: 12, background: '#0f172a', flex: 1, minHeight: 280, }}
headStyle={{ color: '#fff' }}
bodyStyle={{ display: 'flex', justifyContent: 'center', alignItems: 'center', height: 'calc(100% - 57px)' }}
styles={{
header: { color: '#fff', },
body: { display: 'flex', justifyContent: 'center', alignItems: 'center', height: 'calc(100% - 57px)' },
}}
>
<XboxController
onGamepadUpdate={handleGamepadUpdate}

View File

@@ -1110,12 +1110,14 @@ export default function RobotTaskPage() {
{topCards.map((item, index) => (
<Col xs={12} sm={8} md={4} key={index}>
<Card
bordered={false}
bodyStyle={{
padding: '12px 14px',
height: '100%',
display: 'flex',
alignItems: 'center'
variant="borderless"
styles={{
body: {
padding: '12px 14px',
height: '100%',
display: 'flex',
alignItems: 'center'
}
}}
style={{
...cardStyle,
@@ -1211,8 +1213,8 @@ export default function RobotTaskPage() {
{/*<Button size="small" icon={<Maximize2 size={12} />} />*/}
</Space>
}
bordered={false}
bodyStyle={{ padding: 0, position: 'relative' }}
variant="borderless"
styles={{ body: { padding: 0, position: 'relative' } }}
style={{ ...cardStyle, marginBottom: 10 }}
>
<div style={{ width: '100%', height: 420, background: '#e8f3ff center/cover', position: 'relative' }}>
@@ -1305,8 +1307,8 @@ export default function RobotTaskPage() {
{/* 机器人任务模块,带Tab切换 */}
<Card
size="small"
bordered={false}
bodyStyle={{ padding: 0, display: 'flex', flexDirection: 'column', height: "calc(100%)", overflow: "auto" }}
variant="borderless"
styles={{ body: { padding: 0, display: 'flex', flexDirection: 'column', height: "calc(100%)", overflow: "auto" } }}
style={{ ...cardStyle, maxHeight: "300px", flex: 1, marginBottom: 0 }}
>
@@ -1537,31 +1539,52 @@ export default function RobotTaskPage() {
<Col xs={24} xl={10} style={{ display: "flex", flexDirection: "column" }} >
<Card
title={<span style={{ fontSize: fontTitle, fontWeight: 700 }}>{t('devices.operationSuggestion')}</span>}
bordered={false}
bodyStyle={{ padding: '12px 16px' }}
variant="borderless"
styles={{ body: { padding: '12px 16px' } }}
style={{ ...cardStyle, marginBottom: 8 }}
>
<Timeline mode="left">
<Timeline.Item label="09:30" color="green">
<Text strong>{t('devices.timelineMow', { robot: 'RBT-01' })}</Text>
<div style={{ fontSize: 12, color: '#86909C' }}>{t('devices.timelineMowDetail')}</div>
</Timeline.Item>
<Timeline.Item label="11:00" color="blue">
<Text strong>{t('devices.timelineInspect', { robot: 'RBT-02' })}</Text>
<div style={{ fontSize: 12, color: '#86909C' }}>{t('devices.timelineInspectDetail')}</div>
</Timeline.Item>
<Timeline.Item label="14:00" color="gray">
<Text strong>{t('devices.timelineMaintenance')}</Text>
<div style={{ fontSize: 12, color: '#86909C' }}>{t('devices.timelineMaintenanceDetail')}</div>
</Timeline.Item>
</Timeline>
<Timeline
mode="left"
items={[
{
color: 'green',
label: '09:30',
children: (
<>
<Text strong>{t('devices.timelineMow', { robot: 'RBT-01' })}</Text>
<div style={{ fontSize: 12, color: '#86909C' }}>{t('devices.timelineMowDetail')}</div>
</>
)
},
{
color: 'blue',
label: '11:00',
children: (
<>
<Text strong>{t('devices.timelineInspect', { robot: 'RBT-02' })}</Text>
<div style={{ fontSize: 12, color: '#86909C' }}>{t('devices.timelineInspectDetail')}</div>
</>
)
},
{
color: 'gray',
label: '14:00',
children: (
<>
<Text strong>{t('devices.timelineMaintenance')}</Text>
<div style={{ fontSize: 12, color: '#86909C' }}>{t('devices.timelineMaintenanceDetail')}</div>
</>
)
}
]}
/>
<Button type="primary" block style={{ marginTop: 16, borderRadius: 18 }}>{t('devices.autoGenerateTodayPlan')}</Button>
</Card>
<Card
title={<span style={{ fontSize: fontTitle, fontWeight: 700 }}>{t('devices.deviceEnvironment')}</span>}
bordered={false}
bodyStyle={{ padding: '16px' }}
variant="borderless"
styles={{ body: { padding: '16px' } }}
style={{ ...cardStyle, flex: 1 }}
>
<Row gutter={[8, 8]}>
@@ -1613,8 +1636,8 @@ export default function RobotTaskPage() {
/>
</div>
}
bordered={false}
bodyStyle={{ padding: '12px', height: 400, overflow: 'auto' }}
variant="borderless"
styles={{ body: { padding: '12px', height: 400, overflow: 'auto' } }}
style={cardStyle}
>
<div style={{ display: 'flex', flexDirection: 'column', gap: 12 }}>
@@ -1745,8 +1768,8 @@ export default function RobotTaskPage() {
<Col xs={24} xl={18}>
<Card
title={<span style={{ fontSize: fontTitle, fontWeight: 700 }}>{t('devices.taskBoard')}</span>}
bordered={false}
bodyStyle={{ padding: '12px' }}
variant="borderless"
styles={{ body: { padding: '12px' } }}
style={{ ...cardStyle, height: '100%' }}
>
<Row gutter={16}>

View File

@@ -831,7 +831,7 @@ export default function WayLinePage({ onRefresh }) {
<Row gutter={[16, 16]} style={{ marginBottom: 8 }}>
{topCards.map((item, index) => (
<Col xs={12} sm={8} md={4} key={index}>
<Card bordered={false} bodyStyle={{ padding: '12px 14px' }} style={cardStyle}>
<Card variant="borderless" styles={{ body: { padding: '12px 14px' } }} style={cardStyle}>
<div style={{ display: 'flex', alignItems: 'center', gap: 10 }}>
<div style={{ width: 36, height: 36, background: item.bg, borderRadius: 10, display: 'flex', justifyContent: 'center', alignItems: 'center', color: item.color }}>
{React.cloneElement(item.icon, { size: 18 })}
@@ -890,8 +890,8 @@ export default function WayLinePage({ onRefresh }) {
<Button size="small" icon={<Maximize2 size={12} />} />
</Space>
}
bordered={false}
bodyStyle={{ padding: 0, position: 'relative' }}
variant="borderless"
styles={{ body: { padding: 0, position: 'relative' } }}
style={{ ...cardStyle, marginBottom: 10 }}
>
<div style={{ width: '100%', height: 420, background: '#e8f3ff url(https://picsum.photos/seed/solar_map_v2/1600/1000) center/cover', position: 'relative' }}>
@@ -957,8 +957,8 @@ export default function WayLinePage({ onRefresh }) {
/>
</Tooltip>
}
bordered={false}
bodyStyle={{ padding: 0, display: 'flex', flexDirection: 'column', height: "calc(100% - 40px)", overflow: "auto" }}
variant="borderless"
styles={{ body: { padding: 0, display: 'flex', flexDirection: 'column', height: "calc(100% - 40px)", overflow: "auto" } }}
style={{ ...cardStyle, maxHeight: "250px", flex: 1, marginBottom: 0 }}
>
<Table
@@ -982,8 +982,8 @@ export default function WayLinePage({ onRefresh }) {
<Col xs={24} xl={10} style={{ display: "flex", flexDirection: "column" }} >
<Card
title={<span style={{ fontSize: fontTitle, fontWeight: 700 }}>{t('devices.taskOrchestrationAI')}</span>}
bordered={false}
bodyStyle={{ padding: '12px 16px' }}
variant="borderless"
styles={{ body: { padding: '12px 16px' } }}
style={{ ...cardStyle, marginBottom: 8 }}
>
<Table
@@ -1025,8 +1025,8 @@ export default function WayLinePage({ onRefresh }) {
<Card
title={<span style={{ fontSize: fontTitle, fontWeight: 700 }}>{t('devices.waylineParamsTitle')}</span>}
extra={<Text type="secondary" style={{ fontSize: 12 }}>{t('devices.currentWayline')}{selectedTask?.name || '-'}</Text>}
bordered={false}
bodyStyle={{ padding: '16px' }}
variant="borderless"
styles={{ body: { padding: '16px' } }}
style={{ ...cardStyle, marginBottom: 8 }}
>
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(4, 1fr)', gap: '8px', marginBottom: 8 }}>
@@ -1141,8 +1141,8 @@ export default function WayLinePage({ onRefresh }) {
<Card
title={<span style={{ fontSize: fontTitle, fontWeight: 700 }}>{t('devices.weatherWindowTitle')}</span>}
bordered={false}
bodyStyle={{ padding: '16px' }}
variant="borderless"
styles={{ body: { padding: '16px' } }}
style={{ ...cardStyle, flex: 1, }}
>
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(5, 1fr)', gap: '8px', marginBottom: 16 }}>
@@ -1248,8 +1248,8 @@ export default function WayLinePage({ onRefresh }) {
/>
</div>
}
bordered={false}
bodyStyle={{ padding: '12px', display: 'flex', flexDirection: 'column', height: 480 }}
variant="borderless"
styles={{ body: { padding: '12px', display: 'flex', flexDirection: 'column', height: 480 } }}
style={{ ...cardStyle, height: '100%' }}
>
<Input
@@ -1313,8 +1313,8 @@ export default function WayLinePage({ onRefresh }) {
<Card
title={<span style={{ fontSize: fontTitle, fontWeight: 700 }}>{t('devices.ganttViewTitle')} <Text type="secondary" style={{ fontSize: 11, fontWeight: 400, marginLeft: 12 }}></Text></span>}
extra={<MoreOutlined style={{ cursor: 'pointer', fontSize: 18 }} />}
bordered={false}
bodyStyle={{ padding: 16 }}
variant="borderless"
styles={{ body: { padding: 16 } }}
style={{ ...cardStyle, height: '100%' }}
>
<div style={{ position: 'relative', border: '1px solid #F2F3F5', borderRadius: 8, padding: '16px 12px' }}>
@@ -1393,8 +1393,8 @@ export default function WayLinePage({ onRefresh }) {
</Space>
</div>
}
bordered={false}
bodyStyle={{ padding: 16 }}
variant="borderless"
styles={{ body: { padding: 16 } }}
style={{ ...cardStyle, height: '100%', maxHeight: 480, overflow: "auto" }}
>
<Row gutter={10}>

View File

@@ -1,4 +1,4 @@
import React from 'react';
import React from 'react';
import {
ResponsiveContainer,
LineChart,
@@ -55,8 +55,8 @@ export const UniversalLineChart = ({
padding: 12,
}}
>
<ResponsiveContainer width="100%" height="100%">
<LineChart data={data}>
<ResponsiveContainer width="100%" height="100%" minWidth={0} minHeight={0}>
<LineChart data={data} minWidth={0} minHeight={0} width="100%" height="100%" >
{showGrid && (
<CartesianGrid strokeDasharray="3 3" opacity={0.25} />
)}
@@ -114,8 +114,8 @@ export const UniversalBarChart = ({
padding: 12,
}}
>
<ResponsiveContainer width="100%" height="100%">
<BarChart data={data}>
<ResponsiveContainer width="100%" height="100%" minWidth={0} minHeight={0}>
<BarChart data={data} minWidth={0} minHeight={0} width="100%" height="100%" >
{showGrid && (
<CartesianGrid strokeDasharray="3 3" opacity={0.25} />
)}
@@ -171,8 +171,8 @@ export const UniversalPieChart = ({
...style
}}
>
<ResponsiveContainer width="100%" height="100%">
<PieChart>
<ResponsiveContainer width="100%" height="100%" minWidth={0} minHeight={0}>
<PieChart minWidth={0} minHeight={0} width="100%" height="100%" >
{showTooltip && <Tooltip />}
{showLegend && <Legend />}

View File

@@ -154,6 +154,11 @@ h4, .ant-typography h4 { font-size: clamp(1rem, 1.5vw, 1.25rem) !important; }
background-color: #f0f7ff !important;
}
.recharts-responsive-container>div{
width: 100% !important;
height: 100% !important;
}

View File

@@ -345,7 +345,7 @@ const zh = {
good: '良好',
robotRouteMonitor: '机器人路径规划与监控',
clearRealtimeTrack: '清空实时轨迹',
clearPlanRoute: '清空规划航线',
clearPlanRoute: '清空规划区域',
controlMode: '控制模式:',
localMode: '本地',
remoteMode: '远程',

View File

@@ -1,4 +1,4 @@
import React, { useState } from 'react';
import React, { useState } from 'react';
import {
Row, Col, Card, Button, Tag, Table, Typography, Space, Statistic, message, Divider, Tooltip, Avatar, Empty
} from 'antd';
@@ -210,8 +210,8 @@ export default function AIDiagnosisPage() {
].map((item, index) => (
<Col key={index} xs={24} sm={12} md={8} xl={4}>
<Card
bordered={false}
bodyStyle={{ padding: '20px 16px' }}
variant="borderless"
styles={{ body: { padding: '20px 16px' } }}
style={{ ...cardStyle, height: '100%' }}
>
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'flex-start' }}>
@@ -245,8 +245,8 @@ export default function AIDiagnosisPage() {
<Card
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' }}
variant="borderless"
styles={{ body: { padding: '16px 20px' } }}
style={{ ...cardStyle, height: '100%' }}
>
<Row gutter={[12, 12]}>
@@ -288,8 +288,8 @@ export default function AIDiagnosisPage() {
<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' }}
variant="borderless"
styles={{ body: { padding: '16px 20px' } }}
style={{ ...cardStyle, height: '100%' }}
>
<Row gutter={[20, 20]}>
@@ -383,8 +383,8 @@ export default function AIDiagnosisPage() {
<Col xs={24} lg={7}>
<Card
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' }}
variant="borderless"
styles={{ body: { padding: '16px 20px' } }}
style={{ ...cardStyle, height: '100%' }}
>
<div style={{ fontSize: 12, color: '#86909C', marginBottom: 16, display: 'flex', justifyContent: 'space-between' }}>
@@ -432,8 +432,8 @@ export default function AIDiagnosisPage() {
<Col xs={24} lg={10}>
<Card
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' }}
variant="borderless"
styles={{ body: { padding: '16px 20px' } }}
style={{ ...cardStyle, height: '100%' }}
>
<div style={{ display: 'flex', gap: 20 }}>
@@ -487,8 +487,8 @@ export default function AIDiagnosisPage() {
<Col xs={24} lg={7}>
<Card
bordered={false}
bodyStyle={{ padding: 0 }}
variant="borderless"
styles={{ body: { padding: 0 } }}
style={{ ...cardStyle, height: '100%' }}
>
{/* AI诊断总结 */}
@@ -498,6 +498,7 @@ export default function AIDiagnosisPage() {
<span style={{ fontSize: 12, color: '#86909C' }}>{t('aiAnalysis.fixed2UpdatedAt202505200945')}</span>
</div>
<Table
rowKey="key"
columns={[
{ title: t('aiAnalysis.s36'), dataIndex: 'diagnosis', width: 78 },
{ title: t('roles.status'), dataIndex: 'status', render: renderStatusTag, },
@@ -524,6 +525,7 @@ export default function AIDiagnosisPage() {
<div style={{ padding: '12px 14px' }}>
<div style={{ fontSize: 14, fontWeight: 700, color: '#1D2129', marginBottom: 10 }}>{t('aiAnalysis.fixed2Ai')}</div>
<Table
rowKey="key"
columns={[
{ title: t('aiAnalysis.s39'), dataIndex: 'measure', ellipsis: true },
{ title: t('workOrder.priority'), dataIndex: 'priority', render: renderPriorityTag, width: 58 },
@@ -564,8 +566,8 @@ export default function AIDiagnosisPage() {
{/* 底部:数据来源 */}
<Card
title={<span style={{ fontSize: 15, fontWeight: 700, color: '#1D2129' }}>{t('aiAnalysis.sourceFixed2')}</span>}
bordered={false}
bodyStyle={{ padding: '16px 20px' }}
variant="borderless"
styles={{ body: { padding: '16px 20px' } }}
style={cardStyle}
>
<Row gutter={[16, 16]}>

View File

@@ -1,4 +1,4 @@
import React, { useState } from 'react';
import React, { useState } from 'react';
import {
Row, Col, Card, Button, Table, Tag, Typography, Space, Statistic, DatePicker,
Divider, Progress, Badge, Select, Tooltip, Avatar
@@ -226,8 +226,8 @@ export default function CleanOptimizationPage() {
].map((item, index) => (
<Col key={index} style={{ minWidth: '168px', flex: '1 0 auto', maxWidth: "250px" }}>
<Card
bordered={false}
bodyStyle={{ padding: '16px' }}
variant="borderless"
styles={{ body: { padding: '16px' } }}
style={{ borderRadius: 8, height: 120 }}
>
<div style={{ display: 'flex', justifyContent: 'space-between', height: '100%' }}>
@@ -298,7 +298,7 @@ export default function CleanOptimizationPage() {
<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 }}>{t('clean.s6')}</span>} bordered={false} style={cardStyle} bodyStyle={{ padding: 16 }}>
<Card title={<span style={{ fontSize: 14, fontWeight: 700 }}>{t('clean.s6')}</span>} variant="borderless" style={cardStyle} styles={{ body: { padding: 16 } }}>
<div style={{ fontSize: 12, color: '#86909C', marginBottom: 16, display: 'flex', justifyContent: 'space-between' }}>
<span>{t('clean.s7')}</span>
<Space size={12}>
@@ -329,7 +329,7 @@ export default function CleanOptimizationPage() {
/>
</Card>
<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 }}>
<Card title={<span style={{ fontSize: 14, fontWeight: 700 }}>{t('clean.fixed2Generation')}<Text type="secondary" style={{ fontWeight: 400, fontSize: 12 }}>{t('clean.near7Days')}</Text></span>} variant="borderless" style={cardStyle} styles={{ body: { padding: 16 } }}>
<div style={{ position: 'relative', height: "100%" }}>
<UniversalPieChart
data={pieChartData}
@@ -346,7 +346,7 @@ export default function CleanOptimizationPage() {
</div>
</Card>
<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 }}>
<Card title={<span style={{ fontSize: 14, fontWeight: 700 }}>{t('clean.fixed2Cleaning2')}<Text type="secondary" style={{ fontWeight: 400, fontSize: 12 }}>{t('clean.nearLast')}</Text></span>} variant="borderless" style={cardStyle} styles={{ body: { padding: 16 } }}>
<UniversalBarChart
data={compareChartData}
xKey="date"
@@ -367,7 +367,7 @@ export default function CleanOptimizationPage() {
/>
</Card>
<Card title={<span style={{ fontSize: 14, fontWeight: 700 }}>{t('clean.fixed2CleaningFixed2')}</span>} bordered={false} style={cardStyle} bodyStyle={{ padding: 16 }}>
<Card title={<span style={{ fontSize: 14, fontWeight: 700 }}>{t('clean.fixed2CleaningFixed2')}</span>} variant="borderless" style={cardStyle} styles={{ body: { padding: 16 } }}>
<Row gutter={[16, 16]}>
<Col span={12}>
<div style={{ fontSize: 11, color: '#86909C', marginBottom: 4 }}>{t('clean.generation')}</div>
@@ -398,9 +398,9 @@ export default function CleanOptimizationPage() {
<Col xs={24} xl={11} style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
<Card
title={<span style={{ fontSize: 15, fontWeight: 700 }}>{t('clean.recommendedCleanBlock')}</span>}
bordered={false}
variant="borderless"
style={{ ...cardStyle, }}
bodyStyle={{ padding: 0, position: 'relative', overflow: 'hidden', minHeight: 500 }}
styles={{ body: { 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 }}>
@@ -455,11 +455,12 @@ export default function CleanOptimizationPage() {
<Card
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}
variant="borderless"
style={cardStyle}
bodyStyle={{ padding: 0 }}
styles={{ body: { padding: 0 } }}
>
<Table
rowKey="area"
columns={[
{ title: t('clean.s45'), dataIndex: 'area', key: 'area' },
{ title: t('workOrder.priority'), dataIndex: 'priority', key: 'priority', render: renderPriorityTag },
@@ -479,11 +480,12 @@ export default function CleanOptimizationPage() {
{/* 右侧:决策建议与参考 */}
<Col xs={24} xl={7} style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
<Card title={<span style={{ fontSize: 14, fontWeight: 700 }}>{t('clean.cleaning2')}</span>} bordered={false} style={cardStyle} bodyStyle={{ padding: 0 }}>
<Card title={<span style={{ fontSize: 14, fontWeight: 700 }}>{t('clean.cleaning2')}</span>} variant="borderless" style={cardStyle} styles={{ body: { padding: 0 } }}>
<div style={{ background: '#f8fafc', padding: '8px 16px', borderBottom: '1px solid #f0f0f0' }}>
<Text type="secondary" style={{ fontSize: 11 }}>{t('clean.algorithmModel')}</Text>
</div>
<Table
rowKey="id"
columns={[
{ 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 },
@@ -498,7 +500,7 @@ export default function CleanOptimizationPage() {
/>
</Card>
<Card title={<span style={{ fontSize: 14, fontWeight: 700 }}>{t('clean.fixed2Cleaning2')}</span>} bordered={false} style={cardStyle} bodyStyle={{ padding: 16 }}>
<Card title={<span style={{ fontSize: 14, fontWeight: 700 }}>{t('clean.fixed2Cleaning2')}</span>} variant="borderless" style={cardStyle} styles={{ body: { padding: 16 } }}>
<Row gutter={12}>
<Col span={12}>
<div style={{ background: '#F9F0FF', borderRadius: 12, padding: 16, border: '1px solid #D3ADF7', height: '100%' }}>
@@ -529,7 +531,7 @@ export default function CleanOptimizationPage() {
</Row>
</Card>
<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 }}>
<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>} variant="borderless" style={cardStyle} styles={{ body: { padding: 16 } }}>
<Row gutter={12}>
<Col span={8}>
<div style={{ background: '#f8fafc', padding: '10px 4px', borderRadius: 8, textAlign: 'center', border: '1px solid #f0f0f0' }}>
@@ -561,7 +563,7 @@ export default function CleanOptimizationPage() {
</Row>
</Card>
<Card title={<span style={{ fontSize: 14, fontWeight: 700 }}>{t('clean.fixed2Cleaning')}</span>} bordered={false} style={cardStyle} bodyStyle={{ padding: 16 }}>
<Card title={<span style={{ fontSize: 14, fontWeight: 700 }}>{t('clean.fixed2Cleaning')}</span>} variant="borderless" style={cardStyle} styles={{ body: { padding: 16 } }}>
<Row gutter={[16, 16]}>
{[
{ 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' },

View File

@@ -1,4 +1,4 @@
import React, { useState, useEffect, useRef } from 'react';
import React, { useState, useEffect, useRef } from 'react';
import { Card, Row, Col, Statistic, Button, Space, Tag, Typography, Table, message } from 'antd';
import {
CloudOutlined, ThunderboltOutlined, BarChartOutlined,
@@ -254,7 +254,7 @@ export default function StationDashboard() {
maxWidth: '240px',
minWidth: '160px'
}}>
<Card bordered={false} style={{ ...cardStyle, height: "100%" }} bodyStyle={{ padding: '12px' }}>
<Card variant="borderless" style={{ ...cardStyle, height: "100%" }} styles={{ body: { padding: '12px' } }}>
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
<div>
<div style={{ color: '#000', fontSize: '13px', fontWeight: 600, marginBottom: 4 }}>{item.title}</div>
@@ -282,7 +282,7 @@ export default function StationDashboard() {
{/* 左侧图表 */}
<Col xs={24} xl={6}>
<Space direction="vertical" size={8} style={{ width: '100%' }}>
<Card title={<span style={{ fontWeight: 800 }}>{t('home.generationTrend')}</span>} extra={<Space><SyncOutlined /><FullscreenOutlined /></Space>} bordered={false} style={cardStyle} bodyStyle={{ padding: '8px' }}>
<Card title={<span style={{ fontWeight: 800 }}>{t('home.generationTrend')}</span>} extra={<Space><SyncOutlined /><FullscreenOutlined /></Space>} variant="borderless" style={cardStyle} styles={{ body: { padding: '8px' } }}>
<div style={{ fontSize: 11, color: '#666', marginBottom: 8 }}>今日发电功率趋势 (kW)</div>
<UniversalLineChart
data={powerTrendData}
@@ -297,7 +297,7 @@ export default function StationDashboard() {
]}
/>
</Card>
<Card title={<span style={{ fontWeight: 800 }}>{t('home.irradianceTempTrend')}</span>} bordered={false} style={cardStyle} bodyStyle={{ padding: '8px' }}>
<Card title={<span style={{ fontWeight: 800 }}>{t('home.irradianceTempTrend')}</span>} variant="borderless" style={cardStyle} styles={{ body: { padding: '8px' } }}>
<UniversalLineChart
data={irradianceData}
xKey="time"
@@ -311,7 +311,7 @@ export default function StationDashboard() {
]}
/>
</Card>
<Card title={<span style={{ fontWeight: 800 }}>{t('home.inverterEfficiency')}</span>} bordered={false} style={cardStyle} bodyStyle={{ padding: '12px' }}>
<Card title={<span style={{ fontWeight: 800 }}>{t('home.inverterEfficiency')}</span>} variant="borderless" style={cardStyle} styles={{ body: { padding: '12px' } }}>
<UniversalBarChart
data={invEfficiencyData}
xKey="device"
@@ -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">{t('home.fixed2MoreGt')}</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>} variant="borderless" style={cardStyle} styles={{ body: { padding: '12px' } }}>
<div style={{ display: 'flex', alignItems: 'center' }}>
<UniversalPieChart
data={taskProgressData}
@@ -358,9 +358,9 @@ export default function StationDashboard() {
</div>
</div>
}
bordered={false}
variant="borderless"
style={cardStyle}
bodyStyle={{ padding: 0, position: 'relative', overflow: 'hidden', height: 500 }}
styles={{ body: { padding: 0, position: 'relative', overflow: 'hidden', height: 500 } }}
>
<div style={{ height: "100%", background: '#111827', borderRadius: 8, width: '100%', overflow: 'hidden', position: "relative" }}>
{/*<iframe
@@ -378,8 +378,9 @@ 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">{t('home.fixed2MoreGt')}</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>} variant="borderless" style={{ ...cardStyle, height: "100%" }} styles={{ body: { padding: '0 12px' } }}>
<Table
rowKey="name"
dataSource={patrolRecords}
pagination={false}
size="small"
@@ -393,7 +394,7 @@ export default function StationDashboard() {
</Card>
</Col>
<Col span={12}>
<Card title={<span style={{ fontWeight: 800 }}>{t('home.aiAnalysisSummary')}</span>} bordered={false} style={{ ...cardStyle, height: "100%" }} bodyStyle={{ padding: '12px' }}>
<Card title={<span style={{ fontWeight: 800 }}>{t('home.aiAnalysisSummary')}</span>} variant="borderless" style={{ ...cardStyle, height: "100%" }} styles={{ body: { padding: '12px' } }}>
<div style={{ display: 'flex', flexDirection: 'column', gap: 16 }}>
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
<div style={{ display: 'flex', alignItems: 'center', gap: 12 }}>
@@ -441,7 +442,7 @@ 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')}>{t('home.fixed2MoreGt')}</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>} variant="borderless" style={cardStyle} styles={{ body: { 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 }}>{t('alerts.alarmContent')}</span>
<span style={{ flex: 1, textAlign: 'center' }}>{t('alerts.level')}</span>
@@ -465,7 +466,7 @@ export default function StationDashboard() {
})}
</Card>
<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' }}>
<Card title={<span style={{ fontWeight: 800 }}>{t('home.deviceOnlineStatus')}</span>} extra={<Button type="link" size="small">{t('home.fixed2MoreGt')}</Button>} variant="borderless" style={cardStyle} styles={{ body: { padding: '12px' } }}>
<Row gutter={[16, 16]}>
{[
{ name: t('home.solarPanel'), count: '320/320', icon: <AppstoreOutlined /> },
@@ -490,7 +491,7 @@ export default function StationDashboard() {
</Row>
</Card>
<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' }}>
<Card title={<span style={{ fontWeight: 800 }}>{t('home.weatherInfo')}</span>} extra={<Button type="link" size="small">{t('home.gt')}</Button>} variant="borderless" style={cardStyle} styles={{ body: { 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 +511,7 @@ export default function StationDashboard() {
{/* ====================================== */}
{/* 👇 清洗建议 + 生成工单按钮(已完善) */}
{/* ====================================== */}
<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' }}>
<Card title={<span style={{ fontWeight: 800 }}>{t('clean.cleaningSuggestion')}</span>} extra={<Button type="link" size="small">{t('home.fixed2MoreGt')}</Button>} variant="borderless" style={cardStyle} styles={{ body: { padding: '12px' } }}>
<div style={{ display: 'flex', alignItems: 'center', gap: 16, marginBottom: 16 }}>
<div style={{ width: 80, height: 80, position: 'relative' }}>
<UniversalPieChart

View File

@@ -146,7 +146,7 @@ const Profile: React.FC = () => {
{/* 左侧信息卡片 */}
<Col xs={24} sm={24} md={8} lg={7} xl={6}>
<Card
bordered={false}
variant="borderless"
style={{
borderRadius: 12,
boxShadow: '0 2px 12px rgba(0,0,0,0.06)',
@@ -220,7 +220,7 @@ const Profile: React.FC = () => {
{/* 右侧表单卡片 */}
<Col xs={24} sm={24} md={16} lg={17} xl={18}>
<Card
bordered={false}
variant="borderless"
style={{
borderRadius: 12,
boxShadow: '0 2px 12px rgba(0,0,0,0.06)',

View File

@@ -1,4 +1,4 @@
import React, { useState } from 'react';
import React, { useState } from 'react';
import {
Card, Row, Col, Table, Select, Input, Tag,
Typography, Button, Space, Avatar, Pagination
@@ -121,9 +121,9 @@ const RealTimeMonitorPage = () => {
<span style={{ display: 'flex', alignItems: 'center' }}><span style={{ color: '#1890ff', marginLeft: 4 }}>{t('page.s2')}</span></span>
</div>
}
bordered={false}
variant="borderless"
style={{ ...cardStyle, borderRadius: 8 }}
bodyStyle={{ padding: 0, position: 'relative', height: 400, overflow: 'hidden' }}
styles={{ body: { padding: 0, position: 'relative', height: 400, overflow: 'hidden' } }}
>
<div style={{ height: "100%", background: '#111827', borderRadius: 8, width: '100%', overflow: 'hidden', position: "relative" }}>
{/*<iframe
@@ -149,7 +149,7 @@ const RealTimeMonitorPage = () => {
{/* 设备实时监控列表 */}
<Card
title={<span style={{ fontWeight: 800, fontSize: 13 }}>{t('page.fixed2DeviceFixed2RealtimeMonitorListFixed2')}</span>}
bordered={false}
variant="borderless"
style={{ ...cardStyle, borderRadius: 8 }}
extra={
<Space size={8}>
@@ -173,7 +173,7 @@ const RealTimeMonitorPage = () => {
/>
<div style={{ display: 'flex', justifyContent: 'space-between', marginTop: 12, alignItems: 'center' }}>
<span style={{ color: '#999', fontSize: 11 }}>{t('page.56')}</span>
<Pagination size="small" total={56} current={1} pageSize={10} showSizeChanger />
<Pagination size="small" total={56} defaultCurrent={1} defaultPageSize={10} showSizeChanger />
</div>
</Card>
</Space>
@@ -193,7 +193,7 @@ const RealTimeMonitorPage = () => {
{ 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' }}>
<Card variant="borderless" style={{ ...cardStyle, height: '100%', borderRadius: 8 }} styles={{ body: { padding: '8px' } }}>
<div style={{ display: 'flex', alignItems: 'flex-start', gap: 6 }}>
<div style={{ color: item.color, fontSize: 18 }}>{item.icon}</div>
<div style={{ flex: 1, minWidth: 0 }}>
@@ -211,7 +211,7 @@ const RealTimeMonitorPage = () => {
</Row>
{/* 实时功率曲线 */}
<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' }}>
<Card title={<span style={{ fontWeight: 800 }}>{t('page.powerCurveFixed2')}</span>} extra={<Select defaultValue="today" size="small"><Option value="today">{t('page.s11')}</Option></Select>} variant="borderless" style={cardStyle} styles={{ body: { padding: '12px' } }}>
<UniversalLineChart
height={180}
data={powerTrendData}
@@ -232,7 +232,7 @@ const RealTimeMonitorPage = () => {
</Card>
{/* 逆变器功率对比 */}
<Card title={<span style={{ fontWeight: 800 }}>{t('page.inverterPowerCompare')}</span>} bordered={false} style={cardStyle} bodyStyle={{ padding: '12px' }}>
<Card title={<span style={{ fontWeight: 800 }}>{t('page.inverterPowerCompare')}</span>} variant="borderless" style={cardStyle} styles={{ body: { padding: '12px' } }}>
<UniversalBarChart
height={180}
data={inverterPowerData}
@@ -253,7 +253,7 @@ const RealTimeMonitorPage = () => {
{/* 热力图与在线率 */}
<Row gutter={8}>
<Col span={12}>
<Card title={<span style={{ fontWeight: 800 }}>{t('page.stringCurrentHeatmap')}</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' }}>
<Card title={<span style={{ fontWeight: 800 }}>{t('page.stringCurrentHeatmap')}</span>} extra={<Select defaultValue="a" size="small" style={{ width: 60 }}><Option value="a">{t('page.s12')}</Option></Select>} variant="borderless" style={cardStyle} styles={{ body: { 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 }}>{t('devices.deviceOnlineRate')}</span>} bordered={false} style={{ ...cardStyle, height: "100%" }} bodyStyle={{ padding: '12px' }}>
<Card title={<span style={{ fontWeight: 800 }}>{t('devices.deviceOnlineRate')}</span>} variant="borderless" style={{ ...cardStyle, height: "100%" }} styles={{ body: { padding: '12px' } }}>
<div style={{ position: 'relative', height: 160 }}>
<UniversalPieChart
height={160}

View File

@@ -223,8 +223,8 @@ export default function ReportCenterPage() {
{overviewCards.map((card, idx) => (
<Col key={idx} style={{ minWidth: '180px', flex: '1 0 auto', }}>
<Card
bordered={false}
bodyStyle={{ padding: '20px 20px', display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}
variant="borderless"
styles={{ body: { padding: '20px 20px', display: 'flex', alignItems: 'center', justifyContent: 'space-between' } }}
style={{ borderRadius: 8, boxShadow: '0 2px 8px rgba(0,0,0,0.06)' }}
>
{/* 左侧文字区域 */}
@@ -307,7 +307,7 @@ 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' }}>{t('report.monthlyOperationAnalysis')}</span>}>
<Card variant="borderless" style={cardStyle} styles={{ body: { 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 }}>
@@ -365,9 +365,9 @@ export default function ReportCenterPage() {
<Row gutter={[8, 8]} style={{ marginTop: 8 }}>
<Col span={8}>
<Card
bordered={false}
variant="borderless"
style={{ ...cardStyle, height: "100%" }}
bodyStyle={{ padding: '16px' }}
styles={{ body: { padding: '16px' } }}
title={<span style={{ fontSize: 14, fontWeight: 700 }}>{t('report.generationMeteorology')}</span>}
>
<div style={{ fontSize: 10, color: '#86909C', marginBottom: 12 }}>
@@ -392,9 +392,9 @@ export default function ReportCenterPage() {
<Col span={8}>
<Card
bordered={false}
variant="borderless"
style={{ ...cardStyle, height: "100%" }}
bodyStyle={{ padding: '16px' }}
styles={{ body: { padding: '16px' } }}
title={<span style={{ fontSize: 14, fontWeight: 700 }}>{t('report.workOrderAlertClosure')}</span>}
>
<div style={{ fontSize: 10, color: '#86909C', marginBottom: 12 }}>
@@ -420,9 +420,9 @@ export default function ReportCenterPage() {
<Col span={8}>
<Card
bordered={false}
variant="borderless"
style={{ ...cardStyle, height: "100%" }}
bodyStyle={{ padding: '16px' }}
styles={{ body: { padding: '16px' } }}
title={<span style={{ fontSize: 14, fontWeight: 700 }}>{t('report.aiAnalysisStatistics')}</span>}
>
<div style={{ width: '100%', boxSizing: 'border-box' }}>
@@ -481,7 +481,7 @@ 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' }}>{t('report.subscriptionDispatch')}</span>}>
<Card variant="borderless" style={{ ...cardStyle, marginTop: 8 }} styles={{ body: { 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 }}>{t('report.subscribers', { count: 6 })}</div>
@@ -526,7 +526,7 @@ export default function ReportCenterPage() {
{/* 右侧边栏 */}
<Col xs={24} xl={8}>
{/* 报表目录 / 快捷下载 */}
<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>}>
<Card variant="borderless" style={cardStyle} styles={{ body: { 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={[
@@ -556,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 }}>{t('report.templateCenter')}</span>} extra={<Button type="link" size="small">{t('common.more')} <ChevronRight size={14} /></Button>}>
<Card variant="borderless" style={{ ...cardStyle, marginTop: 8 }} styles={{ body: { 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}>
@@ -575,7 +575,7 @@ export default function ReportCenterPage() {
</Card>
{/* 报表生成记录 */}
<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>}>
<Card variant="borderless" style={{ ...cardStyle, marginTop: 8 }} styles={{ body: { 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={[

View File

@@ -1,4 +1,4 @@
import React, { useState } from 'react';
import React, { useState } from 'react';
import {
Card, Row, Col, Button, Space, Input, Select, Table, Tag, Typography, Dropdown, Menu,
Timeline, Badge, Divider, Tooltip
@@ -158,8 +158,8 @@ export default function VideoMonitorPage() {
].map((item, index) => (
<Col key={index} style={{ minWidth: '168px', flex: '1 0 auto', maxWidth: "250px" }}>
<Card
bordered={false}
bodyStyle={{ padding: '16px' }}
variant="borderless"
styles={{ body: { padding: '16px' } }}
style={{ borderRadius: 8, height: 120 }}
>
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', height: '100%' }}>
@@ -201,9 +201,9 @@ export default function VideoMonitorPage() {
<Button type="link" size="small" icon={<FullscreenOutlined />}>{t('video.fullScreen')}</Button>
</Space>
}
bordered={false}
variant="borderless"
style={cardStyle}
bodyStyle={{ padding: 16 }}
styles={{ body: { padding: 16 } }}
>
<Row gutter={[12, 12]}>
<Col span={14}>
@@ -221,7 +221,7 @@ export default function VideoMonitorPage() {
<ScissorOutlined style={{ color: '#fff', fontSize: 18, cursor: 'pointer' }} />
<CameraOutlined style={{ color: '#fff', fontSize: 18, cursor: 'pointer' }} />
<ExpandOutlined style={{ color: '#fff', fontSize: 18, cursor: 'pointer' }} />
<Select defaultValue={t('video.high')} size="small" style={{ width: 80 }} bordered={false} className="video-select">
<Select defaultValue={t('video.high')} size="small" style={{ width: 80 }} variant="borderless" className="video-select">
<Option value={t('video.super')}>{t('video.super')}</Option>
<Option value={t('video.high')}>{t('video.high')}</Option>
<Option value={t('video.standard')}>{t('video.standard')}</Option>
@@ -265,9 +265,9 @@ export default function VideoMonitorPage() {
<Card
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}
variant="borderless"
style={{ ...cardStyle, height: '100%' }}
bodyStyle={{ padding: '16px 20px' }}
styles={{ body: { padding: '16px 20px' } }}
>
<div style={{ display: 'flex', flexDirection: 'column', gap: 16 }}>
{[
@@ -308,11 +308,12 @@ export default function VideoMonitorPage() {
</Select>
</Space>
}
bordered={false}
variant="borderless"
style={cardStyle}
bodyStyle={{ padding: 0 }}
styles={{ body: { padding: 0 } }}
>
<Table
rowKey="key"
columns={camColumns}
dataSource={camList}
pagination={false}
@@ -327,9 +328,9 @@ export default function VideoMonitorPage() {
<Card
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}
variant="borderless"
style={cardStyle}
bodyStyle={{ padding: '16px 20px' }}
styles={{ body: { padding: '16px 20px' } }}
>
<Timeline style={{ marginTop: 8 }}>
{[
@@ -357,9 +358,9 @@ export default function VideoMonitorPage() {
<Card
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}
variant="borderless"
style={cardStyle}
bodyStyle={{ padding: '16px 20px' }}
styles={{ body: { padding: '16px 20px' } }}
>
<div style={{ display: 'flex', flexWrap: "wrap", gap: 12, paddingBottom: 8 }} >
{[

View File

@@ -915,7 +915,7 @@ const WorkOrderPage = () => {
<Row gutter={[8, 8]} style={{ marginBottom: 8 }}>
{stats.map((item, index) => (
<Col key={index} xs={24} sm={12} md={8} xl={4}>
<Card bordered={false} bodyStyle={{ padding: '20px 16px' }} style={cardStyle}>
<Card variant="borderless" styles={{ body: { padding: '20px 16px' } }} style={cardStyle}>
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
<div>
<div style={{ fontSize: 'clamp(12px, 0.8vw, 13px)', color: '#86909C', marginBottom: 2 }}>{item.title}</div>
@@ -940,7 +940,7 @@ const WorkOrderPage = () => {
</Row>
{/* 筛选栏 */}
<Card bordered={false} bodyStyle={{ padding: '8px 16px 0px 16px' }} style={{ ...cardStyle, marginBottom: 8 }}>
<Card variant="borderless" styles={{ body: { padding: '8px 16px 0px 16px' } }} style={{ ...cardStyle, marginBottom: 8 }}>
<Form form={queryForm} layout="inline" initialValues={{
orderStatus: 1
}}>
@@ -976,7 +976,7 @@ const WorkOrderPage = () => {
{/* 左侧:列表 + 底部图表 */}
<Col xs={24} xl={15}>
<Card
bordered={false}
variant="borderless"
title={
<Space size={8}>
<Text strong style={{ fontSize: 15, color: '#1D2129' }}>{t('workOrder.listFixed2')}</Text>
@@ -1002,7 +1002,7 @@ const WorkOrderPage = () => {
)}
</Space>
}
bodyStyle={{ padding: 0 }}
styles={{ body: { padding: 0 } }}
style={{ ...cardStyle, marginBottom: 8 }}
>
@@ -1037,7 +1037,7 @@ const WorkOrderPage = () => {
<Row gutter={[12, 12]}>
<Col xs={24} md={9}>
<Card bordered={false} title={<Text strong style={{ fontSize: 14 }}>{t('workOrder.fixed2OrderStatus')}</Text>} style={{ ...cardStyle, height: 380 }}>
<Card variant="borderless" title={<Text strong style={{ fontSize: 14 }}>{t('workOrder.fixed2OrderStatus')}</Text>} style={{ ...cardStyle, height: 380 }}>
<div style={{ height: 300, position: 'relative' }}>
<Pie
data={pieData}
@@ -1059,7 +1059,7 @@ const WorkOrderPage = () => {
</Col>
<Col xs={24} md={15}>
<Card
bordered={false}
variant="borderless"
title={<Text strong style={{ fontSize: 14 }}>{t('workOrder.fixed2TaskSuspended2')}</Text>}
extra={
<Button
@@ -1070,7 +1070,7 @@ const WorkOrderPage = () => {
</Button>
}
style={{ ...cardStyle, height: 380 }}
bodyStyle={{ padding: '16px' }}
styles={{ body: { padding: '16px' } }}
>
{/* 日期切换栏 */}
<div style={{ marginBottom: 16 }}>
@@ -1206,7 +1206,7 @@ const WorkOrderPage = () => {
{/* 右侧:详情 + AI + 告警 */}
<Col xs={24} xl={9}>
<Card bordered={false} style={cardStyle} bodyStyle={{ padding: '20px' }}>
<Card variant="borderless" style={cardStyle} styles={{ body: { padding: '20px' } }}>
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 8 }}>
<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>
@@ -1464,8 +1464,8 @@ const WorkOrderPage = () => {
</Card>
<Card bordered={false} title={<Text strong style={{ fontSize: 14, color: '#1D2129' }}>{t('workOrder.aiSuggestion')}</Text>}
style={{ ...cardStyle, marginTop: 8 }} bodyStyle={{ padding: '16px' }}>
<Card variant="borderless" title={<Text strong style={{ fontSize: 14, color: '#1D2129' }}>{t('workOrder.aiSuggestion')}</Text>}
style={{ ...cardStyle, marginTop: 8 }} styles={{ body: { padding: '16px' } }}>
<Row gutter={12} style={{ marginBottom: 16 }}>
<Col span={8}>
<div style={{ background: '#F9F0FF', padding: '16px 8px', borderRadius: 12, textAlign: 'center', height: '100%', border: '1px solid #F3E8FF' }}>