From 0a4c49b0436d17788afd39715ade8da1c7876433 Mon Sep 17 00:00:00 2001 From: 24kycj <1637269896@qq.com> Date: Thu, 5 Dec 2024 16:02:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/views/dashboard/index.vue | 1 + src/renderer/views/manage/index.vue | 142 ++++++++++++++++++++----- 2 files changed, 118 insertions(+), 25 deletions(-) diff --git a/src/renderer/views/dashboard/index.vue b/src/renderer/views/dashboard/index.vue index 805c85e..dfd968a 100644 --- a/src/renderer/views/dashboard/index.vue +++ b/src/renderer/views/dashboard/index.vue @@ -629,6 +629,7 @@ export default { }, 120000); break; case 7: + // 进入运输模式 that.$confirm('请确保已经取掉左右光盘仓托架,再点击确定', '温馨提示', { confirmButtonText: '确定', cancelButtonText: '取消', diff --git a/src/renderer/views/manage/index.vue b/src/renderer/views/manage/index.vue index ae23b31..e721e1c 100644 --- a/src/renderer/views/manage/index.vue +++ b/src/renderer/views/manage/index.vue @@ -20,14 +20,22 @@ - + +
+
维护设备
+
+
+
{{ item.name }}
+
+
+
@@ -131,7 +139,7 @@ export default { moveList: [ { id: 1, - name: '校准设备' + name: '校准打印机' }, { id: 2, @@ -143,30 +151,32 @@ export default { }, { id: 4, - name: '手动校准驱动' + name: '校准盘仓' } ], actionList: [ { id: 1, - name: '重置工作站' + name: '手动设置光驱' }, { id: 2, - name: '重置工作站(有卡)' + name: '自动设置光驱' + }, + ], + serviceList: [ + { + id: 1, + name: '重启设备' + }, + { + id: 2, + name: '清除错误' }, { id: 3, - name: '核准色带灯' + name: '进入运输模式' }, - { - id: 4, - name: '初始化进卡槽' - }, - { - id: 5, - name: '清洁工作站' - } ], refreshTime: 10, sleepTime: 300000, @@ -232,7 +242,7 @@ export default { switch (e.id) { case 1: // 校准设备 - that.$store + this.$store .dispatch('chat/websocketsend', { req_name: 'CaliPrinter', req_type: 2, @@ -241,7 +251,7 @@ export default { } }) .then(() => { - that.$message({ + this.$message({ message: '执行成功', type: 'success' }) @@ -249,7 +259,7 @@ export default { break case 2: // 校准上光驱 - that.$store + this.$store .dispatch('chat/websocketsend', { req_name: 'CaliPrinter', req_type: 2, @@ -258,7 +268,7 @@ export default { } }) .then(() => { - that.$message({ + this.$message({ message: '执行成功', type: 'success' }) @@ -266,7 +276,7 @@ export default { break case 3: // 校准下光驱 - that.$store + this.$store .dispatch('chat/websocketsend', { req_name: 'CaliPrinter', req_type: 2, @@ -275,13 +285,32 @@ export default { } }) .then(() => { - that.$message({ + this.$message({ message: '执行成功', type: 'success' }) }) break case 4: + // 校准盘仓 + this.$store.dispatch('chat/websocketsend', { + req_name: 'CaliCDStone', + req_type: 2, + req_info: {} + }).then(() => { + this.$message({ + message: '执行成功', + type: 'success' + }) + }) + break + } + }, + // 设置设备 + handleAction(e) { + switch (e.id) { + case 1: + // 手动设置光驱 this.$store .dispatch('chat/websocketsend', { req_name: 'get_all_cd', @@ -292,6 +321,69 @@ export default { this.cdShow = true }) break + case 2: + // 自动设置光驱 + this.$store.dispatch('chat/websocketsend', { + req_name: 'autoSetCDDev', + req_type: 2, + req_info: {} + }).then(() => { + this.$message({ + message: '执行成功', + type: 'success' + }) + }) + break + } + }, + // 维护设备 + handleService(e) { + switch (e.id) { + case 1: + // 重启设备 + this.$store.dispatch('chat/websocketsend', { + req_name: 'resetPrinter', + req_type: 2, + req_info: {} + }).then(() => { + this.$message({ + message: '执行成功', + type: 'success' + }) + }) + break + case 2: + // 清除错误 + this.$store.dispatch('chat/websocketsend', { + req_name: 'cleanError', + req_type: 2, + req_info: {} + }).then(() => { + this.$message({ + message: '执行成功', + type: 'success' + }) + }) + break + case 3: + // 进入运输模式 + this.$confirm('请确保已经取掉左右光盘仓托架,再点击确定', '温馨提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.$store.dispatch('chat/websocketsend', { + req_name: 'TransportMode', + req_type: 2, + req_info: {} + }).then(() => { + this.$message({ + message: '执行成功', + type: 'success' + }) + }) + }) + break } }, cdChange(index, e) { @@ -310,7 +402,7 @@ export default { } }) .then(() => { - that.$message({ + this.$message({ message: '执行成功', type: 'success' }) @@ -327,7 +419,7 @@ export default { } }) .then(() => { - that.$message({ + this.$message({ message: '执行成功', type: 'success' })