SelfAssessmentFormDisplay.vue 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <template>
  2. <FlexCol gap="gap.lg">
  3. <EvaluationFormBlock
  4. ref="blockRef"
  5. :current-form="currentForm"
  6. :form-options="formOptions"
  7. :form-options-end="formOptionsEnd"
  8. :check-item-list="checkItemList"
  9. :current-form-check-items="currentFormCheckItems"
  10. :readonly="readonly"
  11. />
  12. </FlexCol>
  13. </template>
  14. <script setup lang="ts">
  15. import { computed, ref } from 'vue';
  16. import type { CheckItemInfo, SelfAssessmentCheckItemAnswer, SelfAssessmentDetail } from '@/api/collect/AssessmentContent';
  17. import type { IDynamicFormOptions } from '@/components/dynamic';
  18. import EvaluationFormBlock from './EvaluationFormBlock.vue';
  19. import FlexCol from '@/components/layout/FlexCol.vue';
  20. const props = withDefaults(defineProps<{
  21. currentForm: SelfAssessmentDetail;
  22. formOptions: IDynamicFormOptions;
  23. formOptionsEnd: IDynamicFormOptions;
  24. checkItemList: CheckItemInfo[];
  25. currentFormCheckItems: SelfAssessmentCheckItemAnswer[];
  26. readonly?: boolean;
  27. }>(), {
  28. readonly: false,
  29. });
  30. const blockRef = ref<InstanceType<typeof EvaluationFormBlock> | null>(null);
  31. defineExpose({
  32. validate: () => blockRef.value?.validate(),
  33. });
  34. </script>