uu
This commit is contained in:
parent
1242118a62
commit
6ea8e5ddef
@ -14,7 +14,7 @@
|
|||||||
<u-row custom-style="width: 500rpx;min-height: 150rpx;padding: 10rpx;">
|
<u-row custom-style="width: 500rpx;min-height: 150rpx;padding: 10rpx;">
|
||||||
<view>
|
<view>
|
||||||
<u-line-progress :percentage="percentage" activeColor="#B12D29" height="30"></u-line-progress>
|
<u-line-progress :percentage="percentage" activeColor="#B12D29" height="30"></u-line-progress>
|
||||||
<view class="pt-20">正在打印, 请勿退出页面, 如果卡住了请重连打印机重试</view>
|
<view class="pt-20">正在发送数据, 请勿退出页面, 如果卡住了请重连打印机重试</view>
|
||||||
</view>
|
</view>
|
||||||
</u-row>
|
</u-row>
|
||||||
</tpx-dialog>
|
</tpx-dialog>
|
||||||
@ -71,11 +71,27 @@ export default {
|
|||||||
let commond = prtInstance.getPrintCmd()
|
let commond = prtInstance.getPrintCmd()
|
||||||
console.log("打印命令组装完成,开始打印=====", commond)
|
console.log("打印命令组装完成,开始打印=====", commond)
|
||||||
printModule.print(commond)
|
printModule.print(commond)
|
||||||
|
await that.loadPrintProcess()
|
||||||
// printModule.printTestSimple(deviceId)
|
// printModule.printTestSimple(deviceId)
|
||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 模拟打印进度, 用于加载进度条
|
||||||
|
async loadPrintProcess(){
|
||||||
|
let that = this
|
||||||
|
this.percentage = 0
|
||||||
|
let addLen = 10
|
||||||
|
for(let i=0; i<100; i = i + addLen) {
|
||||||
|
await new Promise((resolve)=> {
|
||||||
|
setTimeout(()=> {
|
||||||
|
that.percentage = i
|
||||||
|
resolve()
|
||||||
|
}, 3000/addLen)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
that.percentage = 0
|
||||||
|
that.showToast('数据发送完毕')
|
||||||
|
},
|
||||||
renderCanvasImg(filePath) {
|
renderCanvasImg(filePath) {
|
||||||
let that = this
|
let that = this
|
||||||
showLoading()
|
showLoading()
|
||||||
|
|||||||
@ -15,7 +15,7 @@
|
|||||||
<u-row custom-style="width: 500rpx;min-height: 150rpx;padding: 10rpx;">
|
<u-row custom-style="width: 500rpx;min-height: 150rpx;padding: 10rpx;">
|
||||||
<view>
|
<view>
|
||||||
<u-line-progress :percentage="percentage" activeColor="#B12D29" height="30"></u-line-progress>
|
<u-line-progress :percentage="percentage" activeColor="#B12D29" height="30"></u-line-progress>
|
||||||
<view class="pt-20">正在打印, 请勿退出页面, 如果卡住了请重连打印机重试</view>
|
<view class="pt-20">正在发送数据, 请勿退出页面, 如果卡住了请重连打印机重试</view>
|
||||||
</view>
|
</view>
|
||||||
</u-row>
|
</u-row>
|
||||||
</tpx-dialog>
|
</tpx-dialog>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user