@@ -1581,7 +1583,7 @@ export default function WayLinePage({ onRefresh }) {
{(taskForm.task_type === 'timed' || taskForm.task_type === 'recurring' || taskForm.task_type === 'continuous') && (
-
+
{(taskForm.task_type === 'recurring' || taskForm.task_type === 'continuous') && (
-
+
-
+
@@ -1749,7 +1751,7 @@ export default function WayLinePage({ onRefresh }) {
onCancel={() => setRthModalVisible(false)}
confirmLoading={loading}
okText="立即执行"
- cancelText="取消"
+ cancelText={t('common.cancel')}
centered
width={400}
>
diff --git a/src/components/devices/deviceController.js b/src/components/devices/deviceController.js
index 6aac00d..82a090b 100644
--- a/src/components/devices/deviceController.js
+++ b/src/components/devices/deviceController.js
@@ -6,6 +6,7 @@ import {
} from '../../api/device.ts';
import envConfig from '../../../env';
+import { useTranslation } from 'react-i18next';
export default class DeviceController {
constructor(userInfo, messageApi) {
@@ -321,7 +322,7 @@ export default class DeviceController {
if (isSecure) return;
const type = obstacle?.type;
const distance = (obstacle?.distance || 0).toFixed(2);
- const types = { 0: '未知', 1: '人', 2: '车辆', 3: '围栏', 4: '坑洞', 5: '草丛' };
+ const types = { 0: t('constants.locationUnknown'), 1: '人', 2: '车辆', 3: '围栏', 4: '坑洞', 5: '草丛' };
this.messageApi.warning({
key: 'obstacle-warning',
content: `检测到 ${types[type] ?? '未知物'},距离 ${distance}m`,
diff --git a/src/constants.ts b/src/constants.ts
index ce559d6..971b48e 100644
--- a/src/constants.ts
+++ b/src/constants.ts
@@ -1,39 +1,39 @@
+import i18n from './i18n';
export const orderTypeConfig = {
- 1: '巡检',
- 2: '检修',
- 3: '清洗',
- 4: '维修',
- 5: '运维'
+ get 1() { return i18n.t('constants.inspection') },
+ get 2() { return i18n.t('constants.maintenance') },
+ get 3() { return i18n.t('constants.cleaning') },
+ get 4() { return i18n.t('constants.repair') },
+ get 5() { return i18n.t('constants.operation') },
};
export const sourceTypeMap = {
- 1: 'AI',
- 2: '无人机',
- 3: '清洗',
- 4: '视频',
- 5: '装备',
- 6: '人工',
- 7: '告警'
+ get 1() { return i18n.t('constants.sourceAI') },
+ get 2() { return i18n.t('constants.sourceUAV') },
+ get 3() { return i18n.t('constants.sourceCleaning') },
+ get 4() { return i18n.t('constants.sourceVideo') },
+ get 5() { return i18n.t('constants.sourceEquipment') },
+ get 6() { return i18n.t('constants.sourceManual') },
+ get 7() { return i18n.t('constants.sourceAlert') },
};
export const alarmTypeMap = {
- 'UAV_FAULT': '无人机故障',
- 'MOWER_FAULT': '割草机故障',
- 'OTHER_DEVICE_FAULT': '其他设备故障',
- 'SERVER_FAILURE': '服务器故障',
- 'SYSTEM_ERROR': '系统错误'
+ get 'UAV_FAULT'() { return i18n.t('constants.uavFault') },
+ get 'MOWER_FAULT'() { return i18n.t('constants.mowerFault') },
+ get 'OTHER_DEVICE_FAULT'() { return i18n.t('constants.otherDeviceFault') },
+ get 'SERVER_FAILURE'() { return i18n.t('constants.serverFailure') },
+ get 'SYSTEM_ERROR'() { return i18n.t('constants.systemError') },
};
export const alarmLevelConfig = {
- 1: { description: '严重', color: '#FF4D4F' },
- 2: { description: '重要', color: '#FA8C16' },
- 3: { description: '一般', color: '#FADB14' },
- 4: { description: '提示', color: '#1890FF' }
+ 1: { get description() { return i18n.t('constants.critical') }, color: '#FF4D4F' },
+ 2: { get description() { return i18n.t('constants.important') }, color: '#FA8C16' },
+ 3: { get description() { return i18n.t('constants.general') }, color: '#FADB14' },
+ 4: { get description() { return i18n.t('constants.info') }, color: '#1890FF' },
};
export const handleStatusMap = {
- 1: '待处理',
- 2: '已关闭',
+ get 1() { return i18n.t('constants.pending') },
+ get 2() { return i18n.t('constants.closed') },
};
-
diff --git a/src/i18n/index.ts b/src/i18n/index.ts
new file mode 100644
index 0000000..b6ba573
--- /dev/null
+++ b/src/i18n/index.ts
@@ -0,0 +1,27 @@
+import i18n from 'i18next';
+import { initReactI18next } from 'react-i18next';
+import LanguageDetector from 'i18next-browser-languagedetector';
+import zhTranslation from '../locales/zh';
+import enTranslation from '../locales/en';
+
+i18n
+ .use(LanguageDetector)
+ .use(initReactI18next)
+ .init({
+ resources: {
+ zh: { translation: zhTranslation },
+ en: { translation: enTranslation },
+ },
+ fallbackLng: 'zh',
+ lng: localStorage.getItem('i18nextLng') || 'zh',
+ interpolation: {
+ escapeValue: false,
+ },
+ detection: {
+ order: ['localStorage', 'navigator'],
+ lookupLocalStorage: 'i18nextLng',
+ caches: ['localStorage'],
+ },
+ });
+
+export default i18n;
diff --git a/src/lib/utils.ts b/src/lib/utils.ts
index 649c66c..ae4bf09 100644
--- a/src/lib/utils.ts
+++ b/src/lib/utils.ts
@@ -4,6 +4,7 @@ import Cookies from 'js-cookie'
import type { MessageInstance } from 'antd/es/message/interface';
import type { ModalStaticFunctions } from 'antd/es/modal/confirm';
import type { NotificationInstance } from 'antd/es/notification/interface';
+import i18n from '../i18n';
let message: MessageInstance;
let notification: NotificationInstance;
@@ -41,13 +42,13 @@ export function cn(...inputs: ClassValue[]) {
export const getLocationQuality = (value) => {
const map = {
- 0: { text: '无效', color: '#ff4d4f' },
- 1: { text: 'GPS 单点定位', color: '#999' },
- 2: { text: 'DGPS 伪距差分/SBAS', color: '#1890ff' },
- 4: { text: 'RTK 固定解', color: '#52c41a' }, // 最优
- 5: { text: 'RTK 浮点解', color: '#faad14' },
+ 0: { get text() { return i18n.t('constants.locationInvalid') }, color: '#ff4d4f' },
+ 1: { get text() { return i18n.t('constants.locationGPS') }, color: '#999' },
+ 2: { get text() { return i18n.t('constants.locationDGPS') }, color: '#1890ff' },
+ 4: { get text() { return i18n.t('constants.locationRTKFixed') }, color: '#52c41a' }, // 最优
+ 5: { get text() { return i18n.t('constants.locationRTKFloat') }, color: '#faad14' },
};
- return map[value] || { text: '未知', color: '#999' };
+ return map[value] || { get text() { return i18n.t('constants.locationUnknown') }, color: '#999' };
};
@@ -175,14 +176,14 @@ export const fix2 = (val) => {
return Number(val).toFixed(2);
};
-export const getVal = (val) => val == "no_rain" ? "无" : (val || '-');
+export const getVal = (val) => val == "no_rain" ? i18n.t("constants.none") : (val || '-');
// ==============================================
// 通用导出表格为 CSV / Excel(通用版,不写死任何字段)
// ==============================================
-export const exportTable = (columns, dataSource, fileName = "导出数据") => {
+export const exportTable = (columns, dataSource, fileName = i18n.t("constants.exportData")) => {
// 1. 从 columns 自动提取表头(过滤掉不显示的列)
const headers = columns
.filter(col => col.title && col.dataIndex) // 只取有标题+有字段的列
@@ -249,9 +250,9 @@ export const errorSourceOptions: Array<{
value: ErrorSourceType;
label: string;
}> = [
- { label: '无人机', value: ERROR_SOURCE.UAV },
- { label: '割草机', value: ERROR_SOURCE.MOWER },
- { label: '其他', value: ERROR_SOURCE.OTHERS },
+ { value: ERROR_SOURCE.UAV, get label() { return i18n.t('constants.uav') } },
+ { value: ERROR_SOURCE.MOWER, get label() { return i18n.t('constants.mower') } },
+ { value: ERROR_SOURCE.OTHERS, get label() { return i18n.t('constants.others') } },
];
export const getErrorSourceText = (source?: ErrorSourceType | string): string => {
@@ -262,9 +263,9 @@ export const getErrorSourceText = (source?: ErrorSourceType | string): string =>
// 错误等级
export const errorLevelOptions = [
- { label: '信息', value: 'INFO' },
- { label: '警告', value: 'WARNING' },
- { label: '错误', value: 'ERROR' },
+ { value: 'INFO', get label() { return i18n.t('constants.infoLevel') } },
+ { value: 'WARNING', get label() { return i18n.t('constants.warning') } },
+ { value: 'ERROR', get label() { return i18n.t('constants.error') } },
];
// 文本 → 数字(提交接口用)
export const levelText2Num = {
@@ -287,16 +288,16 @@ export const LEVEL_TAG_COLOR = {
export const CompareEnumOptions = [
- { value: 'EQ', label: '等于', symbol: '=' },
- { value: 'NEQ', label: '不等于', symbol: '!=' },
- { value: 'GT', label: '大于', symbol: '>' },
- { value: 'LT', label: '小于', symbol: '<' },
- { value: 'GTE', label: '大于等于', symbol: '>=' },
- { value: 'LTE', label: '小于等于', symbol: '<=' },
- { value: 'BETWEEN', label: '在之间', symbol: 'between', range: true },
- { value: 'NOT_BETWEEN', label: '不在之间', symbol: 'notBetween', range: true },
- { value: 'CONTAIN', label: '包含', symbol: 'contain' },
- { value: 'NOT_CONTAIN', label: '不包含', symbol: 'notContain' },
+ { value: 'EQ', get label() { return i18n.t('constants.eq') }, symbol: '=' },
+ { value: 'NEQ', get label() { return i18n.t('constants.neq') }, symbol: '!=' },
+ { value: 'GT', get label() { return i18n.t('constants.gt') }, symbol: '>' },
+ { value: 'LT', get label() { return i18n.t('constants.lt') }, symbol: '<' },
+ { value: 'GTE', get label() { return i18n.t('constants.gte') }, symbol: '>=' },
+ { value: 'LTE', get label() { return i18n.t('constants.lte') }, symbol: '<=' },
+ { value: 'BETWEEN', get label() { return i18n.t('constants.between') }, symbol: 'between', range: true },
+ { value: 'NOT_BETWEEN', get label() { return i18n.t('constants.notBetween') }, symbol: 'notBetween', range: true },
+ { value: 'CONTAIN', get label() { return i18n.t('constants.contain') }, symbol: 'contain' },
+ { value: 'NOT_CONTAIN', get label() { return i18n.t('constants.notContain') }, symbol: 'notContain' },
];
// 工单类型常量
@@ -320,14 +321,14 @@ export const workOrderTypeOptions: Array<{
value: WorkOrderType;
label: string;
}> = [
- { value: WORK_ORDER_TYPE.MOWER_ERROR, label: "割草机故障" },
- { value: WORK_ORDER_TYPE.UAV_ERROR, label: "无人机故障" },
- { value: WORK_ORDER_TYPE.INSPECTION_TASK, label: "巡检" },
- { value: WORK_ORDER_TYPE.COMPONENT_DEFECT, label: "光伏组件故障" },
- { value: WORK_ORDER_TYPE.CLEAN_TASK, label: "清洗" },
- { value: WORK_ORDER_TYPE.MAINTAIN_TASK, label: "维护" },
- { value: WORK_ORDER_TYPE.REPAIR_TASK, label: "维修" },
- { value: WORK_ORDER_TYPE.OTHER, label: "其他" },
+ { value: WORK_ORDER_TYPE.MOWER_ERROR, get label() { return i18n.t('workOrder.mowerError') } },
+ { value: WORK_ORDER_TYPE.UAV_ERROR, get label() { return i18n.t('workOrder.uavError') } },
+ { value: WORK_ORDER_TYPE.INSPECTION_TASK, get label() { return i18n.t('workOrder.typeInspection') } },
+ { value: WORK_ORDER_TYPE.COMPONENT_DEFECT, get label() { return i18n.t('workOrder.componentDefect') } },
+ { value: WORK_ORDER_TYPE.CLEAN_TASK, get label() { return i18n.t('workOrder.typeCleaning') } },
+ { value: WORK_ORDER_TYPE.MAINTAIN_TASK, get label() { return i18n.t('workOrder.maintainTask') } },
+ { value: WORK_ORDER_TYPE.REPAIR_TASK, get label() { return i18n.t('workOrder.typeRepair') } },
+ { value: WORK_ORDER_TYPE.OTHER, get label() { return i18n.t('workOrder.other') } },
];
/**
@@ -351,10 +352,10 @@ export const levelColorMap = {
// 告警处理结果枚举(和后端AlarmHandleResult保持一致)
export const alarmHandleResultOptions = [
- { value: "Handled", label: "已处理" },
- { value: "Restored", label: "已恢复" },
- { value: "Ignored", label: "已忽略" },
- { value: "UnableToHandle", label: "无法处理" },
- { value: "ManufacturerHandling", label: "厂家处理中" },
- { value: "FalseAlarm", label: "误报" },
+ { value: "Handled", get label() { return i18n.t("constants.handled") } },
+ { value: "Restored", get label() { return i18n.t("constants.restored") } },
+ { value: "Ignored", get label() { return i18n.t("constants.ignored") } },
+ { value: "UnableToHandle", get label() { return i18n.t("constants.unableToHandle") } },
+ { value: "ManufacturerHandling", get label() { return i18n.t("constants.manufacturerHandling") } },
+ { value: "FalseAlarm", get label() { return i18n.t("constants.falseAlarm") } },
];
diff --git a/src/locales/en/index.ts b/src/locales/en/index.ts
new file mode 100644
index 0000000..11dab7a
--- /dev/null
+++ b/src/locales/en/index.ts
@@ -0,0 +1,870 @@
+const en = {
+ common: {
+ save: 'Save',
+ saveChanges: 'Save Changes',
+ cancel: 'Cancel',
+ confirm: 'Confirm',
+ ok: 'OK',
+ delete: 'Delete',
+ edit: 'Edit',
+ add: 'Add',
+ addNew: 'Add New',
+ search: 'Search',
+ search2: 'Search',
+ reset: 'Reset',
+ submit: 'Submit',
+ close: 'Close',
+ back: 'Back',
+ export: 'Export',
+ import: 'Import',
+ download: 'Download',
+ upload: 'Upload',
+ refresh: 'Refresh',
+ view: 'View',
+ viewAll: 'View All',
+ viewDetail: 'View Details',
+ operation: 'Action',
+ actions: 'Actions',
+ status: 'Status',
+ type: 'Type',
+ name: 'Name',
+ description: 'Description',
+ remark: 'Remark',
+ time: 'Time',
+ date: 'Date',
+ createTime: 'Created At',
+ updateTime: 'Updated At',
+ enable: 'Enable',
+ disable: 'Disable',
+ normal: 'Normal',
+ stopped: 'Disabled',
+ loading: 'Loading...',
+ noData: 'No Data',
+ success: 'Success',
+ failure: 'Failed',
+ deleteSuccess: 'Deleted successfully',
+ deleteFail: 'Delete failed',
+ editSuccess: 'Updated successfully',
+ editFail: 'Update failed',
+ addSuccess: 'Added successfully',
+ addFail: 'Add failed',
+ saveSuccess: 'Saved successfully',
+ saveFail: 'Save failed',
+ confirmDelete: 'Are you sure to delete?',
+ pleaseSelect: 'Please select',
+ pleaseInput: 'Please enter',
+ all: 'All',
+ yes: 'Yes',
+ no: 'No',
+ male: 'Male',
+ female: 'Female',
+ unknown: 'Unknown',
+ notSet: 'Not Set',
+ total: 'Total',
+ items: 'items',
+ selectAll: 'Select All',
+ batchDelete: 'Batch Delete',
+ selectedItems: '{{count}} items selected',
+ more: 'More',
+ expand: 'Expand',
+ collapse: 'Collapse',
+ monday: 'Monday',
+ tuesday: 'Tuesday',
+ wednesday: 'Wednesday',
+ thursday: 'Thursday',
+ friday: 'Friday',
+ saturday: 'Saturday',
+ sunday: 'Sunday',
+ },
+ layout: {
+ systemName: 'PV Station Intelligent Monitoring & O&M System',
+ selectStation: 'Select Station',
+ fullScreen: 'Fullscreen',
+ exitFullScreen: 'Exit Fullscreen',
+ logout: 'Logout',
+ stationAddress: 'Station Address',
+ stationType: 'Station Type',
+ runningStatus: 'Status',
+ normalRunning: 'Running Normal',
+ groundStation: 'Ground-mounted',
+ defaultStationName: '1MW PV Station',
+ defaultStationAddress: 'Linzhou, Henan',
+ moduleDeveloping: 'Module Under Development',
+ },
+ login: {
+ systemName: 'PV Station Intelligent Monitoring & O&M System',
+ accountPlaceholder: 'Enter account',
+ passwordPlaceholder: 'Enter password',
+ accountRequired: 'Please enter account',
+ passwordRequired: 'Please enter password',
+ agreeRequired: 'Please read and agree to the user agreement',
+ agreeText: 'I have read and agree to the',
+ userAgreement: 'User Agreement',
+ privacyPolicy: 'Privacy Policy',
+ loginButton: 'Login',
+ loginSuccess: 'Login successful',
+ loginFailed: 'Login failed',
+ welcome: 'Welcome',
+ },
+ home: {
+ title: 'Overview',
+ todayGeneration: 'Today\'s Generation',
+ currentPower: 'Current Power',
+ systemAvailability: 'System Availability',
+ alertCount: 'Alert Count',
+ costSaving: 'O&M Cost Savings',
+ dailyTarget: 'Daily Target',
+ installedCapacity: 'Installed Capacity',
+ yesterday: 'Yesterday',
+ unhandled: 'Unhandled',
+ closed: 'Closed',
+ monthlyAccumulated: 'Monthly Accumulated',
+ generationTrend: 'Generation Trend',
+ irradianceTempTrend: 'Irradiance & Temperature Trend',
+ inverterEfficiency: 'Inverter Efficiency Comparison',
+ maintenanceProgress: 'Maintenance Task Progress',
+ stationOverview: 'Station Overview',
+ recentInspection: 'Recent Inspection Records',
+ aiAnalysisSummary: 'AI Analysis Summary',
+ realtimeAlerts: 'Real-time Alerts',
+ deviceOnlineStatus: 'Device Online Status',
+ weatherInfo: 'Weather Information',
+ cleaningSuggestion: 'Cleaning Suggestion',
+ actual: 'Actual',
+ predict: 'Predicted',
+ irradiance: 'Irradiance',
+ temperature: 'Temperature',
+ combinerBox: 'Combiner Box',
+ inverter: 'Inverter',
+ inspectionRobot: 'Inspection Robot',
+ abnormal: 'Abnormal',
+ normal2: 'Normal',
+ generateCleanOrder: 'Generate Cleaning Order',
+ pleaseSelectStation: 'Please select a station first',
+ cleanOrderGenerated: 'Cleaning order generated successfully',
+ kWh: 'kWh',
+ kWp: 'kWp',
+ },
+ devices: {
+ deviceManagement: 'Device Management',
+ deviceOverview: 'Device Overview',
+ deviceStatus: 'Device Status',
+ waylineTask: 'Wayline Tasks',
+ robotTask: 'Robot Tasks',
+ deviceName: 'Device Name',
+ deviceType: 'Device Type',
+ deviceModel: 'Model',
+ onlineStatus: 'Online Status',
+ lastHeartbeat: 'Last Heartbeat',
+ batteryLevel: 'Battery',
+ signalStrength: 'Signal Strength',
+ position: 'Position',
+ control: 'Control',
+ uploadWayline: 'Upload Wayline',
+ downloadWayline: 'Download Wayline',
+ executeTask: 'Execute Task',
+ taskName: 'Task Name',
+ taskStatus: 'Task Status',
+ flightTime: 'Flight Time',
+ altitude: 'Altitude',
+ speed: 'Speed',
+ distance: 'Distance',
+ startTime: 'Start Time',
+ endTime: 'End Time',
+ drone: 'Drone',
+ mower: 'Mower',
+ robot: 'Robot',
+ camera: 'Camera',
+ online: 'Online',
+ offline: 'Offline',
+ standby: 'Standby',
+ running: 'Running',
+ charging: 'Charging',
+ idle: 'Idle',
+ busy: 'Busy',
+ error: 'Error',
+ deviceControl: 'Device Control',
+ realtimeVideo: 'Live Video',
+ takeoff: 'Take Off',
+ land: 'Land',
+ returnHome: 'Return Home',
+ pause: 'Pause',
+ resume: 'Resume',
+ emergencyStop: 'Emergency Stop',
+ forward: 'Forward',
+ backward: 'Backward',
+ left: 'Turn Left',
+ right: 'Turn Right',
+ up: 'Ascend',
+ down: 'Descend',
+ rotateLeft: 'Rotate Left',
+ rotateRight: 'Rotate Right',
+ gimbalPitch: 'Gimbal Pitch',
+ gimbalYaw: 'Gimbal Yaw',
+ zoomIn: 'Zoom In',
+ zoomOut: 'Zoom Out',
+ // Robot task page
+ device: 'Device',
+ creator: 'Creator',
+ executionPlan: 'Execution Plan',
+ sun: 'Sun',
+ mon: 'Mon',
+ tue: 'Tue',
+ wed: 'Wed',
+ thu: 'Thu',
+ fri: 'Fri',
+ sat: 'Sat',
+ planByDay: 'Daily | Start {{startDate}} {{dayTime}}',
+ planByWeek: 'Weekly | {{weekText}} {{dayTime}}',
+ planByMonth: 'Monthly | {{monthText}} {{dayTime}}',
+ daySuffix: '{{day}}',
+ unknownPlan: 'Unknown Plan',
+ executionCycle: 'Execution Cycle',
+ statusNew: 'New',
+ statusPaused: 'Paused',
+ statusFinished: 'Succeeded',
+ statusFailed: 'Failed',
+ confirmDeleteTask: 'Are you sure you want to delete this task?',
+ confirmCancelTask: 'Are you sure you want to cancel this task?',
+ confirmPauseTask: 'Are you sure you want to pause this task?',
+ confirmResumeTask: 'Are you sure you want to resume this task?',
+ recover: 'Resume',
+ statTodayPlan: "Today's Robot Plans",
+ unitPlan: 'items',
+ statInProgress: 'In Progress',
+ statWorkingRobots: 'Working Robots',
+ unitRobot: 'units',
+ statWorking: 'Working',
+ statTotalDistance: 'Total Distance',
+ vsYesterday: 'vs yesterday {{value}}',
+ statCompletionRate: 'Task Completion Rate',
+ statAlerts: 'Alerts',
+ unitTimes: 'times',
+ statOnlineRate: 'Online Rate',
+ good: 'Good',
+ robotRouteMonitor: 'Robot Path Planning & Monitoring',
+ clearRealtimeTrack: 'Clear Track',
+ clearPlanRoute: 'Clear Planned Route',
+ controlMode: 'Control Mode:',
+ localMode: 'Local',
+ remoteMode: 'Remote',
+ heading: 'Heading:',
+ initialized: 'Initialized',
+ uninitialized: 'Not Initialized',
+ location: 'Position:',
+ video: 'Video:',
+ taskPool: 'Task Pool',
+ taskExecutionPlan: 'Task Schedule',
+ taskHistory: 'Task History',
+ createTask: 'Create Task',
+ startDate: 'Start Date',
+ endDate: 'End Date',
+ allRobots: 'All Robots',
+ operationSuggestion: 'Operation Suggestions',
+ timelineMow: '{{robot}} starts mowing task',
+ timelineMowDetail: 'Estimated 2 hours, 45% completed',
+ timelineInspect: '{{robot}} scheduled inspection',
+ timelineInspectDetail: 'Pending approval, suggested area C',
+ timelineMaintenance: 'Routine Equipment Maintenance',
+ timelineMaintenanceDetail: 'All mowers returning to charging station',
+ autoGenerateTodayPlan: "Auto-generate Today's Plan",
+ deviceEnvironment: 'Device Environment & Status',
+ currentTemp: 'Temperature',
+ humidity: 'Humidity',
+ positionAccuracy: 'Position Accuracy',
+ rtkFixed: 'RTK Fixed',
+ networkLatency: 'Network Latency',
+ waterRiskWarning: 'Warning: Water accumulation risk in Area B, avoid it',
+ presetRoutes: 'Preset Routes',
+ searchPlaceholder: 'Search...',
+ unnamedRoute: 'Unnamed Route',
+ deleteRoute: 'Delete Route',
+ executeRoute: 'Execute Route',
+ taskBoard: 'Task Board',
+ pending: 'Pending',
+ executingEllipsis: 'Executing...',
+ paused: 'Paused',
+ executeRouteTask: 'Execute Route Task',
+ execute: 'Execute',
+ routeInfo: 'Route Info',
+ routeName: 'Route Name:',
+ selectExecuteDevice: 'Please select a device',
+ robotPanoramaVideo: 'Robot Panorama Video - {{robot}}',
+ wdSun: 'Su',
+ wdMon: 'Mo',
+ wdTue: 'Tu',
+ wdWed: 'We',
+ wdThu: 'Th',
+ wdFri: 'Fr',
+ wdSat: 'Sa',
+ deviceSerial: 'Device Serial',
+ route: 'Route',
+ fillRequired: 'Please fill in: {{fields}}',
+ selectExecTime: 'Please select execution time',
+ taskCreated: 'Task created successfully',
+ createFailed: 'Failed to create',
+ createTaskError: 'Task creation error',
+ newTask: 'New Task',
+ inputTaskName: 'Please enter task name',
+ executeRouteLabel: 'Execution Route',
+ selectRoute: 'Select Route',
+ repeatPlan: 'Repeat Plan',
+ day: 'Day',
+ week: 'Week',
+ month: 'Month',
+ execDate: 'Execution Date',
+ selectExecDate: 'Select date',
+ execTime: 'Execution Time',
+ selectExecTime: 'Select time',
+ saveTask: 'Save Task',
+ },
+ video: {
+ onlineVideo: 'Online Video',
+ videoMonitor: 'Video Monitor',
+ realtimeMonitor: 'Real-time Monitor',
+ videoWall: 'Video Wall',
+ videoDownload: 'Video Download',
+ fullScreen: 'Fullscreen',
+ snapshot: 'Snapshot',
+ record: 'Record',
+ play: 'Play',
+ pause: 'Pause',
+ stop: 'Stop',
+ mute: 'Mute',
+ unmute: 'Unmute',
+ live: 'Live',
+ replay: 'Replay',
+ selectDevice: 'Select Device',
+ selectCamera: 'Select Camera',
+ noVideo: 'No Video',
+ videoLoading: 'Loading video...',
+ streamQuality: 'Quality',
+ fluent: 'Fluent',
+ standard: 'SD',
+ high: 'HD',
+ super: 'UHD',
+ downloadTime: 'Download Time',
+ fileSize: 'File Size',
+ fileName: 'File Name',
+ downloadStatus: 'Download Status',
+ downloading: 'Downloading',
+ downloaded: 'Downloaded',
+ downloadFailed: 'Download Failed',
+ monitorMode: 'Monitor Mode',
+ singleView: '1-View',
+ fourView: '4-View',
+ nineView: '9-View',
+ sixteenView: '16-View',
+ },
+ alerts: {
+ title: 'Alert Center',
+ alertOverview: 'Alert Overview',
+ realtimeAlert: 'Real-time Alerts',
+ alarmHistory: 'Alert History',
+ alarmRules: 'Alert Rules',
+ alarmStatistics: 'Alert Statistics',
+ alarmSubscription: 'Alert Subscription',
+ alertLevel: 'Alert Level',
+ alertType: 'Alert Type',
+ alertSource: 'Alert Source',
+ alertTime: 'Alert Time',
+ handleStatus: 'Handle Status',
+ handleResult: 'Handle Result',
+ handleTime: 'Handle Time',
+ handler: 'Handler',
+ handleRemark: 'Handle Remark',
+ handle: 'Handle',
+ closeAlert: 'Close Alert',
+ confirmAlert: 'Confirm Alert',
+ exportAlert: 'Export Alerts',
+ critical: 'Critical',
+ important: 'Important',
+ general: 'General',
+ info: 'Info',
+ pending: 'Pending',
+ closed: 'Closed',
+ handled: 'Handled',
+ restored: 'Restored',
+ ignored: 'Ignored',
+ unableToHandle: 'Unable to Handle',
+ manufacturerHandling: 'Manufacturer Handling',
+ falseAlarm: 'False Alarm',
+ totalAlerts: 'Total Alerts',
+ todayAlerts: 'Today\'s Alerts',
+ unhandledAlerts: 'Unhandled Alerts',
+ handledRate: 'Handled Rate',
+ uavFault: 'UAV Fault',
+ mowerFault: 'Mower Fault',
+ otherDeviceFault: 'Other Device Fault',
+ serverFailure: 'Server Failure',
+ systemError: 'System Error',
+ alertTrend: 'Alert Trend',
+ alertDistribution: 'Alert Distribution',
+ },
+ aiAnalysis: {
+ title: 'AI Diagnosis',
+ thermalImaging: 'Thermal Imaging Analysis',
+ defectDetection: 'Defect Detection',
+ temperatureAnalysis: 'Temperature Analysis',
+ hotspotDetection: 'Hotspot Detection',
+ componentAnalysis: 'Component Analysis',
+ stringAnalysis: 'String Analysis',
+ inverterAnalysis: 'Inverter Analysis',
+ uploadImage: 'Upload Image',
+ startAnalysis: 'Start Analysis',
+ analysisResult: 'Analysis Result',
+ defectType: 'Defect Type',
+ defectLevel: 'Defect Level',
+ confidence: 'Confidence',
+ location: 'Location',
+ suggestion: 'Suggestion',
+ abnormalTemperature: 'Abnormal Temperature',
+ maxTemperature: 'Max Temperature',
+ avgTemperature: 'Avg Temperature',
+ minTemperature: 'Min Temperature',
+ normalTemp: 'Normal Temperature',
+ hotspotArea: 'Hotspot Area',
+ riskLevel: 'Risk Level',
+ highRisk: 'High Risk',
+ mediumRisk: 'Medium Risk',
+ lowRisk: 'Low Risk',
+ noRisk: 'No Risk',
+ detectedDefects: 'Defects Detected',
+ noDefects: 'No Defects Detected',
+ analysisHistory: 'Analysis History',
+ reanalyze: 'Re-analyze',
+ },
+ clean: {
+ title: 'Cleaning Optimization',
+ cleaningTask: 'Cleaning Tasks',
+ cleaningSuggestion: 'Cleaning Suggestion',
+ cleaningPlan: 'Cleaning Plan',
+ cleaningRecord: 'Cleaning Records',
+ cleaningEffect: 'Cleaning Effect',
+ efficiencyBefore: 'Efficiency Before',
+ efficiencyAfter: 'Efficiency After',
+ efficiencyImprovement: 'Efficiency Improvement',
+ estimatedRevenue: 'Estimated Revenue',
+ cleaningCost: 'Cleaning Cost',
+ netRevenue: 'Net Revenue',
+ priority: 'Priority',
+ suggestedDate: 'Suggested Date',
+ area: 'Cleaning Area',
+ method: 'Cleaning Method',
+ manualCleaning: 'Manual',
+ robotCleaning: 'Robot',
+ waterCleaning: 'Water',
+ dryCleaning: 'Dry',
+ status: 'Status',
+ pending: 'Pending',
+ inProgress: 'In Progress',
+ completed: 'Completed',
+ cancelled: 'Cancelled',
+ generateOrder: 'Generate Order',
+ soilingRate: 'Soiling Rate',
+ powerLoss: 'Power Loss',
+ lastCleanDate: 'Last Clean Date',
+ nextCleanDate: 'Suggested Clean Date',
+ },
+ workOrder: {
+ title: 'Work Orders',
+ orderTitle: 'Order Title',
+ orderType: 'Order Type',
+ orderStatus: 'Order Status',
+ priority: 'Priority',
+ source: 'Source',
+ execStartTime: 'Execution Start Time',
+ relatedDevice: 'Related Device',
+ relatedArea: 'Related Area',
+ currentStatus: 'Current Status',
+ taskDescription: 'Task Description',
+ attachments: 'Attachments',
+ execute: 'Execute',
+ modify: 'Modify',
+ suspend: 'Suspend',
+ complete: 'Complete',
+ dispatch: 'Dispatch',
+ modifyOrder: 'Modify Order',
+ dispatchOrder: 'Dispatch Order',
+ executeOrder: 'Execute Order',
+ completeOrder: 'Complete Order',
+ relatedAlerts7d: 'Related Alerts (Last 7 Days)',
+ pleaseInputTitle: 'Enter order title',
+ pleaseSelectType: 'Select order type',
+ pleaseSelectPriority: 'Select priority',
+ confirmModify: 'Confirm Modify',
+ confirmDispatch: 'Confirm Dispatch',
+ confirmExecute: 'Confirm Execute',
+ confirmComplete: 'Confirm Complete',
+ selectReceiver: 'Select Receiver',
+ pleaseSelectDispatcher: 'Select dispatch person',
+ selectDevice: 'Select Device',
+ confirmSuspend: 'Confirm suspend?',
+ created: 'Created',
+ inProgress: 'In Progress',
+ suspended: 'Suspended',
+ completed: 'Completed',
+ pending: 'Pending',
+ high: 'High',
+ medium: 'Medium',
+ low: 'Low',
+ aiSuggestion: 'AI Suggestions & Related Info',
+ suggestedEquipment: 'Suggested Equipment',
+ thermalCamera: 'Thermal Camera',
+ priorityInspect: 'Priority Inspect Components',
+ estimatedImpact: 'Estimated Generation Impact',
+ relatedAlertTrend: 'Related Alert Trend',
+ relatedAlertList: 'Related Alert List',
+ noAlerts7d: 'No alerts in the last 7 days',
+ near7Days: '(Last 7 Days)',
+ highAlarm: 'High',
+ midAlarm: 'Medium',
+ lowAlarm: 'Low',
+ typeInspection: 'Inspection',
+ typeMaintenance: 'Maintenance',
+ typeCleaning: 'Cleaning',
+ typeRepair: 'Repair',
+ typeOperation: 'O&M',
+ sourceAI: 'AI',
+ sourceUAV: 'UAV',
+ sourceCleaning: 'Cleaning',
+ sourceVideo: 'Video',
+ sourceEquipment: 'Equipment',
+ sourceManual: 'Manual',
+ sourceAlert: 'Alert',
+ mowerError: 'Mower Fault',
+ uavError: 'UAV Fault',
+ componentDefect: 'PV Component Defect',
+ cleanTask: 'Cleaning',
+ maintainTask: 'Maintenance',
+ repairTask: 'Repair',
+ other: 'Other',
+ },
+ report: {
+ title: 'Report Center',
+ generationReport: 'Generation Report',
+ deviceReport: 'Device Report',
+ alertReport: 'Alert Report',
+ workOrderReport: 'Work Order Report',
+ inspectionReport: 'Inspection Report',
+ cleaningReport: 'Cleaning Report',
+ efficiencyReport: 'Efficiency Report',
+ customReport: 'Custom Report',
+ daily: 'Daily',
+ weekly: 'Weekly',
+ monthly: 'Monthly',
+ quarterly: 'Quarterly',
+ yearly: 'Yearly',
+ dateRange: 'Date Range',
+ generateReport: 'Generate Report',
+ exportReport: 'Export Report',
+ totalGeneration: 'Total Generation',
+ peakPower: 'Peak Power',
+ averagePower: 'Average Power',
+ totalAlerts: 'Total Alerts',
+ totalWorkOrders: 'Total Work Orders',
+ completionRate: 'Completion Rate',
+ averageEfficiency: 'Average Efficiency',
+ },
+ systemSetting: {
+ title: 'System Settings',
+ basicSettings: 'Basic Settings',
+ userManagement: 'User Management',
+ menuManagement: 'Menu Management',
+ organizationManagement: 'Organization Management',
+ stationManagement: 'Station Management',
+ noticePolicy: 'Notification Policy',
+ deviceAccess: 'Device Access',
+ dataSafety: 'Data & Security',
+ systemMaintenance: 'System Maintenance',
+ onlineUsers: 'Online Users',
+ deviceManagement: 'Device Management',
+ logManagement: 'Log Management',
+ videoManagement: 'Video Management',
+ systemName: 'System Name',
+ systemVersion: 'System Version',
+ systemDescription: 'System Description',
+ defaultLanguage: 'Default Language',
+ systemLogo: 'System Logo',
+ theme: 'Theme',
+ light: 'Light',
+ dark: 'Dark',
+ followSystem: 'Follow System',
+ username: 'Username',
+ nickname: 'Nickname',
+ phone: 'Phone',
+ email: 'Email',
+ role: 'Role',
+ password: 'Password',
+ passwordPlaceholder: 'Leave empty to keep unchanged',
+ language: 'Language',
+ assignRole: 'Assign Role',
+ gender: 'Gender',
+ status: 'Status',
+ addUser: 'Add User',
+ editUser: 'Edit User',
+ resetPassword: 'Reset Password',
+ resetPasswordConfirm: 'Reset password to 123456?',
+ passwordResetTo: 'Password has been reset to: 123456',
+ chinese: 'Chinese',
+ english: 'English',
+ menuName: 'Menu Name',
+ menuType: 'Menu Type',
+ menuPath: 'Route Path',
+ menuIcon: 'Menu Icon',
+ menuSort: 'Sort Order',
+ permission: 'Permission Key',
+ parentMenu: 'Parent Menu',
+ directory: 'Directory',
+ menu: 'Menu',
+ button: 'Button',
+ orgName: 'Organization Name',
+ orgType: 'Organization Type',
+ parentOrg: 'Parent Organization',
+ leader: 'Leader',
+ contact: 'Contact Phone',
+ siteName: 'Station Name',
+ siteType: 'Station Type',
+ siteAddress: 'Station Address',
+ siteCapacity: 'Installed Capacity',
+ siteStatus: 'Station Status',
+ longitude: 'Longitude',
+ latitude: 'Latitude',
+ timezone: 'Timezone',
+ logType: 'Log Type',
+ loginLog: 'Login Log',
+ operationLog: 'Operation Log',
+ errorLog: 'Error Log',
+ systemLog: 'System Log',
+ operator: 'Operator',
+ operationContent: 'Operation Content',
+ operationTime: 'Operation Time',
+ ipAddress: 'IP Address',
+ videoName: 'Video Name',
+ videoUrl: 'Video URL',
+ videoType: 'Video Type',
+ videoStatus: 'Video Status',
+ backupDatabase: 'Backup Database',
+ clearCache: 'Clear Cache',
+ systemInfo: 'System Info',
+ diskUsage: 'Disk Usage',
+ memoryUsage: 'Memory Usage',
+ cpuUsage: 'CPU Usage',
+ serverStatus: 'Server Status',
+ uptime: 'Uptime',
+ accessProtocol: 'Access Protocol',
+ accessStatus: 'Access Status',
+ accessTime: 'Access Time',
+ snCode: 'SN Code',
+ verifyCode: 'Verify Code',
+ bindDevice: 'Bind Device',
+ // Error Management
+ errorCode: 'Error Code',
+ errorName: 'Error Name',
+ errorSourceLabel: 'Error Source',
+ errorLevelLabel: 'Error Level',
+ errorDesc: 'Error Description',
+ checkField: 'Check Field',
+ compareRule: 'Compare Rule',
+ compareValueCol: 'Compare Value',
+ compareValueLabel: 'Compare Value',
+ rangeMin: 'Range Min',
+ rangeMax: 'Range Max',
+ pleaseInputErrorCode: 'Please enter error code',
+ pleaseInputErrorName: 'Please enter error name',
+ pleaseSelectSource: 'Please select source',
+ pleaseSelectLevel: 'Please select level',
+ pleaseSelectErrorSource: 'Please select error source',
+ pleaseSelectErrorLevel: 'Please select error level',
+ pleaseInputCheckField: 'Please enter check field name',
+ pleaseSelectCompareRule: 'Please select compare rule',
+ pleaseInputMinValue: 'Please enter min value',
+ pleaseInputMaxValue: 'Please enter max value',
+ pleaseInputCompareValue: 'Please enter compare value',
+ errorCodePlaceholder: 'e.g., ERR-ROBOT-001',
+ checkFieldPlaceholder: 'e.g., battery, speed, temperature',
+ minValuePlaceholder: 'Min value',
+ maxValuePlaceholder: 'Max value',
+ compareValuePlaceholder: 'Number/text, separated by commas',
+ errorDescPlaceholder: 'Describe the scenario that triggers this error',
+ suggestionPlaceholder: 'Solution after this error occurs',
+ addErrorRule: 'Add Error Rule',
+ editErrorRule: 'Edit Error Rule',
+ viewErrorRuleDetail: 'View Error Rule Detail',
+ confirmDeleteError: 'Are you sure to delete error "{{name}}"?',
+ getErrorListFailed: 'Failed to get error list',
+ operationFailed: 'Operation failed',
+ },
+ profile: {
+ title: 'Profile',
+ getProfileFailed: 'Failed to get profile',
+ modifySuccess: 'Modified successfully',
+ modifyFailed: 'Modification failed',
+ passwordChanged: 'Password changed successfully',
+ avatarUploadSuccess: 'Avatar uploaded successfully',
+ avatarUploadFailed: 'Upload failed',
+ passwordMismatch: 'The two passwords do not match',
+ changeAvatar: 'Change Avatar',
+ username: 'Username',
+ nickname: 'Nickname',
+ gender: 'Gender',
+ phone: 'Phone',
+ email: 'Email',
+ role: 'Role',
+ remark: 'Remark',
+ oldPassword: 'Old Password',
+ newPassword: 'New Password',
+ confirmPassword: 'Confirm Password',
+ nicknamePlaceholder: 'Enter nickname',
+ phonePlaceholder: 'Enter phone number',
+ saveChanges: 'Save Changes',
+ confirmChange: 'Confirm Change',
+ male: 'Male',
+ female: 'Female',
+ notSet: 'Not Set',
+ },
+ users: {
+ title: 'User Management',
+ addUser: 'Add User',
+ username: 'Username',
+ nickname: 'Nickname',
+ phone: 'Phone',
+ email: 'Email',
+ role: 'Role',
+ status: 'Status',
+ actions: 'Actions',
+ edit: 'Edit',
+ delete: 'Delete',
+ usernameLabel: 'Username',
+ nicknameLabel: 'Nickname',
+ phoneLabel: 'Phone',
+ passwordLabel: 'Password',
+ languageLabel: 'Language',
+ assignRoleLabel: 'Assign Role',
+ statusLabel: 'Status',
+ genderLabel: 'Gender',
+ passwordPlaceholder: 'Leave empty to keep unchanged',
+ chinese: 'Chinese',
+ english: 'English',
+ normal: 'Normal',
+ stopped: 'Disabled',
+ male: 'Male',
+ female: 'Female',
+ unknown: 'Unknown',
+ batchDelete: 'Batch Delete ({{count}} selected)',
+ resetPassword: 'Reset Password',
+ passwordResetTo: 'Password has been reset to: 123456',
+ resetPasswordConfirm: 'Reset password to 123456?',
+ },
+ roles: {
+ title: 'Role Management',
+ addRole: 'Add Role',
+ roleName: 'Role Name',
+ roleKey: 'Role Key',
+ roleSort: 'Sort Order',
+ status: 'Status',
+ remark: 'Remark',
+ actions: 'Actions',
+ edit: 'Edit',
+ delete: 'Delete',
+ assignPermissions: 'Assign Permissions',
+ dataScope: 'Data Scope',
+ menuPermissions: 'Menu Permissions',
+ roleDescription: 'Role Description',
+ normal: 'Normal',
+ stopped: 'Disabled',
+ },
+ constants: {
+ inspection: 'Inspection',
+ maintenance: 'Maintenance',
+ cleaning: 'Cleaning',
+ repair: 'Repair',
+ operation: 'O&M',
+ sourceAI: 'AI',
+ sourceUAV: 'UAV',
+ sourceCleaning: 'Cleaning',
+ sourceVideo: 'Video',
+ sourceEquipment: 'Equipment',
+ sourceManual: 'Manual',
+ sourceAlert: 'Alert',
+ uavFault: 'UAV Fault',
+ mowerFault: 'Mower Fault',
+ otherDeviceFault: 'Other Device Fault',
+ serverFailure: 'Server Failure',
+ systemError: 'System Error',
+ critical: 'Critical',
+ important: 'Important',
+ general: 'General',
+ info: 'Info',
+ pending: 'Pending',
+ closed: 'Closed',
+ uav: 'UAV',
+ mower: 'Mower',
+ others: 'Others',
+ infoLevel: 'Info',
+ warning: 'Warning',
+ error: 'Error',
+ handled: 'Handled',
+ restored: 'Restored',
+ ignored: 'Ignored',
+ unableToHandle: 'Unable to Handle',
+ manufacturerHandling: 'Manufacturer Handling',
+ falseAlarm: 'False Alarm',
+ eq: 'Equals',
+ neq: 'Not Equals',
+ gt: 'Greater Than',
+ lt: 'Less Than',
+ gte: 'Greater or Equal',
+ lte: 'Less or Equal',
+ between: 'Between',
+ notBetween: 'Not Between',
+ contain: 'Contains',
+ notContain: 'Does Not Contain',
+ locationInvalid: 'Invalid',
+ locationGPS: 'GPS Single Point',
+ locationDGPS: 'DGPS / SBAS',
+ locationRTKFixed: 'RTK Fixed',
+ locationRTKFloat: 'RTK Float',
+ locationUnknown: 'Unknown',
+ exportData: 'Exported Data',
+ none: 'None',
+ },
+ router: {
+ overview: 'Overview',
+ devices: 'Device Management',
+ video: 'Online Video',
+ monitor: 'Real-time Monitor',
+ alerts: 'Alert Center',
+ aiAnalysis: 'AI Diagnosis',
+ clean: 'Cleaning Optimization',
+ task: 'Work Orders',
+ table: 'Report Center',
+ systemSetting: 'System Settings',
+ log: 'Log Management',
+ videoManage: 'Video Management',
+ downloads: 'Video Download',
+ users: 'User Management',
+ roles: 'Role Management',
+ menuList: 'Menu Management',
+ organization: 'Organization Management',
+ station: 'Station Management',
+ realtimeMonitor: 'Real-time Monitor',
+ profile: 'Profile',
+ noticePolicy: 'Notification Policy',
+ dataSafety: 'Data & Security',
+ moduleDeveloping: 'Module Under Development',
+ pleaseSelectMenu: 'Please select a menu',
+ },
+ api: {
+ loginExpired: 'Login expired, please log in again',
+ networkError: 'Network error, please try again later',
+ },
+ weather: {
+ sunny: 'Sunny',
+ cloudy: 'Cloudy',
+ overcast: 'Overcast',
+ rainy: 'Rainy',
+ },
+};
+
+export default en;
diff --git a/src/locales/zh/index.ts b/src/locales/zh/index.ts
new file mode 100644
index 0000000..ee6d29f
--- /dev/null
+++ b/src/locales/zh/index.ts
@@ -0,0 +1,895 @@
+const zh = {
+ common: {
+ // 按钮
+ save: '保存',
+ saveChanges: '保存修改',
+ cancel: '取消',
+ confirm: '确认',
+ ok: '确定',
+ delete: '删除',
+ edit: '编辑',
+ add: '新增',
+ addNew: '新增',
+ search: '搜索',
+ search2: '查询',
+ reset: '重置',
+ submit: '提交',
+ close: '关闭',
+ back: '返回',
+ export: '导出',
+ import: '导入',
+ download: '下载',
+ upload: '上传',
+ refresh: '刷新',
+ view: '查看',
+ viewAll: '查看全部',
+ viewDetail: '查看详情',
+ operation: '操作',
+ actions: '操作',
+ status: '状态',
+ type: '类型',
+ name: '名称',
+ description: '描述',
+ remark: '备注',
+ time: '时间',
+ date: '日期',
+ createTime: '创建时间',
+ updateTime: '更新时间',
+ enable: '启用',
+ disable: '停用',
+ normal: '正常',
+ stopped: '停用',
+ loading: '加载中...',
+ noData: '暂无数据',
+ success: '成功',
+ failure: '失败',
+ deleteSuccess: '删除成功',
+ deleteFail: '删除失败',
+ editSuccess: '编辑成功',
+ editFail: '编辑失败',
+ addSuccess: '新增成功',
+ addFail: '新增失败',
+ saveSuccess: '保存成功',
+ saveFail: '保存失败',
+ confirmDelete: '确定删除?',
+ pleaseSelect: '请选择',
+ pleaseInput: '请输入',
+ all: '全部',
+ yes: '是',
+ no: '否',
+ male: '男',
+ female: '女',
+ unknown: '未知',
+ notSet: '未设置',
+ total: '共',
+ items: '条',
+ selectAll: '全选',
+ batchDelete: '批量删除',
+ selectedItems: '已选 {{count}} 项',
+ more: '更多',
+ expand: '展开',
+ collapse: '收起',
+ // 星期
+ monday: '星期一',
+ tuesday: '星期二',
+ wednesday: '星期三',
+ thursday: '星期四',
+ friday: '星期五',
+ saturday: '星期六',
+ sunday: '星期日',
+ },
+ layout: {
+ systemName: '光伏电站智能监控与运维系统',
+ selectStation: '请选择电站',
+ fullScreen: '全屏',
+ exitFullScreen: '退出全屏',
+ logout: '退出登录',
+ stationAddress: '电站地址',
+ stationType: '电站类型',
+ runningStatus: '运行状态',
+ normalRunning: '正常运行',
+ groundStation: '地面电站',
+ defaultStationName: '1MW 光伏电站',
+ defaultStationAddress: '河南省林州',
+ moduleDeveloping: '模块开发中',
+ },
+ login: {
+ systemName: '光伏电站智能监控与运维系统',
+ accountPlaceholder: '请输入账号',
+ passwordPlaceholder: '请输入密码',
+ accountRequired: '请输入账号',
+ passwordRequired: '请输入密码',
+ agreeRequired: '请阅读并同意用户协议',
+ agreeText: '我已阅读并同意',
+ userAgreement: '用户协议',
+ privacyPolicy: '隐私政策',
+ loginButton: '登录',
+ loginSuccess: '登录成功',
+ loginFailed: '登录失败',
+ welcome: '欢迎',
+ },
+ home: {
+ title: '总览首页',
+ todayGeneration: '今日发电量',
+ currentPower: '当前功率',
+ systemAvailability: '系统可用率',
+ alertCount: '告警数量',
+ costSaving: '节省运维成本',
+ dailyTarget: '日目标',
+ installedCapacity: '装机容量',
+ yesterday: '昨日',
+ unhandled: '未处理',
+ closed: '已关闭',
+ monthlyAccumulated: '本月累计节省',
+ generationTrend: '发电趋势',
+ irradianceTempTrend: '辐照度与温度趋势',
+ inverterEfficiency: '逆变器效率对比',
+ maintenanceProgress: '运维任务进度',
+ stationOverview: '电站概览',
+ recentInspection: '近期巡检记录',
+ aiAnalysisSummary: 'AI 分析摘要',
+ realtimeAlerts: '实时告警',
+ deviceOnlineStatus: '设备在线状态',
+ weatherInfo: '天气信息',
+ cleaningSuggestion: '清洗建议',
+ actual: '实际',
+ predict: '预测',
+ irradiance: '辐照度',
+ temperature: '温度',
+ combinerBox: '汇流箱',
+ inverter: '逆变器',
+ inspectionRobot: '巡检机器人',
+ abnormal: '异常',
+ normal2: '正常',
+ generateCleanOrder: '生成清洗工单',
+ pleaseSelectStation: '请先选择电站',
+ cleanOrderGenerated: '清洗工单生成成功',
+ kWh: 'kWh',
+ kWp: 'kWp',
+ },
+ devices: {
+ deviceManagement: '设备管理',
+ deviceOverview: '设备总览',
+ deviceStatus: '设备状态',
+ waylineTask: '航线任务',
+ robotTask: '机器人任务',
+ deviceName: '设备名称',
+ deviceType: '设备类型',
+ deviceModel: '设备型号',
+ onlineStatus: '在线状态',
+ lastHeartbeat: '最后心跳',
+ batteryLevel: '电量',
+ signalStrength: '信号强度',
+ position: '位置',
+ control: '控制',
+ uploadWayline: '上传航线',
+ downloadWayline: '下载航线',
+ executeTask: '执行任务',
+ taskName: '任务名称',
+ taskStatus: '任务状态',
+ flightTime: '飞行时间',
+ altitude: '高度',
+ speed: '速度',
+ distance: '距离',
+ startTime: '开始时间',
+ endTime: '结束时间',
+ drone: '无人机',
+ mower: '割草机',
+ robot: '机器人',
+ camera: '摄像头',
+ online: '在线',
+ offline: '离线',
+ standby: '待机',
+ running: '运行中',
+ charging: '充电中',
+ idle: '空闲',
+ busy: '忙碌',
+ error: '故障',
+ deviceControl: '设备控制',
+ realtimeVideo: '实时视频',
+ takeoff: '起飞',
+ land: '降落',
+ returnHome: '返航',
+ pause: '暂停',
+ resume: '继续',
+ emergencyStop: '紧急停止',
+ forward: '前进',
+ backward: '后退',
+ left: '左转',
+ right: '右转',
+ up: '上升',
+ down: '下降',
+ rotateLeft: '左旋',
+ rotateRight: '右旋',
+ gimbalPitch: '云台俯仰',
+ gimbalYaw: '云台偏航',
+ zoomIn: '放大',
+ zoomOut: '缩小',
+ // 机器人任务页
+ device: '设备',
+ creator: '创建者',
+ executionPlan: '执行计划',
+ sun: '周日',
+ mon: '周一',
+ tue: '周二',
+ wed: '周三',
+ thu: '周四',
+ fri: '周五',
+ sat: '周六',
+ planByDay: '按天 | 开始日期{{startDate}} {{dayTime}}',
+ planByWeek: '按周 | {{weekText}} {{dayTime}}',
+ planByMonth: '按月 | {{monthText}} {{dayTime}}',
+ daySuffix: '{{day}}日',
+ unknownPlan: '未知计划',
+ executionCycle: '执行周期',
+ statusNew: '新建',
+ statusPaused: '暂停中',
+ statusFinished: '执行成功',
+ statusFailed: '执行失败',
+ confirmDeleteTask: '确定要删除该任务吗?',
+ confirmCancelTask: '确定要取消该任务吗?',
+ confirmPauseTask: '确定要暂停该任务吗?',
+ confirmResumeTask: '确定要恢复该任务吗?',
+ recover: '恢复',
+ statTodayPlan: '今日机器人计划',
+ unitPlan: '条',
+ statInProgress: '进行中',
+ statWorkingRobots: '作业中机器人',
+ unitRobot: '台',
+ statWorking: '作业中',
+ statTotalDistance: '累计作业里程',
+ vsYesterday: '较昨日 {{value}}',
+ statCompletionRate: '任务完成率',
+ statAlerts: '异常告警',
+ unitTimes: '次',
+ statOnlineRate: '在线率',
+ good: '良好',
+ robotRouteMonitor: '机器人路径规划与监控',
+ clearRealtimeTrack: '清空实时轨迹',
+ clearPlanRoute: '清空规划航线',
+ controlMode: '控制模式:',
+ localMode: '本地',
+ remoteMode: '远程',
+ heading: '航向:',
+ initialized: '已初始化',
+ uninitialized: '未初始化',
+ location: '定位:',
+ video: '视频:',
+ taskPool: '任务池',
+ taskExecutionPlan: '任务执行计划',
+ taskHistory: '历史任务',
+ createTask: '创建任务',
+ startDate: '开始日期',
+ endDate: '结束日期',
+ allRobots: '全部机器人',
+ operationSuggestion: '作业编排建议',
+ timelineMow: '{{robot}} 开始除草任务',
+ timelineMowDetail: '预计耗时 2 小时,当前进度 45%',
+ timelineInspect: '{{robot}} 预定巡检任务',
+ timelineInspectDetail: '待审批,建议执行区域 C',
+ timelineMaintenance: '设备例行维护',
+ timelineMaintenanceDetail: '所有割草机返回充电站',
+ autoGenerateTodayPlan: '智能生成今日计划',
+ deviceEnvironment: '设备环境与状态',
+ currentTemp: '当前温度',
+ humidity: '环境湿度',
+ positionAccuracy: '定位精度',
+ rtkFixed: 'RTK 固定',
+ networkLatency: '网络延迟',
+ waterRiskWarning: '注意:区域 B 存在积水风险,建议避开',
+ presetRoutes: '预设路线',
+ searchPlaceholder: '搜索...',
+ unnamedRoute: '未命名路线',
+ deleteRoute: '删除航线',
+ executeRoute: '执行航线',
+ taskBoard: '任务看板',
+ pending: '待执行',
+ executingEllipsis: '正在执行...',
+ paused: '已暂停',
+ executeRouteTask: '执行路线任务',
+ execute: '执行',
+ routeInfo: '路线信息',
+ routeName: '路线名称:',
+ selectExecuteDevice: '请选择执行设备',
+ robotPanoramaVideo: '机器人全景视频 - {{robot}}',
+ wdSun: '日',
+ wdMon: '一',
+ wdTue: '二',
+ wdWed: '三',
+ wdThu: '四',
+ wdFri: '五',
+ wdSat: '六',
+ deviceSerial: '设备编号',
+ route: '路线',
+ fillRequired: '请填写:{{fields}}',
+ selectExecTime: '请选择执行时间',
+ taskCreated: '任务创建成功',
+ createFailed: '创建失败',
+ createTaskError: '创建任务异常',
+ newTask: '新建任务',
+ inputTaskName: '请输入任务名称',
+ executeRouteLabel: '执行路线',
+ selectRoute: '选择路线',
+ repeatPlan: '重复计划',
+ day: '天',
+ week: '周',
+ month: '月',
+ execDate: '执行日期',
+ selectExecDate: '选择执行日期',
+ execTime: '执行时间',
+ selectExecTime: '选择执行时间',
+ saveTask: '保存任务',
+ },
+ video: {
+ onlineVideo: '在线视频',
+ videoMonitor: '视频监控',
+ realtimeMonitor: '实时监控',
+ videoWall: '视频墙',
+ videoDownload: '视频下载',
+ fullScreen: '全屏',
+ snapshot: '截图',
+ record: '录制',
+ play: '播放',
+ pause: '暂停',
+ stop: '停止',
+ mute: '静音',
+ unmute: '取消静音',
+ live: '直播',
+ replay: '回放',
+ selectDevice: '选择设备',
+ selectCamera: '选择摄像头',
+ noVideo: '暂无视频',
+ videoLoading: '视频加载中...',
+ streamQuality: '画质',
+ fluent: '流畅',
+ standard: '标清',
+ high: '高清',
+ super: '超清',
+ downloadTime: '下载时间',
+ fileSize: '文件大小',
+ fileName: '文件名',
+ downloadStatus: '下载状态',
+ downloading: '下载中',
+ downloaded: '已下载',
+ downloadFailed: '下载失败',
+ monitorMode: '监控模式',
+ singleView: '单画面',
+ fourView: '四画面',
+ nineView: '九画面',
+ sixteenView: '十六画面',
+ },
+ alerts: {
+ title: '告警中心',
+ alertOverview: '告警概览',
+ realtimeAlert: '实时告警',
+ alarmHistory: '历史告警',
+ alarmRules: '告警规则',
+ alarmStatistics: '告警统计',
+ alarmSubscription: '告警订阅',
+ alertLevel: '告警级别',
+ alertType: '告警类型',
+ alertSource: '告警来源',
+ alertTime: '告警时间',
+ handleStatus: '处理状态',
+ handleResult: '处理结果',
+ handleTime: '处理时间',
+ handler: '处理人',
+ handleRemark: '处理备注',
+ handle: '处理',
+ closeAlert: '关闭告警',
+ confirmAlert: '确认告警',
+ exportAlert: '导出告警',
+ critical: '严重',
+ important: '重要',
+ general: '一般',
+ info: '提示',
+ pending: '待处理',
+ closed: '已关闭',
+ handled: '已处理',
+ restored: '已恢复',
+ ignored: '已忽略',
+ unableToHandle: '无法处理',
+ manufacturerHandling: '厂家处理中',
+ falseAlarm: '误报',
+ totalAlerts: '告警总数',
+ todayAlerts: '今日告警',
+ unhandledAlerts: '未处理告警',
+ handledRate: '处理率',
+ uavFault: '无人机故障',
+ mowerFault: '割草机故障',
+ otherDeviceFault: '其他设备故障',
+ serverFailure: '服务器故障',
+ systemError: '系统错误',
+ alertTrend: '告警趋势',
+ alertDistribution: '告警分布',
+ },
+ aiAnalysis: {
+ title: 'AI诊断分析',
+ thermalImaging: '热成像分析',
+ defectDetection: '缺陷检测',
+ temperatureAnalysis: '温度分析',
+ hotspotDetection: '热斑检测',
+ componentAnalysis: '组件分析',
+ stringAnalysis: '组串分析',
+ inverterAnalysis: '逆变器分析',
+ uploadImage: '上传图片',
+ startAnalysis: '开始分析',
+ analysisResult: '分析结果',
+ defectType: '缺陷类型',
+ defectLevel: '缺陷等级',
+ confidence: '置信度',
+ location: '位置',
+ suggestion: '处理建议',
+ abnormalTemperature: '异常温度',
+ maxTemperature: '最高温度',
+ avgTemperature: '平均温度',
+ minTemperature: '最低温度',
+ normalTemp: '正常温度',
+ hotspotArea: '热斑区域',
+ riskLevel: '风险等级',
+ highRisk: '高风险',
+ mediumRisk: '中风险',
+ lowRisk: '低风险',
+ noRisk: '无风险',
+ detectedDefects: '检测到缺陷',
+ noDefects: '未检测到缺陷',
+ analysisHistory: '分析历史',
+ reanalyze: '重新分析',
+ },
+ clean: {
+ title: '清洗优化',
+ cleaningTask: '清洗任务',
+ cleaningSuggestion: '清洗建议',
+ cleaningPlan: '清洗计划',
+ cleaningRecord: '清洗记录',
+ cleaningEffect: '清洗效果',
+ efficiencyBefore: '清洗前效率',
+ efficiencyAfter: '清洗后效率',
+ efficiencyImprovement: '效率提升',
+ estimatedRevenue: '预计收益',
+ cleaningCost: '清洗成本',
+ netRevenue: '净收益',
+ priority: '优先级',
+ suggestedDate: '建议日期',
+ area: '清洗区域',
+ method: '清洗方式',
+ manualCleaning: '人工清洗',
+ robotCleaning: '机器人清洗',
+ waterCleaning: '水清洗',
+ dryCleaning: '干清洗',
+ status: '状态',
+ pending: '待清洗',
+ inProgress: '清洗中',
+ completed: '已清洗',
+ cancelled: '已取消',
+ generateOrder: '生成工单',
+ soilingRate: '污损率',
+ powerLoss: '功率损失',
+ lastCleanDate: '上次清洗日期',
+ nextCleanDate: '建议清洗日期',
+ },
+ workOrder: {
+ title: '工单任务',
+ orderTitle: '工单标题',
+ orderType: '工单类型',
+ orderStatus: '工单状态',
+ priority: '优先级',
+ source: '来源',
+ execStartTime: '执行开始时间',
+ relatedDevice: '关联设备',
+ relatedArea: '关联区域',
+ currentStatus: '当前状态',
+ taskDescription: '任务描述',
+ attachments: '附件素材',
+ execute: '执行工单',
+ modify: '修改',
+ suspend: '挂起',
+ complete: '完成',
+ dispatch: '派单',
+ modifyOrder: '修改工单',
+ dispatchOrder: '工单派单',
+ executeOrder: '执行工单',
+ completeOrder: '完成工单',
+ relatedAlerts7d: '近7天全部关联告警',
+ pleaseInputTitle: '请输入工单标题',
+ pleaseSelectType: '请选择工单类型',
+ pleaseSelectPriority: '请选择优先级',
+ confirmModify: '确认修改',
+ confirmDispatch: '确认派单',
+ confirmExecute: '确认执行',
+ confirmComplete: '确认完成',
+ selectReceiver: '选择接收人员',
+ pleaseSelectDispatcher: '请选择派单人员',
+ selectDevice: '选择执行设备',
+ confirmSuspend: '确定挂起?',
+ created: '已创建',
+ inProgress: '执行中',
+ suspended: '已挂起',
+ completed: '已完成',
+ pending: '待处理',
+ high: '高',
+ medium: '中',
+ low: '低',
+ aiSuggestion: 'AI 建议与关联信息',
+ suggestedEquipment: '建议携带',
+ thermalCamera: '红外热像设备',
+ priorityInspect: '优先复检组件',
+ estimatedImpact: '预计影响发电',
+ relatedAlertTrend: '关联告警趋势',
+ relatedAlertList: '关联告警列表',
+ noAlerts7d: '近7天无告警记录',
+ near7Days: '(近 7 天)',
+ highAlarm: '高告警',
+ midAlarm: '中告警',
+ lowAlarm: '低告警',
+ // 工单类型
+ typeInspection: '巡检',
+ typeMaintenance: '检修',
+ typeCleaning: '清洗',
+ typeRepair: '维修',
+ typeOperation: '运维',
+ // 来源
+ sourceAI: 'AI',
+ sourceUAV: '无人机',
+ sourceCleaning: '清洗',
+ sourceVideo: '视频',
+ sourceEquipment: '装备',
+ sourceManual: '人工',
+ sourceAlert: '告警',
+ // 工单类型枚举
+ mowerError: '割草机故障',
+ uavError: '无人机故障',
+ componentDefect: '光伏组件故障',
+ cleanTask: '清洗',
+ maintainTask: '维护',
+ repairTask: '维修',
+ other: '其他',
+ },
+ report: {
+ title: '报表中心',
+ generationReport: '发电量报表',
+ deviceReport: '设备报表',
+ alertReport: '告警报表',
+ workOrderReport: '工单报表',
+ inspectionReport: '巡检报表',
+ cleaningReport: '清洗报表',
+ efficiencyReport: '效率报表',
+ customReport: '自定义报表',
+ daily: '日报',
+ weekly: '周报',
+ monthly: '月报',
+ quarterly: '季报',
+ yearly: '年报',
+ dateRange: '日期范围',
+ generateReport: '生成报表',
+ exportReport: '导出报表',
+ totalGeneration: '总发电量',
+ peakPower: '峰值功率',
+ averagePower: '平均功率',
+ totalAlerts: '告警总数',
+ totalWorkOrders: '工单总数',
+ completionRate: '完成率',
+ averageEfficiency: '平均效率',
+ },
+ systemSetting: {
+ title: '系统设置',
+ basicSettings: '基础设置',
+ userManagement: '用户管理',
+ menuManagement: '菜单管理',
+ organizationManagement: '组织管理',
+ stationManagement: '场站管理',
+ noticePolicy: '通知策略',
+ deviceAccess: '设备接入',
+ dataSafety: '数据与安全',
+ systemMaintenance: '系统维护',
+ onlineUsers: '在线用户',
+ deviceManagement: '设备管理',
+ logManagement: '日志管理',
+ videoManagement: '视频管理',
+ systemName: '系统名称',
+ systemVersion: '系统版本',
+ systemDescription: '系统描述',
+ defaultLanguage: '默认语言',
+ systemLogo: '系统Logo',
+ theme: '主题',
+ light: '浅色',
+ dark: '深色',
+ followSystem: '跟随系统',
+ // 用户管理
+ username: '用户账号',
+ nickname: '用户昵称',
+ phone: '手机号',
+ email: '邮箱',
+ role: '角色',
+ password: '密码',
+ passwordPlaceholder: '不填则不修改',
+ language: '语言',
+ assignRole: '分配角色',
+ gender: '性别',
+ status: '状态',
+ addUser: '新增用户',
+ editUser: '编辑用户',
+ resetPassword: '重置密码',
+ resetPasswordConfirm: '确定将密码重置为 123456 吗?',
+ passwordResetTo: '密码已重置为:123456',
+ chinese: '中文',
+ english: '英语',
+ // 菜单管理
+ menuName: '菜单名称',
+ menuType: '菜单类型',
+ menuPath: '路由地址',
+ menuIcon: '菜单图标',
+ menuSort: '排序',
+ permission: '权限标识',
+ parentMenu: '上级菜单',
+ directory: '目录',
+ menu: '菜单',
+ button: '按钮',
+ // 组织管理
+ orgName: '组织名称',
+ orgType: '组织类型',
+ parentOrg: '上级组织',
+ leader: '负责人',
+ contact: '联系电话',
+ // 场站管理
+ siteName: '场站名称',
+ siteType: '场站类型',
+ siteAddress: '场站地址',
+ siteCapacity: '装机容量',
+ siteStatus: '场站状态',
+ longitude: '经度',
+ latitude: '纬度',
+ timezone: '时区',
+ // 日志管理
+ logType: '日志类型',
+ loginLog: '登录日志',
+ operationLog: '操作日志',
+ errorLog: '错误日志',
+ systemLog: '系统日志',
+ operator: '操作人',
+ operationContent: '操作内容',
+ operationTime: '操作时间',
+ ipAddress: 'IP地址',
+ // 视频管理
+ videoName: '视频名称',
+ videoUrl: '视频地址',
+ videoType: '视频类型',
+ videoStatus: '视频状态',
+ // 系统维护
+ backupDatabase: '备份数据库',
+ clearCache: '清除缓存',
+ systemInfo: '系统信息',
+ diskUsage: '磁盘使用',
+ memoryUsage: '内存使用',
+ cpuUsage: 'CPU使用率',
+ serverStatus: '服务器状态',
+ uptime: '运行时长',
+ // 设备接入
+ accessProtocol: '接入协议',
+ accessStatus: '接入状态',
+ accessTime: '接入时间',
+ snCode: 'SN码',
+ verifyCode: '验证码',
+ bindDevice: '绑定设备',
+ // 错误管理
+ errorCode: '错误编码',
+ errorName: '错误名称',
+ errorSourceLabel: '错误来源',
+ errorLevelLabel: '错误等级',
+ errorDesc: '错误描述',
+ checkField: '校验字段',
+ compareRule: '对比规则',
+ compareValueCol: '对比数值',
+ compareValueLabel: '对比值',
+ rangeMin: '区间最小值',
+ rangeMax: '区间最大值',
+ pleaseInputErrorCode: '请输入错误编码',
+ pleaseInputErrorName: '请输入错误名称',
+ pleaseSelectSource: '请选择来源',
+ pleaseSelectLevel: '请选择等级',
+ pleaseSelectErrorSource: '请选择错误来源',
+ pleaseSelectErrorLevel: '请选择错误等级',
+ pleaseInputCheckField: '请填写校验字段名',
+ pleaseSelectCompareRule: '请选择对比规则',
+ pleaseInputMinValue: '请填写最小值',
+ pleaseInputMaxValue: '请填写最大值',
+ pleaseInputCompareValue: '请填写对比值',
+ errorCodePlaceholder: '例如:ERR-ROBOT-001',
+ checkFieldPlaceholder: '如:battery、speed、temperature',
+ minValuePlaceholder: '最小值',
+ maxValuePlaceholder: '最大值',
+ compareValuePlaceholder: '数值/文本,多个用逗号分隔',
+ errorDescPlaceholder: '详细描述触发该错误的场景',
+ suggestionPlaceholder: '出现该错误后的处理方案',
+ addErrorRule: '新增错误规则',
+ editErrorRule: '编辑错误规则',
+ viewErrorRuleDetail: '查看错误规则详情',
+ confirmDeleteError: '确定要删除错误 "{{name}}" 吗?',
+ getErrorListFailed: '获取错误列表失败',
+ operationFailed: '操作失败',
+ },
+ profile: {
+ title: '个人中心',
+ getProfileFailed: '获取个人信息失败',
+ modifySuccess: '修改成功',
+ modifyFailed: '修改失败',
+ passwordChanged: '密码修改成功',
+ avatarUploadSuccess: '头像上传成功',
+ avatarUploadFailed: '上传失败',
+ passwordMismatch: '两次输入的密码不一致',
+ changeAvatar: '更换头像',
+ username: '用户名称',
+ nickname: '用户昵称',
+ gender: '性别',
+ phone: '手机号码',
+ email: '用户邮箱',
+ role: '所属角色',
+ remark: '备注',
+ oldPassword: '旧密码',
+ newPassword: '新密码',
+ confirmPassword: '确认密码',
+ nicknamePlaceholder: '请输入用户昵称',
+ phonePlaceholder: '请输入手机号码',
+ saveChanges: '保存修改',
+ confirmChange: '确认修改',
+ male: '男',
+ female: '女',
+ notSet: '未设置',
+ },
+ users: {
+ title: '用户管理',
+ addUser: '新增用户',
+ username: '用户账号',
+ nickname: '用户昵称',
+ phone: '手机号',
+ email: '邮箱',
+ role: '角色',
+ status: '状态',
+ actions: '操作',
+ edit: '编辑',
+ delete: '删除',
+ usernameLabel: '用户账号',
+ nicknameLabel: '用户昵称',
+ phoneLabel: '手机号码',
+ passwordLabel: '密码',
+ languageLabel: '语言',
+ assignRoleLabel: '分配角色',
+ statusLabel: '状态',
+ genderLabel: '性别',
+ passwordPlaceholder: '不填则不修改',
+ chinese: '中文',
+ english: '英语',
+ normal: '正常',
+ stopped: '停用',
+ male: '男',
+ female: '女',
+ unknown: '未知',
+ batchDelete: '批量删除(已选 {{count}} 项)',
+ resetPassword: '重置密码',
+ passwordResetTo: '密码已重置为:123456',
+ resetPasswordConfirm: '确定将密码重置为 123456 吗?',
+ },
+ roles: {
+ title: '角色管理',
+ addRole: '新增角色',
+ roleName: '角色名称',
+ roleKey: '权限字符',
+ roleSort: '排序',
+ status: '状态',
+ remark: '备注',
+ actions: '操作',
+ edit: '编辑',
+ delete: '删除',
+ assignPermissions: '分配权限',
+ dataScope: '数据权限',
+ menuPermissions: '菜单权限',
+ roleDescription: '角色描述',
+ normal: '正常',
+ stopped: '停用',
+ },
+ constants: {
+ // 工单类型
+ inspection: '巡检',
+ maintenance: '检修',
+ cleaning: '清洗',
+ repair: '维修',
+ operation: '运维',
+ // 来源
+ sourceAI: 'AI',
+ sourceUAV: '无人机',
+ sourceCleaning: '清洗',
+ sourceVideo: '视频',
+ sourceEquipment: '装备',
+ sourceManual: '人工',
+ sourceAlert: '告警',
+ // 告警类型
+ uavFault: '无人机故障',
+ mowerFault: '割草机故障',
+ otherDeviceFault: '其他设备故障',
+ serverFailure: '服务器故障',
+ systemError: '系统错误',
+ // 告警级别
+ critical: '严重',
+ important: '重要',
+ general: '一般',
+ info: '提示',
+ // 处理状态
+ pending: '待处理',
+ closed: '已关闭',
+ // 错误来源
+ uav: '无人机',
+ mower: '割草机',
+ others: '其他',
+ // 错误等级
+ infoLevel: '信息',
+ warning: '警告',
+ error: '错误',
+ // 告警处理结果
+ handled: '已处理',
+ restored: '已恢复',
+ ignored: '已忽略',
+ unableToHandle: '无法处理',
+ manufacturerHandling: '厂家处理中',
+ falseAlarm: '误报',
+ // 比较操作符
+ eq: '等于',
+ neq: '不等于',
+ gt: '大于',
+ lt: '小于',
+ gte: '大于等于',
+ lte: '小于等于',
+ between: '在之间',
+ notBetween: '不在之间',
+ contain: '包含',
+ notContain: '不包含',
+ // 定位质量
+ locationInvalid: '无效',
+ locationGPS: 'GPS 单点定位',
+ locationDGPS: 'DGPS 伪距差分/SBAS',
+ locationRTKFixed: 'RTK 固定解',
+ locationRTKFloat: 'RTK 浮点解',
+ locationUnknown: '未知',
+ // 导出
+ exportData: '导出数据',
+ // 无
+ none: '无',
+ },
+ router: {
+ overview: '总览首页',
+ devices: '设备管理',
+ video: '在线视频',
+ monitor: '实时监控',
+ alerts: '告警中心',
+ aiAnalysis: 'AI诊断分析',
+ clean: '清洗优化',
+ task: '工单任务',
+ table: '报表中心',
+ systemSetting: '系统设置',
+ log: '日志管理',
+ videoManage: '视频管理',
+ downloads: '视频下载',
+ users: '用户管理',
+ roles: '角色管理',
+ menuList: '菜单管理',
+ organization: '组织管理',
+ station: '场站管理',
+ realtimeMonitor: '实时监控',
+ profile: '个人中心',
+ noticePolicy: '通知策略页面',
+ dataSafety: '数据与安全页面',
+ moduleDeveloping: '模块开发中',
+ pleaseSelectMenu: '请选择菜单',
+ },
+ api: {
+ loginExpired: '登录已过期,请重新登录',
+ networkError: '网络异常,请稍后重试',
+ },
+ weather: {
+ sunny: '晴',
+ cloudy: '多云',
+ overcast: '阴',
+ rainy: '雨',
+ },
+};
+
+export default zh;
diff --git a/src/main.tsx b/src/main.tsx
index 6141ba0..eeafc73 100644
--- a/src/main.tsx
+++ b/src/main.tsx
@@ -4,6 +4,7 @@ import App from './App.tsx';
import { Provider } from 'react-redux';
import { store } from './store/index.ts';
import { App as Appantd } from 'antd';
+import './i18n';
import './index.css';
createRoot(document.getElementById('root')!).render(
@@ -11,9 +12,7 @@ createRoot(document.getElementById('root')!).render(
-
,
-
);
diff --git a/src/pages/AIAnalysis.tsx b/src/pages/AIAnalysis.tsx
index 3059e67..85c39d5 100644
--- a/src/pages/AIAnalysis.tsx
+++ b/src/pages/AIAnalysis.tsx
@@ -11,18 +11,11 @@ import {
SelectOutlined, FireOutlined, WarningOutlined, ExclamationCircleOutlined
} from '@ant-design/icons';
import { Line, Area } from '@ant-design/charts';
+import { useTranslation } from 'react-i18next';
import { UniversalLineChart } from "../components/recharts"
const { Title, Text } = Typography;
-// 模拟数据
-const aiSummaryData = [
- { key: '1', diagnosis: '热斑检测', status: '异常', confidence: '92%', impact: '高', conclusion: '检测到 36 处热斑疑似点' },
- { key: '2', diagnosis: '组串失配', status: '异常', confidence: '90%', impact: '高', conclusion: '8 串组串存在异常' },
- { key: '3', diagnosis: '遮挡风险', status: '轻微', confidence: '78%', impact: '中', conclusion: '局部遮挡影响 2% 发电量' },
- { key: '4', diagnosis: '组件衰减', status: '异常', confidence: '86%', impact: '中', conclusion: '平均衰减率 -5.32%' },
- { key: '5', diagnosis: '逆变器效率异常', status: '正常', confidence: '93%', impact: '低', conclusion: '所有逆变器运行正常' },
-];
const aiRecommendations = [
{ key: '1', measure: '处理热斑组件', priority: '高', expectedGain: '+2.15%', confidence: '92%' },
@@ -137,6 +130,7 @@ const generationPerformanceData = [
export default function AIDiagnosisPage() {
+ const { t } = useTranslation();
const cardStyle = {
borderRadius: 12,
border: '1px solid #f0f0f0',
@@ -146,9 +140,9 @@ export default function AIDiagnosisPage() {
const renderStatusTag = (status: string) => {
let color = '';
- if (status === '异常') color = '#ff4d4f';
+ if (status === t('home.abnormal')) color = '#ff4d4f';
else if (status === '轻微') color = '#1677ff';
- else if (status === '正常') color = '#52c41a';
+ else if (status === t('roles.normal')) color = '#52c41a';
return
{status};
};
@@ -214,7 +208,7 @@ export default function AIDiagnosisPage() {
{ title: '异常组串数量', value: '8', trend: '较昨日 +2 ↑', icon:
, color: '#1D2129', bg: '#F5F7FA', trendColor: '#F53F3F', direction: 'up' },
{ title: '热斑疑似数量', value: '36', trend: '较昨日 +5 ↑', icon:
, color: '#F53F3F', bg: '#FFF1F0', trendColor: '#F53F3F', direction: 'up' },
{ title: '电站健康度评分', value: '86.3', unit: '分', trend: '较昨日 -1.7', icon:
, color: '#00B42A', bg: '#E8FFEA', trendColor: '#F53F3F', direction: 'down' },
- { title: '预测发电量', value: '4,821', unit: 'kWh', trend: '较昨日 +2.6% ↑', icon:
, color: '#165DFF', bg: '#E8F3FF', trendColor: '#00B42A', direction: 'up' },
+ { title: '预测发电量', value: '4,821', unit: t('home.kWh'), trend: '较昨日 +2.6% ↑', icon:
, color: '#165DFF', bg: '#E8F3FF', trendColor: '#00B42A', direction: 'up' },
].map((item, index) => (