diff --git a/src/components/previews/PreviewImage.vue b/src/components/previews/PreviewImage.vue new file mode 100644 index 0000000..26b49ca --- /dev/null +++ b/src/components/previews/PreviewImage.vue @@ -0,0 +1,147 @@ + + + + + + \ No newline at end of file diff --git a/src/views/moneyManage/receiveDetail/receiveDetail.vue b/src/views/moneyManage/receiveDetail/receiveDetail.vue index ecdc449..bfff5aa 100644 --- a/src/views/moneyManage/receiveDetail/receiveDetail.vue +++ b/src/views/moneyManage/receiveDetail/receiveDetail.vue @@ -998,6 +998,35 @@ const customUpload = async (options) => { ElMessage.error(`上传失败: ${error.msg || error.message || '网络异常'}`) } } + +// 预览图片函数 + +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 refundFormData = ref({ diff --git a/src/views/moneyManage/refundDetail/refundService.vue b/src/views/moneyManage/refundDetail/refundService.vue index 556f40b..1ccd383 100644 --- a/src/views/moneyManage/refundDetail/refundService.vue +++ b/src/views/moneyManage/refundDetail/refundService.vue @@ -67,12 +67,16 @@ - - - + + +