| | |
| | | import { computed, onMounted, reactive, ref } from 'vue' |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | import { useRouter } from 'vue-router' |
| | | import { listFormationReports, deleteFormationReport, getFormationReport, type FormationSummary } from '@/api/formationReports' |
| | | import { listFormationReports, deleteFormationReport, type FormationSummary } from '@/api/formationReports' |
| | | import { getUserInfo } from '@/api/auth' |
| | | import { openFormationSavedReportPrint } from '@/utils/formationSavedReportPrint' |
| | | |
| | |
| | | function openEdit(item: FormationReportRecord) { router.push(`/report-formation/${item.id}/edit`) } |
| | | function openView(item: FormationReportRecord) { router.push({ path: `/report-formation/${item.id}/edit`, query: { mode: 'view' } }) } |
| | | async function downloadPdf(item: FormationReportRecord) { |
| | | try{const record=await getFormationReport(item.id);await openFormationSavedReportPrint(item.id,record.versionNo)} |
| | | // 列表提供版本身份,导出只走独立导出权限,不额外请求查看接口。 |
| | | try{await openFormationSavedReportPrint(item.id,item.versionNo)} |
| | | catch(cause){ElMessage.error(cause instanceof Error?cause.message:'打印版加载失败')} |
| | | } |
| | | async function deleteReport(item: FormationReportRecord) { |