| | |
| | | style="margin-left: 10px" |
| | | size="small" |
| | | type="success" |
| | | v-if="btn" |
| | | @click="picUpload" |
| | | >上传到服务器</el-button> |
| | | <h4 class="form-header">其他附件 </h4> |
| | |
| | | style="margin-left: 10px" |
| | | size="small" |
| | | type="success" |
| | | v-if="btn" |
| | | @click="fileUpload" |
| | | >上传到服务器</el-button> |
| | | <h4 class="form-header"> </h4> |
| | |
| | | // 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 |
| | | } |
| | |
| | | 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) |
| | |
| | | // return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"") |
| | | // }).join(",") |
| | | //console.log(_this.fileList) |
| | | alert(response.fileNames) |
| | | // alert(response.fileNames) |
| | | _this.formData.url = _this.formData.url+","+response.fileNames |
| | | |
| | | // alert(87) |