fix:标签模板优化
This commit is contained in:
parent
d91db25ed6
commit
7ed39bb24a
|
@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue