mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-09 19:16:43 +08:00
Merge branch 'FCRS-743-【需求】关于金掌桂开发机构实时出单功能和动态贺报生成的请示' into dev-new
This commit is contained in:
@@ -67,8 +67,6 @@ export default {
|
||||
created() {},
|
||||
methods: {
|
||||
double_click(index, fn, data) {
|
||||
console.log(this.tableData[index], 'data')
|
||||
console.log(this.$refs['th' + index], 6)
|
||||
let timestamp = 0
|
||||
this.$refs['th' + index][0].addEventListener('click', () => {
|
||||
const now = new Date()
|
||||
|
||||
@@ -82,19 +82,32 @@ export default {
|
||||
}).then((canvas) => {
|
||||
// 转换canvas为PNG图片并压缩
|
||||
canvas.toBlob(
|
||||
function (blob) {
|
||||
const a = document.createElement('a')
|
||||
a.href = URL.createObjectURL(blob)
|
||||
a.download = '业绩贺报.png'
|
||||
a.click()
|
||||
(blob) => {
|
||||
// const a = document.createElement('a')
|
||||
// a.href = URL.createObjectURL(blob)
|
||||
// a.download = '业绩贺报.png'
|
||||
// a.click()
|
||||
// let newimg = new Image()
|
||||
// newimg.src = URL.createObjectURL(blob)
|
||||
// newimg.onload = function () {
|
||||
// URL.revokeObjectURL(newimg.src)
|
||||
// callback(newimg)
|
||||
// }
|
||||
}
|
||||
// 'image/png',
|
||||
this.blobToBase64(blob).then((base64String) => {
|
||||
console.log(base64String, '==')
|
||||
EWebBridge.webCallAppInJs('download', {
|
||||
name: '开门红方案.png',
|
||||
url: base64String
|
||||
})
|
||||
.then(() => {
|
||||
console.log('下载完成')
|
||||
})
|
||||
.catch(() => {
|
||||
this.$toast.fail('图片下载失败,请重新下载!')
|
||||
})
|
||||
})
|
||||
},
|
||||
'image/png'
|
||||
// quality
|
||||
)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user