From 0d9c8915b4c9deef17459f886ef136ad3d3b9440 Mon Sep 17 00:00:00 2001 From: 田源 <lastanimals@163.com> Date: 星期四, 04 七月 2024 16:50:04 +0800 Subject: [PATCH] 成员管理 分配部门 部门搜索 添加 修改 导入人员 下载导入模板 --- 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