| | |
| | | </div> |
| | | <lims-table :tableData="tableDataFile" :column="columnFile" height="500px" key="tableDataFile" |
| | | :tableLoading="tableLoadingFile"></lims-table> |
| | | <el-dialog title="查看附件" :visible.sync="lookDialogVisible" width="800px" top="5vh" fullscreen append-to-body> |
| | | <filePreview v-if="lookDialogVisible" :fileUrl="javaApi + '/word/' + currentInfo.fileUrl" :currentFile="{}" |
| | | style="max-height: 90vh;overflow-y: auto;" /> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import { fileList, delFile } from "@/api/structural/workshop.js" |
| | | import filePreview from "@/components/Preview/filePreview.vue"; |
| | | export default { |
| | | components: { |
| | | limsTable, |
| | | filePreview, |
| | | }, |
| | | props: ['currentId'], |
| | | computed: { |
| | |
| | | this.delete(row); |
| | | } |
| | | }, |
| | | { |
| | | name: '预览', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.currentInfo = row |
| | | this.lookDialogVisible = true |
| | | } |
| | | }, |
| | | ] |
| | | } |
| | | ], |
| | | tableDataFile: [], |
| | | tableLoadingFile: false, |
| | | lookDialogVisible: false, |
| | | currentInfo: {}, |
| | | } |
| | | }, |
| | | mounted() { |
| | |
| | | }, |
| | | // 下载附件的文件 |
| | | handleDown(row) { |
| | | downFile({ |
| | | id: row.id, |
| | | }).then(res => { |
| | | this.$download.saveAs(res.data.fileUrl, row.fileName); |
| | | }).catch(error => { |
| | | |
| | | }) |
| | | this.$download.saveAs(row.fileUrl, row.fileName); |
| | | }, |
| | | // 删除附件文件 |
| | | delete(row) { |