更新优化

This commit is contained in:
24kycj
2025-06-22 23:25:40 +08:00
parent 5441064823
commit 311f94644c
3 changed files with 56 additions and 9 deletions
+31
View File
@@ -151,6 +151,37 @@ export default {
'重试'
)
}
if (data.isClear) {
btns = [
that.$createElement(
'el-button',
{
props: { type: 'primary', size: 'mini' },
style: { marginLeft: '10px' },
on: {
click: () => {
// 清除错误
that.$store
.dispatch('chat/websocketsend', {
req_name: 'cleanError',
req_type: 2,
req_info: {}
})
.then(() => {
notifyInstance.close()
setTimeout(() => {
that.errors.splice(that.errors.indexOf(data.message), 1)
}, 10000);
})
.catch(() => {})
}
}
},
'重试'
)
]
}
return that.$createElement('div', [that.$createElement('p', { style: 'margin-top: 8px; line-height: 24px' }, data.message), that.$createElement('div', { style: 'margin-top: 8px; text-align: right' }, btns)])
}
// 创建通知实例
+10 -2
View File
@@ -69,6 +69,8 @@ const Error = {
17: '从打印托盘抓取光盘时未找到光盘,请检查后手动将光盘取走后再点重试。',
18: '设备清洗',
19: '从光驱上抓取光盘时错误,请手动将光盘取走再点击重试',
20: '盘仓为空',
21: '光盘抓取错误',
32: '其他错误',
}
// const Error1 = {
@@ -466,14 +468,20 @@ const actions = {
let errors = error.error
let continues = [8, 9, 10, 11, 12, 17, 19]
let nojumps = [7, 8, 9, 10, 11, 12, 17, 19]
let isClears = [20, 21]
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
let isClear = isClears.indexOf(errors[i]) > -1
if (isClear) {
noJump = false
req = ''
}
if (req) {
commit('setData', { name: 'printer_error', data: { type: 'error', confirm: Error[errors[i]], req: req, noJump: noJump } })
commit('setData', { name: 'printer_error', data: { type: 'error', confirm: Error[errors[i]], req: req, noJump: noJump, isClear: isClear } })
} else {
commit('setData', { name: 'printer_error', data: { type: 'error', notify: Error[errors[i]], noJump: noJump } })
commit('setData', { name: 'printer_error', data: { type: 'error', notify: Error[errors[i]], isClear: isClear } })
}
}, 500)
}
+15 -7
View File
@@ -376,6 +376,10 @@ export default {
{
value: 6,
label: '设置光盘桶'
},
{
value: 7,
label: '刷新光盘桶'
}
],
// 剩余容量
@@ -501,6 +505,10 @@ export default {
{
value: 2,
label: '清除错误'
},
{
value: 7,
label: '刷新光盘桶'
}
]
} else {
@@ -526,6 +534,10 @@ export default {
{
value: 6,
label: '设置光盘桶'
},
{
value: 7,
label: '刷新光盘桶'
}
]
}
@@ -737,10 +749,6 @@ export default {
})
return
}
that.$message({
message: that.runList[index].label,
type: 'success'
})
clearTimeout(outTimer)
switch (that.runVal) {
case 1:
@@ -865,9 +873,9 @@ export default {
}, 120000)
break
case 7:
// 进入运输模式
// 刷新光盘桶
that
.$confirm('请确保已经取掉左右光盘桶托架,再点击确定', '温馨提示', {
.$confirm('点击确定后将刷新所有光盘桶的光盘数量。', '温馨提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@@ -875,7 +883,7 @@ export default {
.then(() => {
that.$store
.dispatch('chat/websocketsend', {
req_name: 'TransportMode',
req_name: 'RefreshCdNum',
req_type: 2,
req_info: {}
})