From 14c161a917777f7a47ae241347fbf4c306e6395b Mon Sep 17 00:00:00 2001 From: shijing Date: Fri, 11 Apr 2025 15:23:40 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=89=93=E5=8D=B0=E6=AC=A1=E6=95=B0?= =?UTF-8?q?=E5=A4=A7=E4=BA=8E1=E6=97=B6=EF=BC=8C=E5=86=8D=E8=B5=B0?= =?UTF-8?q?=E5=BE=AA=E7=8E=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/template/printmaterial.vue | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src/views/template/printmaterial.vue b/src/views/template/printmaterial.vue index 24c60183..b7778071 100644 --- a/src/views/template/printmaterial.vue +++ b/src/views/template/printmaterial.vue @@ -105,17 +105,22 @@ export default { let obj = {}; obj.printer_commands = str; obj.printer_name = that.printer_name; - 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 ); + if(that.print_count>1){ + 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("请等待当前打印任务完成"); + } }else{ - that.$message.warning("请等待当前打印任务完成"); + that.$API.wpm.prints.req(obj).then((response) => {}); } + }) }, closed(){