| | |
| | | </el-form> |
| | | <template #footer><span class="dialog-footer"> |
| | | <el-button @click="downloadDialogVisible = false">取 消</el-button> |
| | | <el-button :disabled="!downloadRow" @click="previewReport(downloadRow)">预览有章报告</el-button> |
| | | <el-button type="primary" :loading="downloadingReportId !== null" |
| | | @click="downloadSelectedReport">下 载</el-button> |
| | | </span></template> |
| | | </el-dialog> |
| | | <report-preview ref="reportPreview" /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import ReportPreview from '@/components/ReportPreview/index.vue' |
| | | import { reportFilename } from '@/utils/reportPreview' |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import { |
| | | exportProcessReport, |
| | |
| | | export default { |
| | | name: 'ReportResults', |
| | | components: { |
| | | limsTable |
| | | limsTable, |
| | | ReportPreview |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | dataType: "action", |
| | | fixed: "right", |
| | | label: "操作", |
| | | width: "180px", |
| | | width: "230px", |
| | | operation: [ |
| | | { |
| | | name: "预览", |
| | | type: "text", |
| | | clickFun: row => this.previewReport(row), |
| | | }, |
| | | { |
| | | name: "下载", |
| | | type: "text", |
| | |
| | | this.addInfo = { ...row } |
| | | this.addDialogVisible = true; |
| | | }, |
| | | previewReport(row) { |
| | | this.$refs.reportPreview.open([{ |
| | | key: 'stamped', label: '有章报告', format: 'pdf', |
| | | filename: reportFilename(row.insReportCode || '有章报告', 'pdf'), |
| | | load: signal => downloadStampedReport(row.id, 'pdf', signal) |
| | | }]) |
| | | }, |
| | | handleDownload(row) { |
| | | this.downloadRow = row |
| | | this.selectedDownloadFormat = 'pdf' |