| | |
| | | //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("图片上传成功"); |
| | |
| | | { |
| | | 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 => { |
| | |
| | | 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}) |
| | | } |
| | | }) |
| | | }, |
| | |
| | | { |
| | | 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 => { |
| | |
| | | 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}) |
| | | } |
| | | }) |
| | | }, |
| | |
| | | /** 提交按钮(数据权限) */ |
| | | 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; |