|
|
@ -383,6 +383,8 @@
|
|
|
|
import { Check } from '@element-plus/icons-vue'
|
|
|
|
import { Check } from '@element-plus/icons-vue'
|
|
|
|
import { ref } from 'vue'
|
|
|
|
import { ref } from 'vue'
|
|
|
|
import { getDictLabel, DICT_TYPE } from '@/utils/dict'
|
|
|
|
import { getDictLabel, DICT_TYPE } from '@/utils/dict'
|
|
|
|
|
|
|
|
import urlimg from '@/assets/imgs/exlogo.png'
|
|
|
|
|
|
|
|
|
|
|
|
import { getDeliverOrder, getDeliverOrderSubListByDeliveryOrderId } from '@/api/heli/deliverorder'
|
|
|
|
import { getDeliverOrder, getDeliverOrderSubListByDeliveryOrderId } from '@/api/heli/deliverorder'
|
|
|
|
import { formatDate } from '@/utils/formatTime'
|
|
|
|
import { formatDate } from '@/utils/formatTime'
|
|
|
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
|
|
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
|
|
@ -517,7 +519,6 @@ const subTotalAmount = ref(0)
|
|
|
|
const splitThreshold = 5
|
|
|
|
const splitThreshold = 5
|
|
|
|
const logoDataUrl = ref('') // 存储Logo的Base64编码数据URL
|
|
|
|
const logoDataUrl = ref('') // 存储Logo的Base64编码数据URL
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 打开弹窗 */
|
|
|
|
/** 打开弹窗 */
|
|
|
|
const open = async (id: number) => {
|
|
|
|
const open = async (id: number) => {
|
|
|
|
dialogVisible.value = true
|
|
|
|
dialogVisible.value = true
|
|
|
@ -556,7 +557,7 @@ const open = async (id: number) => {
|
|
|
|
//图片
|
|
|
|
//图片
|
|
|
|
// 在组件挂载后,将Logo图片转换为Base64编码数据URL
|
|
|
|
// 在组件挂载后,将Logo图片转换为Base64编码数据URL
|
|
|
|
const logoImage = new Image()
|
|
|
|
const logoImage = new Image()
|
|
|
|
logoImage.src = '/src/assets/imgs/exlogo.png' // 替换为Logo图片路径
|
|
|
|
logoImage.src = urlimg // 替换为Logo图片路径
|
|
|
|
|
|
|
|
|
|
|
|
logoImage.onload = () => {
|
|
|
|
logoImage.onload = () => {
|
|
|
|
const canvas = document.createElement('canvas')
|
|
|
|
const canvas = document.createElement('canvas')
|
|
|
@ -566,7 +567,6 @@ const open = async (id: number) => {
|
|
|
|
context.drawImage(logoImage, 0, 0)
|
|
|
|
context.drawImage(logoImage, 0, 0)
|
|
|
|
const base64String = canvas.toDataURL('image/png')
|
|
|
|
const base64String = canvas.toDataURL('image/png')
|
|
|
|
logoDataUrl.value = base64String
|
|
|
|
logoDataUrl.value = base64String
|
|
|
|
console.log(logoDataUrl.value)
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
formLoading.value = false
|
|
|
|
formLoading.value = false
|
|
|
|