| | |
| | | <el-input v-model="fileUploadForm.billNo" disabled /> |
| | | </el-form-item> |
| | | <el-form-item label="附件"> |
| | | <el-upload class="upload-demo" ref="fileUpload" :action="upload.url + '?updateSupport=' + upload.updateSupport" :on-preview="handleFilePreview" |
| | | <el-upload class="upload-demo" ref="fileUpload" :headers="upload.headers" action="http://220.189.218.155:9010/File" :on-preview="handleFilePreview" |
| | | :on-remove="handleFileRemove" :on-change="handleFileChange" :file-list="fileList" :on-success="handleFileSuccess" :on-error="handleFileError" |
| | | :auto-upload="false" :limit="10" :on-exceed="handleFileExceed" |
| | | :limit="10" :on-exceed="handleFileExceed" |
| | | accept=".jpg,.png,.jpeg,.pdf,.doc,.docx,.xls,.xlsx,.zip,.rar"> |
| | | <el-button size="small" type="primary">点击上传</el-button> |
| | | <div slot="tip" class="el-upload__tip"> |
| | |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="submitFileUpload" :loading="fileUploadLoading">上传</el-button> |
| | | <!-- <el-button type="primary" @click="submitFileUpload" :loading="fileUploadLoading">上传</el-button> --> |
| | | <el-button @click="openFileUpload = false">关 闭</el-button> |
| | | </div> |
| | | </el-dialog> |
| | |
| | | // 是否更新已经存在的数据 |
| | | updateSupport: 0, |
| | | // 设置上传的请求头部 |
| | | // headers: { Authorization: "Bearer " + getToken() }, |
| | | headers: { 'Content-Type': 'multipart/form-data'}, |
| | | // 上传的地址 |
| | | url: 'http://220.189.218.155:9010/File' |
| | | }, |
| | |
| | | this.fileList = [] |
| | | this.uploadFiles = [] |
| | | this.uploadedFileList = [] |
| | | this.getUploadedFileList() |
| | | // this.getUploadedFileList() |
| | | this.openFileUpload = true |
| | | }, |
| | | handleFileChange(file, fileList) { |
| | | this.uploadFiles = fileList |
| | | console.log(file, fileList) |
| | | |
| | | // this.uploadFiles = fileList |
| | | }, |
| | | handleFileRemove(file, fileList) { |
| | | console.log(file, fileList) |
| | | |
| | | this.uploadFiles = fileList |
| | | }, |
| | | handleFileSuccess(response, file, fileList){ |
| | | console.log(file) |
| | | console.log(response, file, fileList) |
| | | |
| | | }, |
| | | handleFileError(response, file, fileList){ |
| | | console.log(response, file, fileList) |