<!--
审批详情
动态渲染要显示的内容 需要再flowDescripionsMap先定义好组件
-->
<script setup lang="ts">
import type { TaskInfo } from '#/api/workflow/task/model';

import { ApprovalTimeline } from '.';
import { flowComponentsMap } from '../register';

defineOptions({
  name: 'ApprovalDetails',
  inheritAttrs: false,
});

defineProps<{
  task?: TaskInfo;
  workOrderDetail?: any;
}>();
</script>

<template>
  <div>
    <!--
     动态渲染要显示的内容 需要再flowDescripionsMap先定义好组件
     business-id为业务ID 必传
    -->
    <!-- <component :is="flowComponentsMap[task.formPath as FlowComponentsMapMapKey]" :business-id="task.businessId" /> -->
    <component
      :is="flowComponentsMap['/workflow/leaveEdit/index']"
      :work-order-detail="workOrderDetail"
    />
    <ApprovalTimeline :id="workOrderDetail?.id" />
  </div>
</template>
