| | |
| | | :on-change="handleChange" |
| | | :auto-upload="false" |
| | | ref="upload" |
| | | |
| | | |
| | | > |
| | | <i slot="default" class="el-icon-plus"></i> |
| | | <div slot="file" slot-scope="{ file }"> |
| | |
| | | style="margin-left: 10px" |
| | | size="small" |
| | | type="success" |
| | | |
| | | |
| | | @click="picUpload" |
| | | >上传到服务器</el-button> |
| | | <h4 class="form-header">其他附件 </h4> |
| | |
| | | :http-request="requestUpload1" |
| | | :show-file-list="true" |
| | | > |
| | | <!-- |
| | | <!-- |
| | | <el-button type="primary">点击上传</el-button> |
| | | <div v-if="uploading" class="upload-status">正在上传...</div> --> |
| | | <template #tip> |
| | |
| | | // 数据范围选项 |
| | | fot:['.bmp','.jpg','.jpeg','.png','.tif','.gif','.pcx','.tga','.exif','.fpx', |
| | | '.svg','.psd','.cdr','.pcd','.dxf','.ufo','.eps','.ai','.aw','.WMF','.webp','.apng'], |
| | | |
| | | |
| | | fileList:[ |
| | | ], |
| | | fileList1:[], |
| | |
| | | this.$delete(this.fileList,i); |
| | | this.$delete(this.uploadFileList,i); |
| | | } |
| | | |
| | | |
| | | } |
| | | }, |
| | | |
| | |
| | | deptCheckStrictly: true, |
| | | remark: undefined |
| | | }; |
| | | this.resetForm("form"); |
| | | this.resetForm("elForm"); |
| | | }, |
| | | /** 搜索按钮操作 */ |
| | | handleQuery() { |
| | |
| | | { |
| | | if(this.fileListOther[i].url==file.url) |
| | | { |
| | | |
| | | |
| | | this.$delete(this.fileListOther,i); |
| | | this.$delete(this.uploadFileList1,i); |
| | | |
| | | |
| | | } |
| | | } |
| | | }, |
| | |
| | | }, |
| | | handleChange(file, fileList1) { |
| | | //定义一个全局数组uploadFileList来做存储 |
| | | |
| | | |
| | | // this.uploadFileList.push(file.raw); |
| | | console.log("=========5555=========") |
| | | this.uploadFileList.push(file.raw); |
| | |
| | | }, |
| | | handleChange1(file, fileOtherList1) { |
| | | //定义一个全局数组uploadFileList来做存储 |
| | | |
| | | |
| | | // this.uploadFileList.push(file.raw); |
| | | console.log("=========5555=========") |
| | | this.uploadFileList1.push(file.raw); |
| | |
| | | }, |
| | | fileUpload(){ |
| | | // var file = params.file; |
| | | |
| | | |
| | | var formData = new FormData(); |
| | | //this.$refs.upload1.submit(); |
| | | // formData.append('uploadFile', file); |
| | |
| | | } |
| | | this.uploadFileList1.forEach((elem)=>{ |
| | | formData.append("files", elem) |
| | | |
| | | |
| | | }) |
| | | |
| | | |
| | | let _this = this |
| | | |
| | | |
| | | this.uploading = true; |
| | | uploadPic(formData).then(response => { |
| | | _this.uploadFileList1 = [] |
| | | _this.formDat.url = _this.formDat.url+","+response.fileNames |
| | | _this.$modal.msgSuccess("文件上传成功!"); |
| | | }) |
| | | |
| | | |
| | | }, |
| | | picUpload() |
| | | { |
| | |
| | | //console.log(this.uploadFileList) |
| | | this.uploadFileList.forEach((elem)=>{ |
| | | formData.append("files", elem) |
| | | |
| | | |
| | | }) |
| | | //alert(90) |
| | | let _this = this |
| | |
| | | //alert( _this.formDat.url) |
| | | _this.uploadFileList = [] |
| | | _this.$modal.msgSuccess("图片上传成功"); |
| | | |
| | | |
| | | }); |
| | | }, |
| | | requestUpload(params) { |
| | | |
| | | |
| | | // this.uploadFileList.push(params.file); |
| | | }, |
| | | requestUpload1(params) |