中英文切换根据已有的功能 已经基本完善
This commit is contained in:
@@ -4449,7 +4449,7 @@ export default function Agri() {
|
||||
{
|
||||
title: t('aiAnalysis.algoCount'),
|
||||
value: '2',
|
||||
unit: '检测 + 分割',
|
||||
unit: `${t('aiAnalysis.algoCountUnit')}`,
|
||||
icon: <AppstoreOutlined />,
|
||||
color: '#165DFF',
|
||||
bg: '#E8F3FF',
|
||||
|
||||
@@ -384,9 +384,9 @@ export default function StationDashboard() {
|
||||
pagination={false}
|
||||
size="small"
|
||||
columns={[
|
||||
{ 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('home.InspectionType'), dataIndex: 'name', key: 'name', ellipsis: true },
|
||||
{ title: t('home.InspectionTime'), dataIndex: 'time', key: 'time' },
|
||||
{ title: t('home.InspectionPerson'), 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> },
|
||||
]}
|
||||
/>
|
||||
@@ -468,12 +468,12 @@ export default function StationDashboard() {
|
||||
<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 /> },
|
||||
{ name: t('home.solarPanel'), count: '320/320', icon: <AppstoreOutlined /> },
|
||||
{ name: t('home.inverter'), count: '5/5', icon: <ThunderboltOutlined /> },
|
||||
{ name: t('home.combinerBox'), count: '20/20', icon: <BranchesOutlined /> },
|
||||
{ name: '气象站', count: '1/1', icon: <CloudOutlined /> },
|
||||
{ name: t('home.weatherStation'), count: '1/1', icon: <CloudOutlined /> },
|
||||
{ name: t('devices.camera'), count: '12/12', icon: <VideoCameraOutlined /> },
|
||||
{ name: '环境传感器', count: '8/8', icon: <ExperimentOutlined /> },
|
||||
{ name: t('home.environmentalSensor'), count: '8/8', icon: <ExperimentOutlined /> },
|
||||
{ name: t('constants.uav'), count: '1/1', icon: <RocketOutlined /> },
|
||||
{ name: t('home.inspectionRobot'), count: '1/1', icon: <RobotOutlined /> },
|
||||
].map((item, idx) => (
|
||||
|
||||
@@ -112,7 +112,7 @@ const RealTimeMonitorPage = () => {
|
||||
<Space direction="vertical" size={8} style={{ width: '100%' }}>
|
||||
{/* 电站拓扑图 */}
|
||||
<Card
|
||||
title={<span style={{ fontWeight: 800, fontSize: 13 }}>电站拓扑图 (实时)</span>}
|
||||
title={<span style={{ fontWeight: 800, fontSize: 13 }}>{t('page.stationTopology')}</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>{t('roles.normal')}</span>
|
||||
@@ -232,7 +232,7 @@ const RealTimeMonitorPage = () => {
|
||||
</Card>
|
||||
|
||||
{/* 逆变器功率对比 */}
|
||||
<Card title={<span style={{ fontWeight: 800 }}>逆变器功率对比 (实时)</span>} bordered={false} style={cardStyle} bodyStyle={{ padding: '12px' }}>
|
||||
<Card title={<span style={{ fontWeight: 800 }}>{t('page.inverterPowerCompare')}</span>} bordered={false} style={cardStyle} bodyStyle={{ 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 }}>组串电流热力图 (单位: 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' }}>
|
||||
<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' }}>
|
||||
<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 }}>
|
||||
@@ -325,10 +325,10 @@ const RealTimeMonitorPage = () => {
|
||||
</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>{t('page.56')}</span>
|
||||
<span style={{ display: 'flex', alignItems: 'center' }}><span style={{ width: 6, height: 6, borderRadius: '50%', background: '#52c41a', marginRight: 4 }}></span>{t('pages.online')} 52 (92.1%)</span>
|
||||
<span style={{ display: 'flex', alignItems: 'center' }}><span style={{ width: 6, height: 6, borderRadius: '50%', background: '#f5f5f5', marginRight: 4 }}></span>{t('pages.offline')} 3 (5.3%)</span>
|
||||
<span style={{ display: 'flex', alignItems: 'center' }}><span style={{ width: 6, height: 6, borderRadius: '50%', background: '#faad14', marginRight: 4 }}></span>{t('pages.alerts')} 1 (1.8%)</span>
|
||||
<span style={{ display: 'flex', alignItems: 'center' }}><span style={{ width: 6, height: 6, borderRadius: '50%', background: '#999', marginRight: 4 }}></span>{t('pages.all')} 56</span>
|
||||
</div>
|
||||
<div style={{ width: '100%', height: '100%', background: `url(${bgMain}) center/cover no-repeat`, position: 'relative' }}>
|
||||
{/* 简易地图点位 */}
|
||||
|
||||
@@ -221,7 +221,7 @@ export default function ReportCenterPage() {
|
||||
}}
|
||||
>
|
||||
{overviewCards.map((card, idx) => (
|
||||
<Col key={idx} style={{ minWidth: '180px', flex: '1 0 auto', maxWidth: "240px" }}>
|
||||
<Col key={idx} style={{ minWidth: '180px', flex: '1 0 auto', }}>
|
||||
<Card
|
||||
bordered={false}
|
||||
bodyStyle={{ padding: '20px 20px', display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}
|
||||
|
||||
@@ -452,7 +452,7 @@ const WorkOrderPage = () => {
|
||||
{
|
||||
title: t('workOrder.handle'),
|
||||
value: orderStat.avgHandleHour,
|
||||
unit: '小时',
|
||||
unit: t('workOrder.hour'),
|
||||
subValue: orderStat.avgDiff,
|
||||
subText: '较上周',
|
||||
icon: <Timer size={24} color="#1890ff" />,
|
||||
@@ -461,7 +461,7 @@ const WorkOrderPage = () => {
|
||||
{
|
||||
title: t('workOrder.fixed2Ai'),
|
||||
value: orderStat.aiCreate,
|
||||
unit: '单',
|
||||
unit: t('workOrder.workorderUnit'),
|
||||
subValue: '',
|
||||
subText: '今日自动生成',
|
||||
icon: <Cpu size={24} color="#722ed1" />,
|
||||
@@ -1078,7 +1078,7 @@ const WorkOrderPage = () => {
|
||||
<Button size="small" icon={<ChevronRight style={{ transform: 'rotate(180deg)' }} size={14} />} onClick={prevScheduleDay} />
|
||||
<Text strong style={{ fontSize: 13 }}>
|
||||
{scheduleDate}
|
||||
{scheduleDate === dayjs().format('YYYY-MM-DD') ? ' (今天)' : ''}
|
||||
{scheduleDate === dayjs().format('YYYY-MM-DD') ? ' (' + t('workOrder.today') + ')' : ''}
|
||||
</Text>
|
||||
<Button size="small" icon={<ChevronRight size={14} />} onClick={nextScheduleDay} />
|
||||
</Space>
|
||||
@@ -1098,7 +1098,7 @@ const WorkOrderPage = () => {
|
||||
{/* 单一行时间画布,不再区分人员 */}
|
||||
<div style={{ height: 220, position: 'relative', padding: '10px 0', overflow: 'hidden' }}>
|
||||
{getScheduleOrderList().length === 0 ? (
|
||||
<Empty description={`${scheduleDate} 暂无设置计划执行时间的工单`} style={{ padding: "60px 0" }} />
|
||||
<Empty description={`${scheduleDate} ${t('workOrder.noScheduledOrders')}`} style={{ padding: "60px 0" }} />
|
||||
) : (
|
||||
<>
|
||||
{getScheduleOrderList().map((order, index) => {
|
||||
@@ -1214,7 +1214,7 @@ const WorkOrderPage = () => {
|
||||
|
||||
<div style={{ marginBottom: 8 }}>
|
||||
<div style={{ display: 'flex', alignItems: 'center', marginBottom: 8, flexWrap: 'wrap', gap: 12 }}>
|
||||
<span level={4} style={{ margin: 0, fontSize: 18, fontWeight: 800 }}>{currentDetail?.orderTitle || '暂无标题'}</span>
|
||||
<span level={4} style={{ margin: 0, fontSize: 18, fontWeight: 800 }}>{currentDetail?.orderTitle || t('workOrder.notitle')}</span>
|
||||
{currentDetail?.priorityLevel && (
|
||||
<Tag style={{ color: priorityConfig[currentDetail.priorityLevel]?.color, background: priorityConfig[currentDetail.priorityLevel]?.bg, border: `1px solid ${priorityConfig[currentDetail.priorityLevel]?.color}`, borderRadius: 4, fontWeight: 600 }}>
|
||||
{currentDetail.priorityLevel}
|
||||
@@ -1239,11 +1239,11 @@ const WorkOrderPage = () => {
|
||||
</Col>
|
||||
<Col span={24}>
|
||||
<span style={{ fontSize: 12 }}>{t('workOrder.fixed2RelatedDevice')}</span>
|
||||
<span style={{ fontSize: 12, color: '#165DFF', fontWeight: 600 }}>{currentDetail?.deviceName || '无'}</span>
|
||||
<span style={{ fontSize: 12, color: '#165DFF', fontWeight: 600 }}>{currentDetail?.deviceName || t('workOrder.noRelatedDevice')}</span>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<span style={{ fontSize: 12 }}>{t('workOrder.fixed2RelatedArea')}</span>
|
||||
<span style={{ fontSize: 12, fontWeight: 500 }}>{currentDetail?.siteName || '无'}</span>
|
||||
<span style={{ fontSize: 12, fontWeight: 500 }}>{currentDetail?.siteName || t('workOrder.noRelatedArea')}</span>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<span style={{ fontSize: 12 }}>{t('workOrder.fixed2CurrentStatus')}</span>
|
||||
|
||||
Reference in New Issue
Block a user