| | |
| | | <script setup lang="ts" generic="TAnnexItem"> |
| | | import { downloadFileByUrl } from '@bole-core/core'; |
| | | import { CommonAnnexTableColumns } from '@/constants'; |
| | | import { ProTableV2, ProTableV2Props } from '@bole-core/components'; |
| | | import { bolePreview, ProTableV2, ProTableV2Props } from '@bole-core/components'; |
| | | |
| | | defineOptions({ |
| | | name: 'PortraitTableWithAttachment', |
| | |
| | | const operationListBtns = [ |
| | | { |
| | | data: { |
| | | enCode: 'previewBtn', |
| | | name: '查看', |
| | | }, |
| | | emits: { |
| | | onClick: (row) => handlePreview(row), |
| | | }, |
| | | }, |
| | | { |
| | | data: { |
| | | enCode: 'downloadBtn', |
| | | name: '下载', |
| | | }, |
| | |
| | | downloadFileByUrl(row[props.downloadFileKey] as any); |
| | | } |
| | | } |
| | | |
| | | function handlePreview(row: TAnnexItem) { |
| | | bolePreview({ |
| | | fileUrl: row[props.downloadFileKey] as any, |
| | | }); |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |