优化错误提示,ios文件刻录

This commit is contained in:
24kycj
2025-06-09 18:18:50 +08:00
parent 91e19e4780
commit 0ee97073c0
6 changed files with 98 additions and 64 deletions
+61 -56
View File
@@ -56,9 +56,14 @@ const Error = {
4: '墨盒容量低',
5: '机械臂移动错误,请按功能按钮重试。',
6: '设备处于离线状态',
7: '设备门盖被打开',
7: '设备门盖被打开,请关闭门盖。',
8: '从打印托盘上抓取光盘时错误,请手动将光盘取走再点击重试。',
9: '多张光盘被抓取或移动,请检查后手动将光盘放回原处再点重试,如重试后继续错误,则需校准设备后再来重试。',
10: '从进盘仓到光驱的过程中,抓取错误,请手动将光盘放回进盘仓后重试。',
11: '从进盘仓到打印托盘的过程中,抓取错误,请手动将光盘放回进盘仓后重试。',
12: '从光驱到打印托盘的过程中,抓取错误,请手动将光盘放回光驱后重试。',
13: '打印机需要校准',
14: '检测墨盒错误',
15: '校准光盘桶失败',
16: '等待打印完成超时',
17: '从打印托盘抓取光盘时未找到光盘。',
@@ -66,31 +71,31 @@ const Error = {
19: '从光驱上抓取光盘时错误,请手动将光盘取走再点击重试',
32: '其他错误',
}
const Error1 = {
0: '托盘移动错误',
1: '墨盒类型错误',
2: '抓取光盘时未检测到光盘光盘已用完',
3: '光盘掉落',
4: '墨水车空警告',
5: '光盘抓手错误',
6: '抓取多张光盘错误',
7: '机械臂挂钩错误或者机械臂归位错误'
}
// const Error1 = {
// 0: '托盘移动错误',
// 1: '墨盒类型错误',
// 2: '抓取光盘时未检测到光盘光盘已用完',
// 3: '光盘掉落',
// 4: '墨水车空警告',
// 5: '光盘抓手错误',
// 6: '抓取多张光盘错误',
// 7: '机械臂挂钩错误或者机械臂归位错误'
// }
const Error2 = {
0: '墨水车伺服系统错误',
1: '墨水车失速错误',
2: '墨盒数据读取错误',
3: '打印图像超出范围',
4: '环境温度超出正常使用范围',
5: '墨盒短路',
6: '型号错误',
7: '缓冲区溢出错误'
}
// const Error2 = {
// 0: '墨水车伺服系统错误',
// 1: '墨水车失速错误',
// 2: '墨盒数据读取错误',
// 3: '打印图像超出范围',
// 4: '环境温度超出正常使用范围',
// 5: '墨盒短路',
// 6: '型号错误',
// 7: '缓冲区溢出错误'
// }
const Error3 = {
0: '光盘已经打印'
}
// const Error3 = {
// 0: '光盘已经打印'
// }
// 光驱信息
const CDName = {
@@ -122,7 +127,7 @@ const CDTypes = {
6: 'BD_TL',
7: 'BD_QL'
}
const size = process.platform === 'linux' ? 1000 : 1024
const size = 1024
const cd_types = [
{
value: 1,
@@ -377,7 +382,7 @@ const actions = {
}
info.strongList = strong_list
if (info.cover_flag && info.printer_name !== 'SE3') {
commit('setData', { name: 'printer_error', data: { type: 'error', notify: '设备门盖被打开,请关闭门盖。' } })
// commit('setData', { name: 'printer_error', data: { type: 'error', notify: '设备门盖被打开,请关闭门盖。' } })
}
if (info.calibration_flag) {
commit('setData', { name: 'printer_error', data: { type: 'error', notify: '请校准打印机。' } })
@@ -469,36 +474,36 @@ const actions = {
}, 500)
}
}
if (error.error1) {
let errors = error.error1.toString(2).split('').reverse()
for (let i = 0; i < errors.length; i++) {
if (errors[i] == 1) {
setTimeout(() => {
commit('setData', { name: 'printer_error', data: { type: 'error', notify: Error1[i] } })
}, 500)
}
}
}
if (error.error2) {
let errors = error.error2.toString(2).split('').reverse()
for (let i = 0; i < errors.length; i++) {
if (errors[i] == 1) {
setTimeout(() => {
commit('setData', { name: 'printer_error', data: { type: 'error', notify: Error2[i] } })
}, 500)
}
}
}
if (error.error3) {
let errors = error.error3.toString(2).split('').reverse()
for (let i = 0; i < errors.length; i++) {
if (errors[i] == 1) {
setTimeout(() => {
commit('setData', { name: 'printer_error', data: { type: 'error', notify: Error3[i] } })
}, 500)
}
}
}
// if (error.error1) {
// let errors = error.error1.toString(2).split('').reverse()
// for (let i = 0; i < errors.length; i++) {
// if (errors[i] == 1) {
// setTimeout(() => {
// commit('setData', { name: 'printer_error', data: { type: 'error', notify: Error1[i] } })
// }, 500)
// }
// }
// }
// if (error.error2) {
// let errors = error.error2.toString(2).split('').reverse()
// for (let i = 0; i < errors.length; i++) {
// if (errors[i] == 1) {
// setTimeout(() => {
// commit('setData', { name: 'printer_error', data: { type: 'error', notify: Error2[i] } })
// }, 500)
// }
// }
// }
// if (error.error3) {
// let errors = error.error3.toString(2).split('').reverse()
// for (let i = 0; i < errors.length; i++) {
// if (errors[i] == 1) {
// setTimeout(() => {
// commit('setData', { name: 'printer_error', data: { type: 'error', notify: Error3[i] } })
// }, 500)
// }
// }
// }
if (error.printer_error) {
error.printer_error = '0x' + error.printer_error.toString(16)
let continues = ['0x11', '0x12', '0x13', '0x14', '0x15', '0x16', '0x17', '0x18', '0x19', '0x1a', '0x1b', '0x1c', '0x1d', '0x1e', '0x1f', '0x21']