中英文切换根据已有的功能 已经基本完善
This commit is contained in:
@@ -161,11 +161,11 @@ const BasicSettings = () => {
|
||||
const deviceStatuses = [
|
||||
{ name: t('home.inverter'), count: '5/5', status: t('roles.normal') },
|
||||
{ name: t('home.combinerBox'), count: '20/20', status: t('roles.normal') },
|
||||
{ name: '气象站', count: '1/1', status: t('roles.normal') },
|
||||
{ name: t('home.WeatherStation'), count: '1/1', status: t('roles.normal') },
|
||||
{ name: t('devices.camera'), count: '12/12', status: t('roles.normal') },
|
||||
{ name: t('constants.uav'), count: '2/2', status: t('roles.normal') },
|
||||
{ name: t('devices.robot'), count: '5/5', status: t('roles.normal') },
|
||||
{ name: 'API接口', count: t('roles.normal'), status: t('roles.normal') },
|
||||
{ name: t('systemSetting.api'), count: t('roles.normal'), status: t('roles.normal') },
|
||||
{ name: 'Modbus', count: t('roles.normal'), status: t('roles.normal') },
|
||||
];
|
||||
|
||||
@@ -204,7 +204,7 @@ const BasicSettings = () => {
|
||||
<Col xs={24} xl={17}>
|
||||
{/* 基础配置 */}
|
||||
<AntdCard
|
||||
title={<Space><SettingOutlined style={{ color: '#1677ff' }} /><b>{t('systemSetting.s02')}</b></Space>}
|
||||
title={<Space><SettingOutlined style={{ color: '#1677ff' }} /><b>{t('systemSetting.basicSettings')}</b></Space>}
|
||||
bordered={false}
|
||||
style={{ borderRadius: 10, marginBottom: 8, boxShadow: '0 2px 8px rgba(0,0,0,0.04)' }}
|
||||
bodyStyle={{ padding: '16px' }}
|
||||
@@ -292,10 +292,10 @@ const BasicSettings = () => {
|
||||
>
|
||||
<Row gutter={[12, 12]} style={{ marginBottom: 8 }}>
|
||||
{[
|
||||
{ label: t('alerts.sms'), icon: <Smartphone size={16} />, color: '#52c41a', status: '已启用' },
|
||||
{ label: t('alerts.email'), icon: <Mail size={16} />, color: '#1677ff', status: '已启用' },
|
||||
{ label: 'Telegram', icon: <Send size={16} />, color: '#13c2c2', status: '已启用' },
|
||||
{ label: t('report.systemNotification'), icon: <BellOutlined style={{ fontSize: 16 }} />, color: '#fa8c16', status: '已启用' },
|
||||
{ label: t('alerts.sms'), icon: <Smartphone size={16} />, color: '#52c41a', status: `${t('alerts.enabled')}` },
|
||||
{ label: t('alerts.email'), icon: <Mail size={16} />, color: '#1677ff', status: `${t('alerts.enabled')}` },
|
||||
{ label: 'Telegram', icon: <Send size={16} />, color: '#13c2c2', status: `${t('alerts.enabled')}` },
|
||||
{ label: t('report.systemNotification'), icon: <BellOutlined style={{ fontSize: 16 }} />, color: '#fa8c16', status: `${t('alerts.enabled')}` },
|
||||
].map((item, idx) => (
|
||||
<Col xs={24} sm={12} lg={6} key={idx}>
|
||||
<div style={{ display: 'flex', alignItems: 'center', padding: '10px 12px', background: '#f8fafc', borderRadius: 8, border: '1px solid #f1f5f9' }}>
|
||||
@@ -315,10 +315,10 @@ const BasicSettings = () => {
|
||||
<Col xs={24} sm={12} md={8}><Space size={8}><span style={{ fontSize: fontSmall }}>{t('systemSetting.fixed2CriticalAlert')}</span><Switch size="small" defaultChecked /></Space></Col>
|
||||
<Col xs={24} sm={12} md={8}><Space size={8}><span style={{ fontSize: fontSmall }}>{t('systemSetting.fixed2GenerationFixed2Descend15')}</span><Switch size="small" defaultChecked /></Space></Col>
|
||||
<Col xs={24} sm={12} md={8}><Space size={8}><span style={{ fontSize: fontSmall }}>{t('systemSetting.fixed2Communicating')}</span><Switch size="small" defaultChecked /></Space></Col>
|
||||
<Col xs={24} sm={12} md={8}><Space size={8}><span style={{ fontSize: fontSmall }}>{t('systemSetting.s122')}</span><Switch size="small" defaultChecked /></Space></Col>
|
||||
<Col xs={24} sm={12} md={8}><Space size={8}><span style={{ fontSize: fontSmall }}>{t('systemSetting.everydayPush')}</span><Switch size="small" defaultChecked /></Space></Col>
|
||||
<Col xs={24} md={16}>
|
||||
<Space size="middle" style={{ flexWrap: 'wrap' }}>
|
||||
<span style={{ fontSize: fontSmall }}>{t('systemSetting.s132')}</span>
|
||||
<span style={{ fontSize: fontSmall }}>{t('systemSetting.Nighttime')}</span>
|
||||
<TimePicker.RangePicker size="small" defaultValue={[dayjs('23:00', 'HH:mm'), dayjs('07:00', 'HH:mm')]} format="HH:mm" style={{ width: 140 }} />
|
||||
<Switch size="small" />
|
||||
</Space>
|
||||
@@ -328,7 +328,7 @@ const BasicSettings = () => {
|
||||
|
||||
{/* 用户与权限预览 */}
|
||||
<AntdCard
|
||||
title={<Space><Users size={16} style={{ color: '#1677ff' }} /><b>{t('systemSetting.s142')}</b></Space>}
|
||||
title={<Space><Users size={16} style={{ color: '#1677ff' }} /><b>{t('systemSetting.fixed2RolePermissionFixed2OverviewFixed2')}</b></Space>}
|
||||
bordered={false}
|
||||
style={{ borderRadius: 10, boxShadow: '0 2px 8px rgba(0,0,0,0.04)', marginBottom: 0 }}
|
||||
bodyStyle={{ padding: '12px' }}
|
||||
@@ -466,7 +466,7 @@ const BasicSettings = () => {
|
||||
{[
|
||||
{ x: 60, y: 40, icon: <Cpu size={10} />, label: t('home.inverter') },
|
||||
{ x: 140, y: 40, icon: <Box size={10} />, label: t('home.combinerBox') },
|
||||
{ x: 160, y: 80, icon: <Wind size={10} />, label: t('video.s0') },
|
||||
{ x: 160, y: 80, icon: <Wind size={10} />, label: t('video.WeatherStation') },
|
||||
{ x: 140, y: 120, icon: <Camera size={10} />, label: t('devices.camera') },
|
||||
{ x: 60, y: 120, icon: <Activity size={10} />, label: t('devices.robot') },
|
||||
{ x: 40, y: 80, icon: <Zap size={10} />, label: t('systemSetting.s38') },
|
||||
|
||||
@@ -356,7 +356,7 @@ export default function DroneManagement({
|
||||
pageSize: droneParams.pageSize,
|
||||
total: droneTotal,
|
||||
showSizeChanger: true,
|
||||
showTotal: t => `${t('common.total')} ${t} ${t('common.items')}`,
|
||||
showTotal: r => `${t('common.total')} ${r} ${t('common.items')}`,
|
||||
onChange: (page, pageSize) => {
|
||||
setDroneParams({ ...droneParams, pageNum: page, pageSize });
|
||||
},
|
||||
|
||||
@@ -171,7 +171,7 @@ export default function MenuList() {
|
||||
)}
|
||||
<Button type="text" icon={<EditOutlined />} onClick={() => handleEdit(record)}>{t('roles.edit')}</Button>
|
||||
<Popconfirm title={t('common.confirmDelete')} onConfirm={() => handleDelete(record.menuId)}>
|
||||
<Button type="text" danger>roles.delete</Button>
|
||||
<Button type="text" danger>{t('roles.delete')}</Button>
|
||||
</Popconfirm>
|
||||
</Space>
|
||||
),
|
||||
@@ -212,7 +212,7 @@ export default function MenuList() {
|
||||
|
||||
{/* 菜单弹窗 */}
|
||||
<Modal
|
||||
title={editMenu ? '编辑菜单' : '新增菜单'}
|
||||
title={editMenu ? t('systemSetting.editMenu') : t('systemSetting.addMenu')}
|
||||
open={menuModal}
|
||||
width={600}
|
||||
onCancel={() => setMenuModal(false)}
|
||||
|
||||
@@ -115,7 +115,7 @@ const OnlineUserPage = () => {
|
||||
/>
|
||||
</div>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>
|
||||
<span>profile.username</span>
|
||||
<span>{t('profile.username')}</span>
|
||||
<Input
|
||||
placeholder={t('systemSetting.fixed2PleaseEnterFixed2UsernameFixed2')}
|
||||
value={searchParams.userName}
|
||||
|
||||
@@ -404,7 +404,7 @@ export default function SmartDeviceManagement({
|
||||
pageSize: smartParams.pageSize,
|
||||
total: smartTotal,
|
||||
showSizeChanger: true,
|
||||
showTotal: (t) => `${t('common.total')} ${t} ${t('common.items')}`,
|
||||
showTotal: (r) => `${t('common.total')} ${r} ${t('common.items')}`,
|
||||
onChange: (page, pageSize) => {
|
||||
setSmartParams({ pageNum: page, pageSize });
|
||||
},
|
||||
|
||||
@@ -264,7 +264,7 @@ export default function StationManage() {
|
||||
<Button icon={<BgColorsOutlined />} onClick={() => handleOpenArea(record)}>{t('systemSetting.settingsFixed2')}</Button>
|
||||
<Button onClick={() => handleOpenMap(record)}>{t('systemSetting.s110')}</Button>
|
||||
<Popconfirm title={t('common.confirmDelete')} onConfirm={() => handleDelete(record.id)}>
|
||||
<Button danger>roles.delete</Button>
|
||||
<Button danger>{t('roles.delete')}</Button>
|
||||
</Popconfirm>
|
||||
</Space>
|
||||
)
|
||||
@@ -319,7 +319,7 @@ export default function StationManage() {
|
||||
|
||||
{/* 场站弹窗 */}
|
||||
<Modal
|
||||
title={editRecord ? '编辑场站' : '新增场站'}
|
||||
title={editRecord ? t('systemSetting.editSite') : t('systemSetting.addSite')}
|
||||
open={modalVisible}
|
||||
width={680}
|
||||
onCancel={() => setModalVisible(false)}
|
||||
@@ -497,9 +497,9 @@ export default function StationManage() {
|
||||
footer={null}
|
||||
>
|
||||
<div style={{ height: 400, background: '#f5f5f5', borderRadius: 8, display: 'flex', alignItems: 'center', justifyContent: 'center', flexDirection: 'column' }}>{t('systemSetting.area')}<Space style={{ marginTop: 20 }}>
|
||||
<Button type="primary">{t('systemSetting.s8')}</Button>
|
||||
<Button>{t('systemSetting.fixed2Save')}</Button>
|
||||
</Space>
|
||||
<Button type="primary">{t('systemSetting.s8')}</Button>
|
||||
<Button>{t('systemSetting.fixed2Save')}</Button>
|
||||
</Space>
|
||||
</div>
|
||||
</Modal>
|
||||
</div>
|
||||
|
||||
@@ -410,7 +410,7 @@ export default function UserRolePage() {
|
||||
<div style={{ marginBottom: 16, display: 'flex', justifyContent: 'space-between' }}>
|
||||
{selectedUserIds.length > 0 && (
|
||||
<Button danger onClick={handleBatchDeleteUsers}>
|
||||
批量删除(已选 {selectedUserIds.length} 项)
|
||||
{t('systemSetting.batchDelete')} {selectedUserIds.length} {t('systemSetting.deleteUnit')}
|
||||
</Button>
|
||||
)}
|
||||
<Button type="primary" icon={<PlusOutlined />} onClick={handleAddUser}>{t('users.addUser')}</Button>
|
||||
@@ -498,7 +498,7 @@ export default function UserRolePage() {
|
||||
<div style={{ marginBottom: 16, display: 'flex', justifyContent: 'space-between' }}>
|
||||
{selectedRoleIds.length > 0 && (
|
||||
<Button danger onClick={handleBatchDeleteRoles}>
|
||||
批量删除(已选 {selectedRoleIds.length} 项)
|
||||
{t("systemSetting.batchDelete")}{selectedRoleIds.length}{t("systemSetting.deleteunit")}
|
||||
</Button>
|
||||
)}
|
||||
<Button type="primary" icon={<PlusOutlined />} onClick={handleAddRole}>{t('roles.addRole')}</Button>
|
||||
@@ -512,7 +512,7 @@ export default function UserRolePage() {
|
||||
actions={[
|
||||
<Button type="text" icon={<EditOutlined />} onClick={() => handleEditRole(r)}>{t('roles.edit')}</Button>,
|
||||
<Popconfirm onConfirm={() => handleDeleteRole(r.roleId)} title={t('common.confirmDelete')}>
|
||||
<Button type="text" danger>roles.delete</Button>
|
||||
<Button type="text" danger>{t('roles.delete')}</Button>
|
||||
</Popconfirm>
|
||||
]}
|
||||
>
|
||||
@@ -532,8 +532,8 @@ export default function UserRolePage() {
|
||||
title={<strong>{r.roleName}</strong>}
|
||||
description={
|
||||
<Space direction="vertical" size={2}>
|
||||
<span>权限:{r.roleKey}</span>
|
||||
<span>等级:{r.roleLevel || '-'}</span>
|
||||
<span>{t('systemSetting.permission')}:{r.roleKey}</span>
|
||||
<span>{t('systemSetting.level')}:{r.roleLevel || '-'}</span>
|
||||
{/*{r.roleKey == "admin1" && <Tag color="red">{t('roles.superAdmin')}</Tag>}*/}
|
||||
</Space>
|
||||
}
|
||||
@@ -566,7 +566,7 @@ export default function UserRolePage() {
|
||||
|
||||
{/* 角色弹窗 */}
|
||||
<Modal
|
||||
title={editRole ? '编辑角色' : t('roles.addRole')}
|
||||
title={editRole ? t('roles.editRole') : t('roles.addRole')}
|
||||
open={roleModalVisible}
|
||||
onCancel={() => setRoleModalVisible(false)}
|
||||
onOk={handleSaveRole}
|
||||
@@ -600,7 +600,7 @@ export default function UserRolePage() {
|
||||
|
||||
{userInfo?.roleId == 23 && (
|
||||
<>
|
||||
<Divider>roles.menuPermissions</Divider>
|
||||
<Divider>{t("roles.menuPermissions")}</Divider>
|
||||
<Tree
|
||||
checkable
|
||||
treeData={menuTree}
|
||||
|
||||
@@ -182,9 +182,7 @@ const VideoManagement = () => {
|
||||
<div style={{ padding: '8px 0px', background: '#f5f7fa', minHeight: '100vh' }}>
|
||||
<div style={{ marginBottom: 8 }}>
|
||||
<Title level={4} style={{ margin: 0, fontSize: 'clamp(14px, 1.1vw, 18px)' }}>{t('router.videoManage')}</Title>
|
||||
<Text type="secondary" style={{ fontSize: 12 }}>
|
||||
录像通道与回放管理 · 共 {channels.length} 个通道
|
||||
</Text>
|
||||
|
||||
</div>
|
||||
|
||||
<Card bordered={false} style={{ borderRadius: 10, marginBottom: 8 }} bodyStyle={{ padding: 12 }}>
|
||||
|
||||
@@ -178,7 +178,6 @@ const WorkOrderModelManagement: React.FC = () => {
|
||||
}, [stationId]);
|
||||
|
||||
const handleAdd = () => {
|
||||
const { t } = useTranslation();
|
||||
setEditingItem(null);
|
||||
form.resetFields();
|
||||
setSelectedDeviceType(null);
|
||||
|
||||
@@ -474,31 +474,31 @@ export default function DeviceOverviewPage() {
|
||||
title: t('devices.fixed2DroneAirportFixed2StatusFixed2'),
|
||||
icon: <EnvironmentOutlined style={{ color: '#165DFF', fontSize: 24 }} />,
|
||||
value: `${onlineDrones} / ${totalDrones}`,
|
||||
sub: `可调度 ${onlineDrones} 架`,
|
||||
sub: `${t('devices.distributable')} ${onlineDrones} ${t('devices.UnitsDrone')}`,
|
||||
color: '#165DFF',
|
||||
iconBg: '#E8F3FF'
|
||||
},
|
||||
{
|
||||
title: t('home.inspectionRobot'),
|
||||
icon: <RobotOutlined style={{ color: '#13c2c2', fontSize: 24 }} />,
|
||||
value: `${totalRobots} 台`,
|
||||
sub: `执行中 ${activeRobots}`,
|
||||
value: `${totalRobots} ${t('devices.UnitsRobot')}`,
|
||||
sub: `${t('devices.executing')} ${activeRobots}`,
|
||||
color: '#13c2c2',
|
||||
iconBg: '#E6FFFA'
|
||||
},
|
||||
{
|
||||
title: t('devices.mowingRobot'),
|
||||
icon: <CarOutlined style={{ color: '#722ED1', fontSize: 24 }} />,
|
||||
value: `${totalMowers} 台`,
|
||||
sub: `任务中 ${activeMowers}`,
|
||||
value: `${totalMowers} ${t('devices.UnitsRobot')}`,
|
||||
sub: `${t('devices.executing')} ${activeMowers}`,
|
||||
color: '#722ED1',
|
||||
iconBg: '#F9F0FF'
|
||||
},
|
||||
{
|
||||
title: t('devices.washDrone'),
|
||||
icon: <CloudOutlined style={{ color: '#eb2f96', fontSize: 24 }} />,
|
||||
value: `${totalDrones} 架`,
|
||||
sub: `待命 ${washDroneStandby}`,
|
||||
value: `${totalDrones} ${t('devices.UnitsDrone')}`,
|
||||
sub: `${t('devices.waiting')} ${washDroneStandby}`,
|
||||
color: '#eb2f96',
|
||||
iconBg: '#FFF1F3'
|
||||
},
|
||||
@@ -514,7 +514,7 @@ export default function DeviceOverviewPage() {
|
||||
title: t('devices.todayTaskExecute'),
|
||||
icon: <CheckCircleOutlined style={{ color: '#2f54eb', fontSize: 24 }} />,
|
||||
value: `${completedTasks} / ${totalTasks}`,
|
||||
sub: `完成率 ${completionRate}%`,
|
||||
sub: `${t('devices.completionRate')} ${completionRate}%`,
|
||||
color: '#2f54eb',
|
||||
iconBg: '#E8F3FF'
|
||||
},
|
||||
@@ -779,7 +779,7 @@ export default function DeviceOverviewPage() {
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', marginBottom: 4 }}>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 4 }}>
|
||||
<span style={{ color: '#52c41a' }}><ThunderboltOutlined /></span>
|
||||
<span style={{ fontSize: 12 }}>电量 {fix2(realtimeDevice?.capacity_percent || realtimeDevice?.lastRunningStatus?.battery || 100)}%</span>
|
||||
<span style={{ fontSize: 12 }}>{t('devices.batteryLevel')}: {fix2(realtimeDevice?.capacity_percent || realtimeDevice?.lastRunningStatus?.battery || 100)}%</span>
|
||||
</div>
|
||||
{realtimeDevice?.environment_temperature && (
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
|
||||
import React, { useEffect, useState, useRef } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
const XboxController = ({ onGamepadUpdate, handleControlModal, isControlled, isConnecting, hasControlRight }) => {
|
||||
const { t } = useTranslation();
|
||||
const [gamepadState, setGamepadState] = useState<{
|
||||
buttons: boolean[];
|
||||
axes: number[];
|
||||
@@ -135,15 +136,15 @@ const XboxController = ({ onGamepadUpdate, handleControlModal, isControlled, isC
|
||||
`}
|
||||
>
|
||||
{!connected ? (
|
||||
'未连接设备'
|
||||
t('devices.controllerNotConnected')
|
||||
) : !hasControlRight ? (
|
||||
'其他 Web 端已连接'
|
||||
t('devices.otherWebConnected')
|
||||
) : isConnecting ? (
|
||||
'请求控制中...'
|
||||
t('devices.control2')
|
||||
) : isControlled ? (
|
||||
'控制中'
|
||||
t('devices.controlling')
|
||||
) : (
|
||||
'点击获取控制权限'
|
||||
t('devices.clickToRequestControl')
|
||||
)}
|
||||
</div>
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,5 @@
|
||||
import WeatherRainy from "@/src/components/Weather/WeatherRainy";
|
||||
|
||||
const zh = {
|
||||
common: {
|
||||
// 按钮
|
||||
@@ -188,7 +190,7 @@ const zh = {
|
||||
|
||||
'3': '3天内',
|
||||
|
||||
fixed2MoreGt: '更多 >',
|
||||
fixed2MoreGt: '更多',
|
||||
|
||||
taskSuspended2Fixed2: '总任务',
|
||||
|
||||
@@ -208,7 +210,7 @@ const zh = {
|
||||
|
||||
generationDeviationFixed2: '整体发电偏差',
|
||||
|
||||
gt: '详细 >',
|
||||
gt: '详细',
|
||||
|
||||
cleaningFixed2Time: '建议清洗时间:',
|
||||
|
||||
@@ -224,17 +226,21 @@ const zh = {
|
||||
|
||||
a05HotspotPvA05018PvA05020StatusAbnormal: 'A05阵列热斑处置建议:建议现场复核PV-A05-018至PV-A05-020组件接线和旁路二极管状态,必要时更换异常组件。',
|
||||
|
||||
fixed2InspectionFixed2TypeFixed2: '巡检类型',
|
||||
InspectionType: '巡检类型',
|
||||
|
||||
fixed2InspectionFixed2TimeFixed2: '巡检时间',
|
||||
|
||||
fixed2Inspection: '巡检人员',
|
||||
InspectionTime: '巡检时间',
|
||||
|
||||
InspectionPerson: '巡检人员',
|
||||
fixed2Battery: '预计提升发电量:',
|
||||
|
||||
cleaningOrderGeneratedSuccessfullyFixed2: '✅ 清洗工单生成成功',
|
||||
|
||||
failedFixed2: '❌ 工单生成接口调用失败',
|
||||
solarPanel: "组件阵列",
|
||||
weatherStation: "气象站",
|
||||
environmentalSensor: "环境传感器",
|
||||
distributable: "可调度",
|
||||
|
||||
},
|
||||
devices: {
|
||||
deviceManagement: '设备管理',
|
||||
@@ -481,7 +487,7 @@ const zh = {
|
||||
coverClosed: '覆盖已关闭',
|
||||
coverOpen: '覆盖打开',
|
||||
coverageEquipment: '覆盖设备',
|
||||
coverageValue: '覆盖值',
|
||||
coverageValue: '{{types}}/{{units}}',
|
||||
createSuccess: '创建成功',
|
||||
createTaskException: '创建任务异常',
|
||||
createTaskFail: '创建任务失败',
|
||||
@@ -570,7 +576,7 @@ const zh = {
|
||||
horizontalSpeed: '水平速度',
|
||||
hotspotSuspect: '热斑疑似',
|
||||
inDock: '内停靠',
|
||||
inProgressDesc: '内进度描述',
|
||||
inProgressDesc: '进行中',
|
||||
indoor: '室内',
|
||||
inputCustomAlias: '输入自定义别名',
|
||||
inputPlotName: '输入区域名称',
|
||||
@@ -709,7 +715,7 @@ const zh = {
|
||||
pathPlanFailRetry: '路径计划失败重试',
|
||||
pathPlanning: '路径规划',
|
||||
pauseTask: '暂停任务',
|
||||
pendingApprovalTasks: '待处理审批任务',
|
||||
pendingApprovalTasks: '待处理任务',
|
||||
pendingExec: '待处理执行',
|
||||
permissionObtained: '权限已获取',
|
||||
permissionRequestTitle: '权限请求标题',
|
||||
@@ -912,7 +918,7 @@ const zh = {
|
||||
todayWaylinePlan: '今日航线计划',
|
||||
totalCount: '总数量',
|
||||
trendFlat: '趋势持平',
|
||||
trendYesterday: '趋势昨日',
|
||||
trendYesterday: '较昨日 {{diff}}',
|
||||
typeAIRecheck: '类型AI复检',
|
||||
typeArrayMow: '类型阵列除草',
|
||||
typeComponentClean: '类型组件清洗',
|
||||
@@ -920,10 +926,10 @@ const zh = {
|
||||
typeFenceInspect: '类型围栏巡检',
|
||||
typeHotspotInspect: '类型热斑巡检',
|
||||
typeRecheck: '类型复检',
|
||||
unitGe: '单位地理',
|
||||
unitJia: '单位',
|
||||
unitTai: '单位台',
|
||||
unitTiao: '单位条',
|
||||
unitGe: '个',
|
||||
unitJia: '架',
|
||||
unitTai: '台',
|
||||
unitTiao: '条',
|
||||
unknownDevice: '未知设备',
|
||||
unknownDrone: '未知无人机',
|
||||
unknownObject: '未知对象',
|
||||
@@ -1000,6 +1006,7 @@ const zh = {
|
||||
s6: '遥控接管',
|
||||
|
||||
s7: '规划态势',
|
||||
waiting: '待命',
|
||||
|
||||
taskSuspended2Fixed2: '连续任务',
|
||||
|
||||
@@ -1280,6 +1287,11 @@ const zh = {
|
||||
noneControl: '无控制权限',
|
||||
|
||||
fixed2ControlFixed2: '控制请求超时',
|
||||
executing: "执行中",
|
||||
failed: "失败",
|
||||
cancel: "取消",
|
||||
UnitsRobot: "台",
|
||||
UnitsDrone: "架",
|
||||
},
|
||||
video: {
|
||||
onlineVideo: '在线视频',
|
||||
@@ -1569,7 +1581,9 @@ const zh = {
|
||||
trendUp: '趋势上升',
|
||||
trendZero: '趋势零',
|
||||
triggerCondition: '触发条件',
|
||||
yesterdayValue: '昨日值',
|
||||
yesterdayValue: '昨日值 {{value}}',
|
||||
enabled: '已启用',
|
||||
|
||||
},
|
||||
aiAnalysis: {
|
||||
title: 'AI诊断分析',
|
||||
@@ -1619,6 +1633,7 @@ const zh = {
|
||||
clickHotspotHint: '点击热斑提示',
|
||||
default: '默认',
|
||||
detect: '检测',
|
||||
algoCountUnit: "检测 + 分割",
|
||||
detectAndSeg: '检测与分割',
|
||||
detectDesc: '检测描述',
|
||||
detectModel: '检测模型',
|
||||
@@ -2008,6 +2023,12 @@ const zh = {
|
||||
orderStatus: '工单状态',
|
||||
priority: '优先级',
|
||||
source: '来源',
|
||||
today: '今天',
|
||||
notitle: '暂无标题',
|
||||
noRelatedArea: '无',
|
||||
|
||||
|
||||
|
||||
execStartTime: '执行开始时间',
|
||||
relatedDevice: '关联设备',
|
||||
relatedArea: '关联区域',
|
||||
@@ -2349,6 +2370,13 @@ const zh = {
|
||||
videoCodecMseNotSupported: '当前浏览器 MSE 不支持该视频编码格式',
|
||||
mediaSourceNotSupported: '当前浏览器不支持 MediaSource 扩展',
|
||||
flvMseHint: '提示:播放 FLV 需要浏览器支持 MSE',
|
||||
everydayPush: '每日推送',
|
||||
Nighttime: '夜间免打扰',
|
||||
WeatherStation: "气象站",
|
||||
batchDelete: '批量删除(已选择',
|
||||
deleteUnit: "项)",
|
||||
level: "等级",
|
||||
|
||||
|
||||
exportLogFileName: '系统日志',
|
||||
exportLogSuccess: '成功导出 {count} 条日志',
|
||||
@@ -2613,6 +2641,10 @@ const zh = {
|
||||
s36: '用户名',
|
||||
|
||||
s37: '关联产品',
|
||||
editMenu: '编辑菜单',
|
||||
addMenu: '新增菜单',
|
||||
editSite: '编辑场站',
|
||||
addSite: '新增场站',
|
||||
|
||||
s38: '接口',
|
||||
|
||||
@@ -3355,6 +3387,7 @@ const zh = {
|
||||
roleName: '角色名称',
|
||||
roleKey: '权限字符',
|
||||
roleSort: '排序',
|
||||
editRole: '编辑角色',
|
||||
status: '状态',
|
||||
remark: '备注',
|
||||
actions: '操作',
|
||||
@@ -3369,7 +3402,7 @@ const zh = {
|
||||
abnormal: '异常',
|
||||
addSuccess: '新增成功',
|
||||
confirmDeleteRole: '确认删除角色',
|
||||
editRole: '编辑角色',
|
||||
|
||||
editSuccess: '编辑成功',
|
||||
manageMembers: '管理成员',
|
||||
menuPermissionConfig: '菜单权限配置',
|
||||
@@ -3491,8 +3524,11 @@ const zh = {
|
||||
page: {
|
||||
|
||||
uploadThermal: '请上传热成像文件',
|
||||
stationTopology: '场站拓扑图',
|
||||
|
||||
s0: '外部系统',
|
||||
inverterPowerCompare: '逆变器功率对比',
|
||||
stringCurrentHeatmap: '组串电流热力图(单位:A)',
|
||||
|
||||
|
||||
'2': '已接入 2 套',
|
||||
@@ -3514,6 +3550,11 @@ const zh = {
|
||||
geojson: '面板 GeoJSON',
|
||||
|
||||
s15: '结果展示',
|
||||
online: '在线',
|
||||
offline: '离线',
|
||||
alerts: '告警',
|
||||
all: '总数',
|
||||
|
||||
|
||||
jsonViewFixed2: '原始预览、结果图与完整 JSON 同屏查看',
|
||||
|
||||
|
||||
@@ -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