From 676e73b8780c6cb49596865de81e6d806544ef10 Mon Sep 17 00:00:00 2001
From: 张诺 <zhang_12370@163.com>
Date: 星期四, 09 四月 2026 13:29:28 +0800
Subject: [PATCH] fix: 阳光印刷:添加附件功能,新增时可以上传附件、审核时要求可以预览附件.公司电话为必填项,改为选填 fix:调整供应商管理表单验证及优化知识库文件处理 - 将供应商管理中的公司电话字段改为非必填 - 移除销售报价中未使用的 delLedgerFile 导入 - 优化知识库文件上传组件,添加文件操作按钮和预览功能 - 修复知识库编辑时文件列表显示异常问题 - 统一文件下载和预览的处理逻辑

---
 src/views/system/user/profile/userAvatar.vue |   30 +++++++++---------------------
 1 files changed, 9 insertions(+), 21 deletions(-)

diff --git a/src/views/system/user/profile/userAvatar.vue b/src/views/system/user/profile/userAvatar.vue
index ae36e39..ff1c9ef 100644
--- a/src/views/system/user/profile/userAvatar.vue
+++ b/src/views/system/user/profile/userAvatar.vue
@@ -4,18 +4,9 @@
     <el-dialog :title="title" v-model="open" width="800px" append-to-body @opened="modalOpened" @close="closeDialog">
       <el-row>
         <el-col :xs="24" :md="12" :style="{ height: '350px' }">
-          <vue-cropper
-            ref="cropper"
-            :img="options.img"
-            :info="true"
-            :autoCrop="options.autoCrop"
-            :autoCropWidth="options.autoCropWidth"
-            :autoCropHeight="options.autoCropHeight"
-            :fixedBox="options.fixedBox"
-            :outputType="options.outputType"
-            @realTime="realTime"
-            v-if="visible"
-          />
+          <vue-cropper ref="cropper" :img="options.img" :info="true" :autoCrop="options.autoCrop"
+            :autoCropWidth="options.autoCropWidth" :autoCropHeight="options.autoCropHeight" :fixedBox="options.fixedBox"
+            :outputType="options.outputType" @realTime="realTime" v-if="visible" />
         </el-col>
         <el-col :xs="24" :md="12" :style="{ height: '350px' }">
           <div class="avatar-upload-preview">
@@ -26,15 +17,12 @@
       <br />
       <el-row>
         <el-col :lg="2" :md="2">
-          <el-upload
-            action="#"
-            :http-request="requestUpload"
-            :show-file-list="false"
-            :before-upload="beforeUpload"
-          >
+          <el-upload action="#" :http-request="requestUpload" :show-file-list="false" :before-upload="beforeUpload">
             <el-button>
               閫夋嫨
-              <el-icon class="el-icon--right"><Upload /></el-icon>
+              <el-icon class="el-icon--right">
+                <Upload />
+              </el-icon>
             </el-button>
           </el-upload>
         </el-col>
@@ -94,7 +82,7 @@
 }
 
 /** 瑕嗙洊榛樿涓婁紶琛屼负 */
-function requestUpload() {}
+function requestUpload() { }
 
 /** 鍚戝乏鏃嬭浆 */
 function rotateLeft() {
@@ -133,7 +121,7 @@
     formData.append("avatarfile", data, options.filename)
     uploadAvatar(formData).then(response => {
       open.value = false
-      options.img = import.meta.env.VITE_APP_BASE_API + response.imgUrl
+      options.img = import.meta.env.VITE_APP_BASE_API + '/profile/' + response.imgUrl
       userStore.avatar = options.img
       proxy.$modal.msgSuccess("淇敼鎴愬姛")
       visible.value = false

--
Gitblit v1.9.3