修复bug
This commit is contained in:
+30
-1
@@ -59,6 +59,16 @@ export default {
|
|||||||
},
|
},
|
||||||
deep: true,
|
deep: true,
|
||||||
immediate: true
|
immediate: true
|
||||||
|
},
|
||||||
|
'$store.state.chat.clearError': {
|
||||||
|
handler(val) {
|
||||||
|
let that = this
|
||||||
|
if (val) {
|
||||||
|
that.$notify.closeAll()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
deep: true,
|
||||||
|
immediate: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -94,8 +104,27 @@ export default {
|
|||||||
'确定'
|
'确定'
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
if (data.noJump) {
|
||||||
|
btns = [
|
||||||
|
that.$createElement(
|
||||||
|
'el-button',
|
||||||
|
{
|
||||||
|
props: { type: 'primary', size: 'mini' },
|
||||||
|
style: { marginLeft: '10px' },
|
||||||
|
on: {
|
||||||
|
click: () => {
|
||||||
|
that.errors.splice(that.errors.indexOf(data.message), 1)
|
||||||
|
notifyInstance.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'确定'
|
||||||
|
)
|
||||||
|
]
|
||||||
|
}
|
||||||
if (data.confirm) {
|
if (data.confirm) {
|
||||||
btns[1] = that.$createElement(
|
let index = data.noJump ? 0 : 1
|
||||||
|
btns[index] = that.$createElement(
|
||||||
'el-button',
|
'el-button',
|
||||||
{
|
{
|
||||||
props: { type: 'primary', size: 'mini' },
|
props: { type: 'primary', size: 'mini' },
|
||||||
|
|||||||
@@ -170,6 +170,7 @@ export default {
|
|||||||
size: res.size,
|
size: res.size,
|
||||||
folder: false,
|
folder: false,
|
||||||
};
|
};
|
||||||
|
calcSize(item, _this.folderCalcCallback);
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
_this.insertList({
|
_this.insertList({
|
||||||
|
|||||||
@@ -635,7 +635,7 @@ export default {
|
|||||||
console.error('Error reading file:', error)
|
console.error('Error reading file:', error)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let isISO = fileList.every(item => item.name.indexOf('ISO') > -1 || item.name.indexOf('IMG') > -1)
|
let isISO = fileList.every(item => item.name.indexOf('.ISO') > -1 || item.name.indexOf('.IMG') > -1 || item.name.indexOf('.iso') > -1 || item.name.indexOf('.img') > -1)
|
||||||
if (that.form.copy_type == 2) {
|
if (that.form.copy_type == 2) {
|
||||||
if (fileList.length != 1 || !isISO) {
|
if (fileList.length != 1 || !isISO) {
|
||||||
this.$notify({
|
this.$notify({
|
||||||
|
|||||||
@@ -10,26 +10,26 @@ const PrinterStatus = {
|
|||||||
P: '正在打印'
|
P: '正在打印'
|
||||||
}
|
}
|
||||||
|
|
||||||
// 设备报错
|
// // 设备报错
|
||||||
const printer_errors = {
|
// const printer_errors = {
|
||||||
'0x11': '从光盘桶抓取到光驱时,光盘为空,请添加光盘后点击重试',
|
// '0x11': '从光盘桶抓取到光驱时,光盘为空,请添加光盘后点击重试',
|
||||||
'0x12': '从光盘桶抓取到光驱时,抓取错误,请将该光盘放入光盘桶后点击重试',
|
// '0x12': '从光盘桶抓取到光驱时,抓取错误,请将该光盘放入光盘桶后点击重试',
|
||||||
'0x13': '从光盘桶抓取到光驱时,其他错误,请将该光盘放入光盘桶后点击重试',
|
// '0x13': '从光盘桶抓取到光驱时,其他错误,请将该光盘放入光盘桶后点击重试',
|
||||||
'0x14': '从光盘桶抓取到打印托盘时,光盘为空,请添加光盘后点击重试',
|
// '0x14': '从光盘桶抓取到打印托盘时,光盘为空,请添加光盘后点击重试',
|
||||||
'0x15': '从光盘桶抓取到打印托盘时,抓取错误,请将该光盘放入光盘桶后点击重试',
|
// '0x15': '从光盘桶抓取到打印托盘时,抓取错误,请将该光盘放入光盘桶后点击重试',
|
||||||
'0x16': '从光盘桶抓取到打印托盘时,其他错误,请将该光盘放入光盘桶后点击重试',
|
// '0x16': '从光盘桶抓取到打印托盘时,其他错误,请将该光盘放入光盘桶后点击重试',
|
||||||
'0x17': '从光驱抓取到打印托盘时,光盘为空,请检查光驱弹出并将该光盘放入后点击重试',
|
// '0x17': '从光驱抓取到打印托盘时,光盘为空,请检查光驱弹出并将该光盘放入后点击重试',
|
||||||
'0x18': '从光驱抓取到打印托盘时,抓取错误,请将该光盘重新放入光驱后点击重试',
|
// '0x18': '从光驱抓取到打印托盘时,抓取错误,请将该光盘重新放入光驱后点击重试',
|
||||||
'0x19': '从光驱抓取到打印托盘时,其他错误,请将该光盘重新放入光驱后点击重试',
|
// '0x19': '从光驱抓取到打印托盘时,其他错误,请将该光盘重新放入光驱后点击重试',
|
||||||
'0x1a': '从打印托盘抓取到出口时,光盘为空,请检查打印托盘弹出并将该光盘放入后点击重试',
|
// '0x1a': '从打印托盘抓取到出口时,光盘为空,请检查打印托盘弹出并将该光盘放入后点击重试',
|
||||||
'0x1b': '从打印托盘抓取到出口时,抓取错误,请将光该盘重新放入托盘后点击重试',
|
// '0x1b': '从打印托盘抓取到出口时,抓取错误,请将光该盘重新放入托盘后点击重试',
|
||||||
'0x1c': '从打印托盘抓取到出口时,其他错误,请将该光盘重新放入托盘后点击重试',
|
// '0x1c': '从打印托盘抓取到出口时,其他错误,请将该光盘重新放入托盘后点击重试',
|
||||||
'0x1d': '从光驱抓取到出口时,光盘为空,光盘为空,请检查光驱弹出并将该光盘放入后点击重试',
|
// '0x1d': '从光驱抓取到出口时,光盘为空,光盘为空,请检查光驱弹出并将该光盘放入后点击重试',
|
||||||
'0x1e': '从光驱抓取到出口时,抓取错误,请将该光盘重新放入光驱后点击重试',
|
// '0x1e': '从光驱抓取到出口时,抓取错误,请将该光盘重新放入光驱后点击重试',
|
||||||
'0x1f': '从光驱抓取到出口时,其他错误,请将该光盘重新放入光驱后点击重试',
|
// '0x1f': '从光驱抓取到出口时,其他错误,请将该光盘重新放入光驱后点击重试',
|
||||||
'0x21': '作业开始时设备错误,请清除故障后点击重试',
|
// '0x21': '作业开始时设备错误,请清除故障后点击重试',
|
||||||
'0x10001': '通讯失败,请检查设备'
|
// '0x10001': '通讯失败,请检查设备'
|
||||||
}
|
// }
|
||||||
|
|
||||||
// 提交任务报错
|
// 提交任务报错
|
||||||
const submitErros = {
|
const submitErros = {
|
||||||
@@ -56,7 +56,7 @@ const Error = {
|
|||||||
4: '墨盒容量低',
|
4: '墨盒容量低',
|
||||||
5: '机械臂移动错误,请按功能按钮重试。',
|
5: '机械臂移动错误,请按功能按钮重试。',
|
||||||
6: '设备处于离线状态',
|
6: '设备处于离线状态',
|
||||||
7: '设备门盖被打开,请关闭门盖。',
|
7: '设备门盖被打开,为了避免打印机失联请关闭门盖。',
|
||||||
8: '从打印托盘上抓取光盘时错误,请手动将光盘取走再点击重试。',
|
8: '从打印托盘上抓取光盘时错误,请手动将光盘取走再点击重试。',
|
||||||
9: '多张光盘被抓取或移动,请检查后手动将光盘放回原处再点重试,如重试后继续错误,则需校准设备后再来重试。',
|
9: '多张光盘被抓取或移动,请检查后手动将光盘放回原处再点重试,如重试后继续错误,则需校准设备后再来重试。',
|
||||||
10: '从进盘仓到光驱的过程中,抓取错误,请手动将光盘放回进盘仓后重试。',
|
10: '从进盘仓到光驱的过程中,抓取错误,请手动将光盘放回进盘仓后重试。',
|
||||||
@@ -66,7 +66,7 @@ const Error = {
|
|||||||
14: '检测墨盒错误',
|
14: '检测墨盒错误',
|
||||||
15: '校准光盘桶失败',
|
15: '校准光盘桶失败',
|
||||||
16: '等待打印完成超时',
|
16: '等待打印完成超时',
|
||||||
17: '从打印托盘抓取光盘时未找到光盘。',
|
17: '从打印托盘抓取光盘时未找到光盘,请检查后手动将光盘取走后再点重试。',
|
||||||
18: '设备清洗',
|
18: '设备清洗',
|
||||||
19: '从光驱上抓取光盘时错误,请手动将光盘取走再点击重试',
|
19: '从光驱上抓取光盘时错误,请手动将光盘取走再点击重试',
|
||||||
32: '其他错误',
|
32: '其他错误',
|
||||||
@@ -230,6 +230,7 @@ const defaultData = {
|
|||||||
system_ip: '', //主机IP
|
system_ip: '', //主机IP
|
||||||
system_name: '', //主机名称
|
system_name: '', //主机名称
|
||||||
is_set_cddev: 0,
|
is_set_cddev: 0,
|
||||||
|
serial_no: '', //设备序列号
|
||||||
// 左右光盘桶
|
// 左右光盘桶
|
||||||
strong_list: [
|
strong_list: [
|
||||||
{
|
{
|
||||||
@@ -326,6 +327,7 @@ const getDefaultState = () => {
|
|||||||
refreshTime: 10,
|
refreshTime: 10,
|
||||||
// 错误信息
|
// 错误信息
|
||||||
printer_error: {},
|
printer_error: {},
|
||||||
|
clearError: false,
|
||||||
...defaultData
|
...defaultData
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -381,12 +383,12 @@ const actions = {
|
|||||||
strong_list[info.strong_list[i].strong_pos] = info.strong_list[i]
|
strong_list[info.strong_list[i].strong_pos] = info.strong_list[i]
|
||||||
}
|
}
|
||||||
info.strongList = strong_list
|
info.strongList = strong_list
|
||||||
if (info.cover_flag && info.printer_name !== 'SE3') {
|
// 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) {
|
// if (info.calibration_flag) {
|
||||||
commit('setData', { name: 'printer_error', data: { type: 'error', notify: '请校准打印机。' } })
|
// commit('setData', { name: 'printer_error', data: { type: 'error', notify: '请校准打印机。' } })
|
||||||
}
|
// }
|
||||||
commit('setData', { name: 'printer_info', data: info })
|
commit('setData', { name: 'printer_info', data: info })
|
||||||
// 驱动信息
|
// 驱动信息
|
||||||
} else if (data.resp_name === 'cd_info') {
|
} else if (data.resp_name === 'cd_info') {
|
||||||
@@ -463,13 +465,15 @@ const actions = {
|
|||||||
if (error.error) {
|
if (error.error) {
|
||||||
let errors = error.error
|
let errors = error.error
|
||||||
let continues = [8, 9, 10, 11, 12, 17, 19]
|
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++) {
|
for (let i = 0; i < errors.length; i++) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
let req = continues.indexOf(errors[i]) > -1 ? 'continue_task' : ''
|
let req = continues.indexOf(errors[i]) > -1 ? 'continue_task' : ''
|
||||||
|
let noJump = nojumps.indexOf(errors[i]) > -1
|
||||||
if (req) {
|
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 {
|
} 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)
|
}, 500)
|
||||||
}
|
}
|
||||||
@@ -514,6 +518,12 @@ const actions = {
|
|||||||
commit('setData', { name: 'printer_error', data: { type: 'error', notify: printer_errors[error.printer_error] } })
|
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 {
|
} else {
|
||||||
if (data.resp_info.res_code === 0) {
|
if (data.resp_info.res_code === 0) {
|
||||||
@@ -543,12 +553,12 @@ const actions = {
|
|||||||
websocketsend({ commit, dispatch }, res) {
|
websocketsend({ commit, dispatch }, res) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
if (!state.serviceStatus) {
|
if (!state.serviceStatus) {
|
||||||
commit('setData', { name: 'printer_error', data: { type: 'warning', message: '服务连接中,请耐心等待' } })
|
commit('setData', { name: 'printer_error', data: { type: 'warning', message: '服务连接中,请耐心等待', noJump: true } })
|
||||||
reject()
|
reject()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (!state.isConnect) {
|
if (!state.isConnect) {
|
||||||
commit('setData', { name: 'printer_error', data: { type: 'warning', message: '请先打开服务' } })
|
commit('setData', { name: 'printer_error', data: { type: 'warning', message: '请先打开服务', noJump: true } })
|
||||||
reject()
|
reject()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,13 +68,13 @@
|
|||||||
<div class="flex_box flex_row_center">
|
<div class="flex_box flex_row_center">
|
||||||
<el-dropdown trigger="click" :disabled="currentRunVal !== 6" @command="(e) => handleCommandCD(e, 2)">
|
<el-dropdown trigger="click" :disabled="currentRunVal !== 6" @command="(e) => handleCommandCD(e, 2)">
|
||||||
<div class="el-dropdown-link flex_box flex_row_center device_info_option_b">
|
<div class="el-dropdown-link flex_box flex_row_center device_info_option_b">
|
||||||
<div class="device_info_option_b_text">{{ printer_info.printer_name === 'SE3' ? '组合' : CDTypes[printer_info.strongList[2].cd_type] }} {{ printer_info.strongList[2].cd_num }}张</div>
|
<div class="device_info_option_b_text">{{ printer_info.printer_name === 'SE3' ? '组合' : CDTypes[changeCD.req_info.strong_list[1].strong_type] }} {{ printer_info.strongList[2].cd_num }}张</div>
|
||||||
<i v-if="currentRunVal === 6" class="el-icon-caret-bottom"></i>
|
<i v-if="currentRunVal === 6" class="el-icon-caret-bottom"></i>
|
||||||
</div>
|
</div>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item v-for="(item, index) in CDTypes" :key="index" :command="index"
|
<el-dropdown-item v-for="(item, index) in CDTypes" :key="index" :command="index"
|
||||||
><span
|
><span
|
||||||
:style="{ color: index === printer_info.strongList[2].cd_type ? '#409EFF' : '#000', 'font-weight': index === printer_info.strongList[2].cd_type ? '600' : '400' }"
|
:style="{ color: index === changeCD.req_info.strong_list[1].strong_type ? '#409EFF' : '#000', 'font-weight': index === changeCD.req_info.strong_list[1].strong_type ? '600' : '400' }"
|
||||||
>{{ item }}</span
|
>{{ item }}</span
|
||||||
></el-dropdown-item
|
></el-dropdown-item
|
||||||
>
|
>
|
||||||
@@ -96,13 +96,13 @@
|
|||||||
<div class="flex_box flex_row_center">
|
<div class="flex_box flex_row_center">
|
||||||
<el-dropdown trigger="click" :disabled="currentRunVal !== 6" @command="(e) => handleCommandCD(e, 1)">
|
<el-dropdown trigger="click" :disabled="currentRunVal !== 6" @command="(e) => handleCommandCD(e, 1)">
|
||||||
<div class="el-dropdown-link flex_box flex_row_center device_info_option_b">
|
<div class="el-dropdown-link flex_box flex_row_center device_info_option_b">
|
||||||
<div class="device_info_option_b_text">{{ printer_info.printer_name === 'SE3' ? '组合' : CDTypes[printer_info.strongList[1].cd_type] }} {{ printer_info.strongList[1].cd_num }}张</div>
|
<div class="device_info_option_b_text">{{ printer_info.printer_name === 'SE3' ? '组合' : CDTypes[changeCD.req_info.strong_list[0].strong_type] }} {{ printer_info.strongList[1].cd_num }}张</div>
|
||||||
<i v-if="currentRunVal === 6" class="el-icon-caret-bottom"></i>
|
<i v-if="currentRunVal === 6" class="el-icon-caret-bottom"></i>
|
||||||
</div>
|
</div>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item v-for="(item, index) in CDTypes" :key="index" :command="index"
|
<el-dropdown-item v-for="(item, index) in CDTypes" :key="index" :command="index"
|
||||||
><span
|
><span
|
||||||
:style="{ color: index === printer_info.strongList[1].cd_type ? '#409EFF' : '#000', 'font-weight': index === printer_info.strongList[1].cd_type ? '600' : '400' }"
|
:style="{ color: index === changeCD.req_info.strong_list[0].strong_type ? '#409EFF' : '#000', 'font-weight': index === changeCD.req_info.strong_list[0].strong_type ? '600' : '400' }"
|
||||||
>{{ item }}</span
|
>{{ item }}</span
|
||||||
></el-dropdown-item
|
></el-dropdown-item
|
||||||
>
|
>
|
||||||
@@ -142,7 +142,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="device_info_item">
|
<div class="device_info_item">
|
||||||
<div class="device_info_text">系统序列号:</div>
|
<div class="device_info_text">系统序列号:{{ printer_info.serial_no }}</div>
|
||||||
<div class="device_info_text">主机名:{{ printer_info.system_name }}</div>
|
<div class="device_info_text">主机名:{{ printer_info.system_name }}</div>
|
||||||
<div class="device_info_text">主机IP:{{ printer_info.system_ip }}</div>
|
<div class="device_info_text">主机IP:{{ printer_info.system_ip }}</div>
|
||||||
<div class="device_info_text">缓存空间:0G(共0G)</div>
|
<div class="device_info_text">缓存空间:0G(共0G)</div>
|
||||||
@@ -534,9 +534,9 @@ export default {
|
|||||||
this.is_set_cddev = true
|
this.is_set_cddev = true
|
||||||
this.goSet('/manage?type=cddev')
|
this.goSet('/manage?type=cddev')
|
||||||
}
|
}
|
||||||
if (this.printer_info.cartridge_flag == 0) {
|
// if (this.printer_info.cartridge_flag == 0) {
|
||||||
this.$store.commit('chat/setData', { name: 'printer_error', data: { type: 'error', notify: '请检查墨盒错误或墨盒未安装,否则作业将失败。' } })
|
// this.$store.commit('chat/setData', { name: 'printer_error', data: { type: 'error', notify: '请检查墨盒错误或墨盒未安装,否则作业将失败。', noJump: true } })
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
deep: true,
|
deep: true,
|
||||||
immediate: true
|
immediate: true
|
||||||
@@ -584,6 +584,13 @@ export default {
|
|||||||
// type: 'success'
|
// type: 'success'
|
||||||
// })
|
// })
|
||||||
this.serviceLoading = false
|
this.serviceLoading = false
|
||||||
|
that.$store
|
||||||
|
.dispatch('chat/websocketsend', {
|
||||||
|
req_name: 'get_printer_info',
|
||||||
|
req_type: 2,
|
||||||
|
req_info: {}
|
||||||
|
})
|
||||||
|
.then(() => { })
|
||||||
}
|
}
|
||||||
this.isConnect = val
|
this.isConnect = val
|
||||||
},
|
},
|
||||||
@@ -730,10 +737,10 @@ export default {
|
|||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// that.$message({
|
that.$message({
|
||||||
// message: that.runList[index].label,
|
message: that.runList[index].label,
|
||||||
// type: 'success'
|
type: 'success'
|
||||||
// })
|
})
|
||||||
clearTimeout(outTimer)
|
clearTimeout(outTimer)
|
||||||
switch (that.runVal) {
|
switch (that.runVal) {
|
||||||
case 1:
|
case 1:
|
||||||
@@ -885,7 +892,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 更换左右磁盘类型
|
// 更换左右磁盘类型
|
||||||
handleCommandCD(e, type) {
|
handleCommandCD(e, type) {
|
||||||
that.printer_info.strongList[type].cd_type = parseInt(e)
|
// that.printer_info.strongList[type].cd_type = parseInt(e)
|
||||||
that.changeCD.req_info.strong_list[type - 1].strong_type = parseInt(e)
|
that.changeCD.req_info.strong_list[type - 1].strong_type = parseInt(e)
|
||||||
},
|
},
|
||||||
sureCD() {
|
sureCD() {
|
||||||
|
|||||||
Reference in New Issue
Block a user