修复bug
This commit is contained in:
@@ -10,26 +10,26 @@ const PrinterStatus = {
|
||||
P: '正在打印'
|
||||
}
|
||||
|
||||
// 设备报错
|
||||
const printer_errors = {
|
||||
'0x11': '从光盘桶抓取到光驱时,光盘为空,请添加光盘后点击重试',
|
||||
'0x12': '从光盘桶抓取到光驱时,抓取错误,请将该光盘放入光盘桶后点击重试',
|
||||
'0x13': '从光盘桶抓取到光驱时,其他错误,请将该光盘放入光盘桶后点击重试',
|
||||
'0x14': '从光盘桶抓取到打印托盘时,光盘为空,请添加光盘后点击重试',
|
||||
'0x15': '从光盘桶抓取到打印托盘时,抓取错误,请将该光盘放入光盘桶后点击重试',
|
||||
'0x16': '从光盘桶抓取到打印托盘时,其他错误,请将该光盘放入光盘桶后点击重试',
|
||||
'0x17': '从光驱抓取到打印托盘时,光盘为空,请检查光驱弹出并将该光盘放入后点击重试',
|
||||
'0x18': '从光驱抓取到打印托盘时,抓取错误,请将该光盘重新放入光驱后点击重试',
|
||||
'0x19': '从光驱抓取到打印托盘时,其他错误,请将该光盘重新放入光驱后点击重试',
|
||||
'0x1a': '从打印托盘抓取到出口时,光盘为空,请检查打印托盘弹出并将该光盘放入后点击重试',
|
||||
'0x1b': '从打印托盘抓取到出口时,抓取错误,请将光该盘重新放入托盘后点击重试',
|
||||
'0x1c': '从打印托盘抓取到出口时,其他错误,请将该光盘重新放入托盘后点击重试',
|
||||
'0x1d': '从光驱抓取到出口时,光盘为空,光盘为空,请检查光驱弹出并将该光盘放入后点击重试',
|
||||
'0x1e': '从光驱抓取到出口时,抓取错误,请将该光盘重新放入光驱后点击重试',
|
||||
'0x1f': '从光驱抓取到出口时,其他错误,请将该光盘重新放入光驱后点击重试',
|
||||
'0x21': '作业开始时设备错误,请清除故障后点击重试',
|
||||
'0x10001': '通讯失败,请检查设备'
|
||||
}
|
||||
// // 设备报错
|
||||
// const printer_errors = {
|
||||
// '0x11': '从光盘桶抓取到光驱时,光盘为空,请添加光盘后点击重试',
|
||||
// '0x12': '从光盘桶抓取到光驱时,抓取错误,请将该光盘放入光盘桶后点击重试',
|
||||
// '0x13': '从光盘桶抓取到光驱时,其他错误,请将该光盘放入光盘桶后点击重试',
|
||||
// '0x14': '从光盘桶抓取到打印托盘时,光盘为空,请添加光盘后点击重试',
|
||||
// '0x15': '从光盘桶抓取到打印托盘时,抓取错误,请将该光盘放入光盘桶后点击重试',
|
||||
// '0x16': '从光盘桶抓取到打印托盘时,其他错误,请将该光盘放入光盘桶后点击重试',
|
||||
// '0x17': '从光驱抓取到打印托盘时,光盘为空,请检查光驱弹出并将该光盘放入后点击重试',
|
||||
// '0x18': '从光驱抓取到打印托盘时,抓取错误,请将该光盘重新放入光驱后点击重试',
|
||||
// '0x19': '从光驱抓取到打印托盘时,其他错误,请将该光盘重新放入光驱后点击重试',
|
||||
// '0x1a': '从打印托盘抓取到出口时,光盘为空,请检查打印托盘弹出并将该光盘放入后点击重试',
|
||||
// '0x1b': '从打印托盘抓取到出口时,抓取错误,请将光该盘重新放入托盘后点击重试',
|
||||
// '0x1c': '从打印托盘抓取到出口时,其他错误,请将该光盘重新放入托盘后点击重试',
|
||||
// '0x1d': '从光驱抓取到出口时,光盘为空,光盘为空,请检查光驱弹出并将该光盘放入后点击重试',
|
||||
// '0x1e': '从光驱抓取到出口时,抓取错误,请将该光盘重新放入光驱后点击重试',
|
||||
// '0x1f': '从光驱抓取到出口时,其他错误,请将该光盘重新放入光驱后点击重试',
|
||||
// '0x21': '作业开始时设备错误,请清除故障后点击重试',
|
||||
// '0x10001': '通讯失败,请检查设备'
|
||||
// }
|
||||
|
||||
// 提交任务报错
|
||||
const submitErros = {
|
||||
@@ -56,7 +56,7 @@ const Error = {
|
||||
4: '墨盒容量低',
|
||||
5: '机械臂移动错误,请按功能按钮重试。',
|
||||
6: '设备处于离线状态',
|
||||
7: '设备门盖被打开,请关闭门盖。',
|
||||
7: '设备门盖被打开,为了避免打印机失联请关闭门盖。',
|
||||
8: '从打印托盘上抓取光盘时错误,请手动将光盘取走再点击重试。',
|
||||
9: '多张光盘被抓取或移动,请检查后手动将光盘放回原处再点重试,如重试后继续错误,则需校准设备后再来重试。',
|
||||
10: '从进盘仓到光驱的过程中,抓取错误,请手动将光盘放回进盘仓后重试。',
|
||||
@@ -66,7 +66,7 @@ const Error = {
|
||||
14: '检测墨盒错误',
|
||||
15: '校准光盘桶失败',
|
||||
16: '等待打印完成超时',
|
||||
17: '从打印托盘抓取光盘时未找到光盘。',
|
||||
17: '从打印托盘抓取光盘时未找到光盘,请检查后手动将光盘取走后再点重试。',
|
||||
18: '设备清洗',
|
||||
19: '从光驱上抓取光盘时错误,请手动将光盘取走再点击重试',
|
||||
32: '其他错误',
|
||||
@@ -230,6 +230,7 @@ const defaultData = {
|
||||
system_ip: '', //主机IP
|
||||
system_name: '', //主机名称
|
||||
is_set_cddev: 0,
|
||||
serial_no: '', //设备序列号
|
||||
// 左右光盘桶
|
||||
strong_list: [
|
||||
{
|
||||
@@ -326,6 +327,7 @@ const getDefaultState = () => {
|
||||
refreshTime: 10,
|
||||
// 错误信息
|
||||
printer_error: {},
|
||||
clearError: false,
|
||||
...defaultData
|
||||
}
|
||||
}
|
||||
@@ -381,12 +383,12 @@ const actions = {
|
||||
strong_list[info.strong_list[i].strong_pos] = info.strong_list[i]
|
||||
}
|
||||
info.strongList = strong_list
|
||||
if (info.cover_flag && info.printer_name !== 'SE3') {
|
||||
// commit('setData', { name: 'printer_error', data: { type: 'error', notify: '设备门盖被打开,请关闭门盖。' } })
|
||||
}
|
||||
if (info.calibration_flag) {
|
||||
commit('setData', { name: 'printer_error', data: { type: 'error', notify: '请校准打印机。' } })
|
||||
}
|
||||
// if (info.cover_flag && info.printer_name !== 'SE3') {
|
||||
// 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') {
|
||||
@@ -463,13 +465,15 @@ const actions = {
|
||||
if (error.error) {
|
||||
let errors = error.error
|
||||
let continues = [8, 9, 10, 11, 12, 17, 19]
|
||||
let nojumps = [7, 8, 9, 10, 11, 12, 17, 19]
|
||||
for (let i = 0; i < errors.length; i++) {
|
||||
setTimeout(() => {
|
||||
let req = continues.indexOf(errors[i]) > -1 ? 'continue_task' : ''
|
||||
let noJump = nojumps.indexOf(errors[i]) > -1
|
||||
if (req) {
|
||||
commit('setData', { name: 'printer_error', data: { type: 'error', confirm: Error[errors[i]], req: req } })
|
||||
commit('setData', { name: 'printer_error', data: { type: 'error', confirm: Error[errors[i]], req: req, noJump: noJump } })
|
||||
} else {
|
||||
commit('setData', { name: 'printer_error', data: { type: 'error', notify: Error[errors[i]] } })
|
||||
commit('setData', { name: 'printer_error', data: { type: 'error', notify: Error[errors[i]], noJump: noJump } })
|
||||
}
|
||||
}, 500)
|
||||
}
|
||||
@@ -514,6 +518,12 @@ const actions = {
|
||||
commit('setData', { name: 'printer_error', data: { type: 'error', notify: printer_errors[error.printer_error] } })
|
||||
}
|
||||
}
|
||||
// 清除错误提示
|
||||
} else if (data.resp_name === 'clean_iface_err') {
|
||||
commit('setData', { name: 'clearError', data: true })
|
||||
setTimeout(() => {
|
||||
commit('setData', { name: 'clearError', data: false })
|
||||
}, 1000);
|
||||
// 执行错误提示
|
||||
} else {
|
||||
if (data.resp_info.res_code === 0) {
|
||||
@@ -543,12 +553,12 @@ const actions = {
|
||||
websocketsend({ commit, dispatch }, res) {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (!state.serviceStatus) {
|
||||
commit('setData', { name: 'printer_error', data: { type: 'warning', message: '服务连接中,请耐心等待' } })
|
||||
commit('setData', { name: 'printer_error', data: { type: 'warning', message: '服务连接中,请耐心等待', noJump: true } })
|
||||
reject()
|
||||
return
|
||||
}
|
||||
if (!state.isConnect) {
|
||||
commit('setData', { name: 'printer_error', data: { type: 'warning', message: '请先打开服务' } })
|
||||
commit('setData', { name: 'printer_error', data: { type: 'warning', message: '请先打开服务', noJump: true } })
|
||||
reject()
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user