优化bug
This commit is contained in:
@@ -355,6 +355,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) {
|
||||||
|
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 })
|
commit('setData', { name: 'printer_info', data: info })
|
||||||
// 驱动信息
|
// 驱动信息
|
||||||
} else if (data.resp_name === 'cd_info') {
|
} else if (data.resp_name === 'cd_info') {
|
||||||
@@ -470,6 +476,55 @@ const actions = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 执行错误提示
|
||||||
|
} else if (data.resp_name === 'autoSetCDDevRes') {
|
||||||
|
if (data.resp_info.res_code === 0) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
commit('setData', { name: 'printer_error', data: { type: 'error', notify: '自动设置驱动失败' } })
|
||||||
|
}
|
||||||
|
} else if (data.resp_name === 'setCDStrongRes') {
|
||||||
|
if (data.resp_info.res_code === 0) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
commit('setData', { name: 'printer_error', data: { type: 'error', notify: '设置盘仓失败' } })
|
||||||
|
}
|
||||||
|
} else if (data.resp_name === 'setCDDeviceRes') {
|
||||||
|
if (data.resp_info.res_code === 0) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
commit('setData', { name: 'printer_error', data: { type: 'error', notify: '设置光驱失败' } })
|
||||||
|
}
|
||||||
|
} else if (data.resp_name === 'cleanErrorRes') {
|
||||||
|
if (data.resp_info.res_code === 0) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
commit('setData', { name: 'printer_error', data: { type: 'error', notify: '清除错误失败' } })
|
||||||
|
}
|
||||||
|
} else if (data.resp_name === 'CaliCDStoneRes') {
|
||||||
|
if (data.resp_info.res_code === 0) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
commit('setData', { name: 'printer_error', data: { type: 'error', notify: '校准盘仓失败' } })
|
||||||
|
}
|
||||||
|
} else if (data.resp_name === 'CaliPrinterRes') {
|
||||||
|
if (data.resp_info.res_code === 0) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
commit('setData', { name: 'printer_error', data: { type: 'error', notify: '校准打印机失败' } })
|
||||||
|
}
|
||||||
|
} else if (data.resp_name === 'TransportModeRes') {
|
||||||
|
if (data.resp_info.res_code === 0) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
commit('setData', { name: 'printer_error', data: { type: 'error', notify: '进入运输模式失败' } })
|
||||||
|
}
|
||||||
|
} else if (data.resp_name === 'RefreshCdNumRes') {
|
||||||
|
if (data.resp_info.res_code === 0) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
commit('setData', { name: 'printer_error', data: { type: 'error', notify: '刷新CD数量失败' } })
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// 未知消息
|
// 未知消息
|
||||||
console.log('未知消息: ' + JSON.stringify(data))
|
console.log('未知消息: ' + JSON.stringify(data))
|
||||||
|
|||||||
@@ -162,7 +162,7 @@
|
|||||||
:class="{
|
:class="{
|
||||||
device_status1: printer_info.printer_status === 'I',
|
device_status1: printer_info.printer_status === 'I',
|
||||||
device_status2: printer_info.printer_status === 'B' || printer_info.printer_status === 'P',
|
device_status2: printer_info.printer_status === 'B' || printer_info.printer_status === 'P',
|
||||||
device_status3: printer_info.cover_flag || printer_info.calibration_flag || printer_info.lack_ink || !isConnect || !serviceStatus
|
device_status3: printer_info.lack_ink || !isConnect || !serviceStatus
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<div class="device_status_dot"></div>
|
<div class="device_status_dot"></div>
|
||||||
@@ -548,13 +548,13 @@ export default {
|
|||||||
...mapGetters(['name', 'roles']),
|
...mapGetters(['name', 'roles']),
|
||||||
runText() {
|
runText() {
|
||||||
let text = this.$store.state.chat.PrinterStatus[this.printer_info.printer_status]
|
let text = this.$store.state.chat.PrinterStatus[this.printer_info.printer_status]
|
||||||
if (this.printer_info.cover_flag) {
|
// if (this.printer_info.cover_flag) {
|
||||||
text = '设备门盖被打开,请关闭门盖。'
|
// text = '设备门盖被打开,请关闭门盖。'
|
||||||
}
|
// }
|
||||||
if (this.printer_info.calibration_flag) {
|
// if (this.printer_info.calibration_flag) {
|
||||||
text = '请先校准设备'
|
// text = '请先校准设备'
|
||||||
this.runVal = 4
|
// this.runVal = 4
|
||||||
}
|
// }
|
||||||
if (this.printer_info.lack_ink) {
|
if (this.printer_info.lack_ink) {
|
||||||
text = '缺墨警告'
|
text = '缺墨警告'
|
||||||
}
|
}
|
||||||
@@ -622,7 +622,8 @@ export default {
|
|||||||
that
|
that
|
||||||
.$prompt('请输入管理员密码并点击确定以执行关闭服务操作', '温馨提示', {
|
.$prompt('请输入管理员密码并点击确定以执行关闭服务操作', '温馨提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消'
|
cancelButtonText: '取消',
|
||||||
|
inputType: 'password'
|
||||||
})
|
})
|
||||||
.then(({ value }) => {
|
.then(({ value }) => {
|
||||||
that.serviceLoading = true
|
that.serviceLoading = true
|
||||||
|
|||||||
@@ -12,14 +12,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form_content">
|
<div class="form_content">
|
||||||
<div class="flex_box form_option">
|
|
||||||
<div class="form_label">校准设备</div>
|
|
||||||
<div class="form_val">
|
|
||||||
<div class="flex_box flex_wrap form_tabs">
|
|
||||||
<div @click="handleMove(item)" v-for="(item, index) in moveList" :key="index" class="form_tab">{{ item.name }}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="flex_box form_option">
|
<div class="flex_box form_option">
|
||||||
<div class="form_label">设置设备</div>
|
<div class="form_label">设置设备</div>
|
||||||
<div class="form_val">
|
<div class="form_val">
|
||||||
@@ -28,6 +20,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="flex_box form_option">
|
||||||
|
<div class="form_label">校准设备</div>
|
||||||
|
<div class="form_val">
|
||||||
|
<div class="flex_box flex_wrap form_tabs">
|
||||||
|
<div @click="handleMove(item)" v-for="(item, index) in moveList" :key="index" class="form_tab">{{ item.name }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="flex_box form_option">
|
<div class="flex_box form_option">
|
||||||
<div class="form_label">维护设备</div>
|
<div class="form_label">维护设备</div>
|
||||||
<div class="form_val">
|
<div class="form_val">
|
||||||
@@ -152,6 +152,10 @@ export default {
|
|||||||
{
|
{
|
||||||
id: 4,
|
id: 4,
|
||||||
name: '校准盘仓'
|
name: '校准盘仓'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 5,
|
||||||
|
name: '刷新CD数量'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
actionList: [
|
actionList: [
|
||||||
@@ -339,6 +343,29 @@ export default {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
break
|
break
|
||||||
|
case 5:
|
||||||
|
// 刷新CD数量
|
||||||
|
that
|
||||||
|
.$confirm('请在左右进盘仓各放入一张光盘,点击确定后将刷新CD数量', '温馨提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
that.$store
|
||||||
|
.dispatch('chat/websocketsend', {
|
||||||
|
req_name: 'RefreshCdNum',
|
||||||
|
req_type: 2,
|
||||||
|
req_info: {}
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
that.$message({
|
||||||
|
message: '执行成功',
|
||||||
|
type: 'success'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
break
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 设置设备
|
// 设置设备
|
||||||
|
|||||||
Reference in New Issue
Block a user