From 3ba8323cb7cc42f1441a41d998dad3e5512dbbae Mon Sep 17 00:00:00 2001 From: zlyx <1242874891@qq.com> Date: 星期一, 30 一月 2023 20:10:16 +0800 Subject: [PATCH] update 修改 BaseEntity 创建人, 修改人字段类型, 修改相关 LambdaQueryWrapper 类型判断 ; update 修改 CreateAndUpdateMetaObjectHandler#insertFill 字段填充保存相关参数id ; --- ruoyi-ui/src/components/FileUpload/index.vue | 16 +++++----------- 1 files changed, 5 insertions(+), 11 deletions(-) diff --git a/ruoyi-ui/src/components/FileUpload/index.vue b/ruoyi-ui/src/components/FileUpload/index.vue index 1095824..2e33c1b 100644 --- a/ruoyi-ui/src/components/FileUpload/index.vue +++ b/ruoyi-ui/src/components/FileUpload/index.vue @@ -74,7 +74,7 @@ number: 0, uploadList: [], baseUrl: process.env.VUE_APP_BASE_API, - uploadFileUrl: process.env.VUE_APP_BASE_API + "/system/oss/upload", // 涓婁紶鐨勫浘鐗囨湇鍔″櫒鍦板潃 + uploadFileUrl: process.env.VUE_APP_BASE_API + "/system/oss/upload", // 涓婁紶鏂囦欢鏈嶅姟鍣ㄥ湴鍧� headers: { Authorization: "Bearer " + getToken(), }, @@ -124,15 +124,9 @@ handleBeforeUpload(file) { // 鏍℃鏂囦欢绫诲瀷 if (this.fileType) { - let fileExtension = ""; - if (file.name.lastIndexOf(".") > -1) { - fileExtension = file.name.slice(file.name.lastIndexOf(".") + 1); - } - const isTypeOk = this.fileType.some((type) => { - if (file.type.indexOf(type) > -1) return true; - if (fileExtension && fileExtension.indexOf(type) > -1) return true; - return false; - }); + const fileName = file.name.split('.'); + const fileExt = fileName[fileName.length - 1]; + const isTypeOk = this.fileType.indexOf(fileExt) >= 0; if (!isTypeOk) { this.$modal.msgError(`鏂囦欢鏍煎紡涓嶆纭�, 璇蜂笂浼�${this.fileType.join("/")}鏍煎紡鏂囦欢!`); return false; @@ -156,7 +150,7 @@ }, // 涓婁紶澶辫触 handleUploadError(err) { - this.$modal.msgError("涓婁紶鍥剧墖澶辫触锛岃閲嶈瘯"); + this.$modal.msgError("涓婁紶鏂囦欢澶辫触锛岃閲嶈瘯"); this.$modal.closeLoading(); }, // 涓婁紶鎴愬姛鍥炶皟 -- Gitblit v1.9.3