diff --git a/src/renderer/views/dashboard/index.vue b/src/renderer/views/dashboard/index.vue index 2172631..bd33e21 100644 --- a/src/renderer/views/dashboard/index.vue +++ b/src/renderer/views/dashboard/index.vue @@ -335,13 +335,13 @@ export default { data() { return { deviceImg: { - '4200': { + 4200: { img1: require('@/assets/images/4200.png'), - img2: require('@/assets/images/4200-open.png'), + img2: require('@/assets/images/4200-open.png') }, - 'SE3': { + SE3: { img1: require('@/assets/images/SE3.png'), - img2: require('@/assets/images/SE3-open.png'), + img2: require('@/assets/images/SE3-open.png') } }, // 服务状态 @@ -477,7 +477,7 @@ export default { }, '$store.state.chat.printer_info': { handler(val) { - let data = {...val} + let data = { ...val } if (this.currentRunVal === 6) { data.strongList = this.printer_info.strongList } @@ -592,7 +592,7 @@ export default { .$prompt('请输入管理员密码并点击确定以执行开启服务操作', '温馨提示', { confirmButtonText: '确定', cancelButtonText: '取消', - inputType: 'password', + inputType: 'password' }) .then(({ value }) => { that.serviceLoading = true @@ -668,6 +668,13 @@ export default { }) return } + if ((that.cd_list[0]&&that.cd_list[0].copy_scheduler) || (that.cd_list[1]&&that.cd_list[1].copy_scheduler)) { + that.$message({ + message: '正在任务中,无法进行操作', + type: 'warning' + }) + return + } // that.$message({ // message: that.runList[index].label, // type: 'success' @@ -708,7 +715,7 @@ export default { .then(() => { that.$store .dispatch('chat/websocketsend', { - req_name: 'autoSetCDDev', + req_name: 'cleanError', req_type: 2, req_info: {} }) @@ -719,18 +726,6 @@ export default { }) }) }) - that.$store - .dispatch('chat/websocketsend', { - req_name: 'cleanError', - req_type: 2, - req_info: {} - }) - .then(() => { - that.$message({ - message: '执行成功', - type: 'success' - }) - }) break case 3: // 校准盘仓 @@ -743,7 +738,7 @@ export default { .then(() => { that.$store .dispatch('chat/websocketsend', { - req_name: 'autoSetCDDev', + req_name: 'CaliCDStone', req_type: 2, req_info: {} }) @@ -754,18 +749,6 @@ export default { }) }) }) - that.$store - .dispatch('chat/websocketsend', { - req_name: 'CaliCDStone', - req_type: 2, - req_info: {} - }) - .then(() => { - that.$message({ - message: '执行成功', - type: 'success' - }) - }) break case 4: // 校准设备 @@ -778,8 +761,8 @@ export default { .then(() => { that.$store .dispatch('chat/websocketsend', { - req_name: 'autoSetCDDev', - req_type: 2, + req_name: 'CaliPrinter', + req_type: 1, req_info: {} }) .then(() => { @@ -789,18 +772,6 @@ export default { }) }) }) - that.$store - .dispatch('chat/websocketsend', { - req_name: 'CaliPrinter', - req_type: 1, - req_info: {} - }) - .then(() => { - that.$message({ - message: '执行成功', - type: 'success' - }) - }) break case 5: // 自动匹配光驱 @@ -985,6 +956,13 @@ export default { }, // 跳转设置 goSet(e) { + if ((that.cd_list[0]&&that.cd_list[0].copy_scheduler) || (that.cd_list[1]&&that.cd_list[1].copy_scheduler)) { + that.$message({ + message: '正在任务中,无法进行操作', + type: 'warning' + }) + return + } that.$router.push({ path: e }) }, // 退出登录