| | |
| | | // 下载 |
| | | handleDown(row) { |
| | | downFile({ id: row.id, }).then(res => { |
| | | if (res.code === 200) { |
| | | let url = ''; |
| | | if (res.data.type == 1) { |
| | | url = this.javaApi + '/img/' + res.data.fileUrl |
| | | file.downloadIamge(url, row.fileName) |
| | | } else { |
| | | url = this.javaApi + '/word/' + res.data.fileUrl |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = row.fileName; |
| | | link.click(); |
| | | } |
| | | } |
| | | this.$download.downloadFileFromUrl(res.data.fileUrl, row.fileName); |
| | | }).catch(error => { |
| | | |
| | | }) |
| | |
| | | this.upLoading = false; |
| | | if (response.code == 200) { |
| | | this.$message.success('上传成功'); |
| | | this.$refs.fileList.selectList() |
| | | this.getFileList() |
| | | } |
| | | }, |
| | | beforeUpload(file) { |