| | |
| | | * Queue hook |
| | | * 打印队列方法 |
| | | */ |
| | | export default function QueuePrinter(list,hiprintTemplate,columnsNum){ |
| | | export default function QueuePrinter(list,hiprintTemplate,columnsNum,printer){ |
| | | const queue = JSON.parse(JSON.stringify(list)); |
| | | // 添加打印任务 |
| | | this.printJob = function(job) { |
| | |
| | | |
| | | if(typeof queue === 'object' && Array.isArray(queue)){ |
| | | if (queue.length > 0) { |
| | | hiprintTemplate.value.print2(queue[0]) |
| | | console.log(printer) |
| | | hiprintTemplate.value.print2(queue[0],{printer:printer}) |
| | | queue.shift(); // 打印任务,并从队列中移除 |
| | | }else{ |
| | | clearInterval(this.tick) |