|
@ -165,7 +165,7 @@ export default { |
|
|
` |
|
|
` |
|
|
} |
|
|
} |
|
|
str += ` |
|
|
str += ` |
|
|
|
|
|
|
|
|
<div class="left-item"> |
|
|
<div class="left-item"> |
|
|
<div class="label">打印时间</div> |
|
|
<div class="label">打印时间</div> |
|
|
<div class="value">${item.printTimes}</div> |
|
|
<div class="value">${item.printTimes}</div> |
|
@ -201,7 +201,7 @@ export default { |
|
|
const fileReader = new plus.io.FileReader() |
|
|
const fileReader = new plus.io.FileReader() |
|
|
fileReader.onloadend = (evt) => { |
|
|
fileReader.onloadend = (evt) => { |
|
|
console.log(`文件路径${evt.target.result}`) |
|
|
console.log(`文件路径${evt.target.result}`) |
|
|
this.data[index].barcodeBase64 = evt.target.result |
|
|
// this.data[index].barcodeBase64 = evt.target.result |
|
|
this.generateBase64(index + 1) |
|
|
this.generateBase64(index + 1) |
|
|
} |
|
|
} |
|
|
fileReader.readAsDataURL(file) |
|
|
fileReader.readAsDataURL(file) |
|
@ -258,6 +258,29 @@ export default { |
|
|
this.originData = JSON.parse(option.points) |
|
|
this.originData = JSON.parse(option.points) |
|
|
} |
|
|
} |
|
|
this.data = this.originData |
|
|
this.data = this.originData |
|
|
|
|
|
this.$nextTick(async () => { |
|
|
|
|
|
// 获取二维码图片临时路径 |
|
|
|
|
|
const el = this.$refs['qrcodeRef'] |
|
|
|
|
|
let str = '' |
|
|
|
|
|
el.forEach(async (item, index) => { |
|
|
|
|
|
await item.canvasToTempFilePath({ |
|
|
|
|
|
success: async (res) => { |
|
|
|
|
|
// 将临时路径转换成base64 |
|
|
|
|
|
await pathToBase64(res.tempFilePath).then(base64 => { |
|
|
|
|
|
this.data[index].barcodeBase64 = base64 |
|
|
|
|
|
if (index == el.length - 1) { |
|
|
|
|
|
this.isLoadFinish = true |
|
|
|
|
|
} |
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
console.log(err); |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
fail(err) { |
|
|
|
|
|
console.log('err:::', err) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|