|
|
|
@ -91,7 +91,7 @@ |
|
|
|
<el-table-column prop="refundVoucher" label="退款截图" width="120"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-image v-if="scope.row.refundVoucher" :src="scope.row.refundVoucher" |
|
|
|
:preview-src-list="[scope.row.refundVoucher]" |
|
|
|
@click="previewImage(scope.row.refundVoucher)" |
|
|
|
style="width: 40px; height: 40px; cursor: pointer;z-index: 99999;" fit="cover" /> |
|
|
|
<span v-else style="color: #FA5A1E;">待补充</span> |
|
|
|
</template> |
|
|
|
@ -477,6 +477,36 @@ const currencies = ref([ |
|
|
|
label: '越南盾' |
|
|
|
} |
|
|
|
]) |
|
|
|
|
|
|
|
// 预览图片函数 |
|
|
|
const previewImage = (imageUrl) => { |
|
|
|
// 使用 element-plus 的 el-image 组件实现图片预览功能 |
|
|
|
const imageElement = document.createElement('img'); |
|
|
|
imageElement.src = imageUrl; |
|
|
|
imageElement.style.maxWidth = '80vw'; |
|
|
|
imageElement.style.maxHeight = '80vh'; |
|
|
|
|
|
|
|
const viewer = document.createElement('div'); |
|
|
|
viewer.style.position = 'fixed'; |
|
|
|
viewer.style.top = '0'; |
|
|
|
viewer.style.left = '0'; |
|
|
|
viewer.style.width = '100vw'; |
|
|
|
viewer.style.height = '100vh'; |
|
|
|
viewer.style.backgroundColor = 'rgba(0, 0, 0, 0.7)'; |
|
|
|
viewer.style.display = 'flex'; |
|
|
|
viewer.style.justifyContent = 'center'; |
|
|
|
viewer.style.alignItems = 'center'; |
|
|
|
viewer.style.zIndex = '9999'; |
|
|
|
viewer.style.overflow = 'auto'; |
|
|
|
|
|
|
|
viewer.appendChild(imageElement); |
|
|
|
document.body.appendChild(viewer); |
|
|
|
|
|
|
|
viewer.addEventListener('click', () => { |
|
|
|
document.body.removeChild(viewer); |
|
|
|
}); |
|
|
|
}; |
|
|
|
|
|
|
|
const handleImageChange = (file) => { |
|
|
|
uploadRef.value.submit() |
|
|
|
} |
|
|
|
|