| | |
| | | <script> |
| | | import filePreview from '@/components/Preview/filePreview.vue'; |
| | | import limsTable from '@/components/Table/lims-table.vue' |
| | | import file from '@/utils/file'; |
| | | |
| | | import { getCurrentCalibrationFiles } from '@/api/cnas/process/method/methodVerification' |
| | | |
| | | export default { |
| | |
| | | }, |
| | | // 下载 |
| | | upload (row) { |
| | | let url = ''; |
| | | if (/\.(png|jpe?g|gif|bmp|webp)$/i.test(row.fileUrl || '')) { |
| | | url = this.javaApi+'/img/'+row.fileUrl |
| | | file.downloadIamge(url,row.fileName) |
| | | }else{ |
| | | url = this.javaApi+'/word/'+row.fileUrl |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = row.fileName; |
| | | link.click(); |
| | | } |
| | | return this.$download.attachment(row, row.fileName) |
| | | }, |
| | | } |
| | | }; |