From 1fa6ac40e2ce16e1174cec9ca538d45eeb660fdc Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期四, 05 六月 2025 18:17:56 +0800
Subject: [PATCH] 工作台

---
 src/components/FileUpload/index.vue |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/src/components/FileUpload/index.vue b/src/components/FileUpload/index.vue
index e00f7af..c41ce85 100644
--- a/src/components/FileUpload/index.vue
+++ b/src/components/FileUpload/index.vue
@@ -56,12 +56,12 @@
     // 澶у皬闄愬埗(MB)
     fileSize: {
       type: Number,
-      default: 5,
+      default: 20,
     },
     // 鏂囦欢绫诲瀷, 渚嬪['png', 'jpg', 'jpeg']
     fileType: {
       type: Array,
-      default: () => ["doc", "xls", "ppt", "txt", "pdf"],
+      default: () => ["doc", "docx", "xls", "xlsx", "ppt", "txt", "pdf", "jpg", "png"],
     },
     // 鏄惁鏄剧ず鎻愮ず
     isShowTip: {
@@ -153,7 +153,7 @@
     // 涓婁紶鎴愬姛鍥炶皟
     handleUploadSuccess(res, file) {
       if (res.code === 200) {
-        this.uploadList.push({ name: res.fileName, url: res.fileName });
+        this.uploadList.push({ name: res.newFileName, originalName: res.originalFilename , url: res.fileName });
         this.uploadedSuccessfully();
       } else {
         this.number--;
@@ -166,7 +166,9 @@
     // 鍒犻櫎鏂囦欢
     handleDelete(index) {
       this.fileList.splice(index, 1);
-      this.$emit("input", this.listToString(this.fileList));
+      // this.$emit("input", this.listToString(this.fileList));
+      //淇敼涓鸿繑鍥炴暟缁�
+      this.$emit("input", this.fileList);
     },
     // 涓婁紶缁撴潫澶勭悊
     uploadedSuccessfully() {
@@ -174,7 +176,9 @@
         this.fileList = this.fileList.concat(this.uploadList);
         this.uploadList = [];
         this.number = 0;
-        this.$emit("input", this.listToString(this.fileList));
+        // this.$emit("input", this.listToString(this.fileList));
+        //淇敼涓鸿繑鍥炴暟缁�
+        this.$emit("input", this.fileList);
         this.$modal.closeLoading();
       }
     },

--
Gitblit v1.8.0