From 328b0158c3d97f87efc7da22a1e3f5a7c258b127 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期四, 04 七月 2024 19:17:17 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 Source/plt-web/plt-web-ui/src/components/actions/base/uploadFile.vue |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/Source/plt-web/plt-web-ui/src/components/actions/base/uploadFile.vue b/Source/plt-web/plt-web-ui/src/components/actions/base/uploadFile.vue
index dc1c5b1..6b73c7c 100644
--- a/Source/plt-web/plt-web-ui/src/components/actions/base/uploadFile.vue
+++ b/Source/plt-web/plt-web-ui/src/components/actions/base/uploadFile.vue
@@ -118,14 +118,13 @@
     async beforeUpload(file) {
       // 鑾峰彇鏂囦欢鎵╁睍鍚�
       const fileExtension = file.name.split(".").pop().toLowerCase(); // 杞崲涓哄皬鍐欎互閬垮厤澶у皬鍐欎笉鍖归厤鐨勯棶棰�
-      const allowedExtensions = this.paramVOS.fileType || ['css', 'csv', 'doc', 'gif', 'html', 'jpe', 'jpg', 'jpeg', 'png', 'js', 'json',
-        'mp3', 'mp4', 'xlsx', 'xml', 'zip', 'xhtml', 'wps', 'ppt', 'xls', 'word', 'pdf', 'txt'];
 
-      // 妫�鏌ユ枃浠舵墿灞曞悕鏄惁鍦ㄥ厑璁哥殑鏂囦欢鎵╁睍鍚嶆暟缁勪腑
-      if (!allowedExtensions.includes(fileExtension)) {
-        // 涓婁紶鏍煎紡涓嶇鍚堣姹傦紝鎻愮ず閿欒淇℃伅骞跺彇娑堜笂浼�
-        this.$message.error(`鍙厑璁镐笂浼�${allowedExtensions.toString()}鏍煎紡鐨勬枃浠禶);
-        return Promise.reject(false);
+      if(this.paramVOS.fileType){
+        if (!this.paramVOS.fileType.includes(fileExtension)) {
+          // 涓婁紶鏍煎紡涓嶇鍚堣姹傦紝鎻愮ず閿欒淇℃伅骞跺彇娑堜笂浼�
+          this.$message.error(`鍙厑璁镐笂浼�${this.paramVOS.fileType.toString()}鏍煎紡鐨勬枃浠禶);
+          return Promise.reject(false);
+        }
       }
 
       this.pageLoading = this.$loading({

--
Gitblit v1.9.3