| | |
| | | 新增系统配置=Add System Configuration |
| | | 修改系统配置=Edit System Configuration |
| | | 详情系统配置=System Configuration Details |
| | | |
| | | # Dashboard and device ping pages |
| | | 系统仪表盘=System Dashboard |
| | | 设备网络分析=Device Network Analysis |
| | | 监控画面=Monitoring View |
| | | 监控系统=Monitoring |
| | | 入库任务=Inbound Tasks |
| | | 出库任务=Outbound Tasks |
| | | 执行中=Running |
| | | 待人工=Manual Review |
| | | 已完成=Completed |
| | | 新建=New |
| | | 生成入库任务=Create Inbound Task |
| | | 设备上走=Device Moving Up |
| | | 设备搬运中=Device Handling |
| | | 设备搬运完成=Device Handling Completed |
| | | 入库待人工回滚=Inbound Pending Manual Rollback |
| | | 入库完成=Inbound Completed |
| | | 入库库存更新=Inbound Inventory Updated |
| | | 生成出库任务=Create Outbound Task |
| | | 站点运行中=Station Running |
| | | 站点运行完成=Station Run Completed |
| | | 出库待人工回滚=Outbound Pending Manual Rollback |
| | | 出库完成=Outbound Completed |
| | | 出库库存更新=Outbound Inventory Updated |
| | | 生成移库任务=Create Transfer Task |
| | | 移库待人工回滚=Transfer Pending Manual Rollback |
| | | 移库完成=Transfer Completed |
| | | 输送站点=Conveyor Stations |
| | | 可用=Available |
| | | 已禁用=Disabled |
| | | 超时=Timeout |
| | | 波动=Unstable |
| | | 超时/异常=Timeout/Error |
| | | 未定义状态=Undefined Status |
| | | 全部探测均超时=All probes timed out |
| | | 暂无额外说明=No additional details |
| | | 探测失败=Probe failed |
| | | 请求超时=Request timeout |
| | | 找不到主机=Could not find host |
| | | 无法访问目标主机=Destination host unreachable |
| | | 100.0% 丢失=100.0% packet loss |
| | | regex\:^状态(\d+)$=Status $1 |
| | | regex\:^站点(\d+)$=Station $1 |
| | | regex\:^站点(\d+)\s*/\s*(.+)$=Station $1 / $2 |
| | | regex\:^堆垛机#(\d+)$=Crane #$1 |
| | | regex\:^双工位#(\d+)$=Dual Station #$1 |
| | | regex\:^RGV#(\d+)$=RGV #$1 |
| | | 是否Delete=Deleted |
| | | 租 户=Tenant |
| | | 账 号=Account |
| | |
| | | legacy.regex.stationDeviceLink=Click to remove mapping: Station {0} -> Device {1} |
| | | deviceLogs.visualizationPrefix=Device Logs - |
| | | deviceLogs.downloadDialogTitle=Downloading file |
| | | dashboard.title=System Dashboard |
| | | dashboard.monitorView=Monitoring View |
| | | dashboard.openMonitor=Open Monitoring View |
| | | dashboard.refreshNow=Refresh Now |
| | | dashboard.overviewKicker=Overview |
| | | dashboard.overviewNote=System and refresh cadence |
| | | dashboard.systemStatusLabel=System Status |
| | | dashboard.systemRunning=Running |
| | | dashboard.systemPaused=Paused |
| | | dashboard.systemStatusDesc=Current status of the WCS main service |
| | | dashboard.lastRefreshLabel=Last Refresh |
| | | dashboard.lastRefreshDesc=Time when the latest aggregated data was generated |
| | | dashboard.autoRefreshLabel=Auto Refresh |
| | | dashboard.autoRefreshValue=Refresh in {0}s |
| | | dashboard.autoRefreshDesc=Countdown to the next automatic refresh |
| | | dashboard.coreMetricsKicker=Core Metrics |
| | | dashboard.coreMetricsNote=Tasks, devices, and AI overview |
| | | dashboard.taskTotalLabel=Total Tasks |
| | | dashboard.taskTotalDesc=Running now {0} |
| | | dashboard.deviceOnlineLabel=Online Devices |
| | | dashboard.deviceOnlineDesc=Total {0}, alarms {1} |
| | | dashboard.aiTokenTotalLabel=AI Total Tokens |
| | | dashboard.aiTokenTotalDesc=Aggregated across AI sessions |
| | | dashboard.aiCallTotalLabel=LLM Calls |
| | | dashboard.aiCallTotalDesc=Latest run details are included in the AI section below |
| | | dashboard.taskPanelTitle=Task Overview |
| | | dashboard.taskPanelDesc=Quickly assess current workload pressure by task type, execution stage, and recent flow records. |
| | | dashboard.taskRunningLabel=Running |
| | | dashboard.taskRunningHint=Tasks currently in progress |
| | | dashboard.taskManualLabel=Manual Review |
| | | dashboard.taskManualHint=Requires manual attention or rollback |
| | | dashboard.taskCompletedLabel=Completed |
| | | dashboard.taskCompletedHint=Finished or posted |
| | | dashboard.taskNewLabel=New |
| | | dashboard.taskNewHint=Just entered the dispatch flow |
| | | dashboard.taskDirectionChartTitle=Task Type Distribution |
| | | dashboard.taskStageChartTitle=Task Stage Overview |
| | | dashboard.recentPanelTitle=Recent Tasks |
| | | dashboard.recentPanelDesc=Quickly tell whether tasks are piling up, whether devices have taken over, and where recent tasks are headed. |
| | | dashboard.recentEmpty=No recent tasks |
| | | dashboard.column.workNo=Work No. |
| | | dashboard.column.taskType=Task Type |
| | | dashboard.column.status=Status |
| | | dashboard.column.source=Source |
| | | dashboard.column.target=Target |
| | | dashboard.column.device=Execution Device |
| | | dashboard.column.barcode=Barcode |
| | | dashboard.column.updateTime=Last Updated |
| | | dashboard.aiPanelTitle=AI Activity |
| | | dashboard.aiPanelDesc=Review cumulative AI tokens, LLM call volume, and route availability and cooldown status. |
| | | dashboard.availableRoutesTag=Available routes {0} |
| | | dashboard.aiTokenCardLabel=Total Tokens |
| | | dashboard.aiTokenCardHint=Prompt + Completion |
| | | dashboard.aiAskCountLabel=Conversation Turns |
| | | dashboard.aiAskCountHint=Total AI conversation turns |
| | | dashboard.aiLlmCallLabel=LLM Calls |
| | | dashboard.aiLlmCallHint=Success {0} / Failed {1} |
| | | dashboard.aiSessionCountLabel=Sessions |
| | | dashboard.aiSessionCountHint=Last call {0} |
| | | dashboard.aiRouteChartTitle=AI Route Status |
| | | dashboard.aiRouteDesc=Model {0}, priority {1} |
| | | dashboard.aiRouteResult=Success {0} / Failed {1} |
| | | dashboard.aiRouteLastUsed=Last used {0} |
| | | dashboard.aiRouteEmpty=No AI route data |
| | | dashboard.devicePanelTitle=Device Overview |
| | | dashboard.devicePanelDesc=Summarize the online, busy, and alarm states of conveyor stations, cranes, dual-station cranes, and RGVs. |
| | | dashboard.deviceOnlineRate=Online rate {0} |
| | | dashboard.deviceTotalLabel=Total Devices |
| | | dashboard.deviceTotalHint=Enabled configured devices |
| | | dashboard.deviceOnlineCardLabel=Online Devices |
| | | dashboard.deviceOnlineCardHint=Devices currently reachable |
| | | dashboard.deviceBusyLabel=Busy Devices |
| | | dashboard.deviceBusyHint=Devices currently carrying tasks |
| | | dashboard.deviceAlarmLabel=Alarm Devices |
| | | dashboard.deviceAlarmHint=Devices with blockage or alarm status |
| | | dashboard.deviceTypeChartTitle=Device Online Distribution |
| | | dashboard.deviceTypeDesc=Online {0} / Total {1}, offline {2} |
| | | dashboard.deviceBusyTag=Busy {0} |
| | | dashboard.deviceAlarmTag=Alarm {0} |
| | | dashboard.networkPanelDesc=Summarize connectivity, latency, and abnormal devices from the latest ping samples to quickly spot network fluctuations. |
| | | dashboard.networkAttentionTag=Attention {0} |
| | | dashboard.networkViewDetail=View Details |
| | | dashboard.networkOkLabel=Normal |
| | | dashboard.networkOkHint=Latest sample status is OK |
| | | dashboard.networkUnstableLabel=Unstable |
| | | dashboard.networkUnstableHint=Some probes succeeded |
| | | dashboard.networkOfflineLabel=Timeout/Error |
| | | dashboard.networkNoDataLabel=No Data |
| | | dashboard.networkNoDataHint=No data {0} |
| | | dashboard.networkAvgLatencyLabel=Average Latency |
| | | dashboard.networkPeakLatencyHint=Peak {0} |
| | | dashboard.networkStatusChartTitle=Connectivity Status Distribution |
| | | dashboard.networkAvgLatencyTag=Avg {0} |
| | | dashboard.networkLatestSampleTag=Latest sample {0} |
| | | dashboard.networkHealthyTitle=Network probing is stable |
| | | dashboard.networkHealthyDesc={0} devices are included, and no timeouts or fluctuations were found in the latest round. |
| | | dashboard.networkHealthyOk=Normal {0} |
| | | dashboard.networkHealthyAvg=Avg {0} |
| | | dashboard.networkHealthyPeak=Peak {0} |
| | | dashboard.networkEmpty=No device network samples |
| | | dashboard.loadingTitle=Loading dashboard |
| | | dashboard.loadingDesc=Aggregating task, device, and AI runtime data. Please wait... |
| | | dashboard.loadFailed=Failed to load dashboard data |
| | | dashboard.loadFailedDetail=Failed to load dashboard data. Please check the API status. |
| | | dashboard.deviceOnlineLegend=Online |
| | | dashboard.deviceOfflineLegend=Offline |
| | | dashboard.chartCenter.availableRoutes=Available Routes |
| | | dashboard.chartCenter.attentionDevices=Devices Requiring Attention |
| | | dashboard.systemDefaultPacketSize=System Default |
| | | dashboard.networkSampling=Sampling {0} ms / Timeout {1} ms / {2} probes per sample / Packet size {3} |
| | | dashboard.taskDirectionInbound=Inbound Tasks |
| | | dashboard.taskDirectionOutbound=Outbound Tasks |
| | | dashboard.taskDirectionMove=Transfer Tasks |
| | | dashboard.aiRouteStatusAvailable=Available |
| | | dashboard.aiRouteStatusCooling=Cooling |
| | | dashboard.aiRouteStatusDisabled=Disabled |
| | | devicePingLog.title=Device Network Analysis |
| | | devicePingLog.pageMeta=Packet size {0}, {1} |
| | | devicePingLog.summary.totalDevices=Total Devices |
| | | devicePingLog.summary.totalDevicesHint=Devices with configured IPs |
| | | devicePingLog.summary.ok=Normal |
| | | devicePingLog.summary.okHint=Latest sample status is OK |
| | | devicePingLog.summary.unstable=Unstable |
| | | devicePingLog.summary.unstableHint=Some probes succeeded |
| | | devicePingLog.summary.offline=Timeout/Error |
| | | devicePingLog.summary.offlineHint=Latest sample is unreachable |
| | | devicePingLog.summary.noData=No Data |
| | | devicePingLog.summary.noDataHint=No persisted samples yet |
| | | devicePingLog.summary.avgLatency=Overall Average Latency |
| | | devicePingLog.summary.peakLatency=Peak {0} |
| | | devicePingLog.overviewTitle=Device Overview |
| | | devicePingLog.refresh=Refresh |
| | | devicePingLog.filter.deviceType=Device Type |
| | | devicePingLog.filter.all=All |
| | | devicePingLog.filter.keyword=Keyword |
| | | devicePingLog.filter.keywordPlaceholder=Device No. / IP |
| | | devicePingLog.overviewCount=Overview devices {0} |
| | | devicePingLog.column.device=Device |
| | | devicePingLog.column.status=Status |
| | | devicePingLog.column.successRate=Success Rate |
| | | devicePingLog.column.avg=Avg |
| | | devicePingLog.column.min=Min |
| | | devicePingLog.column.max=Max |
| | | devicePingLog.column.updateTime=Updated At |
| | | devicePingLog.column.message=Message |
| | | devicePingLog.column.action=Action |
| | | devicePingLog.viewDetail=View Details |
| | | devicePingLog.detailTitle=Device Details |
| | | devicePingLog.detailEmpty=Select a device from the overview above to inspect second-level details. |
| | | devicePingLog.filter.timeRange=Time Range |
| | | devicePingLog.filter.rangeSeparator=to |
| | | devicePingLog.filter.start=Start |
| | | devicePingLog.filter.end=End |
| | | devicePingLog.quickRange.30m=30 min |
| | | devicePingLog.quickRange.1h=1 hr |
| | | devicePingLog.quickRange.6h=6 hr |
| | | devicePingLog.query=Query |
| | | devicePingLog.detail.status=Status |
| | | devicePingLog.detail.packetSize=Packet Size |
| | | devicePingLog.detail.successRate=Success Rate |
| | | devicePingLog.detail.avg=Avg |
| | | devicePingLog.detail.min=Min |
| | | devicePingLog.detail.max=Max |
| | | devicePingLog.chart.latencyTitle=Latency |
| | | devicePingLog.chart.empty=No second-level samples in the current range |
| | | devicePingLog.chart.availabilityTitle=Success Rate / Fail Count |
| | | devicePingLog.alertColumn.time=Time |
| | | devicePingLog.alertColumn.status=Status |
| | | devicePingLog.alertColumn.message=Message |
| | | devicePingLog.samplingConfigText=Sampling {0} ms / Timeout {1} ms / {2} probes per sample |
| | | devicePingLog.optionsLoadFailed=Failed to load device configuration |
| | | devicePingLog.overviewLoadFailed=Failed to load overview data |
| | | devicePingLog.selectTimeRange=Please select a time range |
| | | devicePingLog.invalidDevice=Invalid device information |
| | | devicePingLog.detailLoadFailed=Failed to load device details |
| | | devicePingLog.chart.latency.avg=Avg |
| | | devicePingLog.chart.latency.min=Min |
| | | devicePingLog.chart.latency.max=Max |
| | | devicePingLog.chart.availability.failAxis=Failures |
| | | devicePingLog.chart.availability.successRateAxis=Success Rate % |
| | | devicePingLog.chart.availability.failCount=Fail Count |
| | | devicePingLog.chart.availability.successRate=Success Rate |
| | | devicePingLog.systemDefaultPacketSize=System Default |
| | | devicePingLog.status.ok=Normal |
| | | devicePingLog.status.unstable=Unstable |
| | | devicePingLog.status.timeout=Timeout |
| | | devicePingLog.status.error=Error |
| | | devicePingLog.status.noData=No Data |
| | | llm.logsTitle=LLM Call Logs |
| | | llm.logDetailTitle=Log Details |
| | | llm.logDetailPrefix=Log Details - |
| | |
| | | 新增系统配置=新增系统配置 |
| | | 修改系统配置=修改系统配置 |
| | | 详情系统配置=详情系统配置 |
| | | |
| | | # Dashboard and device ping pages |
| | | 系统仪表盘=系统仪表盘 |
| | | 设备网络分析=设备网络分析 |
| | | 监控画面=监控画面 |
| | | 监控系统=监控系统 |
| | | 入库任务=入库任务 |
| | | 出库任务=出库任务 |
| | | 移库任务=移库任务 |
| | | 执行中=执行中 |
| | | 待人工=待人工 |
| | | 已完成=已完成 |
| | | 新建=新建 |
| | | 生成入库任务=生成入库任务 |
| | | 设备上走=设备上走 |
| | | 设备搬运中=设备搬运中 |
| | | 设备搬运完成=设备搬运完成 |
| | | 入库待人工回滚=入库待人工回滚 |
| | | 入库完成=入库完成 |
| | | 入库库存更新=入库库存更新 |
| | | 生成出库任务=生成出库任务 |
| | | 站点运行中=站点运行中 |
| | | 站点运行完成=站点运行完成 |
| | | 出库待人工回滚=出库待人工回滚 |
| | | 出库完成=出库完成 |
| | | 出库库存更新=出库库存更新 |
| | | 生成移库任务=生成移库任务 |
| | | 移库待人工回滚=移库待人工回滚 |
| | | 移库完成=移库完成 |
| | | 输送站点=输送站点 |
| | | 可用=可用 |
| | | 已禁用=已禁用 |
| | | 超时=超时 |
| | | 波动=波动 |
| | | 超时/异常=超时/异常 |
| | | 未定义状态=未定义状态 |
| | | 全部探测均超时=全部探测均超时 |
| | | 暂无额外说明=暂无额外说明 |
| | | 探测失败=探测失败 |
| | | 请求超时=请求超时 |
| | | 找不到主机=找不到主机 |
| | | 无法访问目标主机=无法访问目标主机 |
| | | 100.0% 丢失=100.0% 丢失 |
| | | regex\:^状态(\d+)$=状态$1 |
| | | regex\:^站点(\d+)$=站点$1 |
| | | regex\:^站点(\d+)\s*/\s*(.+)$=站点$1 / $2 |
| | | regex\:^堆垛机#(\d+)$=堆垛机#$1 |
| | | regex\:^双工位#(\d+)$=双工位#$1 |
| | | regex\:^RGV#(\d+)$=RGV#$1 |
| | |
| | | legacy.regex.stationDeviceLink=点击删除关联: 站点 {0} -> 设备 {1} |
| | | deviceLogs.visualizationPrefix=日志可视化 - |
| | | deviceLogs.downloadDialogTitle=文件下载中 |
| | | dashboard.title=系统仪表盘 |
| | | dashboard.monitorView=监控画面 |
| | | dashboard.openMonitor=打开监控画面 |
| | | dashboard.refreshNow=立即刷新 |
| | | dashboard.overviewKicker=状态概览 |
| | | dashboard.overviewNote=系统与刷新节奏 |
| | | dashboard.systemStatusLabel=系统状态 |
| | | dashboard.systemRunning=运行中 |
| | | dashboard.systemPaused=已暂停 |
| | | dashboard.systemStatusDesc=WCS 主服务当前状态 |
| | | dashboard.lastRefreshLabel=最近刷新 |
| | | dashboard.lastRefreshDesc=最近一次聚合数据生成时间 |
| | | dashboard.autoRefreshLabel=自动刷新 |
| | | dashboard.autoRefreshValue={0}s 后刷新 |
| | | dashboard.autoRefreshDesc=页面自动更新倒计时 |
| | | dashboard.coreMetricsKicker=核心指标 |
| | | dashboard.coreMetricsNote=任务、设备与 AI 总览 |
| | | dashboard.taskTotalLabel=任务总数 |
| | | dashboard.taskTotalDesc=当前执行中 {0} |
| | | dashboard.deviceOnlineLabel=在线设备 |
| | | dashboard.deviceOnlineDesc=总设备 {0},告警 {1} |
| | | dashboard.aiTokenTotalLabel=AI 累计 Tokens |
| | | dashboard.aiTokenTotalDesc=按 AI 会话累计统计 |
| | | dashboard.aiCallTotalLabel=LLM 调用次数 |
| | | dashboard.aiCallTotalDesc=最近一轮运行情况已纳入下方 AI 区域 |
| | | dashboard.taskPanelTitle=任务态势 |
| | | dashboard.taskPanelDesc=从任务类型、执行阶段和最近流转记录快速判断当前作业压力。 |
| | | dashboard.taskRunningLabel=执行中 |
| | | dashboard.taskRunningHint=当前正在流转的任务 |
| | | dashboard.taskManualLabel=待人工 |
| | | dashboard.taskManualHint=需人工关注或回滚 |
| | | dashboard.taskCompletedLabel=已完成 |
| | | dashboard.taskCompletedHint=已经完成或落账 |
| | | dashboard.taskNewLabel=新建 |
| | | dashboard.taskNewHint=刚进入调度流程 |
| | | dashboard.taskDirectionChartTitle=任务类型分布 |
| | | dashboard.taskStageChartTitle=任务阶段概览 |
| | | dashboard.recentPanelTitle=最近任务 |
| | | dashboard.recentPanelDesc=帮助快速判断任务是否堆积、是否被设备接手,以及最近的任务目标位置。 |
| | | dashboard.recentEmpty=暂无任务记录 |
| | | dashboard.column.workNo=任务号 |
| | | dashboard.column.taskType=任务类型 |
| | | dashboard.column.status=状态 |
| | | dashboard.column.source=来源 |
| | | dashboard.column.target=目标 |
| | | dashboard.column.device=执行设备 |
| | | dashboard.column.barcode=条码 |
| | | dashboard.column.updateTime=最近更新时间 |
| | | dashboard.aiPanelTitle=AI 运行情况 |
| | | dashboard.aiPanelDesc=查看 AI 会话累计 Tokens、LLM 调用量,以及路由的可用与冷却状态。 |
| | | dashboard.availableRoutesTag=可用路由 {0} |
| | | dashboard.aiTokenCardLabel=累计 Tokens |
| | | dashboard.aiTokenCardHint=Prompt + Completion |
| | | dashboard.aiAskCountLabel=提问轮次 |
| | | dashboard.aiAskCountHint=AI 对话累计轮次 |
| | | dashboard.aiLlmCallLabel=LLM 调用 |
| | | dashboard.aiLlmCallHint=成功 {0} / 失败 {1} |
| | | dashboard.aiSessionCountLabel=会话数 |
| | | dashboard.aiSessionCountHint=最近调用 {0} |
| | | dashboard.aiRouteChartTitle=AI 路由状态 |
| | | dashboard.aiRouteDesc=模型 {0},优先级 {1} |
| | | dashboard.aiRouteResult=成功 {0} / 失败 {1} |
| | | dashboard.aiRouteLastUsed=最近使用 {0} |
| | | dashboard.aiRouteEmpty=暂无 AI 路由数据 |
| | | dashboard.devicePanelTitle=设备态势 |
| | | dashboard.devicePanelDesc=汇总输送站点、堆垛机、双工位堆垛机与 RGV 的在线、忙碌和告警情况。 |
| | | dashboard.deviceOnlineRate=在线率 {0} |
| | | dashboard.deviceTotalLabel=设备总数 |
| | | dashboard.deviceTotalHint=已启用配置设备 |
| | | dashboard.deviceOnlineCardLabel=在线设备 |
| | | dashboard.deviceOnlineCardHint=实时连通设备数量 |
| | | dashboard.deviceBusyLabel=忙碌设备 |
| | | dashboard.deviceBusyHint=当前承载任务的设备 |
| | | dashboard.deviceAlarmLabel=告警设备 |
| | | dashboard.deviceAlarmHint=含阻塞或报警状态 |
| | | dashboard.deviceTypeChartTitle=设备在线分布 |
| | | dashboard.deviceTypeDesc=在线 {0} / 总数 {1},离线 {2} |
| | | dashboard.deviceBusyTag=忙碌 {0} |
| | | dashboard.deviceAlarmTag=告警 {0} |
| | | dashboard.networkPanelDesc=汇总最新 Ping 样本的连通性、延迟与异常设备,帮助快速发现网络波动。 |
| | | dashboard.networkAttentionTag=需关注 {0} |
| | | dashboard.networkViewDetail=查看明细 |
| | | dashboard.networkOkLabel=正常 |
| | | dashboard.networkOkHint=最新样本状态 OK |
| | | dashboard.networkUnstableLabel=波动 |
| | | dashboard.networkUnstableHint=部分探测成功 |
| | | dashboard.networkOfflineLabel=超时/异常 |
| | | dashboard.networkNoDataLabel=暂无数据 |
| | | dashboard.networkNoDataHint=暂无数据 {0} |
| | | dashboard.networkAvgLatencyLabel=平均延迟 |
| | | dashboard.networkPeakLatencyHint=峰值 {0} |
| | | dashboard.networkStatusChartTitle=连通状态分布 |
| | | dashboard.networkAvgLatencyTag=平均 {0} |
| | | dashboard.networkLatestSampleTag=最近样本 {0} |
| | | dashboard.networkHealthyTitle=当前网络探测稳定 |
| | | dashboard.networkHealthyDesc=已纳入 {0} 台设备,最近一轮未发现超时或波动。 |
| | | dashboard.networkHealthyOk=正常 {0} |
| | | dashboard.networkHealthyAvg=平均 {0} |
| | | dashboard.networkHealthyPeak=峰值 {0} |
| | | dashboard.networkEmpty=暂无设备网络样本 |
| | | dashboard.loadingTitle=正在加载仪表盘 |
| | | dashboard.loadingDesc=汇总任务、设备与 AI 运行数据,请稍候... |
| | | dashboard.loadFailed=仪表盘数据加载失败 |
| | | dashboard.loadFailedDetail=仪表盘数据加载失败,请检查接口状态 |
| | | dashboard.deviceOnlineLegend=在线 |
| | | dashboard.deviceOfflineLegend=离线 |
| | | dashboard.chartCenter.availableRoutes=可用路由 |
| | | dashboard.chartCenter.attentionDevices=需关注设备 |
| | | dashboard.systemDefaultPacketSize=系统默认 |
| | | dashboard.networkSampling=采样 {0} ms / 超时 {1} ms / 每样本 {2} 次 / 包大小 {3} |
| | | dashboard.taskDirectionInbound=入库任务 |
| | | dashboard.taskDirectionOutbound=出库任务 |
| | | dashboard.taskDirectionMove=移库任务 |
| | | dashboard.aiRouteStatusAvailable=可用 |
| | | dashboard.aiRouteStatusCooling=冷却中 |
| | | dashboard.aiRouteStatusDisabled=已禁用 |
| | | devicePingLog.title=设备网络分析 |
| | | devicePingLog.pageMeta=包大小 {0},{1} |
| | | devicePingLog.summary.totalDevices=设备总数 |
| | | devicePingLog.summary.totalDevicesHint=已配置 IP 的设备 |
| | | devicePingLog.summary.ok=正常 |
| | | devicePingLog.summary.okHint=最近样本状态 OK |
| | | devicePingLog.summary.unstable=波动 |
| | | devicePingLog.summary.unstableHint=部分探测成功 |
| | | devicePingLog.summary.offline=超时/异常 |
| | | devicePingLog.summary.offlineHint=最近样本不可达 |
| | | devicePingLog.summary.noData=暂无数据 |
| | | devicePingLog.summary.noDataHint=还没有落盘样本 |
| | | devicePingLog.summary.avgLatency=整体平均延迟 |
| | | devicePingLog.summary.peakLatency=峰值 {0} |
| | | devicePingLog.overviewTitle=设备总览 |
| | | devicePingLog.refresh=刷新 |
| | | devicePingLog.filter.deviceType=设备类型 |
| | | devicePingLog.filter.all=全部 |
| | | devicePingLog.filter.keyword=关键字 |
| | | devicePingLog.filter.keywordPlaceholder=设备号 / IP |
| | | devicePingLog.overviewCount=总览设备 {0} 台 |
| | | devicePingLog.column.device=设备 |
| | | devicePingLog.column.status=状态 |
| | | devicePingLog.column.successRate=成功率 |
| | | devicePingLog.column.avg=平均 |
| | | devicePingLog.column.min=最小 |
| | | devicePingLog.column.max=最大 |
| | | devicePingLog.column.updateTime=更新时间 |
| | | devicePingLog.column.message=说明 |
| | | devicePingLog.column.action=操作 |
| | | devicePingLog.viewDetail=查看详情 |
| | | devicePingLog.detailTitle=设备详情 |
| | | devicePingLog.detailEmpty=从上方设备总览选择一台设备查看秒级明细 |
| | | devicePingLog.filter.timeRange=时间范围 |
| | | devicePingLog.filter.rangeSeparator=至 |
| | | devicePingLog.filter.start=开始 |
| | | devicePingLog.filter.end=结束 |
| | | devicePingLog.quickRange.30m=30 分钟 |
| | | devicePingLog.quickRange.1h=1 小时 |
| | | devicePingLog.quickRange.6h=6 小时 |
| | | devicePingLog.query=查询 |
| | | devicePingLog.detail.status=状态 |
| | | devicePingLog.detail.packetSize=包大小 |
| | | devicePingLog.detail.successRate=成功率 |
| | | devicePingLog.detail.avg=平均 |
| | | devicePingLog.detail.min=最小 |
| | | devicePingLog.detail.max=最大 |
| | | devicePingLog.chart.latencyTitle=延迟 |
| | | devicePingLog.chart.empty=当前范围暂无秒级样本 |
| | | devicePingLog.chart.availabilityTitle=成功率 / 失败次数 |
| | | devicePingLog.alertColumn.time=时间 |
| | | devicePingLog.alertColumn.status=状态 |
| | | devicePingLog.alertColumn.message=说明 |
| | | devicePingLog.samplingConfigText=采样 {0} ms / 超时 {1} ms / 每样本 {2} 次 |
| | | devicePingLog.optionsLoadFailed=设备配置加载失败 |
| | | devicePingLog.overviewLoadFailed=总览数据加载失败 |
| | | devicePingLog.selectTimeRange=请选择时间范围 |
| | | devicePingLog.invalidDevice=设备信息无效 |
| | | devicePingLog.detailLoadFailed=设备详情加载失败 |
| | | devicePingLog.chart.latency.avg=平均 |
| | | devicePingLog.chart.latency.min=最小 |
| | | devicePingLog.chart.latency.max=最大 |
| | | devicePingLog.chart.availability.failAxis=失败 |
| | | devicePingLog.chart.availability.successRateAxis=成功率% |
| | | devicePingLog.chart.availability.failCount=失败次数 |
| | | devicePingLog.chart.availability.successRate=成功率 |
| | | devicePingLog.systemDefaultPacketSize=系统默认 |
| | | devicePingLog.status.ok=正常 |
| | | devicePingLog.status.unstable=波动 |
| | | devicePingLog.status.timeout=超时 |
| | | devicePingLog.status.error=异常 |
| | | devicePingLog.status.noData=暂无数据 |
| | | llm.logsTitle=LLM调用日志 |
| | | llm.logDetailTitle=日志详情 |
| | | llm.logDetailPrefix=日志详情 - |
| | |
| | | el: "#app", |
| | | data: function () { |
| | | return { |
| | | rawPayload: null, |
| | | loading: true, |
| | | refreshing: false, |
| | | countdown: REFRESH_SECONDS, |
| | |
| | | }, |
| | | mounted: function () { |
| | | var self = this; |
| | | this.refreshDocumentTitle(); |
| | | if (window.WCS_I18N && typeof window.WCS_I18N.onReady === "function") { |
| | | window.WCS_I18N.onReady(function () { |
| | | self.refreshLocalizedState(); |
| | | }); |
| | | } |
| | | this.$nextTick(function () { |
| | | self.initCharts(); |
| | | self.loadDashboard(false); |
| | |
| | | this.disposeCharts(); |
| | | }, |
| | | methods: { |
| | | formatMessage: function (text, params) { |
| | | var list = Array.isArray(params) ? params : [params]; |
| | | return String(text == null ? "" : text).replace(/\{(\d+)\}/g, function (match, index) { |
| | | return list[index] == null ? "" : list[index]; |
| | | }); |
| | | }, |
| | | i18n: function (key, fallback, params) { |
| | | if (window.WCS_I18N && typeof window.WCS_I18N.t === "function") { |
| | | var translated = window.WCS_I18N.t(key, params); |
| | | if (translated && translated !== key) { |
| | | return translated; |
| | | } |
| | | } |
| | | return this.formatMessage(fallback || key, params); |
| | | }, |
| | | translateLegacyText: function (text) { |
| | | if (text == null || text === "") { |
| | | return text; |
| | | } |
| | | if (window.WCS_I18N && typeof window.WCS_I18N.tl === "function") { |
| | | return window.WCS_I18N.tl(String(text)); |
| | | } |
| | | return text; |
| | | }, |
| | | getCurrentLocale: function () { |
| | | if (window.WCS_I18N && typeof window.WCS_I18N.getLocale === "function") { |
| | | return window.WCS_I18N.getLocale(); |
| | | } |
| | | return "zh-CN"; |
| | | }, |
| | | refreshDocumentTitle: function () { |
| | | document.title = this.i18n("dashboard.title", "系统仪表盘"); |
| | | }, |
| | | refreshLocalizedState: function () { |
| | | this.refreshDocumentTitle(); |
| | | if (this.rawPayload) { |
| | | this.applyData(this.rawPayload); |
| | | return; |
| | | } |
| | | this.$forceUpdate(); |
| | | this.updateCharts(); |
| | | }, |
| | | loadDashboard: function (manual) { |
| | | var self = this; |
| | | if (this.refreshing) { |
| | |
| | | self.countdown = REFRESH_SECONDS; |
| | | return; |
| | | } |
| | | self.$message.error((res && res.msg) || "仪表盘数据加载失败"); |
| | | self.$message.error((res && res.msg) || self.i18n("dashboard.loadFailed", "仪表盘数据加载失败")); |
| | | }, |
| | | error: function () { |
| | | if (manual) { |
| | | self.$message.error("仪表盘数据加载失败,请检查接口状态"); |
| | | self.$message.error(self.i18n("dashboard.loadFailedDetail", "仪表盘数据加载失败,请检查接口状态")); |
| | | } |
| | | }, |
| | | complete: function () { |
| | |
| | | }); |
| | | }, |
| | | applyData: function (payload) { |
| | | this.overview = payload.overview || this.overview; |
| | | this.tasks = payload.tasks || this.tasks; |
| | | this.devices = payload.devices || this.devices; |
| | | this.network = payload.network || this.network; |
| | | this.ai = payload.ai || this.ai; |
| | | var tasks = payload && payload.tasks ? payload.tasks : {}; |
| | | var devices = payload && payload.devices ? payload.devices : {}; |
| | | var network = payload && payload.network ? payload.network : {}; |
| | | var ai = payload && payload.ai ? payload.ai : {}; |
| | | |
| | | this.rawPayload = payload || {}; |
| | | this.refreshDocumentTitle(); |
| | | this.overview = payload && payload.overview ? payload.overview : this.overview; |
| | | this.tasks = { |
| | | overview: tasks.overview || this.tasks.overview, |
| | | directionStats: this.normalizeTaskDirectionMetrics(tasks.directionStats), |
| | | stageStats: this.normalizeTaskStageMetrics(tasks.stageStats), |
| | | statusStats: this.normalizeMetricList(tasks.statusStats), |
| | | recentTasks: this.normalizeRecentTasks(tasks.recentTasks) |
| | | }; |
| | | this.devices = { |
| | | overview: devices.overview || this.devices.overview, |
| | | typeStats: this.normalizeDeviceTypeStats(devices.typeStats) |
| | | }; |
| | | this.network = { |
| | | overview: network.overview || this.network.overview, |
| | | samplingConfig: network.samplingConfig || this.network.samplingConfig, |
| | | statusStats: this.normalizeNetworkStatusMetrics(network.statusStats), |
| | | focusDevices: this.normalizeFocusDevices(network.focusDevices) |
| | | }; |
| | | this.ai = { |
| | | overview: ai.overview || this.ai.overview, |
| | | routeStats: this.normalizeAiRouteStats(ai.routeStats), |
| | | routeList: this.normalizeAiRouteList(ai.routeList) |
| | | }; |
| | | this.updateCharts(); |
| | | }, |
| | | normalizeTaskDirectionMetrics: function (list) { |
| | | var self = this; |
| | | return cloneMetricList(list).map(function (item) { |
| | | var result = Object.assign({}, item); |
| | | if (item && item.name === "入库任务") { |
| | | result.name = self.i18n("dashboard.taskDirectionInbound", "入库任务"); |
| | | } else if (item && item.name === "出库任务") { |
| | | result.name = self.i18n("dashboard.taskDirectionOutbound", "出库任务"); |
| | | } else if (item && item.name === "移库任务") { |
| | | result.name = self.i18n("dashboard.taskDirectionMove", "移库任务"); |
| | | } else { |
| | | result.name = self.translateLegacyText(item && item.name); |
| | | } |
| | | return result; |
| | | }); |
| | | }, |
| | | normalizeTaskStageMetrics: function (list) { |
| | | var self = this; |
| | | return cloneMetricList(list).map(function (item) { |
| | | var result = Object.assign({}, item); |
| | | if (item && item.name === "执行中") { |
| | | result.name = self.i18n("dashboard.taskRunningLabel", "执行中"); |
| | | } else if (item && item.name === "待人工") { |
| | | result.name = self.i18n("dashboard.taskManualLabel", "待人工"); |
| | | } else if (item && item.name === "已完成") { |
| | | result.name = self.i18n("dashboard.taskCompletedLabel", "已完成"); |
| | | } else if (item && item.name === "新建") { |
| | | result.name = self.i18n("dashboard.taskNewLabel", "新建"); |
| | | } else { |
| | | result.name = self.translateLegacyText(item && item.name); |
| | | } |
| | | return result; |
| | | }); |
| | | }, |
| | | normalizeMetricList: function (list) { |
| | | var self = this; |
| | | return cloneMetricList(list).map(function (item) { |
| | | var result = Object.assign({}, item); |
| | | result.name = self.translateLegacyText(item && item.name); |
| | | return result; |
| | | }); |
| | | }, |
| | | normalizeRecentTasks: function (list) { |
| | | var self = this; |
| | | return cloneMetricList(list).map(function (item) { |
| | | var result = Object.assign({}, item); |
| | | result.taskType = self.translateLegacyText(item && item.taskType); |
| | | result.status = self.translateLegacyText(item && item.status); |
| | | result.source = self.translateLegacyText(item && item.source); |
| | | result.target = self.translateLegacyText(item && item.target); |
| | | result.device = self.translateLegacyText(item && item.device); |
| | | return result; |
| | | }); |
| | | }, |
| | | normalizeAiRouteStats: function (list) { |
| | | var self = this; |
| | | return cloneMetricList(list).map(function (item) { |
| | | var result = Object.assign({}, item); |
| | | if (item && item.name === "可用") { |
| | | result.name = self.i18n("dashboard.aiRouteStatusAvailable", "可用"); |
| | | } else if (item && item.name === "冷却中") { |
| | | result.name = self.i18n("dashboard.aiRouteStatusCooling", "冷却中"); |
| | | } else if (item && item.name === "已禁用") { |
| | | result.name = self.i18n("dashboard.aiRouteStatusDisabled", "已禁用"); |
| | | } else { |
| | | result.name = self.translateLegacyText(item && item.name); |
| | | } |
| | | return result; |
| | | }); |
| | | }, |
| | | normalizeNetworkStatusMetrics: function (list) { |
| | | var self = this; |
| | | return cloneMetricList(list).map(function (item) { |
| | | var result = Object.assign({}, item); |
| | | if (item && item.name === "正常") { |
| | | result.name = self.i18n("dashboard.networkOkLabel", "正常"); |
| | | } else if (item && item.name === "波动") { |
| | | result.name = self.i18n("dashboard.networkUnstableLabel", "波动"); |
| | | } else if (item && item.name === "超时/异常") { |
| | | result.name = self.i18n("dashboard.networkOfflineLabel", "超时/异常"); |
| | | } else if (item && item.name === "暂无数据") { |
| | | result.name = self.i18n("dashboard.networkNoDataLabel", "暂无数据"); |
| | | } else { |
| | | result.name = self.translateLegacyText(item && item.name); |
| | | } |
| | | return result; |
| | | }); |
| | | }, |
| | | normalizeDeviceTypeStats: function (list) { |
| | | var self = this; |
| | | return cloneMetricList(list).map(function (item) { |
| | | var result = Object.assign({}, item); |
| | | result.name = self.translateLegacyText(item && item.name); |
| | | return result; |
| | | }); |
| | | }, |
| | | normalizeAiRouteList: function (list) { |
| | | var self = this; |
| | | return cloneMetricList(list).map(function (item) { |
| | | var result = Object.assign({}, item); |
| | | if (result.statusType === "success") { |
| | | result.statusText = self.i18n("dashboard.aiRouteStatusAvailable", "可用"); |
| | | } else if (result.statusType === "warning") { |
| | | result.statusText = self.i18n("dashboard.aiRouteStatusCooling", "冷却中"); |
| | | } else { |
| | | result.statusText = self.i18n("dashboard.aiRouteStatusDisabled", "已禁用"); |
| | | } |
| | | result.lastError = self.translateLegacyText(item && item.lastError); |
| | | return result; |
| | | }); |
| | | }, |
| | | normalizeFocusDevices: function (list) { |
| | | var self = this; |
| | | return cloneMetricList(list).map(function (item) { |
| | | var result = Object.assign({}, item); |
| | | if (result.statusType === "success") { |
| | | result.statusText = self.i18n("dashboard.networkOkLabel", "正常"); |
| | | } else if (result.statusType === "warning") { |
| | | result.statusText = self.i18n("dashboard.networkUnstableLabel", "波动"); |
| | | } else if (result.statusType === "danger") { |
| | | result.statusText = self.i18n("dashboard.networkOfflineLabel", "超时/异常"); |
| | | } else { |
| | | result.statusText = self.i18n("dashboard.networkNoDataLabel", "暂无数据"); |
| | | } |
| | | result.message = self.translateLegacyText(item && item.message); |
| | | return result; |
| | | }); |
| | | }, |
| | | initCharts: function () { |
| | | this.disposeCharts(); |
| | |
| | | }, |
| | | buildDeviceTypeOption: function () { |
| | | var data = cloneMetricList(this.devices.typeStats); |
| | | var onlineText = this.i18n("dashboard.deviceOnlineLegend", "在线"); |
| | | var offlineText = this.i18n("dashboard.deviceOfflineLegend", "离线"); |
| | | return { |
| | | color: ["#2fa38e", "#d8e2ec"], |
| | | legend: { |
| | |
| | | itemWidth: 10, |
| | | itemHeight: 10, |
| | | textStyle: { color: "#60778d", fontSize: 12 }, |
| | | data: ["在线", "离线"] |
| | | data: [onlineText, offlineText] |
| | | }, |
| | | grid: { |
| | | left: 76, |
| | |
| | | axisLabel: { color: "#60778d", fontSize: 12 } |
| | | }, |
| | | series: [{ |
| | | name: "在线", |
| | | name: onlineText, |
| | | type: "bar", |
| | | stack: "device", |
| | | barWidth: 18, |
| | |
| | | borderRadius: [9, 0, 0, 9] |
| | | } |
| | | }, { |
| | | name: "离线", |
| | | name: offlineText, |
| | | type: "bar", |
| | | stack: "device", |
| | | barWidth: 18, |
| | |
| | | left: "center", |
| | | top: "55%", |
| | | style: { |
| | | text: "可用路由", |
| | | text: this.i18n("dashboard.chartCenter.availableRoutes", "可用路由"), |
| | | fill: "#7c8fa4", |
| | | fontSize: 12 |
| | | } |
| | |
| | | left: "center", |
| | | top: "54%", |
| | | style: { |
| | | text: "需关注设备", |
| | | text: this.i18n("dashboard.chartCenter.attentionDevices", "需关注设备"), |
| | | fill: "#7c8fa4", |
| | | fontSize: 12 |
| | | } |
| | |
| | | if (!isFinite(num)) { |
| | | return "0"; |
| | | } |
| | | return num.toLocaleString("zh-CN"); |
| | | return num.toLocaleString(this.getCurrentLocale()); |
| | | }, |
| | | formatLatency: function (value) { |
| | | var num; |
| | |
| | | if (!isFinite(num)) { |
| | | return "--"; |
| | | } |
| | | return num.toLocaleString("zh-CN", { maximumFractionDigits: 2 }) + " ms"; |
| | | return num.toLocaleString(this.getCurrentLocale(), { maximumFractionDigits: 2 }) + " ms"; |
| | | }, |
| | | formatPercentValue: function (value) { |
| | | var num = Number(value); |
| | | if (!isFinite(num)) { |
| | | return "--"; |
| | | } |
| | | return num.toLocaleString(this.getCurrentLocale(), { maximumFractionDigits: 2 }) + "%"; |
| | | }, |
| | | formatPacketSize: function (value) { |
| | | var num = Number(value); |
| | | if (!isFinite(num) || num < 0) { |
| | | return "系统默认"; |
| | | return this.i18n("dashboard.systemDefaultPacketSize", "系统默认"); |
| | | } |
| | | return num + " B"; |
| | | return num.toLocaleString(this.getCurrentLocale()) + " B"; |
| | | }, |
| | | displayText: function (value, fallback) { |
| | | return value == null || value === "" ? (fallback || "") : value; |
| | | }, |
| | | networkSamplingText: function () { |
| | | var config = this.network && this.network.samplingConfig ? this.network.samplingConfig : {}; |
| | | return "采样 " + this.displayText(config.intervalMs, 0) + " ms / 超时 " + this.displayText(config.timeoutMs, 0) + |
| | | " ms / 每样本 " + this.displayText(config.probeCount, 0) + " 次 / 包大小 " + this.formatPacketSize(config.packetSize); |
| | | return this.i18n("dashboard.networkSampling", "采样 {0} ms / 超时 {1} ms / 每样本 {2} 次 / 包大小 {3}", [ |
| | | this.displayText(config.intervalMs, 0), |
| | | this.displayText(config.timeoutMs, 0), |
| | | this.displayText(config.probeCount, 0), |
| | | this.formatPacketSize(config.packetSize) |
| | | ]); |
| | | }, |
| | | startAutoRefresh: function () { |
| | | var self = this; |
| | |
| | | window.open(targetMenu && targetMenu.url ? targetMenu.url : this.resolveAbsoluteViewPath(targetPath), "_blank"); |
| | | }, |
| | | openMonitor: function () { |
| | | this.openParentMenuView("/views/watch/console.html", "监控画面", "监控画面", "监控系统"); |
| | | this.openParentMenuView( |
| | | "/views/watch/console.html", |
| | | this.i18n("dashboard.monitorView", "监控画面"), |
| | | this.translateLegacyText("监控画面"), |
| | | this.translateLegacyText("监控系统") |
| | | ); |
| | | }, |
| | | openDevicePingAnalysis: function () { |
| | | this.openParentMenuView("/views/devicePingLog/devicePingLog.html", "设备网络分析", "设备网络分析"); |
| | | this.openParentMenuView( |
| | | "/views/devicePingLog/devicePingLog.html", |
| | | this.i18n("devicePingLog.title", "设备网络分析"), |
| | | this.translateLegacyText("设备网络分析") |
| | | ); |
| | | } |
| | | } |
| | | }); |
| | |
| | | el: "#app", |
| | | data: function () { |
| | | return { |
| | | lastOptionsData: null, |
| | | lastOverviewData: null, |
| | | lastTrendData: null, |
| | | overviewLoading: false, |
| | | detailLoading: false, |
| | | devices: [], |
| | |
| | | }, |
| | | samplingConfigText: function () { |
| | | var config = this.samplingConfig || createEmptySamplingConfig(); |
| | | return "采样 " + config.intervalMs + " ms / 超时 " + config.timeoutMs + " ms / 每样本 " + config.probeCount + " 次"; |
| | | return this.i18n("devicePingLog.samplingConfigText", "采样 {0} ms / 超时 {1} ms / 每样本 {2} 次", [ |
| | | this.formatNumber(config.intervalMs), |
| | | this.formatNumber(config.timeoutMs), |
| | | this.formatNumber(config.probeCount) |
| | | ]); |
| | | } |
| | | }, |
| | | mounted: function () { |
| | | var self = this; |
| | | this.refreshDocumentTitle(); |
| | | if (window.WCS_I18N && typeof window.WCS_I18N.onReady === "function") { |
| | | window.WCS_I18N.onReady(function () { |
| | | self.refreshLocalizedState(); |
| | | }); |
| | | } |
| | | this.$nextTick(function () { |
| | | self.loadOptions(); |
| | | self.loadOverview(); |
| | |
| | | this.disposeCharts(); |
| | | }, |
| | | methods: { |
| | | formatMessage: function (text, params) { |
| | | var list = Array.isArray(params) ? params : [params]; |
| | | return String(text == null ? "" : text).replace(/\{(\d+)\}/g, function (match, index) { |
| | | return list[index] == null ? "" : list[index]; |
| | | }); |
| | | }, |
| | | i18n: function (key, fallback, params) { |
| | | if (window.WCS_I18N && typeof window.WCS_I18N.t === "function") { |
| | | var translated = window.WCS_I18N.t(key, params); |
| | | if (translated && translated !== key) { |
| | | return translated; |
| | | } |
| | | } |
| | | return this.formatMessage(fallback || key, params); |
| | | }, |
| | | translateLegacyText: function (text) { |
| | | if (text == null || text === "") { |
| | | return text; |
| | | } |
| | | if (window.WCS_I18N && typeof window.WCS_I18N.tl === "function") { |
| | | return window.WCS_I18N.tl(String(text)); |
| | | } |
| | | return text; |
| | | }, |
| | | getCurrentLocale: function () { |
| | | if (window.WCS_I18N && typeof window.WCS_I18N.getLocale === "function") { |
| | | return window.WCS_I18N.getLocale(); |
| | | } |
| | | return "zh-CN"; |
| | | }, |
| | | refreshDocumentTitle: function () { |
| | | document.title = this.i18n("devicePingLog.title", "设备网络分析"); |
| | | }, |
| | | refreshLocalizedState: function () { |
| | | this.refreshDocumentTitle(); |
| | | if (this.lastOptionsData) { |
| | | this.applyOptionsData(this.lastOptionsData); |
| | | } |
| | | if (this.lastOverviewData) { |
| | | this.applyOverviewData(this.lastOverviewData); |
| | | } |
| | | if (this.lastTrendData) { |
| | | this.applyTrendData(this.lastTrendData); |
| | | } else { |
| | | this.$forceUpdate(); |
| | | this.updateCharts(); |
| | | } |
| | | }, |
| | | resolveStatusText: function (status) { |
| | | var code = status == null ? "" : String(status).toUpperCase(); |
| | | if (code === "OK") { |
| | | return this.i18n("devicePingLog.status.ok", "正常"); |
| | | } |
| | | if (code === "UNSTABLE") { |
| | | return this.i18n("devicePingLog.status.unstable", "波动"); |
| | | } |
| | | if (code === "TIMEOUT") { |
| | | return this.i18n("devicePingLog.status.timeout", "超时"); |
| | | } |
| | | if (code === "ERROR") { |
| | | return this.i18n("devicePingLog.status.error", "异常"); |
| | | } |
| | | if (code === "NO_DATA") { |
| | | return this.i18n("devicePingLog.status.noData", "暂无数据"); |
| | | } |
| | | if (!code) { |
| | | return "--"; |
| | | } |
| | | return this.translateLegacyText(status); |
| | | }, |
| | | applyOptionsData: function (data) { |
| | | this.lastOptionsData = data || {}; |
| | | this.refreshDocumentTitle(); |
| | | this.devices = (data && data.devices) || []; |
| | | this.availableDays = (data && data.days) || []; |
| | | this.samplingConfig = Object.assign(createEmptySamplingConfig(), data && data.samplingConfig ? data.samplingConfig : {}); |
| | | }, |
| | | applyOverviewData: function (data) { |
| | | this.lastOverviewData = data || {}; |
| | | this.overviewSummary = Object.assign(createEmptyOverviewSummary(), data && data.summary ? data.summary : {}); |
| | | this.overviewRows = this.normalizeOverviewRows(data && data.devices ? data.devices : []); |
| | | }, |
| | | applyTrendData: function (data) { |
| | | this.lastTrendData = data || {}; |
| | | this.detailSummary = this.normalizeDetailSummary(data && data.summary ? data.summary : {}); |
| | | this.series = (data && data.series) || []; |
| | | this.alerts = this.normalizeAlerts(data && data.alerts ? data.alerts : []); |
| | | this.updateCharts(); |
| | | }, |
| | | normalizeOverviewRows: function (rows) { |
| | | var self = this; |
| | | return (rows || []).map(function (item) { |
| | | var result = Object.assign({}, item); |
| | | result.statusText = self.resolveStatusText(item && item.status); |
| | | result.message = self.translateLegacyText(item && item.message); |
| | | result.label = self.translateLegacyText(item && item.label); |
| | | return result; |
| | | }); |
| | | }, |
| | | normalizeDetailSummary: function (summary) { |
| | | var result = Object.assign(createEmptyDetailSummary(), summary || {}); |
| | | result.latestStatus = this.resolveStatusText(result.latestStatus); |
| | | return result; |
| | | }, |
| | | normalizeAlerts: function (alerts) { |
| | | var self = this; |
| | | return (alerts || []).map(function (item) { |
| | | var result = Object.assign({}, item); |
| | | result.status = self.resolveStatusText(item && item.status); |
| | | result.message = self.translateLegacyText(item && item.message); |
| | | return result; |
| | | }); |
| | | }, |
| | | formatNumber: function (value) { |
| | | var num = Number(value || 0); |
| | | if (!isFinite(num)) { |
| | | return "0"; |
| | | } |
| | | return num.toLocaleString(this.getCurrentLocale()); |
| | | }, |
| | | loadOptions: function () { |
| | | var self = this; |
| | | $.ajax({ |
| | |
| | | success: function (res) { |
| | | if (res && res.code === 200) { |
| | | var data = res.data || {}; |
| | | self.devices = data.devices || []; |
| | | self.availableDays = data.days || []; |
| | | self.samplingConfig = Object.assign(createEmptySamplingConfig(), data.samplingConfig || {}); |
| | | self.applyOptionsData(data); |
| | | return; |
| | | } |
| | | self.$message.error((res && res.msg) || "设备配置加载失败"); |
| | | self.$message.error((res && res.msg) || self.i18n("devicePingLog.optionsLoadFailed", "设备配置加载失败")); |
| | | }, |
| | | error: function () { |
| | | self.$message.error("设备配置加载失败"); |
| | | self.$message.error(self.i18n("devicePingLog.optionsLoadFailed", "设备配置加载失败")); |
| | | } |
| | | }); |
| | | }, |
| | |
| | | method: "GET", |
| | | success: function (res) { |
| | | if (res && res.code === 200) { |
| | | var data = res.data || {}; |
| | | self.overviewSummary = Object.assign(createEmptyOverviewSummary(), data.summary || {}); |
| | | self.overviewRows = data.devices || []; |
| | | self.applyOverviewData(res.data || {}); |
| | | return; |
| | | } |
| | | self.overviewSummary = createEmptyOverviewSummary(); |
| | | self.overviewRows = []; |
| | | self.$message.error((res && res.msg) || "总览数据加载失败"); |
| | | self.$message.error((res && res.msg) || self.i18n("devicePingLog.overviewLoadFailed", "总览数据加载失败")); |
| | | }, |
| | | error: function () { |
| | | self.overviewSummary = createEmptyOverviewSummary(); |
| | | self.overviewRows = []; |
| | | self.$message.error("总览数据加载失败"); |
| | | self.$message.error(self.i18n("devicePingLog.overviewLoadFailed", "总览数据加载失败")); |
| | | }, |
| | | complete: function () { |
| | | self.overviewLoading = false; |
| | |
| | | return; |
| | | } |
| | | if (!this.detailFilters.range || this.detailFilters.range.length !== 2) { |
| | | this.$message.warning("请选择时间范围"); |
| | | this.$message.warning(this.i18n("devicePingLog.selectTimeRange", "请选择时间范围")); |
| | | return; |
| | | } |
| | | var parts = this.detailFilters.deviceKey.split("#"); |
| | | if (parts.length !== 2) { |
| | | this.$message.warning("设备信息无效"); |
| | | this.$message.warning(this.i18n("devicePingLog.invalidDevice", "设备信息无效")); |
| | | return; |
| | | } |
| | | var self = this; |
| | |
| | | }, |
| | | success: function (res) { |
| | | if (res && res.code === 200) { |
| | | var data = res.data || {}; |
| | | self.detailSummary = Object.assign(createEmptyDetailSummary(), data.summary || {}); |
| | | self.series = data.series || []; |
| | | self.alerts = data.alerts || []; |
| | | self.updateCharts(); |
| | | self.applyTrendData(res.data || {}); |
| | | return; |
| | | } |
| | | self.detailSummary = createEmptyDetailSummary(); |
| | | self.series = []; |
| | | self.alerts = []; |
| | | self.updateCharts(); |
| | | self.$message.error((res && res.msg) || "设备详情加载失败"); |
| | | self.$message.error((res && res.msg) || self.i18n("devicePingLog.detailLoadFailed", "设备详情加载失败")); |
| | | }, |
| | | error: function () { |
| | | self.detailSummary = createEmptyDetailSummary(); |
| | | self.series = []; |
| | | self.alerts = []; |
| | | self.updateCharts(); |
| | | self.$message.error("设备详情加载失败"); |
| | | self.$message.error(self.i18n("devicePingLog.detailLoadFailed", "设备详情加载失败")); |
| | | }, |
| | | complete: function () { |
| | | self.detailLoading = false; |
| | |
| | | bottom: 10 |
| | | }], |
| | | series: [{ |
| | | name: "平均", |
| | | name: this.i18n("devicePingLog.chart.latency.avg", "平均"), |
| | | type: "line", |
| | | showSymbol: false, |
| | | sampling: "lttb", |
| | | data: this.series.map(function (item) { return item.avgLatencyMs; }), |
| | | lineStyle: { width: 2 } |
| | | }, { |
| | | name: "最小", |
| | | name: this.i18n("devicePingLog.chart.latency.min", "最小"), |
| | | type: "line", |
| | | showSymbol: false, |
| | | sampling: "lttb", |
| | | data: this.series.map(function (item) { return item.minLatencyMs; }), |
| | | lineStyle: { width: 1.5 } |
| | | }, { |
| | | name: "最大", |
| | | name: this.i18n("devicePingLog.chart.latency.max", "最大"), |
| | | type: "line", |
| | | showSymbol: false, |
| | | sampling: "lttb", |
| | |
| | | }, |
| | | yAxis: [{ |
| | | type: "value", |
| | | name: "失败", |
| | | name: this.i18n("devicePingLog.chart.availability.failAxis", "失败"), |
| | | splitLine: { lineStyle: { color: "#edf2f7" } }, |
| | | axisLine: { show: false }, |
| | | axisTick: { show: false }, |
| | | axisLabel: { color: "#7f92a5" } |
| | | }, { |
| | | type: "value", |
| | | name: "成功率%", |
| | | name: this.i18n("devicePingLog.chart.availability.successRateAxis", "成功率%"), |
| | | min: 0, |
| | | max: 100, |
| | | splitLine: { show: false }, |
| | |
| | | bottom: 10 |
| | | }], |
| | | series: [{ |
| | | name: "失败次数", |
| | | name: this.i18n("devicePingLog.chart.availability.failCount", "失败次数"), |
| | | type: "bar", |
| | | yAxisIndex: 0, |
| | | barMaxWidth: 18, |
| | |
| | | borderRadius: [6, 6, 0, 0] |
| | | } |
| | | }, { |
| | | name: "成功率", |
| | | name: this.i18n("devicePingLog.chart.availability.successRate", "成功率"), |
| | | type: "line", |
| | | yAxisIndex: 1, |
| | | showSymbol: false, |
| | |
| | | return "offline"; |
| | | }, |
| | | formatLatency: function (value) { |
| | | var num; |
| | | if (value === null || value === undefined || value === "") { |
| | | return "--"; |
| | | } |
| | | return value + " ms"; |
| | | num = Number(value); |
| | | if (!isFinite(num)) { |
| | | return "--"; |
| | | } |
| | | return num.toLocaleString(this.getCurrentLocale(), { maximumFractionDigits: 2 }) + " ms"; |
| | | }, |
| | | formatPercent: function (value) { |
| | | var num; |
| | | if (value === null || value === undefined || value === "") { |
| | | return "--"; |
| | | } |
| | | return value + "%"; |
| | | num = Number(value); |
| | | if (!isFinite(num)) { |
| | | return "--"; |
| | | } |
| | | return num.toLocaleString(this.getCurrentLocale(), { maximumFractionDigits: 2 }) + "%"; |
| | | }, |
| | | formatPacketSize: function (value) { |
| | | if (value === null || value === undefined || value === "" || value < 0) { |
| | | return "系统默认"; |
| | | var num = Number(value); |
| | | if (!isFinite(num) || num < 0) { |
| | | return this.i18n("devicePingLog.systemDefaultPacketSize", "系统默认"); |
| | | } |
| | | return value + " B"; |
| | | return num.toLocaleString(this.getCurrentLocale()) + " B"; |
| | | } |
| | | } |
| | | }); |
| | |
| | | <div class="hero-main"> |
| | | <div class="hero-copy"> |
| | | <div class="hero-eyebrow">WCS Dashboard</div> |
| | | <h1 class="hero-title">系统仪表盘</h1> |
| | | <h1 class="hero-title">{{ i18n('dashboard.title', '系统仪表盘') }}</h1> |
| | | </div> |
| | | <div class="hero-actions"> |
| | | <el-button size="small" plain @click="openMonitor">打开监控画面</el-button> |
| | | <el-button size="small" type="primary" :loading="refreshing" @click="loadDashboard(true)">立即刷新</el-button> |
| | | <el-button size="small" plain @click="openMonitor">{{ i18n('dashboard.openMonitor', '打开监控画面') }}</el-button> |
| | | <el-button size="small" type="primary" :loading="refreshing" @click="loadDashboard(true)">{{ i18n('dashboard.refreshNow', '立即刷新') }}</el-button> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="hero-stat-grid"> |
| | | <div class="hero-stat-row"> |
| | | <div class="hero-row-head"> |
| | | <div class="hero-row-kicker">状态概览</div> |
| | | <div class="hero-row-note">系统与刷新节奏</div> |
| | | <div class="hero-row-kicker">{{ i18n('dashboard.overviewKicker', '状态概览') }}</div> |
| | | <div class="hero-row-note">{{ i18n('dashboard.overviewNote', '系统与刷新节奏') }}</div> |
| | | </div> |
| | | <div class="hero-status-grid"> |
| | | <div class="hero-meta"> |
| | | <div class="hero-meta-label">系统状态</div> |
| | | <div class="hero-meta-value">{{ overview.systemRunning ? '运行中' : '已暂停' }}</div> |
| | | <div class="hero-meta-desc">WCS 主服务当前状态</div> |
| | | <div class="hero-meta-label">{{ i18n('dashboard.systemStatusLabel', '系统状态') }}</div> |
| | | <div class="hero-meta-value">{{ overview.systemRunning ? i18n('dashboard.systemRunning', '运行中') : i18n('dashboard.systemPaused', '已暂停') }}</div> |
| | | <div class="hero-meta-desc">{{ i18n('dashboard.systemStatusDesc', 'WCS 主服务当前状态') }}</div> |
| | | </div> |
| | | <div class="hero-meta"> |
| | | <div class="hero-meta-label">最近刷新</div> |
| | | <div class="hero-meta-label">{{ i18n('dashboard.lastRefreshLabel', '最近刷新') }}</div> |
| | | <div class="hero-meta-value">{{ displayText(overview.generatedAt, '-') }}</div> |
| | | <div class="hero-meta-desc">最近一次聚合数据生成时间</div> |
| | | <div class="hero-meta-desc">{{ i18n('dashboard.lastRefreshDesc', '最近一次聚合数据生成时间') }}</div> |
| | | </div> |
| | | <div class="hero-meta"> |
| | | <div class="hero-meta-label">自动刷新</div> |
| | | <div class="hero-meta-value">{{ countdown }}s 后刷新</div> |
| | | <div class="hero-meta-desc">页面自动更新倒计时</div> |
| | | <div class="hero-meta-label">{{ i18n('dashboard.autoRefreshLabel', '自动刷新') }}</div> |
| | | <div class="hero-meta-value">{{ i18n('dashboard.autoRefreshValue', '{0}s 后刷新', [countdown]) }}</div> |
| | | <div class="hero-meta-desc">{{ i18n('dashboard.autoRefreshDesc', '页面自动更新倒计时') }}</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="hero-stat-row"> |
| | | <div class="hero-row-head"> |
| | | <div class="hero-row-kicker">核心指标</div> |
| | | <div class="hero-row-note">任务、设备与 AI 总览</div> |
| | | <div class="hero-row-kicker">{{ i18n('dashboard.coreMetricsKicker', '核心指标') }}</div> |
| | | <div class="hero-row-note">{{ i18n('dashboard.coreMetricsNote', '任务、设备与 AI 总览') }}</div> |
| | | </div> |
| | | <div class="hero-metric-grid"> |
| | | <div class="summary-card"> |
| | | <div class="label">任务总数</div> |
| | | <div class="label">{{ i18n('dashboard.taskTotalLabel', '任务总数') }}</div> |
| | | <div class="value">{{ formatNumber(overview.taskTotal) }}</div> |
| | | <div class="desc">当前执行中 {{ formatNumber(overview.taskRunning) }}</div> |
| | | <div class="desc">{{ i18n('dashboard.taskTotalDesc', '当前执行中 {0}', [formatNumber(overview.taskRunning)]) }}</div> |
| | | </div> |
| | | <div class="summary-card"> |
| | | <div class="label">在线设备</div> |
| | | <div class="label">{{ i18n('dashboard.deviceOnlineLabel', '在线设备') }}</div> |
| | | <div class="value">{{ formatNumber(overview.deviceOnline) }}</div> |
| | | <div class="desc">总设备 {{ formatNumber(overview.deviceTotal) }},告警 {{ formatNumber(overview.deviceAlarm) }}</div> |
| | | <div class="desc">{{ i18n('dashboard.deviceOnlineDesc', '总设备 {0},告警 {1}', [formatNumber(overview.deviceTotal), formatNumber(overview.deviceAlarm)]) }}</div> |
| | | </div> |
| | | <div class="summary-card"> |
| | | <div class="label">AI 累计 Tokens</div> |
| | | <div class="label">{{ i18n('dashboard.aiTokenTotalLabel', 'AI 累计 Tokens') }}</div> |
| | | <div class="value">{{ formatNumber(overview.aiTokenTotal) }}</div> |
| | | <div class="desc">按 AI 会话累计统计</div> |
| | | <div class="desc">{{ i18n('dashboard.aiTokenTotalDesc', '按 AI 会话累计统计') }}</div> |
| | | </div> |
| | | <div class="summary-card"> |
| | | <div class="label">LLM 调用次数</div> |
| | | <div class="label">{{ i18n('dashboard.aiCallTotalLabel', 'LLM 调用次数') }}</div> |
| | | <div class="value">{{ formatNumber(overview.aiCallTotal) }}</div> |
| | | <div class="desc">最近一轮运行情况已纳入下方 AI 区域</div> |
| | | <div class="desc">{{ i18n('dashboard.aiCallTotalDesc', '最近一轮运行情况已纳入下方 AI 区域') }}</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="panel-header"> |
| | | <div> |
| | | <div class="panel-kicker">Task</div> |
| | | <h2 class="panel-title">任务态势</h2> |
| | | <div class="panel-desc">从任务类型、执行阶段和最近流转记录快速判断当前作业压力。</div> |
| | | <h2 class="panel-title">{{ i18n('dashboard.taskPanelTitle', '任务态势') }}</h2> |
| | | <div class="panel-desc">{{ i18n('dashboard.taskPanelDesc', '从任务类型、执行阶段和最近流转记录快速判断当前作业压力。') }}</div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="mini-grid"> |
| | | <div class="mini-card task-mini-running"> |
| | | <div class="mini-label">执行中</div> |
| | | <div class="mini-label">{{ i18n('dashboard.taskRunningLabel', '执行中') }}</div> |
| | | <div class="mini-value">{{ formatNumber(tasks.overview.running) }}</div> |
| | | <div class="mini-hint">当前正在流转的任务</div> |
| | | <div class="mini-hint">{{ i18n('dashboard.taskRunningHint', '当前正在流转的任务') }}</div> |
| | | </div> |
| | | <div class="mini-card task-mini-manual"> |
| | | <div class="mini-label">待人工</div> |
| | | <div class="mini-label">{{ i18n('dashboard.taskManualLabel', '待人工') }}</div> |
| | | <div class="mini-value">{{ formatNumber(tasks.overview.manual) }}</div> |
| | | <div class="mini-hint">需人工关注或回滚</div> |
| | | <div class="mini-hint">{{ i18n('dashboard.taskManualHint', '需人工关注或回滚') }}</div> |
| | | </div> |
| | | <div class="mini-card task-mini-completed"> |
| | | <div class="mini-label">已完成</div> |
| | | <div class="mini-label">{{ i18n('dashboard.taskCompletedLabel', '已完成') }}</div> |
| | | <div class="mini-value">{{ formatNumber(tasks.overview.completed) }}</div> |
| | | <div class="mini-hint">已经完成或落账</div> |
| | | <div class="mini-hint">{{ i18n('dashboard.taskCompletedHint', '已经完成或落账') }}</div> |
| | | </div> |
| | | <div class="mini-card task-mini-new"> |
| | | <div class="mini-label">新建</div> |
| | | <div class="mini-label">{{ i18n('dashboard.taskNewLabel', '新建') }}</div> |
| | | <div class="mini-value">{{ formatNumber(tasks.overview.newCreated) }}</div> |
| | | <div class="mini-hint">刚进入调度流程</div> |
| | | <div class="mini-hint">{{ i18n('dashboard.taskNewHint', '刚进入调度流程') }}</div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="chart-grid"> |
| | | <div class="chart-card"> |
| | | <div class="chart-title">任务类型分布</div> |
| | | <div class="chart-title">{{ i18n('dashboard.taskDirectionChartTitle', '任务类型分布') }}</div> |
| | | <div ref="taskDirectionChart" class="chart-box"></div> |
| | | </div> |
| | | <div class="chart-card"> |
| | | <div class="chart-title">任务阶段概览</div> |
| | | <div class="chart-title">{{ i18n('dashboard.taskStageChartTitle', '任务阶段概览') }}</div> |
| | | <div ref="taskStageChart" class="chart-box"></div> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="panel-header"> |
| | | <div> |
| | | <div class="panel-kicker">Recent</div> |
| | | <h2 class="panel-title">最近任务</h2> |
| | | <div class="panel-desc">帮助快速判断任务是否堆积、是否被设备接手,以及最近的任务目标位置。</div> |
| | | <h2 class="panel-title">{{ i18n('dashboard.recentPanelTitle', '最近任务') }}</h2> |
| | | <div class="panel-desc">{{ i18n('dashboard.recentPanelDesc', '帮助快速判断任务是否堆积、是否被设备接手,以及最近的任务目标位置。') }}</div> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | stripe |
| | | size="mini" |
| | | height="360" |
| | | empty-text="暂无任务记录"> |
| | | <el-table-column prop="wrkNo" label="任务号" min-width="100"></el-table-column> |
| | | <el-table-column prop="taskType" label="任务类型" min-width="110"></el-table-column> |
| | | <el-table-column prop="status" label="状态" min-width="160" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="source" label="来源" min-width="170" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="target" label="目标" min-width="170" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="device" label="执行设备" min-width="180" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="barcode" label="条码" min-width="150" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="updateTime" label="最近更新时间" min-width="170"></el-table-column> |
| | | :empty-text="i18n('dashboard.recentEmpty', '暂无任务记录')"> |
| | | <el-table-column prop="wrkNo" :label="i18n('dashboard.column.workNo', '任务号')" min-width="100"></el-table-column> |
| | | <el-table-column prop="taskType" :label="i18n('dashboard.column.taskType', '任务类型')" min-width="110"></el-table-column> |
| | | <el-table-column prop="status" :label="i18n('dashboard.column.status', '状态')" min-width="160" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="source" :label="i18n('dashboard.column.source', '来源')" min-width="170" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="target" :label="i18n('dashboard.column.target', '目标')" min-width="170" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="device" :label="i18n('dashboard.column.device', '执行设备')" min-width="180" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="barcode" :label="i18n('dashboard.column.barcode', '条码')" min-width="150" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="updateTime" :label="i18n('dashboard.column.updateTime', '最近更新时间')" min-width="170"></el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </section> |
| | |
| | | <div class="panel-header"> |
| | | <div> |
| | | <div class="panel-kicker">AI</div> |
| | | <h2 class="panel-title">AI 运行情况</h2> |
| | | <div class="panel-desc">查看 AI 会话累计 Tokens、LLM 调用量,以及路由的可用与冷却状态。</div> |
| | | <h2 class="panel-title">{{ i18n('dashboard.aiPanelTitle', 'AI 运行情况') }}</h2> |
| | | <div class="panel-desc">{{ i18n('dashboard.aiPanelDesc', '查看 AI 会话累计 Tokens、LLM 调用量,以及路由的可用与冷却状态。') }}</div> |
| | | </div> |
| | | <el-tag size="small" type="success">可用路由 {{ formatNumber(ai.overview.availableRouteCount) }}</el-tag> |
| | | <el-tag size="small" type="success">{{ i18n('dashboard.availableRoutesTag', '可用路由 {0}', [formatNumber(ai.overview.availableRouteCount)]) }}</el-tag> |
| | | </div> |
| | | |
| | | <div class="mini-grid"> |
| | | <div class="mini-card"> |
| | | <div class="mini-label">累计 Tokens</div> |
| | | <div class="mini-label">{{ i18n('dashboard.aiTokenCardLabel', '累计 Tokens') }}</div> |
| | | <div class="mini-value">{{ formatNumber(ai.overview.tokenTotal) }}</div> |
| | | <div class="mini-hint">Prompt + Completion</div> |
| | | <div class="mini-hint">{{ i18n('dashboard.aiTokenCardHint', 'Prompt + Completion') }}</div> |
| | | </div> |
| | | <div class="mini-card"> |
| | | <div class="mini-label">提问轮次</div> |
| | | <div class="mini-label">{{ i18n('dashboard.aiAskCountLabel', '提问轮次') }}</div> |
| | | <div class="mini-value">{{ formatNumber(ai.overview.askCount) }}</div> |
| | | <div class="mini-hint">AI 对话累计轮次</div> |
| | | <div class="mini-hint">{{ i18n('dashboard.aiAskCountHint', 'AI 对话累计轮次') }}</div> |
| | | </div> |
| | | <div class="mini-card"> |
| | | <div class="mini-label">LLM 调用</div> |
| | | <div class="mini-label">{{ i18n('dashboard.aiLlmCallLabel', 'LLM 调用') }}</div> |
| | | <div class="mini-value">{{ formatNumber(ai.overview.llmCallTotal) }}</div> |
| | | <div class="mini-hint">成功 {{ formatNumber(ai.overview.successCallTotal) }} / 失败 {{ formatNumber(ai.overview.failCallTotal) }}</div> |
| | | <div class="mini-hint">{{ i18n('dashboard.aiLlmCallHint', '成功 {0} / 失败 {1}', [formatNumber(ai.overview.successCallTotal), formatNumber(ai.overview.failCallTotal)]) }}</div> |
| | | </div> |
| | | <div class="mini-card"> |
| | | <div class="mini-label">会话数</div> |
| | | <div class="mini-label">{{ i18n('dashboard.aiSessionCountLabel', '会话数') }}</div> |
| | | <div class="mini-value">{{ formatNumber(ai.overview.sessionCount) }}</div> |
| | | <div class="mini-hint">最近调用 {{ displayText(ai.overview.lastCallTime, '-') }}</div> |
| | | <div class="mini-hint">{{ i18n('dashboard.aiSessionCountHint', '最近调用 {0}', [displayText(ai.overview.lastCallTime, '-')]) }}</div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="chart-card"> |
| | | <div class="chart-title">AI 路由状态</div> |
| | | <div class="chart-title">{{ i18n('dashboard.aiRouteChartTitle', 'AI 路由状态') }}</div> |
| | | <div ref="aiRouteChart" class="ai-chart-box"></div> |
| | | </div> |
| | | |
| | |
| | | <div v-for="route in ai.routeList.slice(0, 6)" :key="route.name + '-' + route.model + '-' + route.priority" class="route-row"> |
| | | <div class="route-row-main"> |
| | | <div class="route-row-name">{{ route.name }}</div> |
| | | <div class="route-row-desc">模型 {{ displayText(route.model, '-') }},优先级 {{ displayText(route.priority, '-') }}</div> |
| | | <div class="route-row-desc">{{ i18n('dashboard.aiRouteDesc', '模型 {0},优先级 {1}', [displayText(route.model, '-'), displayText(route.priority, '-')]) }}</div> |
| | | <div v-if="route.lastError" class="route-error">{{ route.lastError }}</div> |
| | | </div> |
| | | <div class="route-row-side"> |
| | | <el-tag size="mini" :type="route.statusType">{{ route.statusText }}</el-tag> |
| | | <div class="route-extra">成功 {{ formatNumber(route.successCount) }} / 失败 {{ formatNumber(route.failCount) }}</div> |
| | | <div class="route-extra">最近使用 {{ displayText(route.lastUsedTime, '-') }}</div> |
| | | <div class="route-extra">{{ i18n('dashboard.aiRouteResult', '成功 {0} / 失败 {1}', [formatNumber(route.successCount), formatNumber(route.failCount)]) }}</div> |
| | | <div class="route-extra">{{ i18n('dashboard.aiRouteLastUsed', '最近使用 {0}', [displayText(route.lastUsedTime, '-')]) }}</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <el-empty v-else description="暂无 AI 路由数据"></el-empty> |
| | | <el-empty v-else :description="i18n('dashboard.aiRouteEmpty', '暂无 AI 路由数据')"></el-empty> |
| | | </section> |
| | | </div> |
| | | |
| | |
| | | <div class="panel-header"> |
| | | <div> |
| | | <div class="panel-kicker">Devices</div> |
| | | <h2 class="panel-title">设备态势</h2> |
| | | <div class="panel-desc">汇总输送站点、堆垛机、双工位堆垛机与 RGV 的在线、忙碌和告警情况。</div> |
| | | <h2 class="panel-title">{{ i18n('dashboard.devicePanelTitle', '设备态势') }}</h2> |
| | | <div class="panel-desc">{{ i18n('dashboard.devicePanelDesc', '汇总输送站点、堆垛机、双工位堆垛机与 RGV 的在线、忙碌和告警情况。') }}</div> |
| | | </div> |
| | | <el-tag size="small" type="info">在线率 {{ devices.overview.onlineRate || 0 }}%</el-tag> |
| | | <el-tag size="small" type="info">{{ i18n('dashboard.deviceOnlineRate', '在线率 {0}', [formatPercentValue(devices.overview.onlineRate || 0)]) }}</el-tag> |
| | | </div> |
| | | |
| | | <div class="mini-grid"> |
| | | <div class="mini-card"> |
| | | <div class="mini-label">设备总数</div> |
| | | <div class="mini-label">{{ i18n('dashboard.deviceTotalLabel', '设备总数') }}</div> |
| | | <div class="mini-value">{{ formatNumber(devices.overview.total) }}</div> |
| | | <div class="mini-hint">已启用配置设备</div> |
| | | <div class="mini-hint">{{ i18n('dashboard.deviceTotalHint', '已启用配置设备') }}</div> |
| | | </div> |
| | | <div class="mini-card"> |
| | | <div class="mini-label">在线设备</div> |
| | | <div class="mini-label">{{ i18n('dashboard.deviceOnlineCardLabel', '在线设备') }}</div> |
| | | <div class="mini-value">{{ formatNumber(devices.overview.online) }}</div> |
| | | <div class="mini-hint">实时连通设备数量</div> |
| | | <div class="mini-hint">{{ i18n('dashboard.deviceOnlineCardHint', '实时连通设备数量') }}</div> |
| | | </div> |
| | | <div class="mini-card"> |
| | | <div class="mini-label">忙碌设备</div> |
| | | <div class="mini-label">{{ i18n('dashboard.deviceBusyLabel', '忙碌设备') }}</div> |
| | | <div class="mini-value">{{ formatNumber(devices.overview.busy) }}</div> |
| | | <div class="mini-hint">当前承载任务的设备</div> |
| | | <div class="mini-hint">{{ i18n('dashboard.deviceBusyHint', '当前承载任务的设备') }}</div> |
| | | </div> |
| | | <div class="mini-card"> |
| | | <div class="mini-label">告警设备</div> |
| | | <div class="mini-label">{{ i18n('dashboard.deviceAlarmLabel', '告警设备') }}</div> |
| | | <div class="mini-value">{{ formatNumber(devices.overview.alarm) }}</div> |
| | | <div class="mini-hint">含阻塞或报警状态</div> |
| | | <div class="mini-hint">{{ i18n('dashboard.deviceAlarmHint', '含阻塞或报警状态') }}</div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="chart-card"> |
| | | <div class="chart-title">设备在线分布</div> |
| | | <div class="chart-title">{{ i18n('dashboard.deviceTypeChartTitle', '设备在线分布') }}</div> |
| | | <div ref="deviceTypeChart" class="device-chart-box"></div> |
| | | </div> |
| | | |
| | |
| | | <div v-for="item in devices.typeStats" :key="item.name" class="type-row"> |
| | | <div class="type-row-main"> |
| | | <div class="type-row-name">{{ item.name }}</div> |
| | | <div class="type-row-desc">在线 {{ formatNumber(item.online) }} / 总数 {{ formatNumber(item.total) }},离线 {{ formatNumber(item.offline) }}</div> |
| | | <div class="type-row-desc">{{ i18n('dashboard.deviceTypeDesc', '在线 {0} / 总数 {1},离线 {2}', [formatNumber(item.online), formatNumber(item.total), formatNumber(item.offline)]) }}</div> |
| | | </div> |
| | | <div class="type-row-side"> |
| | | <el-tag size="mini" type="success">忙碌 {{ formatNumber(item.busy) }}</el-tag> |
| | | <el-tag size="mini" :type="item.alarm > 0 ? 'danger' : 'info'">告警 {{ formatNumber(item.alarm) }}</el-tag> |
| | | <el-tag size="mini" type="success">{{ i18n('dashboard.deviceBusyTag', '忙碌 {0}', [formatNumber(item.busy)]) }}</el-tag> |
| | | <el-tag size="mini" :type="item.alarm > 0 ? 'danger' : 'info'">{{ i18n('dashboard.deviceAlarmTag', '告警 {0}', [formatNumber(item.alarm)]) }}</el-tag> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="panel-header"> |
| | | <div> |
| | | <div class="panel-kicker">Network</div> |
| | | <h2 class="panel-title">设备网络分析</h2> |
| | | <div class="panel-desc">汇总最新 Ping 样本的连通性、延迟与异常设备,帮助快速发现网络波动。</div> |
| | | <h2 class="panel-title">{{ i18n('devicePingLog.title', '设备网络分析') }}</h2> |
| | | <div class="panel-desc">{{ i18n('dashboard.networkPanelDesc', '汇总最新 Ping 样本的连通性、延迟与异常设备,帮助快速发现网络波动。') }}</div> |
| | | </div> |
| | | <div class="panel-actions"> |
| | | <el-tag size="small" :type="network.overview.attentionDevices > 0 ? 'warning' : 'success'"> |
| | | 需关注 {{ formatNumber(network.overview.attentionDevices) }} |
| | | {{ i18n('dashboard.networkAttentionTag', '需关注 {0}', [formatNumber(network.overview.attentionDevices)]) }} |
| | | </el-tag> |
| | | <el-button size="mini" plain @click="openDevicePingAnalysis">查看明细</el-button> |
| | | <el-button size="mini" plain @click="openDevicePingAnalysis">{{ i18n('dashboard.networkViewDetail', '查看明细') }}</el-button> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="mini-grid"> |
| | | <div class="mini-card network-mini-ok"> |
| | | <div class="mini-label">正常</div> |
| | | <div class="mini-label">{{ i18n('dashboard.networkOkLabel', '正常') }}</div> |
| | | <div class="mini-value">{{ formatNumber(network.overview.okDevices) }}</div> |
| | | <div class="mini-hint">最新样本状态 OK</div> |
| | | <div class="mini-hint">{{ i18n('dashboard.networkOkHint', '最新样本状态 OK') }}</div> |
| | | </div> |
| | | <div class="mini-card network-mini-warning"> |
| | | <div class="mini-label">波动</div> |
| | | <div class="mini-label">{{ i18n('dashboard.networkUnstableLabel', '波动') }}</div> |
| | | <div class="mini-value">{{ formatNumber(network.overview.unstableDevices) }}</div> |
| | | <div class="mini-hint">部分探测成功</div> |
| | | <div class="mini-hint">{{ i18n('dashboard.networkUnstableHint', '部分探测成功') }}</div> |
| | | </div> |
| | | <div class="mini-card network-mini-offline"> |
| | | <div class="mini-label">超时/异常</div> |
| | | <div class="mini-label">{{ i18n('dashboard.networkOfflineLabel', '超时/异常') }}</div> |
| | | <div class="mini-value">{{ formatNumber(network.overview.offlineDevices) }}</div> |
| | | <div class="mini-hint">暂无数据 {{ formatNumber(network.overview.noDataDevices) }}</div> |
| | | <div class="mini-hint">{{ i18n('dashboard.networkNoDataHint', '暂无数据 {0}', [formatNumber(network.overview.noDataDevices)]) }}</div> |
| | | </div> |
| | | <div class="mini-card network-mini-latency"> |
| | | <div class="mini-label">平均延迟</div> |
| | | <div class="mini-label">{{ i18n('dashboard.networkAvgLatencyLabel', '平均延迟') }}</div> |
| | | <div class="mini-value">{{ formatLatency(network.overview.avgLatencyMs) }}</div> |
| | | <div class="mini-hint">峰值 {{ formatLatency(network.overview.maxLatencyMs) }}</div> |
| | | <div class="mini-hint">{{ i18n('dashboard.networkPeakLatencyHint', '峰值 {0}', [formatLatency(network.overview.maxLatencyMs)]) }}</div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="chart-card"> |
| | | <div class="chart-title">连通状态分布</div> |
| | | <div class="chart-title">{{ i18n('dashboard.networkStatusChartTitle', '连通状态分布') }}</div> |
| | | <div class="chart-subtitle">{{ networkSamplingText() }}</div> |
| | | <div ref="networkStatusChart" class="network-chart-box"></div> |
| | | </div> |
| | |
| | | </div> |
| | | <div class="route-row-side"> |
| | | <el-tag size="mini" :type="item.statusType">{{ item.statusText }}</el-tag> |
| | | <div class="route-extra">平均 {{ formatLatency(item.avgLatencyMs) }}</div> |
| | | <div class="route-extra">最近样本 {{ displayText(item.latestTimeLabel, '-') }}</div> |
| | | <div class="route-extra">{{ i18n('dashboard.networkAvgLatencyTag', '平均 {0}', [formatLatency(item.avgLatencyMs)]) }}</div> |
| | | <div class="route-extra">{{ i18n('dashboard.networkLatestSampleTag', '最近样本 {0}', [displayText(item.latestTimeLabel, '-')]) }}</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div v-else-if="network.overview.totalDevices > 0" class="network-healthy-state"> |
| | | <div class="network-healthy-main"> |
| | | <div class="network-healthy-title">当前网络探测稳定</div> |
| | | <div class="network-healthy-desc">已纳入 {{ formatNumber(network.overview.totalDevices) }} 台设备,最近一轮未发现超时或波动。</div> |
| | | <div class="network-healthy-title">{{ i18n('dashboard.networkHealthyTitle', '当前网络探测稳定') }}</div> |
| | | <div class="network-healthy-desc">{{ i18n('dashboard.networkHealthyDesc', '已纳入 {0} 台设备,最近一轮未发现超时或波动。', [formatNumber(network.overview.totalDevices)]) }}</div> |
| | | </div> |
| | | <div class="network-healthy-tags"> |
| | | <div class="network-healthy-tag">正常 {{ formatNumber(network.overview.okDevices) }}</div> |
| | | <div class="network-healthy-tag">平均 {{ formatLatency(network.overview.avgLatencyMs) }}</div> |
| | | <div class="network-healthy-tag">峰值 {{ formatLatency(network.overview.maxLatencyMs) }}</div> |
| | | <div class="network-healthy-tag">{{ i18n('dashboard.networkHealthyOk', '正常 {0}', [formatNumber(network.overview.okDevices)]) }}</div> |
| | | <div class="network-healthy-tag">{{ i18n('dashboard.networkHealthyAvg', '平均 {0}', [formatLatency(network.overview.avgLatencyMs)]) }}</div> |
| | | <div class="network-healthy-tag">{{ i18n('dashboard.networkHealthyPeak', '峰值 {0}', [formatLatency(network.overview.maxLatencyMs)]) }}</div> |
| | | </div> |
| | | </div> |
| | | <el-empty v-else description="暂无设备网络样本"></el-empty> |
| | | <el-empty v-else :description="i18n('dashboard.networkEmpty', '暂无设备网络样本')"></el-empty> |
| | | </section> |
| | | </div> |
| | | </div> |
| | |
| | | <div v-if="loading" class="loading-mask"> |
| | | <div class="loading-card"> |
| | | <i class="el-icon-loading" style="font-size: 26px;"></i> |
| | | <div class="loading-title">正在加载仪表盘</div> |
| | | <div class="loading-desc">汇总任务、设备与 AI 运行数据,请稍候...</div> |
| | | <div class="loading-title">{{ i18n('dashboard.loadingTitle', '正在加载仪表盘') }}</div> |
| | | <div class="loading-desc">{{ i18n('dashboard.loadingDesc', '汇总任务、设备与 AI 运行数据,请稍候...') }}</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <script type="text/javascript" src="../../static/vue/js/vue.min.js"></script> |
| | | <script type="text/javascript" src="../../static/vue/element/element.js"></script> |
| | | <script type="text/javascript" src="../../static/js/echarts/echarts.min.js"></script> |
| | | <script type="text/javascript" src="../../static/js/dashboard/dashboard.js?v=20260317-dashboard-network-focus"></script> |
| | | <script type="text/javascript" src="../../static/js/dashboard/dashboard.js?v=20260317-dashboard-network-i18n"></script> |
| | | </body> |
| | | </html> |
| | |
| | | <body> |
| | | <div id="app" v-cloak class="page-shell"> |
| | | <div class="page-head"> |
| | | <div class="page-title">设备网络分析</div> |
| | | <div class="page-meta">包大小 {{ formatPacketSize(samplingConfig.packetSize) }},{{ samplingConfigText }}</div> |
| | | <div class="page-title">{{ i18n('devicePingLog.title', '设备网络分析') }}</div> |
| | | <div class="page-meta">{{ i18n('devicePingLog.pageMeta', '包大小 {0},{1}', [formatPacketSize(samplingConfig.packetSize), samplingConfigText]) }}</div> |
| | | </div> |
| | | |
| | | <section class="summary-grid"> |
| | | <div class="summary-card"> |
| | | <div class="summary-label">设备总数</div> |
| | | <div class="summary-value">{{ overviewSummary.totalDevices }}</div> |
| | | <div class="summary-sub">已配置 IP 的设备</div> |
| | | <div class="summary-label">{{ i18n('devicePingLog.summary.totalDevices', '设备总数') }}</div> |
| | | <div class="summary-value">{{ formatNumber(overviewSummary.totalDevices) }}</div> |
| | | <div class="summary-sub">{{ i18n('devicePingLog.summary.totalDevicesHint', '已配置 IP 的设备') }}</div> |
| | | </div> |
| | | <div class="summary-card"> |
| | | <div class="summary-label">正常</div> |
| | | <div class="summary-value">{{ overviewSummary.okDevices }}</div> |
| | | <div class="summary-sub">最近样本状态 OK</div> |
| | | <div class="summary-label">{{ i18n('devicePingLog.summary.ok', '正常') }}</div> |
| | | <div class="summary-value">{{ formatNumber(overviewSummary.okDevices) }}</div> |
| | | <div class="summary-sub">{{ i18n('devicePingLog.summary.okHint', '最近样本状态 OK') }}</div> |
| | | </div> |
| | | <div class="summary-card"> |
| | | <div class="summary-label">波动</div> |
| | | <div class="summary-value">{{ overviewSummary.unstableDevices }}</div> |
| | | <div class="summary-sub">部分探测成功</div> |
| | | <div class="summary-label">{{ i18n('devicePingLog.summary.unstable', '波动') }}</div> |
| | | <div class="summary-value">{{ formatNumber(overviewSummary.unstableDevices) }}</div> |
| | | <div class="summary-sub">{{ i18n('devicePingLog.summary.unstableHint', '部分探测成功') }}</div> |
| | | </div> |
| | | <div class="summary-card"> |
| | | <div class="summary-label">超时/异常</div> |
| | | <div class="summary-value">{{ overviewSummary.offlineDevices }}</div> |
| | | <div class="summary-sub">最近样本不可达</div> |
| | | <div class="summary-label">{{ i18n('devicePingLog.summary.offline', '超时/异常') }}</div> |
| | | <div class="summary-value">{{ formatNumber(overviewSummary.offlineDevices) }}</div> |
| | | <div class="summary-sub">{{ i18n('devicePingLog.summary.offlineHint', '最近样本不可达') }}</div> |
| | | </div> |
| | | <div class="summary-card"> |
| | | <div class="summary-label">暂无数据</div> |
| | | <div class="summary-value">{{ overviewSummary.noDataDevices }}</div> |
| | | <div class="summary-sub">还没有落盘样本</div> |
| | | <div class="summary-label">{{ i18n('devicePingLog.summary.noData', '暂无数据') }}</div> |
| | | <div class="summary-value">{{ formatNumber(overviewSummary.noDataDevices) }}</div> |
| | | <div class="summary-sub">{{ i18n('devicePingLog.summary.noDataHint', '还没有落盘样本') }}</div> |
| | | </div> |
| | | <div class="summary-card"> |
| | | <div class="summary-label">整体平均延迟</div> |
| | | <div class="summary-label">{{ i18n('devicePingLog.summary.avgLatency', '整体平均延迟') }}</div> |
| | | <div class="summary-value">{{ formatLatency(overviewSummary.avgLatencyMs) }}</div> |
| | | <div class="summary-sub">峰值 {{ formatLatency(overviewSummary.maxLatencyMs) }}</div> |
| | | <div class="summary-sub">{{ i18n('devicePingLog.summary.peakLatency', '峰值 {0}', [formatLatency(overviewSummary.maxLatencyMs)]) }}</div> |
| | | </div> |
| | | </section> |
| | | |
| | | <section class="panel"> |
| | | <div class="panel-head"> |
| | | <div class="panel-title">设备总览</div> |
| | | <el-button size="small" :loading="overviewLoading" @click="loadOverview">刷新</el-button> |
| | | <div class="panel-title">{{ i18n('devicePingLog.overviewTitle', '设备总览') }}</div> |
| | | <el-button size="small" :loading="overviewLoading" @click="loadOverview">{{ i18n('devicePingLog.refresh', '刷新') }}</el-button> |
| | | </div> |
| | | <div class="panel-body"> |
| | | <div class="toolbar"> |
| | | <el-form :inline="true" size="small" :model="overviewFilters" style="margin-bottom: -18px;"> |
| | | <el-form-item label="设备类型"> |
| | | <el-form-item :label="i18n('devicePingLog.filter.deviceType', '设备类型')"> |
| | | <el-select v-model="overviewFilters.deviceType" clearable style="width: 120px;"> |
| | | <el-option label="全部" value=""></el-option> |
| | | <el-option :label="i18n('devicePingLog.filter.all', '全部')" value=""></el-option> |
| | | <el-option label="Crn" value="Crn"></el-option> |
| | | <el-option label="DualCrn" value="DualCrn"></el-option> |
| | | <el-option label="Devp" value="Devp"></el-option> |
| | | <el-option label="Rgv" value="Rgv"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="关键字"> |
| | | <el-input v-model.trim="overviewFilters.keyword" clearable style="width: 220px;" placeholder="设备号 / IP"></el-input> |
| | | <el-form-item :label="i18n('devicePingLog.filter.keyword', '关键字')"> |
| | | <el-input v-model.trim="overviewFilters.keyword" clearable style="width: 220px;" :placeholder="i18n('devicePingLog.filter.keywordPlaceholder', '设备号 / IP')"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div class="toolbar-right"> |
| | | <span class="page-meta">总览设备 {{ filteredOverviewRows.length }} 台</span> |
| | | <span class="page-meta">{{ i18n('devicePingLog.overviewCount', '总览设备 {0} 台', [formatNumber(filteredOverviewRows.length)]) }}</span> |
| | | </div> |
| | | </div> |
| | | |
| | | <el-table :data="filteredOverviewRows" border stripe size="mini" v-loading="overviewLoading" style="width: 100%;"> |
| | | <el-table-column label="设备" min-width="170"> |
| | | <el-table-column :label="i18n('devicePingLog.column.device', '设备')" min-width="170"> |
| | | <template slot-scope="scope"> |
| | | {{ scope.row.deviceType }}-{{ scope.row.deviceNo }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="ip" label="IP" min-width="150"></el-table-column> |
| | | <el-table-column label="状态" width="110" align="center"> |
| | | <el-table-column :label="i18n('devicePingLog.column.status', '状态')" width="110" align="center"> |
| | | <template slot-scope="scope"> |
| | | <span class="status-chip" :class="statusClass(scope.row.status)">{{ scope.row.statusText }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="成功率" width="90" align="right"> |
| | | <el-table-column :label="i18n('devicePingLog.column.successRate', '成功率')" width="90" align="right"> |
| | | <template slot-scope="scope"> |
| | | {{ formatPercent(scope.row.successRate) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="平均" width="90" align="right"> |
| | | <el-table-column :label="i18n('devicePingLog.column.avg', '平均')" width="90" align="right"> |
| | | <template slot-scope="scope"> |
| | | {{ formatLatency(scope.row.avgLatencyMs) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="最小" width="90" align="right"> |
| | | <el-table-column :label="i18n('devicePingLog.column.min', '最小')" width="90" align="right"> |
| | | <template slot-scope="scope"> |
| | | {{ formatLatency(scope.row.minLatencyMs) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="最大" width="90" align="right"> |
| | | <el-table-column :label="i18n('devicePingLog.column.max', '最大')" width="90" align="right"> |
| | | <template slot-scope="scope"> |
| | | {{ formatLatency(scope.row.maxLatencyMs) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="latestTimeLabel" label="更新时间" width="170"></el-table-column> |
| | | <el-table-column prop="message" label="说明" min-width="200" show-overflow-tooltip></el-table-column> |
| | | <el-table-column label="操作" width="110" align="center" fixed="right"> |
| | | <el-table-column prop="latestTimeLabel" :label="i18n('devicePingLog.column.updateTime', '更新时间')" width="170"></el-table-column> |
| | | <el-table-column prop="message" :label="i18n('devicePingLog.column.message', '说明')" min-width="200" show-overflow-tooltip></el-table-column> |
| | | <el-table-column :label="i18n('devicePingLog.column.action', '操作')" width="110" align="center" fixed="right"> |
| | | <template slot-scope="scope"> |
| | | <el-button size="mini" type="primary" plain @click="openDetail(scope.row)">查看详情</el-button> |
| | | <el-button size="mini" type="primary" plain @click="openDetail(scope.row)">{{ i18n('devicePingLog.viewDetail', '查看详情') }}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | |
| | | <section class="panel"> |
| | | <div class="panel-head"> |
| | | <div class="panel-title">设备详情</div> |
| | | <div class="panel-title">{{ i18n('devicePingLog.detailTitle', '设备详情') }}</div> |
| | | </div> |
| | | <div class="panel-body"> |
| | | <div v-if="!currentDevice" class="empty-shell">从上方设备总览选择一台设备查看秒级明细</div> |
| | | <div v-if="!currentDevice" class="empty-shell">{{ i18n('devicePingLog.detailEmpty', '从上方设备总览选择一台设备查看秒级明细') }}</div> |
| | | <div v-else class="detail-shell"> |
| | | <div class="detail-toolbar"> |
| | | <div class="detail-selected">{{ currentDevice.label }}</div> |
| | | <div class="toolbar-right"> |
| | | <el-form :inline="true" size="small" :model="detailFilters" style="margin-bottom: -18px;"> |
| | | <el-form-item label="时间范围"> |
| | | <el-form-item :label="i18n('devicePingLog.filter.timeRange', '时间范围')"> |
| | | <el-date-picker |
| | | v-model="detailFilters.range" |
| | | type="datetimerange" |
| | | unlink-panels |
| | | range-separator="至" |
| | | start-placeholder="开始" |
| | | end-placeholder="结束" |
| | | :range-separator="i18n('devicePingLog.filter.rangeSeparator', '至')" |
| | | :start-placeholder="i18n('devicePingLog.filter.start', '开始')" |
| | | :end-placeholder="i18n('devicePingLog.filter.end', '结束')" |
| | | style="width: 360px;"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button @click="setQuickRange(30)">30 分钟</el-button> |
| | | <el-button @click="setQuickRange(30)">{{ i18n('devicePingLog.quickRange.30m', '30 分钟') }}</el-button> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button @click="setQuickRange(60)">1 小时</el-button> |
| | | <el-button @click="setQuickRange(60)">{{ i18n('devicePingLog.quickRange.1h', '1 小时') }}</el-button> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button @click="setQuickRange(360)">6 小时</el-button> |
| | | <el-button @click="setQuickRange(360)">{{ i18n('devicePingLog.quickRange.6h', '6 小时') }}</el-button> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" :loading="detailLoading" @click="queryTrend">查询</el-button> |
| | | <el-button type="primary" :loading="detailLoading" @click="queryTrend">{{ i18n('devicePingLog.query', '查询') }}</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | |
| | | |
| | | <div class="detail-summary-grid"> |
| | | <div class="detail-card"> |
| | | <div class="detail-card-label">状态</div> |
| | | <div class="detail-card-label">{{ i18n('devicePingLog.detail.status', '状态') }}</div> |
| | | <div class="detail-card-value">{{ detailSummary.latestStatus || '--' }}</div> |
| | | </div> |
| | | <div class="detail-card"> |
| | | <div class="detail-card-label">包大小</div> |
| | | <div class="detail-card-label">{{ i18n('devicePingLog.detail.packetSize', '包大小') }}</div> |
| | | <div class="detail-card-value">{{ formatPacketSize(detailSummary.packetSize) }}</div> |
| | | </div> |
| | | <div class="detail-card"> |
| | | <div class="detail-card-label">成功率</div> |
| | | <div class="detail-card-label">{{ i18n('devicePingLog.detail.successRate', '成功率') }}</div> |
| | | <div class="detail-card-value">{{ formatPercent(detailSummary.successRate) }}</div> |
| | | </div> |
| | | <div class="detail-card"> |
| | | <div class="detail-card-label">平均</div> |
| | | <div class="detail-card-label">{{ i18n('devicePingLog.detail.avg', '平均') }}</div> |
| | | <div class="detail-card-value">{{ formatLatency(detailSummary.avgLatencyMs) }}</div> |
| | | </div> |
| | | <div class="detail-card"> |
| | | <div class="detail-card-label">最小</div> |
| | | <div class="detail-card-label">{{ i18n('devicePingLog.detail.min', '最小') }}</div> |
| | | <div class="detail-card-value">{{ formatLatency(detailSummary.minLatencyMs) }}</div> |
| | | </div> |
| | | <div class="detail-card"> |
| | | <div class="detail-card-label">最大</div> |
| | | <div class="detail-card-label">{{ i18n('devicePingLog.detail.max', '最大') }}</div> |
| | | <div class="detail-card-value">{{ formatLatency(detailSummary.maxLatencyMs) }}</div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="chart-grid"> |
| | | <div class="chart-card"> |
| | | <div class="chart-title">延迟</div> |
| | | <div v-if="!series.length && !detailLoading" class="empty-shell">当前范围暂无秒级样本</div> |
| | | <div class="chart-title">{{ i18n('devicePingLog.chart.latencyTitle', '延迟') }}</div> |
| | | <div v-if="!series.length && !detailLoading" class="empty-shell">{{ i18n('devicePingLog.chart.empty', '当前范围暂无秒级样本') }}</div> |
| | | <div v-show="series.length || detailLoading" ref="latencyChart" class="chart-box"></div> |
| | | </div> |
| | | <div class="chart-card"> |
| | | <div class="chart-title">成功率 / 失败次数</div> |
| | | <div v-if="!series.length && !detailLoading" class="empty-shell">当前范围暂无秒级样本</div> |
| | | <div class="chart-title">{{ i18n('devicePingLog.chart.availabilityTitle', '成功率 / 失败次数') }}</div> |
| | | <div v-if="!series.length && !detailLoading" class="empty-shell">{{ i18n('devicePingLog.chart.empty', '当前范围暂无秒级样本') }}</div> |
| | | <div v-show="series.length || detailLoading" ref="availabilityChart" class="chart-box"></div> |
| | | </div> |
| | | </div> |
| | | |
| | | <el-table :data="alerts" border stripe size="mini" style="width: 100%;"> |
| | | <el-table-column prop="timeLabel" label="时间" width="180"></el-table-column> |
| | | <el-table-column prop="status" label="状态" width="110"></el-table-column> |
| | | <el-table-column prop="timeLabel" :label="i18n('devicePingLog.alertColumn.time', '时间')" width="180"></el-table-column> |
| | | <el-table-column prop="status" :label="i18n('devicePingLog.alertColumn.status', '状态')" width="110"></el-table-column> |
| | | <el-table-column prop="ip" label="IP" width="150"></el-table-column> |
| | | <el-table-column prop="message" label="说明" min-width="240" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="message" :label="i18n('devicePingLog.alertColumn.message', '说明')" min-width="240" show-overflow-tooltip></el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | |
| | | <script type="text/javascript" src="../../static/vue/js/vue.min.js"></script> |
| | | <script type="text/javascript" src="../../static/vue/element/element.js"></script> |
| | | <script type="text/javascript" src="../../static/js/echarts/echarts.min.js"></script> |
| | | <script type="text/javascript" src="../../static/js/devicePingLog/devicePingLog.js?v=20260316_device_ping_packet_size_detail" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/devicePingLog/devicePingLog.js?v=20260317_device_ping_i18n" charset="utf-8"></script> |
| | | </body> |
| | | </html> |