From 8251d3ac36429c3522b589518b60cecbd1d3ec5b Mon Sep 17 00:00:00 2001 From: feige <791364011@qq.com> Date: 星期二, 20 二月 2024 21:50:45 +0800 Subject: [PATCH] 修改了文件 --- ruoyi-ui/src/views/bignote/familyeventInfo.vue | 21 ++++++++++++++++----- 1 files changed, 16 insertions(+), 5 deletions(-) diff --git a/ruoyi-ui/src/views/bignote/familyeventInfo.vue b/ruoyi-ui/src/views/bignote/familyeventInfo.vue index d95bb8d..b5d3e25 100644 --- a/ruoyi-ui/src/views/bignote/familyeventInfo.vue +++ b/ruoyi-ui/src/views/bignote/familyeventInfo.vue @@ -101,6 +101,7 @@ style="margin-left: 10px" size="small" type="success" + v-if="btn" @click="picUpload" >涓婁紶鍒版湇鍔″櫒</el-button> <h4 class="form-header">鍏朵粬闄勪欢 </h4> @@ -186,6 +187,7 @@ style="margin-left: 10px" size="small" type="success" + v-if="btn" @click="fileUpload" >涓婁紶鍒版湇鍔″櫒</el-button> <h4 class="form-header"> </h4> @@ -304,13 +306,22 @@ let pth = paths[i].substr(paths[i].length - 4, paths[i].length) if (_this.fot.includes(pth) === true) - _this.fileList.push({name:paths[i],url: process.env.VUE_APP_BASE_TRUE_API+paths[i]}) + { + if(paths[i][0]=="/") + _this.fileList.push({name:paths[i],url: process.env.VUE_APP_BASE_TRUE_API+paths[i].substr(1)}) + else + _this.fileList.push({name:paths[i],url: process.env.VUE_APP_BASE_TRUE_API+paths[i]}) + } else { // alert(paths[i]) let nms = paths[i].split("\/") let nm = nms[nms.length - 1] - _this.fileListOther.push({name:nm, url: process.env.VUE_APP_BASE_TRUE_API+paths[i]}) - } + if(paths[i][0]=="/") + _this.fileListOther.push({name:nm, url: process.env.VUE_APP_BASE_TRUE_API+paths[i].substr(1)}) + else + _this.fileListOther.push({name:nm, url: process.env.VUE_APP_BASE_TRUE_API+paths[i]}) + + } } _this.fileList1 = _this.fileList } @@ -469,7 +480,7 @@ var formData = new FormData(); this.$refs.upload1.submit(); // formData.append('uploadFile', file); - + // if(this.uploadFileList1.length==0) this.uploadFileList1.forEach((elem)=>{ formData.append("files", elem) @@ -540,7 +551,7 @@ // return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"") // }).join(",") //console.log(_this.fileList) - + // alert(response.fileNames) _this.formData.url = _this.formData.url+","+response.fileNames // alert(87) -- Gitblit v1.9.1