diff --git a/src/views/template/printmaterial.vue b/src/views/template/printmaterial.vue index 24426209..24c60183 100644 --- a/src/views/template/printmaterial.vue +++ b/src/views/template/printmaterial.vue @@ -105,13 +105,16 @@ export default { let obj = {}; obj.printer_commands = str; obj.printer_name = that.printer_name; - if(that.$INTERVAL == null){ - that.$INTERVAL = setInterval(() => { + let printerInterval = that.$TOOL.data.get('printerInterval'); + if(printerInterval==null){ + let intervalID = setInterval(() => { that.printLabel(obj) }, 2000); that.visible = false; + that.$TOOL.data.set('printerInterval',intervalID ); + }else{ - that.$message.warning("请等待当前打印任务完成") + that.$message.warning("请等待当前打印任务完成"); } }) }, @@ -123,8 +126,9 @@ export default { that.$API.wpm.prints.req(obj).then((response) => { that.count_printed ++ if (that.count_printed >= that.print_count){ - clearInterval(that.$INTERVAL); - that.$INTERVAL = null; + let printerInterval = that.$TOOL.data.get('printerInterval'); + clearInterval(printerInterval); + that.$TOOL.data.set('printerInterval',null); } }); } diff --git a/src/views/wpm_gx/fmlog_detail.vue b/src/views/wpm_gx/fmlog_detail.vue index 4d972469..bbc2c2eb 100644 --- a/src/views/wpm_gx/fmlog_detail.vue +++ b/src/views/wpm_gx/fmlog_detail.vue @@ -178,7 +178,7 @@ > - + diff --git a/src/views/wpm_gx/handover_form.vue b/src/views/wpm_gx/handover_form.vue index 9a904e4d..a40c8648 100644 --- a/src/views/wpm_gx/handover_form.vue +++ b/src/views/wpm_gx/handover_form.vue @@ -182,12 +182,6 @@ 取消 -