SelfAssessmentResultBlock.vue 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <template>
  2. <FlexCol gap="gap.lg">
  3. <FlexCol v-for="sec in reviewSections" :key="sec.key" gap="gap.lg">
  4. <Text bold :text="sec.title" />
  5. <FlexRow wrap align="center" gap="gap.md">
  6. <CheckBox
  7. v-for="opt in opinionOptions"
  8. :key="`${sec.key}-${opt.value}`"
  9. disabled
  10. :model-value="currentForm[sec.opinionField] === opt.value"
  11. :text="opt.label"
  12. :check-size="28"
  13. />
  14. </FlexRow>
  15. <FlexRow align="center" gap="gap.sm">
  16. <Text text="评分:" />
  17. <Text v-if="currentForm[sec.pointsField]" :text="String(currentForm[sec.pointsField])" />
  18. <Text v-else color="text.second" text="(待审核填写)" />
  19. </FlexRow>
  20. </FlexCol>
  21. </FlexCol>
  22. </template>
  23. <script setup lang="ts">
  24. import type { SelfAssessmentDetail } from '@/api/collect/AssessmentContent';
  25. import FlexCol from '@/components/layout/FlexCol.vue';
  26. import FlexRow from '@/components/layout/FlexRow.vue';
  27. import Text from '@/components/basic/Text.vue';
  28. import CheckBox from '@/components/form/CheckBox.vue';
  29. type OpinionField = 'ichUnit' | 'county' | 'district' | 'province';
  30. type PointsField = 'unitPoints' | 'countyPoints' | 'districtPoints' | 'provincePoints';
  31. defineProps<{
  32. currentForm: SelfAssessmentDetail;
  33. }>();
  34. const opinionOptions = [
  35. { label: '优秀', value: 1 },
  36. { label: '合格', value: 2 },
  37. { label: '不合格', value: 3 },
  38. { label: '丧失传承能力', value: 4 },
  39. { label: '取消资格', value: 5 },
  40. ];
  41. const reviewSections: { key: string; title: string; opinionField: OpinionField; pointsField: PointsField }[] = [
  42. { key: 'ichUnit', title: '1. 项目保护单位意见', opinionField: 'ichUnit', pointsField: 'unitPoints' },
  43. { key: 'county', title: '2. 县(区)文旅部门审核意见', opinionField: 'county', pointsField: 'countyPoints' },
  44. { key: 'district', title: '3. 设区市文旅部门、省非遗中心审核意见', opinionField: 'district', pointsField: 'districtPoints' },
  45. { key: 'province', title: '4. 省文化和旅游厅意见', opinionField: 'province', pointsField: 'provincePoints' },
  46. ];
  47. </script>