From c0702fb50443fb03a4f5a7beb127294a17fc1dcd Mon Sep 17 00:00:00 2001 From: yz3456 <2753272399@qq.com> Date: 星期六, 30 三月 2024 23:58:01 +0800 Subject: [PATCH] 修改了3月30这周的所有bug --- ruoyi-ui/src/views/self/show.vue | 30 ++++++++++++++++-------------- 1 files changed, 16 insertions(+), 14 deletions(-) diff --git a/ruoyi-ui/src/views/self/show.vue b/ruoyi-ui/src/views/self/show.vue index 72919db..2ae5ebb 100644 --- a/ruoyi-ui/src/views/self/show.vue +++ b/ruoyi-ui/src/views/self/show.vue @@ -1206,16 +1206,17 @@ //console.log(this.uploadFileList) // alert(this.uploadFileList) this.uploadFileList.forEach((elem)=>{ - formData.append("uploadFile", elem) + formData.append("files", elem) }) //alert(90) let _this = this //alert(9) uploadPic(formData).then(response => { - // console.log(response) + // console.log(response,'123123123') // console.log(_this.formDat.url,'666') - _this.formDat.url = _this.formDat.url+","+response.data.fileName + _this.formDat.url = _this.formDat.url+","+response.fileNames + // alert(_this.formDat.url) _this.uploadFileList = [] _this.$modal.msgSuccess("鍥剧墖涓婁紶鎴愬姛"); @@ -1524,7 +1525,7 @@ { var file = params.file; var formData = new FormData(); - formData.append('uploadFile', file); + formData.append('files', file); let _this = this this.uploading = true; uploadPic(formData).then(response => { @@ -1533,7 +1534,7 @@ this.$modal.msgSuccess("涓婁紶鎴愬姛"); if(_this.fot.includes(pth) === true) { - _this.fileList.push({name:response.data.fileName, "url":response.data.url}) + _this.fileList.push({name:response.fileNames, "url":response.data.url}) } }) }, @@ -1541,7 +1542,7 @@ { var file = params.file; var formData = new FormData(); - formData.append('uploadFile', file); + formData.append('files', file); let _this = this this.uploading1 = true; uploadPic(formData).then(response => { @@ -1550,7 +1551,7 @@ this.$modal.msgSuccess("涓婁紶鎴愬姛"); if(_this.fot.includes(pth) !== true) { - _this.fileListOther.push({name:response.data.fileName, url:response.data.url}) + _this.fileListOther.push({name:response.fileNames, url:response.data.url}) } }) }, @@ -1593,17 +1594,18 @@ /** 鎻愪氦鎸夐挳锛堟暟鎹潈闄愶級 */ submitDataScopem: function() { - 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.formDat.url = ul+","+uls + // 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.formDat.url = ul+","+uls this.$refs["elForm"].validate(valid => { if (valid) { addNote(this.formDat).then(response => { + console.log(this.formDat) this.$modal.msgSuccess("鏂板鎴愬姛"); this.getList(); this.open = false; -- Gitblit v1.9.1