areaCheckPlanManagementItem.vue 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <!--
  2. * @Author: liuJie
  3. * @Date: 2026-02-28 15:54:00
  4. * @LastEditors: liuJie
  5. * @LastEditTime: 2026-04-11 13:33:27
  6. * @Describe: file describe
  7. -->
  8. <template>
  9. <div class="safety-platform-container">
  10. <header class="safety-platform-container__header">
  11. <BreadcrumbBack />
  12. <span class="breadcrumb-title">{{ headerTitle }}</span>
  13. </header>
  14. <AreaCheckPlanManagementDetail v-if="!isRecordDetail" />
  15. <AreaCheckPlanRecordDetail v-else />
  16. </div>
  17. </template>
  18. <script setup lang="ts">
  19. import { computed } from 'vue';
  20. import { useRoute } from 'vue-router';
  21. import BreadcrumbBack from '@/components/BreadcrumbBack.vue';
  22. import AreaCheckPlanManagementDetail from './components/areaCheckPlanManagementDetail.vue';
  23. import AreaCheckPlanRecordDetail from './components/areaCheckPlanRecordDetail.vue';
  24. const route = useRoute();
  25. const operate = computed(() => (route.query.operate as string) || '');
  26. const isRecordDetail = computed(() => operate.value === 'area-check-plan-record-view');
  27. const headerTitle = computed(() => {
  28. if (isRecordDetail.value) return '查看检查记录';
  29. switch (operate.value) {
  30. case 'area-check-plan-create':
  31. return '新增区域检查';
  32. case 'area-check-plan-edit':
  33. return '编辑区域检查';
  34. case 'area-check-plan-view':
  35. return '查看区域检查';
  36. default:
  37. return '未知操作';
  38. }
  39. });
  40. </script>
  41. <style scoped lang="scss">
  42. @use '@/styles/page-details-layout.scss' as *;
  43. @use '@/styles/page-main-layout.scss' as *;
  44. .safety-platform-container__header {
  45. flex-direction: row !important;
  46. justify-content: flex-start !important;
  47. gap: 8px !important;
  48. }
  49. </style>