From 08db4a5f53e17f3224e4f0caa66f1b76e3971aaf Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期三, 04 八月 2021 19:03:25 +0800 Subject: [PATCH] update 更改所有业务excel导出 --- ruoyi-ui/src/components/ImageUpload/index.vue | 12 ++++-------- 1 files changed, 4 insertions(+), 8 deletions(-) diff --git a/ruoyi-ui/src/components/ImageUpload/index.vue b/ruoyi-ui/src/components/ImageUpload/index.vue index f2a7402..e074b38 100644 --- a/ruoyi-ui/src/components/ImageUpload/index.vue +++ b/ruoyi-ui/src/components/ImageUpload/index.vue @@ -74,7 +74,7 @@ dialogVisible: false, hideUpload: false, baseUrl: process.env.VUE_APP_BASE_API, - uploadImgUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 涓婁紶鐨勫浘鐗囨湇鍔″櫒鍦板潃 + uploadImgUrl: process.env.VUE_APP_BASE_API + "/system/oss/upload", // 涓婁紶鐨勫浘鐗囨湇鍔″櫒鍦板潃 headers: { Authorization: "Bearer " + getToken(), }, @@ -90,11 +90,7 @@ // 鐒跺悗灏嗘暟缁勮浆涓哄璞℃暟缁� this.fileList = list.map(item => { if (typeof item === "string") { - if (item.indexOf(this.baseUrl) === -1) { - item = { name: this.baseUrl + item, url: this.baseUrl + item }; - } else { - item = { name: item, url: item }; - } + item = { name: item, url: item }; } return item; }); @@ -116,13 +112,13 @@ methods: { // 鍒犻櫎鍥剧墖 handleRemove(file, fileList) { - const findex = this.fileList.indexOf(file.name); + const findex = this.fileList.map(f => f.name).indexOf(file.name); this.fileList.splice(findex, 1); this.$emit("input", this.listToString(this.fileList)); }, // 涓婁紶鎴愬姛鍥炶皟 handleUploadSuccess(res) { - this.fileList.push({ name: res.data.fileName, url: res.data.fileName }); + this.fileList.push({ name: res.data.fileName, url: res.data.url }); this.$emit("input", this.listToString(this.fileList)); this.loading.close(); }, -- Gitblit v1.9.3