feat: 微调页面,加入模拟数据

This commit is contained in:
wenjinbo 2025-10-21 10:37:50 +08:00
parent ffa217229e
commit 2ba805518e
16 changed files with 3296 additions and 886 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -104,7 +104,7 @@ export function refreshModuleData(moduleType: string) {
}
/**
*
*
* @param question
* @param sysMessageId ID
*/

View File

@ -128,7 +128,7 @@ const title = computed(() => {
typicalCase: '典型案例详情',
standardFile: '标准文件详情',
ruleRegulation: '规则制度详情',
aiChat: 'AI助手对话详情'
inputCard: '输入框卡片详情'
}
return props.moduleType ? titles[props.moduleType] : '详情信息'
})
@ -142,7 +142,7 @@ const iconComponent = computed(() => {
typicalCase: FileText,
standardFile: Folder,
ruleRegulation: Shield,
aiChat: Activity
inputCard: Activity
}
return props.moduleType ? icons[props.moduleType] : FileText
})
@ -205,7 +205,7 @@ const tableColumns = computed(() => {
{ prop: 'complianceRate', label: '合规率', width: 120 },
{ prop: 'violations', label: '违规次数', width: 120 }
],
aiChat: [
inputCard: [
{ prop: 'type', label: '消息类型', width: 120 },
{ prop: 'content', label: '消息内容', width: 300 },
{ prop: 'timestamp', label: '时间戳', width: 150 }

File diff suppressed because it is too large Load Diff

View File

@ -61,11 +61,11 @@ export const MODULE_CONFIGS: ModuleConfig[] = [
description: '显示车组运用过程中的重要信息和事件记录'
},
{
id: 'aiChat',
title: 'AI助手对话',
id: 'inputCard',
title: '输入框卡片',
icon: 'Activity',
color: '#00D4FF',
description: '与AI助手进行智能对话获取运维建议和技术支持'
description: '用于输入消息或指令的交互界面'
}
]

View File

@ -12,7 +12,8 @@ import type {
RuleRegulation,
PrecautionInfo,
RouteInfo,
FaultCause
FaultCause,
SafetyReminder
} from '@/types/dashboard'
import * as dashboardApi from '@/api/dashboard'
import { USE_MOCK_DATA, MOCK_NETWORK_DELAY } from '@/config/dashboard.config'
@ -24,30 +25,65 @@ export const generateTrainData = (): TrainInfo[] => {
return [
{
id: '1',
name: 'CRH380B-3686',
status: 'running',
location: '金华-金华',
speed: 280,
mileage: 6335222,
lastMaintenance: '2024-01-15'
name: 'CR400AF-2028',
status: 'maintenance',
location: '长沙所',
speed: 0,
mileage: 5066507,
lastMaintenance: '2024-11-21',
// 详细信息
bureau: '广',
depot: '沙',
station: '长沙所',
assetProperty: '国铁集团',
detailedStatus: '二级检修',
speedLevel: 300,
formation: 8,
seatType: '座车',
manufacturer: '四方股份',
manufactureDate: '2017-09',
// 高级修信息
maintenanceInfo: {
totalMileage: 5066507,
lastMaintenanceType: '三级修',
lastMaintenanceRound: 'A32',
lastMaintenanceDate: '2024-11-21',
lastMaintenanceMileage: 4372153,
mileageAfterMaintenance: 694354,
nextMaintenanceType: '五级修',
nextMaintenanceRound: 'A51'
}
},
{
id: '2',
name: 'CRH380B-3688',
status: 'maintenance',
location: '新塘动车运用所',
speed: 0,
mileage: 5842100,
lastMaintenance: '2024-01-10'
},
{
id: '3',
name: 'CRH380B-3631',
status: 'standby',
location: '新塘动车运用所',
speed: 0,
mileage: 4523890,
lastMaintenance: '2024-01-12'
name: 'CR400AF-2024',
status: 'running',
location: '长沙所',
speed: 250,
mileage: 4921189,
lastMaintenance: '2024-11-21',
// 详细信息
bureau: '广',
depot: '沙',
station: '长沙所',
assetProperty: '国铁集团',
detailedStatus: '载客运行',
speedLevel: 300,
formation: 8,
seatType: '座车',
manufacturer: '四方股份',
manufactureDate: '2017-09',
// 高级修信息
maintenanceInfo: {
totalMileage: 4921189,
lastMaintenanceType: '三级修',
lastMaintenanceRound: 'A32',
lastMaintenanceDate: '2024-11-21',
lastMaintenanceMileage: 4233893,
mileageAfterMaintenance: 687296,
nextMaintenanceType: '五级修',
nextMaintenanceRound: 'A51'
}
}
]
}
@ -59,30 +95,39 @@ export const generateMechanicData = (): MechanicInfo[] => {
return [
{
id: '1',
name: '李师傅',
level: '高级机械师',
name: '王平',
level: '技术组',
status: 'working',
currentTask: '车组检修',
currentTask: '技术组',
completedTasks: 156,
workHours: 2340
workHours: 2340,
// 新增字段参考CLClient中的样式
team: '技术组',
qualifications: 'CRH3、CR400AF'
},
{
id: '2',
name: '张工',
level: '中级机械师',
name: '曾凌锋',
level: '乘务一队',
status: 'available',
currentTask: '',
currentTask: '乘务一队',
completedTasks: 98,
workHours: 1680
workHours: 1680,
// 新增字段参考CLClient中的样式
team: '乘务一队',
qualifications: 'CRH3、CR400AF'
},
{
id: '3',
name: '王师傅',
level: '高级机械师',
name: '颜麒麟',
level: '乘务二队',
status: 'break',
currentTask: '休息中',
currentTask: '乘务二队',
completedTasks: 203,
workHours: 3120
workHours: 3120,
// 新增字段参考CLClient中的样式
team: '乘务二队',
qualifications: 'CRH3、CR400AF'
}
]
}
@ -93,28 +138,36 @@ export const generateMechanicData = (): MechanicInfo[] => {
export const generateDiagnosticData = (): DiagnosticCode[] => {
return [
{
code: '191A',
description: '间接制动试验过程中,间接制动受到干扰',
severity: 'medium',
frequency: 12,
category: '制动系统',
code: '3044',
description: '受电弓升弓位置异常',
severity: 'high',
frequency: 8,
category: '受电弓系统',
lastOccurrence: '2024-01-14'
},
{
code: '2C4F',
description: '牵引系统异常',
severity: 'high',
frequency: 5,
category: '牵引系统',
code: '3041',
description: '受电弓自动降弓异常',
severity: 'medium',
frequency: 12,
category: '受电弓系统',
lastOccurrence: '2024-01-13'
},
{
code: '3A2B',
description: '空调系统压力异常',
severity: 'low',
frequency: 8,
category: '空调系统',
code: '3042',
description: '受电弓位置开关信号异常',
severity: 'medium',
frequency: 6,
category: '受电弓系统',
lastOccurrence: '2024-01-12'
},
{
code: '3045',
description: '受电弓DIO模块通信异常',
severity: 'low',
frequency: 4,
category: '受电弓系统',
lastOccurrence: '2024-01-11'
}
]
}
@ -126,30 +179,48 @@ export const generateTreatmentData = (): TreatmentMethod[] => {
return [
{
id: '1',
title: '完成当前制动试验步骤',
description: '忽略代码191A继续完成其余制动试验项目确保故障车制动有效率不显示。',
source: '故障代码191A',
estimatedTime: 30,
requiredTools: ['扳手', '万用表'],
safetyNotes: ['确保车辆静止', '佩戴防护装备']
title: '维持运行',
description: '确认受电弓状态正常后,继续运行至前方站点。',
source: '受电弓故障应急处置办法',
estimatedTime: 5,
requiredTools: ['弓网视频监控'],
safetyNotes: ['通过弓网视频确认受电弓状态']
},
{
id: '2',
title: '切除故障车空气制动',
description: '对08车空气制动切除并按照限速表中制动切除后限速值运行。',
source: '故障代码191A',
estimatedTime: 20,
requiredTools: ['操作手册'],
safetyNotes: ['严格按限速值运行']
title: '重新操作升弓',
description: '车速200km/h以下操作降弓然后再次进行升弓操作HMI屏确认故障是否再次发生。若故障消失闭合总真空断路器正常运行若故障再次发生根据现车状态隔离相应受电弓操作换弓维持运行。',
source: '受电弓升弓位置异常处置规程',
estimatedTime: 10,
requiredTools: ['HMI操作屏', '总真空断路器'],
safetyNotes: ['换弓操作需降速至200km/h以下', '确认HMI屏显示状态']
},
{
id: '3',
title: '复位相关空开',
description: '若故障未消除尝试复位08车BCU空开如42-F01/42-F02并重新进行制动试验。',
source: '《CRH380B车型诊断代码总表—CRH380BG型》《录入运用信息_20240101-20240531.xls》',
title: '断开升弓断路器处置',
description: '若仅单弓升起或升弓时报出受电弓升弓位置异常3044则断开自动降弓编组靠近重联端的受电弓车厢[升弓]断路器,重新升弓后维持运行。',
source: '重联车单弓异常降弓应急处置办法',
estimatedTime: 15,
requiredTools: ['工具箱'],
safetyNotes: ['确认空开状态后操作']
requiredTools: ['升弓断路器操作工具'],
safetyNotes: ['确认断路器位置', '重新升弓前确认安全']
},
{
id: '4',
title: '申请救援或继电器处置',
description: '若后续途中再次发生单弓异常降弓则使用剩余受电弓维持运行至前方站后申请救援或对调降弓编组头尾车总配电柜MXR1继电器后维持运行。',
source: '重联车受电弓故障应急处置规程',
estimatedTime: 30,
requiredTools: ['总配电柜操作工具', 'MXR1继电器'],
safetyNotes: ['确保至少一个受电弓正常工作', '必要时申请救援']
},
{
id: '5',
title: '检修受电弓位置开关',
description: '检修受电弓位置开关状态检查采集以上信号的网络DIO模块能够正确采集到升弓位置开关信息。',
source: '受电弓检修维护指南',
estimatedTime: 45,
requiredTools: ['万用表', '网络DIO模块测试仪', '位置开关检测工具'],
safetyNotes: ['断电后进行检修', '确认DIO模块信号采集正常', '佩戴防护装备']
}
]
}
@ -161,21 +232,48 @@ export const generateCaseData = (): TypicalCase[] => {
return [
{
id: '1',
title: 'CRH380B-3688车组191A故障处理案例',
description: '司机制动手柄操作导致的间接制动干扰',
solution: '指导司机正确操作制动手柄',
category: '制动系统',
difficulty: 'easy',
resolveTime: 20
title: '重联动车组近端两架受电弓同时升起故障',
description: '重联动车组在运行过程中出现近端两架受电弓同时升起的异常情况,需要进行应急处置',
solution: '按照应急处置流程进行单弓降弓操作,确保安全运行',
category: '受电弓系统',
difficulty: 'high',
resolveTime: 30,
fileName: '3.典型故障案例-重联动车组近端两架受电弓同时升起故障.pdf',
fileUrl: '/dxal/3.典型故障案例-重联动车组近端两架受电弓同时升起故障.pdf',
caseSummary: '重联动车组在升弓操作时由于网络误判重联状态导致近端两架受电弓同时升起触发升弓位置异常故障代码3044系统自动降弓保护。司机未立即停车但触发了自动降弓保护机制。',
caseAnalysis: '直接原因A列00车MXR1继电器辅助触点故障导致联挂完成信号T741线异常失电CCU误判重联状态。连锁反应A列06车因误判为"后弓"与B列03车同时升弓触发故障代码3044。硬件问题MXR1继电器型号B400的第三组触点故障。',
emergencyPoints: '1.优先通过视频监控确认故障情况2.若受电弓拉弧严重需逐级降速每40km/h一个等级3.故障处理完毕后需在前方停车站检查受电弓状态4.若重联车单弓异常降弓,可断开故障编组靠近重联端的升弓断路器,重新升弓维持运行。',
caseConclusion: '故障本质为MXR1继电器辅助触点失效导致网络误判重联状态引发升弓逻辑冲突及安全环路异常。若故障属于"无需降弓"或"降弓不停车"场景且通过视频监控确认故障不影响运行升弓或换弓后控制速度≤200km/h则司机未停车符合应急处置要求。'
},
{
id: '2',
title: 'CRH380B-3631总风压力不足案例',
description: '空气制动系统压力异常',
solution: '检查并修复空气压缩机',
category: '制动系统',
title: '重联动车组网络WTB初运行导致受电弓无法升起故障',
description: '重联动车组网络WTB系统初始化运行时出现受电弓无法升起的故障情况',
solution: '检查网络WTB系统状态重新初始化网络连接确保受电弓控制信号正常',
category: '受电弓系统',
difficulty: 'medium',
resolveTime: 90
resolveTime: 45,
fileName: '3.典型故障案例-重联动车组网络WTB初运行导致受电弓无法升起故障.pdf',
fileUrl: '/dxal/3.典型故障案例-重联动车组网络WTB初运行导致受电弓无法升起故障.pdf',
caseSummary: '重联动车组在启动时网络WTB系统进行初运行过程中出现异常导致受电弓控制信号中断无法正常升起受电弓。故障表现为升弓指令发出后受电弓无响应HMI显示升弓失败。',
caseAnalysis: '网络WTB初运行过程中重联信号传输异常导致CCU无法正确识别编组状态。可能原因包括1.网络连接不稳定2.WTB总线通信故障3.重联继电器状态异常4.网络初始化时序问题。',
emergencyPoints: '1.检查网络WTB系统状态指示灯2.重新进行WTB初运行操作3.确认重联信号传输正常4.若网络故障持续可尝试重启网络系统5.必要时联系技术支持进行远程诊断。',
caseConclusion: '网络WTB初运行故障通常为临时性故障通过重新初始化网络连接可解决。预防措施包括定期检查网络连接状态确保重联继电器工作正常避免在恶劣环境下进行网络操作。'
},
{
id: '3',
title: '受电弓升弓位置异常内含代码3044和重联继电器MXR1故障应急处置',
description: '受电弓升弓位置出现异常伴随故障代码3044涉及重联继电器MXR1的故障处置',
solution: '根据故障代码3044进行诊断检查重联继电器MXR1状态执行相应的应急处置措施',
category: '受电弓系统',
difficulty: 'high',
resolveTime: 60,
fileName: '典型故障案例受电弓升弓位置异常内含代码3044和重联继电器MXR1故障应急处置.pdf',
fileUrl: '/dxal/典型故障案例受电弓升弓位置异常内含代码3044和重联继电器MXR1故障应急处置.pdf',
caseSummary: 'B列00车主控时升06车受电弓出库前A列06车自动降弓。后续在B列00车重新操作升弓时B列03车与A列06车受电弓同时升起触发受电弓升弓位置异常故障代码3044导致自动降弓。司机未停车但触发自动降弓保护。',
caseAnalysis: '直接原因A列00车MXR1继电器辅助触点故障导致联挂完成信号T741线异常失电CCU误判重联状态。连锁反应A列06车因误判为"后弓"与B列03车同时升弓触发故障代码3044。HMI操作切除受电弓时因单元位置误判导致03/06车同时切除或切除无效。硬件问题MXR1继电器型号B400的第三组触点故障辅助触点未闭合T741线电压为0V但主触点正常得电。',
emergencyPoints: '视频监控优先装有受电弓视频监控装置的动车组应优先通过监控确认故障。限速运行要求若受电弓拉弧严重需逐级降速每40km/h一个等级直至受流正常。应急处置后检查故障处理完毕后需在前方停车站检查受电弓状态。重联车处置若重联车单弓异常降弓可断开故障编组靠近重联端的升弓断路器重新升弓维持运行。',
caseConclusion: '故障本质为MXR1继电器辅助触点失效导致网络误判重联状态引发升弓逻辑冲突及安全环路异常。司机未停车的处理需结合故障性质、监控确认和限速操作进行合规性判断。若故障属于"无需降弓"或"降弓不停车"场景且通过视频监控确认故障不影响运行升弓或换弓后控制速度≤200km/h则司机未停车符合应急处置要求。'
}
]
}
@ -228,35 +326,71 @@ export const generateRuleData = (): RuleRegulation[] => {
{
id: '1',
title: '国铁文件',
description: '机辆动客电2021304号',
description: '广铁辆发[2020]7号',
type: 'national',
effectiveDate: '2024-01-01',
complianceRate: 98.5,
violations: 3,
fileName: '《广州局集团公司行车突发事件应急预案》车辆专业内容的通知.pdf',
fileUrl: '/notice.pdf'
fileName: '中国铁路广州局集团有限公司关于发布《广州局集团公司动车组受电弓故障应急处置办法(修订)的通知(废止:广铁辆发[2012]229号.pdf',
fileUrl: '/gzzd/1.pdf',
faultParagraphs: [
{
title: '受电弓升弓位置异常故障处置',
content: '当动车组出现受电弓升弓位置异常故障代码3044司机应立即停车检查。若故障发生在重联动车组中应优先通过视频监控确认故障情况避免盲目操作。对于MXR1继电器故障导致的升弓逻辑异常需断开故障编组靠近重联端的升弓断路器重新升弓维持运行。',
fileName: '中国铁路广州局集团有限公司关于发布《广州局集团公司动车组受电弓故障应急处置办法(修订)的通知(废止:广铁辆发[2012]229号.pdf'
},
{
title: '重联继电器故障应急处置',
content: '重联继电器MXR1故障会导致网络误判重联状态引发升弓逻辑冲突。应急处置时应检查T741线电压确认联挂完成信号状态。若辅助触点故障但主触点正常可临时维持运行但需加强监控必要时按救援方式运行。',
fileName: '中国铁路广州局集团有限公司关于发布《广州局集团公司动车组受电弓故障应急处置办法(修订)的通知(废止:广铁辆发[2012]229号.pdf'
}
]
},
{
id: '2',
title: '集团文件',
description: '机辆动客网2023297号',
description: '集团文件',
type: 'group',
effectiveDate: '2024-01-01',
complianceRate: 96.2,
violations: 7,
fileName: '《广州局集团公司行车突发事件应急预案》车辆专业内容的通知.pdf',
fileUrl: '/notice.pdf'
fileName: '广铁(集团)公司车辆处关于明确动车组受电弓升弓操作方式的函.pdf',
fileUrl: '/gzzd/2.pdf',
faultParagraphs: [
{
title: '升弓操作方式规范',
content: '动车组升弓操作应严格按照"前-前弓"或"后-后弓"的原则进行,避免同时升起近端两架受电弓。在重联编组中,主控端默认升"后-后弓",若不可用则选择"前-前弓"。升弓前应确认网络状态正常避免因WTB初运行导致升弓失败。',
fileName: '广铁(集团)公司车辆处关于明确动车组受电弓升弓操作方式的函.pdf'
},
{
title: '升弓失败处理流程',
content: '当升弓操作失败时应首先检查网络WTB系统状态确认重联信号正常。若为网络初始化问题可重新进行WTB初运行。若为硬件故障应按照故障代码进行相应处置必要时联系技术支持。',
fileName: '广铁(集团)公司车辆处关于明确动车组受电弓升弓操作方式的函.pdf'
}
]
},
{
id: '3',
title: '段级文件',
description: '安全管理制度汇编',
description: '辆电【2023】271号',
type: 'department',
effectiveDate: '2024-01-01',
complianceRate: 95.8,
violations: 5,
fileName: '《广州局集团公司行车突发事件应急预案》车辆专业内容的通知.pdf',
fileUrl: '/notice.pdf'
fileName: '广州局集团公司车辆部关于2023年10月15日CRH6F-0410车组03车受电弓无法升起的通报.pdf',
fileUrl: '/gzzd/3.pdf',
faultParagraphs: [
{
title: 'CRH6F车组受电弓故障案例',
content: '2023年10月15日CRH6F-0410车组03车受电弓无法升起经检查发现受电弓升弓位置异常。通过视频监控确认故障后司机按限速要求操作最终在前方停车站检查受电弓状态。此案例说明视频监控在故障确认中的重要作用。',
fileName: '广州局集团公司车辆部关于2023年10月15日CRH6F-0410车组03车受电弓无法升起的通报.pdf'
},
{
title: '应急处置后检查要求',
content: '故障处理完毕后必须在前方停车站检查受电弓状态确认升弓功能正常。若受电弓拉弧严重需逐级降速每40km/h一个等级直至受流正常。检查时应重点关注受电弓与接触网的接触状态。',
fileName: '广州局集团公司车辆部关于2023年10月15日CRH6F-0410车组03车受电弓无法升起的通报.pdf'
}
]
}
]
}
@ -282,13 +416,67 @@ export const generateRouteData = (): RouteInfo[] => {
return [
{
id: '1',
currentLocation: '金华站',
nextTrain: 'G2114 金华→广州南',
restriction: '制动切除后限速160km/h'
currentLocation: '株洲西-衡阳西区间',
nextTrain: 'G6084/1/4/1',
restriction: '制动切除后限速160km/h',
// 新增字段,根据图片内容
currentTrainNumber: 'G6307/10/07',
currentRoute: '长沙南-汕头',
followingTrainNumber: 'G6084/1/4/1',
followingRoute: '汕头-湛江西',
workScheduleUrl: '/jl/长沙动车乘务车间2025年第四季度随车机械师作业图表上半部分.pdf'
}
]
}
/**
*
*/
export const generateSafetyRemindersData = (): SafetyReminder[] => {
return [
{
id: '1',
level: 'warning',
content: '做好动车组出入库时间点的卡控。'
},
{
id: '2',
level: 'warning',
content: '做好途中换乘时间和换乘地点的卡控。'
},
{
id: '3',
level: 'warning',
content: '做好途中吸污,应急上水车次的卡控。'
},
{
id: '4',
level: 'normal',
content: '遇变换车次作业,随车机械师及时变换车次。'
},
{
id: '5',
level: 'normal',
content: '随车机械师实际换乘情况根据当日交路安排执行。'
},
{
id: '6',
level: 'danger',
content: '"危"为部分高架线缝间隙大于10cm且没有安全防护设施梁缝附近沿着墙上喷有"高空危险"的警示标志,下车作业时注意扭伤、坠落风险。'
},
{
id: '7',
level: 'normal',
content: '长大隧道区间,无停放制动的车组注意防溜。'
},
{
id: '8',
level: 'warning',
content: '暴雨暴雪天气如果有雨进入车内的情况站台停步时间超过30分钟的要及时汇报应急并沟通车临时关门。'
}
];
};
/**
*
*/
@ -296,13 +484,23 @@ export const generateFaultCauseData = (): FaultCause[] => {
return [
{
id: '1',
description: '间接制动试验过程中,间接制动受到干扰',
source: '依据诊断代码191A描述'
description: '受电弓升弓位置开关故障或信号异常',
source: '依据受电弓升弓位置异常故障代码3044分析'
},
{
id: '2',
description: '司机制动手柄操作不当',
source: '参考标准文件处置信息中CRH380B-3688车组案例故障代码191A由司机操作问题导致'
description: '网络DIO模块无法正确采集升弓位置开关信息',
source: '参考受电弓检修维护指南DIO模块信号采集异常导致'
},
{
id: '3',
description: '重联车自动降弓系统异常触发',
source: '重联车单弓异常降弓故障分析,自动降弓编组控制异常'
},
{
id: '4',
description: '受电弓机械部件卡滞或损坏',
source: '弓网视频监控发现受电弓物理状态异常'
}
]
}
@ -341,7 +539,8 @@ export class DashboardService {
ruleRegulations: generateRuleData(),
precautions: generatePrecautionsData(),
routeInfo: generateRouteData(),
faultCauses: generateFaultCauseData()
faultCauses: generateFaultCauseData(),
safetyReminders: generateSafetyRemindersData()
}
}
@ -403,7 +602,10 @@ export class DashboardService {
case 'emergencyDisposal':
return generateTreatmentData()
case 'routeInfo':
return generateRouteData()
return {
routeInfo: generateRouteData(),
safetyReminders: generateSafetyRemindersData()
}
case 'typicalCase':
return generateCaseData()
case 'ruleRegulation':

View File

@ -204,7 +204,7 @@ export const useDashboardStore = defineStore('dashboard', () => {
return ruleRegulations.value
case 'precautions':
return precautions.value
case 'aiChat':
case 'inputCard':
return []
default:
return []

View File

@ -2,15 +2,40 @@
* - TypeScript类型定义
*/
// 车组高级修信息接口
export interface TrainMaintenanceInfo {
totalMileage: number; // 总累计走行公里
lastMaintenanceType: string; // 上次高级修程
lastMaintenanceRound: string; // 上次高级修程轮次
lastMaintenanceDate: string; // 上次高级修修峻日期
lastMaintenanceMileage: number; // 上次高级修修竣时走行公里
mileageAfterMaintenance: number; // 上次高级修程后走行公里
nextMaintenanceType: string; // 下次高级修程
nextMaintenanceRound: string; // 下次高级修程轮次
}
// 车组信息接口
export interface TrainInfo {
id: string;
name: string;
name: string; // 车组号
status: 'running' | 'maintenance' | 'standby';
location: string;
speed: number;
mileage: number;
lastMaintenance: string;
// 新增详细信息
bureau?: string; // 配属局
depot?: string; // 配属段
station?: string; // 配属所
assetProperty?: string; // 资产属性
detailedStatus?: string; // 详细状态
speedLevel?: number; // 速度等级
formation?: number; // 编组
seatType?: string; // 坐卧种类
manufacturer?: string; // 制造厂
manufactureDate?: string; // 制造年月
// 高级修信息
maintenanceInfo?: TrainMaintenanceInfo;
}
// 机械师信息接口
@ -22,6 +47,9 @@ export interface MechanicInfo {
currentTask: string;
completedTasks: number;
workHours: number;
// 新增字段参考CLClient中的样式
team?: string; // 班组
qualifications?: string; // 车型资质
}
// 诊断代码信息接口
@ -53,8 +81,16 @@ export interface TypicalCase {
description: string;
solution: string;
category: string;
difficulty: 'easy' | 'medium' | 'hard';
difficulty: 'easy' | 'medium' | 'hard' | 'high';
resolveTime: number;
// 新增:用于前端展示与预览
fileName?: string;
fileUrl?: string;
// 新增:典型案例摘要和文件段落内容
caseSummary?: string; // 典型案例摘要
caseAnalysis?: string; // 故障原因分析
emergencyPoints?: string; // 应急处置要点
caseConclusion?: string; // 案例结论
}
// 标准文件信息接口
@ -84,6 +120,12 @@ export interface RuleRegulation {
// 新增:用于前端展示与预览
fileName?: string;
fileUrl?: string;
// 新增:相关故障的文件段落内容
faultParagraphs?: Array<{
title: string; // 段落标题
content: string; // 段落内容
fileName: string; // 所属文件名
}>;
}
// 注意事项信息接口
@ -101,6 +143,19 @@ export interface RouteInfo {
currentLocation: string;
nextTrain: string;
restriction: string;
// 新增字段
currentTrainNumber: string; // 当前车次
currentRoute: string; // 运行区段
followingTrainNumber: string; // 后续车次
followingRoute: string; // 后续区段
workScheduleUrl?: string; // 作业图表PDF文件URL
}
// 安全事项提示
export interface SafetyReminder {
id: string;
level: 'normal' | 'warning' | 'danger';
content: string;
}
// 故障原因接口
@ -121,7 +176,7 @@ export type ModuleType =
| 'typicalCase'
| 'ruleRegulation'
| 'precautions'
| 'aiChat';
| 'inputCard';
// 模块配置接口
export interface ModuleConfig {

View File

@ -5,7 +5,7 @@
<!-- 问题输入界面 -->
<section v-if="showQuestionInput" class="question-input-section">
<div class="question-container">
<h1 class="question-title">今天有什么问题</h1>
<!-- <h1 class="question-title">今天有什么问题</h1> -->
<div class="chat-input-container">
<!-- 左侧头像/图标 -->
<div class="chat-avatar">
@ -22,7 +22,7 @@
class="chat-input"
placeholder="发消息或输入..."
@keyup.enter="handleQuestionSubmit"
rows="3"
rows="1"
></textarea>
</div>
@ -76,8 +76,8 @@
:is-draggable="isDragEnabled"
:initial-position="moduleLayouts[config.id]?.position || { x: 0, y: 0 }"
:initial-size="moduleLayouts[config.id]?.size || { width: 280, height: 200 }"
:initial-question="config.id === 'aiChat' ? submittedQuestion : ''"
:task-list="config.id === 'aiChat' ? taskList : []"
:initial-question="config.id === 'inputCard' ? submittedQuestion : ''"
:task-list="config.id === 'inputCard' ? taskList : []"
:train-data="getTrainData(config.id)"
:mechanic-data="getMechanicData(config.id)"
:diagnostic-codes="getDiagnosticCodes(config.id)"
@ -87,6 +87,7 @@
:precaution-list="getPrecautionList(config.id)"
:route-data="getRouteData(config.id)"
:fault-causes="getFaultCauses(config.id)"
:typical-cases="getTypicalCases(config.id)"
:class="[
`animate-slide-in-up animate-delay-${(index + 1) * 100}`,
'draggable-module-card'
@ -97,6 +98,7 @@
@position-change="handlePositionChange"
@size-change="handleSizeChange"
@open-rule-pdf="handleOpenRulePdf"
@open-case-pdf="handleOpenCasePdf"
/>
</div>
</section>
@ -129,7 +131,7 @@
<el-dialog
v-model="rulePdfDialogVisible"
title="PDF预览"
width="80%"
width="85%"
class="rule-pdf-dialog"
:close-on-click-modal="false"
:append-to-body="true"
@ -149,13 +151,13 @@
</template>
<script setup lang="ts">
import { ref, computed, onMounted, onUnmounted, reactive } from 'vue';
import { ref, computed, onMounted, onUnmounted, reactive, watch } from 'vue';
import { useDashboardStore } from '@/store/modules/dashboard';
import { useAclStore } from '@/store/modules/acl';
import { MODULE_CONFIGS } from '@/constants/modules';
import ModuleCard from '@/components/dashboard/ModuleCard.vue';
import DetailModal from '@/components/dashboard/DetailModal.vue';
import type { ModuleConfig, ModuleType, SearchResult, StatusStats, Position, Size, RuleRegulation } from '@/types/dashboard';
import type { ModuleConfig, ModuleType, SearchResult, StatusStats, Position, Size, RuleRegulation, TypicalCase } from '@/types/dashboard';
import { webSocketService } from '@/utils/websocket';
import { baseURL } from '@/config';
import { v4 as uuidv4 } from 'uuid';
@ -512,6 +514,16 @@ const getFaultCauses = (moduleType: ModuleType) => {
return [];
};
/**
* 获取典型案例数据
*/
const getTypicalCases = (moduleType: ModuleType) => {
if (moduleType === 'typicalCase') {
return dashboardStore.typicalCases;
}
return [];
};
/**
* 处理搜索输入
*/
@ -1096,6 +1108,60 @@ onUnmounted(() => {
webSocketService.off('error');
// disconnect App.vue 使
});
// PDF
const rulePdfDialogVisible = ref(false);
const currentRulePdfUrl = ref('');
const rulePdfLoading = ref(false);
const handleOpenRulePdf = (rule: RuleRegulation) => {
if (!rule.fileUrl) {
ElMessage.warning('该条目未配置预览文件');
return;
}
// PDF URL
rulePdfLoading.value = true;
currentRulePdfUrl.value = '';
//
rulePdfDialogVisible.value = true;
// PDF URL
setTimeout(() => {
currentRulePdfUrl.value = rule.fileUrl;
}, 100);
};
const handleOpenCasePdf = (caseItem: TypicalCase) => {
if (!caseItem.fileUrl) {
ElMessage.warning('该案例未配置预览文件');
return;
}
// PDF URL
rulePdfLoading.value = true;
currentRulePdfUrl.value = '';
//
rulePdfDialogVisible.value = true;
// PDF URL
setTimeout(() => {
currentRulePdfUrl.value = caseItem.fileUrl;
}, 100);
};
//
watch(rulePdfDialogVisible, (newValue) => {
if (!newValue) {
//
setTimeout(() => {
currentRulePdfUrl.value = '';
rulePdfLoading.value = false;
}, 300); //
}
});
</script>
<style scoped lang="scss">
@ -1228,7 +1294,7 @@ onUnmounted(() => {
font-size: 16px;
color: #ffffff;
padding: 12px 0;
min-height: 80px;
min-height: 40px;
max-height: 200px;
resize: none;
overflow-y: auto;
@ -1869,21 +1935,7 @@ onUnmounted(() => {
color: #00A2FF;
}
}
</style>
// PDF
const rulePdfDialogVisible = ref(false);
const currentRulePdfUrl = ref('');
const rulePdfLoading = ref(false);
const handleOpenRulePdf = (rule: RuleRegulation) => {
if (!rule.fileUrl) {
ElMessage.warning('该条目未配置预览文件');
return;
}
currentRulePdfUrl.value = rule.fileUrl;
rulePdfLoading.value = true;
rulePdfDialogVisible.value = true;
};
/* 规章制度 PDF 预览弹窗样式(页面级) */
.rule-pdf-dialog {
:deep(.el-dialog__header) {
@ -1898,7 +1950,7 @@ const handleOpenRulePdf = (rule: RuleRegulation) => {
}
.preview-content {
min-height: 600px;
min-height: 750px;
display: flex;
align-items: center;
justify-content: center;
@ -1908,8 +1960,9 @@ const handleOpenRulePdf = (rule: RuleRegulation) => {
.pdf-preview {
width: 100%;
height: 600px;
height: 750px;
border-radius: 8px;
overflow: hidden;
background: #ffffff;
}
</style>