checkTemplateManagementItem.vue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <template>
  2. <div class="safety-platform-container">
  3. <header class="safety-platform-container__header">
  4. <BreadcrumbBack />
  5. <span class="breadcrumb-title">{{ headerTitle }}</span>
  6. </header>
  7. <CheckTemplateManagementDetail :id="id" />
  8. </div>
  9. </template>
  10. <script setup lang="ts">
  11. import { computed } from 'vue';
  12. import { useRoute } from 'vue-router';
  13. import BreadcrumbBack from '@/components/BreadcrumbBack.vue';
  14. import CheckTemplateManagementDetail from './components/checkTemplateManagementDetail.vue';
  15. const route = useRoute();
  16. const operate = route.query.operate as string;
  17. const id = computed(() => Number(route.query.id));
  18. const headerTitle = computed(() => {
  19. switch (operate) {
  20. case 'check-template-create':
  21. return '新增检查单模版';
  22. case 'check-template-edit':
  23. return '编辑检查单模版';
  24. case 'check-template-view':
  25. return '查看检查单模版';
  26. default:
  27. return '未知操作';
  28. }
  29. });
  30. </script>
  31. <style scoped lang="scss">
  32. @use '@/styles/page-details-layout.scss' as *;
  33. @use '@/styles/page-main-layout.scss' as *;
  34. .safety-platform-container__header {
  35. flex-direction: row !important;
  36. justify-content: flex-start !important;
  37. gap: 8px !important;
  38. }
  39. </style>