const format = { // 格式化Wcs任务状态 formatTaskStatus(taskStatus) { switch (taskStatus) { case 1: return {msg: '离开起点', type: 'success', color: ''}; case 2: return {msg: '执行中', type: 'success', color: ''}; case 3: return {msg: '到达终点', type: 'primary', color: ''}; case 4: return {msg: '执行完成', type: 'primary', color: ''}; case 9: return {msg: '执行异常', type: 'warning', color: ''}; case 0: return {msg: '待执行', type: 'info', color: ''}; default: return {msg: `未知状态:${taskStatus}`, type: 'danger', color: ''}; } } } export default format