<!-- 详情展示报告公共组件 --> <script name="SubpackageDirectoriesDetail" lang="ts" setup> import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' import filePreview from '@/components/filePreview/index.vue' const props = defineProps({ title: { // 标题 type: String, default: '', }, }) const loading = ref(false) // 表单加载状态 const infoId = ref('') // id const printFileName = ref('') // 文件名 const $route = useRoute() const $router = useRouter() // --------------------------------------路由参数---------------------------------------------- // 从路由中获取页面类型参数 if ($route.params) { if ($route.params.id) { infoId.value = $route.params.id as string } } // -----------------------------------------按钮-------------------------------------------------- // 关闭新增页面的回调 const close = () => { $router.back() } // 导出word const exportWord = () => { ElMessage.info('敬请期待') } // 导出pdf const exportPdf = () => { ElMessage.info('敬请期待') } // 打印 const print = () => { ElMessage.info('敬请期待') } // -----------------------------------------钩子-------------------------------------------------- onMounted(() => { }) </script> <template> <app-container> <detail-page v-loading="loading" :title="title"> <template #btns> <el-button type="primary" @click="exportWord"> 导出word </el-button> <el-button type="primary" @click="exportPdf"> 导出pdf </el-button> <el-button type="primary" @click="print"> 打印 </el-button> <el-button type="info" @click="close"> 关闭 </el-button> </template> </detail-page> <!-- <file-preview :print-file-name="printFileName" /> --> <div style="text-align: center;margin-top: 50px;font-weight: 600;"> 敬请期待 </div> </app-container> </template> <style lang="scss" scoped> // 样式 </style>