调整bug
This commit is contained in:
+1
-1
@@ -33,7 +33,7 @@ function createWindow () {
|
||||
require("@electron/remote/main").initialize();
|
||||
require("@electron/remote/main").enable(mainWindow.webContents);
|
||||
// 禁用默认菜单
|
||||
Menu.setApplicationMenu(null);
|
||||
// Menu.setApplicationMenu(null);
|
||||
// mainWindow.maximize()
|
||||
mainWindow.show()
|
||||
mainWindow.loadURL(winURL)
|
||||
|
||||
@@ -461,16 +461,20 @@ const actions = {
|
||||
let error = data.resp_info
|
||||
if (error.error) {
|
||||
let errors = error.error
|
||||
console.log(errors)
|
||||
let continues = [8, 9, 10, 11, 12]
|
||||
for (let i = 0; i < errors.length; i++) {
|
||||
setTimeout(() => {
|
||||
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)
|
||||
}
|
||||
}
|
||||
if (error.error1) {
|
||||
let errors = error.error1.toString(2).split('').reverse()
|
||||
console.log(errors)
|
||||
for (let i = 0; i < errors.length; i++) {
|
||||
if (errors[i] == 1) {
|
||||
setTimeout(() => {
|
||||
|
||||
@@ -185,6 +185,10 @@ export default {
|
||||
{
|
||||
id: 3,
|
||||
name: '进入运输模式'
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
name: '进入循环模式'
|
||||
}
|
||||
],
|
||||
refreshTime: 10,
|
||||
@@ -344,6 +348,10 @@ export default {
|
||||
{
|
||||
id: 3,
|
||||
name: '进入运输模式'
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
name: '进入循环模式'
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -365,6 +373,13 @@ export default {
|
||||
switch (e.id) {
|
||||
case 1:
|
||||
// 校准设备
|
||||
that.$store
|
||||
.dispatch('chat/websocketsend', {
|
||||
req_name: 'openPrinterClay',
|
||||
req_type: 2,
|
||||
req_info: {}
|
||||
})
|
||||
.then(() => {
|
||||
that
|
||||
.$confirm('请在打印机托盘放入一张光盘,点击确定后将自动校准打印机', '温馨提示', {
|
||||
confirmButtonText: '确定',
|
||||
@@ -387,6 +402,7 @@ export default {
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
break
|
||||
case 2:
|
||||
// 校准上光驱
|
||||
@@ -507,7 +523,7 @@ export default {
|
||||
that.$store
|
||||
.dispatch('chat/websocketsend', {
|
||||
req_name: 'CaliPrinterHead',
|
||||
req_type: 1,
|
||||
req_type: 2,
|
||||
req_info: {}
|
||||
})
|
||||
.then(() => {
|
||||
@@ -658,6 +674,29 @@ export default {
|
||||
})
|
||||
})
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user