From c1cff08cdbcee3278c1ac8d8a3a067e3bf015202 Mon Sep 17 00:00:00 2001 From: feige <791364011@qq.com> Date: 星期三, 21 二月 2024 22:45:01 +0800 Subject: [PATCH] 提交新内容 --- ruoyi-ui/src/views/bignote/familyeventInfo.vue | 33 ++++++++++----------------------- 1 files changed, 10 insertions(+), 23 deletions(-) diff --git a/ruoyi-ui/src/views/bignote/familyeventInfo.vue b/ruoyi-ui/src/views/bignote/familyeventInfo.vue index b5d3e25..ca99b19 100644 --- a/ruoyi-ui/src/views/bignote/familyeventInfo.vue +++ b/ruoyi-ui/src/views/bignote/familyeventInfo.vue @@ -477,10 +477,13 @@ }, fileUpload(){ // var file = params.file; + var formData = new FormData(); this.$refs.upload1.submit(); // formData.append('uploadFile', file); - // if(this.uploadFileList1.length==0) + if(this.uploadFileList1.length==0){ + this.$modal.msgSuccess("鏂囨。涓婁紶鍒楄〃涓嶈兘涓虹┖锛�"); + return} this.uploadFileList1.forEach((elem)=>{ formData.append("files", elem) @@ -491,39 +494,23 @@ this.uploading = true; uploadPic(formData).then(response => { - // let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length) - // _this.uploading = false; - // // this.$modal.msgSuccess("涓婁紶鎴愬姛"); - // if(_this.fot.includes(pth) === true) - // { - // _this.fileList.push({name:response.data.fileName, "url":response.data.url}) - - // } - - // else{ - // _this.fileListOther.push({name:response.data.fileName, url:response.data.url}) - // let ul = _this.fileList.map(function (elem){ - // return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"") - // }).join(",") - // let uls = _this.fileListOther.map(function (elem){ - // return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"") - // }).join(",") - // _this.formData.url = ul+","+uls - // console.log(_this.formData.url) + _this.uploadFileList1 = [] _this.formData.url = _this.formData.url+","+response.fileNames updateFamilyevent(_this.formData).then(response => { this.$modal.msgSuccess("鏂囨。涓婁紶鎴愬姛"); // this.open = false; - }); }) }, picUpload() { + var formData = new FormData(); this.$refs.upload.submit(); - + if(this.uploadFileList.length==0){ + this.$modal.msgSuccess("鍥惧儚涓婁紶鍒楄〃涓嶈兘涓虹┖锛�"); + return} this.uploadFileList.forEach((elem)=>{ formData.append("files", elem) @@ -553,7 +540,7 @@ //console.log(_this.fileList) // alert(response.fileNames) _this.formData.url = _this.formData.url+","+response.fileNames - + _this.uploadFileList = [] // alert(87) updateFamilyevent(_this.formData).then(response => { _this.$modal.msgSuccess("鍥剧墖涓婁紶鎴愬姛"); -- Gitblit v1.9.1