From cf117ea396e2a6d1468f7f6fcee65050c527ad2c Mon Sep 17 00:00:00 2001 From: hwj Date: Tue, 17 Mar 2026 15:42:48 +0800 Subject: [PATCH] =?UTF-8?q?style=EF=BC=9ADashboard8=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E9=A1=B5=E9=9D=A2=E4=B8=AD=E8=8B=B1=E6=96=87?= =?UTF-8?q?=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/locales/en.ts | 129 ++++++++++++++++++ src/locales/zh-CN.ts | 129 ++++++++++++++++++ .../report/dashboardPage/dashboard1/index.vue | 9 +- .../dashboard8/components/DashboardHeader.vue | 6 +- .../dashboard8/components/DayCapacity.vue | 66 +++++---- .../dashboard8/components/EnergyTrend.vue | 62 +++++---- .../dashboard8/components/MonthCapacity.vue | 66 +++++---- .../dashboard8/components/OpsTrend.vue | 32 ++++- .../dashboard8/components/QualityTrend.vue | 67 +++++++-- .../dashboard8/components/RealAlarm.vue | 57 ++++---- .../dashboard8/components/TaskBoard.vue | 22 +-- .../dashboard8/components/TodayOps.vue | 21 ++- .../dashboard8/components/WeekTrend.vue | 40 ++++-- 13 files changed, 552 insertions(+), 154 deletions(-) diff --git a/src/locales/en.ts b/src/locales/en.ts index 89223c1e..49818cca 100644 --- a/src/locales/en.ts +++ b/src/locales/en.ts @@ -37,6 +37,7 @@ export default { toolDes: 'Used to set up custom systems', query: 'Query', reset: 'Reset', + noData: 'No data', shrink: 'Put away', expand: 'Expand', confirmTitle: 'System Hint', @@ -59,6 +60,134 @@ export default { copyError: 'Copy Error', code:'Auto-generate on Save' }, + ReportDashboard: { + DashboardList: { + searchNameLabel: 'Name', + searchNamePlaceholder: 'Please enter name', + searchRemarkLabel: 'Remark', + searchRemarkPlaceholder: 'Please enter remark', + searchStateLabel: 'Status', + searchStatePlaceholder: 'Please select status', + + coverAlt: 'Cover image', + stateEnabled: 'Enabled', + stateDisabled: 'Disabled', + noRemark: 'No description', + + dialogCreateTitle: 'Create Dashboard', + dialogEditTitle: 'Edit Dashboard', + dialogNameLabel: 'Name', + dialogNamePlaceholder: 'Please enter name', + dialogTypeLabel: 'Type', + dialogTypePlaceholder: 'Please select type', + dialogOrgLabel: 'Line', + dialogOrgPlaceholder: 'Please select line', + dialogDeviceLabel: 'Device', + dialogDevicePlaceholder: 'Please select device', + dialogPointPlaceholder: 'Please select points', + dialogAddDeviceButton: 'Add device', + dialogContentLabel: 'Content', + dialogContentPlaceholder: 'Please enter content', + dialogRemarkLabel: 'Remark', + dialogRemarkPlaceholder: 'Please enter remark', + dialogStateLabel: 'Status', + + validatorNameRequired: 'Name is required', + validatorTypeRequired: 'Dashboard type is required', + validatorOrgRequired: 'Line is required', + + messageRouteMissing: 'Preview route is not configured', + messageDevicePointRequired: 'Please configure at least one device and point group', + messageMissingId: 'Missing record ID, unable to edit' + } + }, + Dashboard8: { + Header: { + title: 'Smart Manufacturing Line Task Overview', + subTitle: 'INTELLIGENT MANUFACTURING REAL-TIME DASHBOARD' + }, + TaskBoard: { + title: 'Line Task Board', + tag: 'Auto refresh · Scrolling', + statusCompleted: 'Completed', + statusLowProgress: 'Behind', + columns: { + lineName: 'Line', + planNo: 'Plan No.', + productName: 'Product', + planQty: 'Planned', + doneQty: 'Completed', + passRate: 'Pass Rate' + } + }, + DayCapacity: { + title: 'Daily Capacity', + tag: 'Today', + metrics: { + orders: 'Orders', + scheduled: 'Scheduled', + produced: 'Produced', + rate: 'Quality Rate' + }, + chart: { + scheduled: 'Scheduled', + produced: 'Produced' + } + }, + MonthCapacity: { + title: 'Monthly Capacity', + tag: 'This month', + metrics: { + orders: 'Orders', + scheduled: 'Scheduled', + produced: 'Produced', + rate: 'Quality Rate' + }, + chart: { + scheduled: 'Scheduled', + produced: 'Produced' + } + }, + WeekTrend: { + title: 'Weekly Output Trend', + legendOutput: 'Output', + legendPlan: 'Plan', + seriesPlanOutput: 'Planned Output', + seriesActualOutput: 'Actual Output' + }, + OpsTrend: { + title: 'Completed Output', + defaultLine: 'All lines', + yAxisName: 'Completed Output', + seriesName: 'Completed Output', + summary: '{line} · Avg {value}' + }, + TodayOps: { + title: 'Today Power/Utilization', + empty: 'No data', + powerOnRate: 'Power-on Rate', + utilizationRate: 'Utilization' + }, + QualityTrend: { + title: 'Product Quality Trend', + tag: 'Daily (All lines)', + seriesName: 'Pass Rate', + markLineAverage: 'Avg {value}%', + markLineAverageName: 'Average' + }, + RealAlarm: { + title: 'Real-time Alarms', + tag: 'Scrolling', + levelSevere: 'Severe', + levelWarn: 'Warning', + levelInfo: 'Info' + }, + EnergyTrend: { + title: 'Weekly Energy Trend', + selectPlaceholder: 'Please select', + seriesActualEnergy: 'Actual Energy (kWh)' + } + }, ErpStock: { Warehouse: { name: 'Warehouse Name', diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index 7a4b2f9d..a82a3411 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -37,6 +37,7 @@ export default { toolDes: '用于设置定制系统', query: '查询', reset: '重置', + noData: '暂无数据', shrink: '收起', expand: '展开', confirmTitle: '系统提示', @@ -59,6 +60,134 @@ export default { copyError: '复制失败', code: '编码保存后自动生成' }, + ReportDashboard: { + DashboardList: { + searchNameLabel: '名称', + searchNamePlaceholder: '请输入名称', + searchRemarkLabel: '备注', + searchRemarkPlaceholder: '请输入备注', + searchStateLabel: '启用状态', + searchStatePlaceholder: '请选择启用状态', + + coverAlt: '封面图', + stateEnabled: '启用', + stateDisabled: '禁用', + noRemark: '暂无描述', + + dialogCreateTitle: '新增数据大屏', + dialogEditTitle: '编辑数据大屏', + dialogNameLabel: '名称', + dialogNamePlaceholder: '请输入名称', + dialogTypeLabel: '大屏类型', + dialogTypePlaceholder: '请选择大屏类型', + dialogOrgLabel: '产线', + dialogOrgPlaceholder: '请选择产线', + dialogDeviceLabel: '设备', + dialogDevicePlaceholder: '请选择设备', + dialogPointPlaceholder: '请选择点位', + dialogAddDeviceButton: '添加设备', + dialogContentLabel: '内容', + dialogContentPlaceholder: '请输入内容', + dialogRemarkLabel: '备注', + dialogRemarkPlaceholder: '请输入备注', + dialogStateLabel: '启用状态', + + validatorNameRequired: '名称不能为空', + validatorTypeRequired: '大屏类型不能为空', + validatorOrgRequired: '产线不能为空', + + messageRouteMissing: '未配置预览路由', + messageDevicePointRequired: '请至少配置一组设备和点位', + messageMissingId: '缺少数据编号,无法编辑' + } + }, + Dashboard8: { + Header: { + title: '智能制造产线任务总览', + subTitle: '智能制造实时看板' + }, + TaskBoard: { + title: '产线任务看板', + tag: '实时刷新 · 滚动展示', + statusCompleted: '已完成', + statusLowProgress: '进度偏低', + columns: { + lineName: '产线名称', + planNo: '计划单', + productName: '产品名称', + planQty: '计划数量', + doneQty: '完工数量', + passRate: '合格率' + } + }, + DayCapacity: { + title: '日产能达成情况', + tag: '当日维度', + metrics: { + orders: '排产单数量', + scheduled: '已排产数量', + produced: '已生产数量', + rate: '产能合格率' + }, + chart: { + scheduled: '已排产', + produced: '已生产' + } + }, + MonthCapacity: { + title: '月产能达成情况', + tag: '当月累计', + metrics: { + orders: '排产单数量', + scheduled: '已排产数量', + produced: '已生产数量', + rate: '产能合格率' + }, + chart: { + scheduled: '已排产', + produced: '已生产' + } + }, + WeekTrend: { + title: '周生产趋势', + legendOutput: '产量', + legendPlan: '计划', + seriesPlanOutput: '计划产量', + seriesActualOutput: '实际产量' + }, + OpsTrend: { + title: '产能完成数', + defaultLine: '全部产线', + yAxisName: '产能完成数', + seriesName: '产能完成数', + summary: '{line} · 日均完成 {value}' + }, + TodayOps: { + title: '今日开机率/稼动率', + empty: '暂无数据', + powerOnRate: '开机率', + utilizationRate: '稼动率' + }, + QualityTrend: { + title: '成品检合格率趋势图', + tag: '按天统计(全产线)', + seriesName: '合格率', + markLineAverage: '平均 {value}%', + markLineAverageName: '平均值' + }, + RealAlarm: { + title: '实时报警信息', + tag: '滚动展示', + levelSevere: '严重', + levelWarn: '警告', + levelInfo: '提示' + }, + EnergyTrend: { + title: '能耗周趋势', + selectPlaceholder: '请选择', + seriesActualEnergy: '实际能耗(kWh)' + } + }, ErpStock: { Warehouse: { name: '仓库名称', diff --git a/src/views/report/dashboardPage/dashboard1/index.vue b/src/views/report/dashboardPage/dashboard1/index.vue index cc1c845e..7cdee0e0 100644 --- a/src/views/report/dashboardPage/dashboard1/index.vue +++ b/src/views/report/dashboardPage/dashboard1/index.vue @@ -48,7 +48,7 @@
- ID: {{ item.deviceId }} + {{ t('ReportDashboard.Dashboard1.deviceIdPrefix') }}{{ item.deviceId }}
@@ -80,7 +80,7 @@
- ID: {{ item.deviceId }} + {{ t('ReportDashboard.Dashboard1.deviceIdPrefix') }}{{ item.deviceId }}
@@ -128,6 +128,7 @@ import ProductionTrend from './components/ProductionTrend.vue' const route = useRoute() const goviewId = route.query.goviewId as string const orgId = route.query.orgId +const { t } = useI18n() interface DeviceAttribute { attributeName: string @@ -164,7 +165,7 @@ const loadDeviceAttributes = async () => { const cards: DeviceCardData[] = list.map((d: any) => { return { - deviceName: d.deviceName || 'Device', + deviceName: d.deviceName || t('ReportDashboard.Dashboard1.defaultDeviceName'), deviceId: d.deviceId, operatingStatus: d.operatingStatus, attributes: (d.attributes || []).map((attr: any) => ({ @@ -193,7 +194,7 @@ const getDeviceStatusType = (status?: string) => { } const getDeviceStatusText = (status?: string) => { - if (!status) return '离线' + if (!status) return t('ReportDashboard.Dashboard1.statusOffline') return status } diff --git a/src/views/report/dashboardPage/dashboard8/components/DashboardHeader.vue b/src/views/report/dashboardPage/dashboard8/components/DashboardHeader.vue index 9c10a97d..33884766 100644 --- a/src/views/report/dashboardPage/dashboard8/components/DashboardHeader.vue +++ b/src/views/report/dashboardPage/dashboard8/components/DashboardHeader.vue @@ -6,8 +6,8 @@
-
智能制造产线任务总览
-
INTELLIGENT MANUFACTURING REAL-TIME DASHBOARD
+
{{ t('Header.title') }}
+
{{ t('Header.subTitle') }}
@@ -31,8 +31,10 @@