From 1f3ef4ffe18d3590944c7e0a8c5c827ea414f7bd Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期三, 24 十一月 2021 10:59:18 +0800
Subject: [PATCH] update 初始化数据转移到 ApplicationRunner 统一处理
---
ruoyi-ui/src/components/FileUpload/index.vue | 17 +++++++++++------
1 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/ruoyi-ui/src/components/FileUpload/index.vue b/ruoyi-ui/src/components/FileUpload/index.vue
index 244ac28..a5971f2 100644
--- a/ruoyi-ui/src/components/FileUpload/index.vue
+++ b/ruoyi-ui/src/components/FileUpload/index.vue
@@ -146,9 +146,14 @@
},
// 涓婁紶鎴愬姛鍥炶皟
handleUploadSuccess(res, file) {
- this.$message.success("涓婁紶鎴愬姛");
- this.fileList.push({ name: res.data.fileName, url: res.data.fileName });
- this.$emit("input", this.listToString(this.fileList));
+ if (res.code === 200) {
+ this.$message.success("涓婁紶鎴愬姛");
+ this.fileList.push({ name: res.data.fileName, url: res.data.url });
+ this.$emit("input", this.listToString(this.fileList));
+ } else {
+ this.$message.error(res.msg);
+ this.loading.close();
+ }
},
// 鍒犻櫎鏂囦欢
handleDelete(index) {
@@ -170,9 +175,9 @@
for (let i in list) {
strs += list[i].url + separator;
}
- return strs != '' ? strs.substr(0, strs.length - 1) : '';
- }
- }
+ return strs != "" ? strs.substr(0, strs.length - 1) : "";
+ },
+ },
};
</script>
--
Gitblit v1.9.3