lxl-dev #3

Merged
zhanghao merged 122 commits from lxl-dev into dev 2026-08-24 13:55:18 +08:00
Showing only changes of commit b332a5461e - Show all commits

View File

@ -0,0 +1,18 @@
const AGV_RUNTIME_STATUS = {
0: { label: '未知', type: 'info', className: 'unknown' },
1: { label: '已断开', type: 'info', className: 'offline' },
2: { label: '空闲', type: 'success', className: 'online' },
3: { label: '手动模式', type: 'primary', className: 'manual' },
4: { label: '自动运行', type: 'primary', className: 'running' },
5: { label: '充电中', type: 'warning', className: 'charging' },
6: { label: '已暂停', type: 'warning', className: 'paused' },
7: { label: '已停止', type: 'info', className: 'stopped' },
8: { label: '故障', type: 'danger', className: 'fault' },
9: { label: '急停', type: 'danger', className: 'emergency' },
}
const resolveStatus = value => AGV_RUNTIME_STATUS[Number(value)] || AGV_RUNTIME_STATUS[0]
export const agvRuntimeStatusLabel = value => resolveStatus(value).label
export const agvRuntimeStatusType = value => resolveStatus(value).type
export const agvRuntimeStatusClass = value => resolveStatus(value).className