优化bug

This commit is contained in:
24kycj
2025-01-09 20:00:19 +08:00
parent 0393992771
commit 8299d2bc54
3 changed files with 100 additions and 17 deletions
+55
View File
@@ -355,6 +355,12 @@ const actions = {
strong_list[info.strong_list[i].strong_pos] = info.strong_list[i]
}
info.strongList = strong_list
if (info.cover_flag) {
commit('setData', { name: 'printer_error', data: { type: 'error', notify: '设备门盖被打开,请关闭门盖。' } })
}
if (info.calibration_flag) {
commit('setData', { name: 'printer_error', data: { type: 'error', notify: '请先校准设备。' } })
}
commit('setData', { name: 'printer_info', data: info })
// 驱动信息
} else if (data.resp_name === 'cd_info') {
@@ -470,6 +476,55 @@ const actions = {
}
}
}
// 执行错误提示
} else if (data.resp_name === 'autoSetCDDevRes') {
if (data.resp_info.res_code === 0) {
} else {
commit('setData', { name: 'printer_error', data: { type: 'error', notify: '自动设置驱动失败' } })
}
} else if (data.resp_name === 'setCDStrongRes') {
if (data.resp_info.res_code === 0) {
} else {
commit('setData', { name: 'printer_error', data: { type: 'error', notify: '设置盘仓失败' } })
}
} else if (data.resp_name === 'setCDDeviceRes') {
if (data.resp_info.res_code === 0) {
} else {
commit('setData', { name: 'printer_error', data: { type: 'error', notify: '设置光驱失败' } })
}
} else if (data.resp_name === 'cleanErrorRes') {
if (data.resp_info.res_code === 0) {
} else {
commit('setData', { name: 'printer_error', data: { type: 'error', notify: '清除错误失败' } })
}
} else if (data.resp_name === 'CaliCDStoneRes') {
if (data.resp_info.res_code === 0) {
} else {
commit('setData', { name: 'printer_error', data: { type: 'error', notify: '校准盘仓失败' } })
}
} else if (data.resp_name === 'CaliPrinterRes') {
if (data.resp_info.res_code === 0) {
} else {
commit('setData', { name: 'printer_error', data: { type: 'error', notify: '校准打印机失败' } })
}
} else if (data.resp_name === 'TransportModeRes') {
if (data.resp_info.res_code === 0) {
} else {
commit('setData', { name: 'printer_error', data: { type: 'error', notify: '进入运输模式失败' } })
}
} else if (data.resp_name === 'RefreshCdNumRes') {
if (data.resp_info.res_code === 0) {
} else {
commit('setData', { name: 'printer_error', data: { type: 'error', notify: '刷新CD数量失败' } })
}
} else {
// 未知消息
console.log('未知消息: ' + JSON.stringify(data))