调整bug

This commit is contained in:
24kycj
2025-05-13 15:52:13 +08:00
parent 944eae1948
commit 73cca88ed3
3 changed files with 64 additions and 21 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ function createWindow () {
require("@electron/remote/main").initialize(); require("@electron/remote/main").initialize();
require("@electron/remote/main").enable(mainWindow.webContents); require("@electron/remote/main").enable(mainWindow.webContents);
// 禁用默认菜单 // 禁用默认菜单
Menu.setApplicationMenu(null); // Menu.setApplicationMenu(null);
// mainWindow.maximize() // mainWindow.maximize()
mainWindow.show() mainWindow.show()
mainWindow.loadURL(winURL) mainWindow.loadURL(winURL)
+7 -3
View File
@@ -461,16 +461,20 @@ const actions = {
let error = data.resp_info let error = data.resp_info
if (error.error) { if (error.error) {
let errors = error.error let errors = error.error
console.log(errors) let continues = [8, 9, 10, 11, 12]
for (let i = 0; i < errors.length; i++) { for (let i = 0; i < errors.length; i++) {
setTimeout(() => { setTimeout(() => {
commit('setData', { name: 'printer_error', data: { type: 'error', notify: Error[errors[i]] } }) let req = continues.indexOf(errors[i]) > -1 ? 'continue_task' : ''
if (req) {
commit('setData', { name: 'printer_error', data: { type: 'error', confirm: Error[errors[i]], req: req } })
} else {
commit('setData', { name: 'printer_error', data: { type: 'error', notify: Error[errors[i]] } })
}
}, 500) }, 500)
} }
} }
if (error.error1) { if (error.error1) {
let errors = error.error1.toString(2).split('').reverse() let errors = error.error1.toString(2).split('').reverse()
console.log(errors)
for (let i = 0; i < errors.length; i++) { for (let i = 0; i < errors.length; i++) {
if (errors[i] == 1) { if (errors[i] == 1) {
setTimeout(() => { setTimeout(() => {
+56 -17
View File
@@ -185,6 +185,10 @@ export default {
{ {
id: 3, id: 3,
name: '进入运输模式' name: '进入运输模式'
},
{
id: 5,
name: '进入循环模式'
} }
], ],
refreshTime: 10, refreshTime: 10,
@@ -344,6 +348,10 @@ export default {
{ {
id: 3, id: 3,
name: '进入运输模式' name: '进入运输模式'
},
{
id: 5,
name: '进入循环模式'
} }
] ]
} }
@@ -365,26 +373,34 @@ export default {
switch (e.id) { switch (e.id) {
case 1: case 1:
// 校准设备 // 校准设备
that that.$store
.$confirm('请在打印机托盘放入一张光盘,点击确定后将自动校准打印机', '温馨提示', { .dispatch('chat/websocketsend', {
confirmButtonText: '确定', req_name: 'openPrinterClay',
cancelButtonText: '取消', req_type: 2,
type: 'warning' req_info: {}
}) })
.then(() => { .then(() => {
that.$store that
.dispatch('chat/websocketsend', { .$confirm('请在打印机托盘放入一张光盘,点击确定后将自动校准打印机', '温馨提示', {
req_name: 'CaliPrinter', confirmButtonText: '确定',
req_type: 2, cancelButtonText: '取消',
req_info: { type: 'warning'
cali_num: 2
}
}) })
.then(() => { .then(() => {
that.$message({ that.$store
message: '执行成功', .dispatch('chat/websocketsend', {
type: 'success' req_name: 'CaliPrinter',
}) req_type: 2,
req_info: {
cali_num: 2
}
})
.then(() => {
that.$message({
message: '执行成功',
type: 'success'
})
})
}) })
}) })
break break
@@ -507,7 +523,7 @@ export default {
that.$store that.$store
.dispatch('chat/websocketsend', { .dispatch('chat/websocketsend', {
req_name: 'CaliPrinterHead', req_name: 'CaliPrinterHead',
req_type: 1, req_type: 2,
req_info: {} req_info: {}
}) })
.then(() => { .then(() => {
@@ -658,6 +674,29 @@ export default {
}) })
}) })
break break
case 5:
// 进入循环模式
that
.$confirm('请确保已经取掉左右光盘桶托架,点击确定后设备将进入循环模式', '温馨提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
that.$store
.dispatch('chat/websocketsend', {
req_name: 'CycleMode',
req_type: 2,
req_info: {}
})
.then(() => {
that.$message({
message: '执行成功',
type: 'success'
})
})
})
break
} }
}, },
cdChange(index, e) { cdChange(index, e) {