<script setup lang="ts" name="LeaveDetailFlow">
/* 请假详情 */
import { ref } from 'vue'
import { getFlowChart } from '@/api/flowEngine/flowInterface'
import DetailForm from './DetailForm.vue'
import FlowTimeline from '@/components/Flow/FlowTimeline.vue'

const props = defineProps<{
  id: string
  instanceId: string
}>()

const nodeData = ref<any>()

// 流程详情
getFlowChart({ instanceId: props.instanceId }).then(res => {
  nodeData.value = res.data
})
</script>

<template>
  <div>
    <DetailForm :id="props.id" :instance-id="props.instanceId" />
    <FlowTimeline :node-data="nodeData" />
  </div>
</template>

<style lang="less" scoped>
.grid {
  :deep(.van-image) {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 100%;
    border-radius: 0.6rem;
    box-shadow: 0.2rem 0.2rem 0.5rem rgba(0,0,0,0.5);
    overflow: hidden;
    .van-image__img {
      position: absolute;
      object-fit: cover;
    }
  }
}

:deep(.van-cell) {
  .van-cell__title {
    margin-right: 1rem;
    flex: none;
  }
  .van-cell__value {
    display: flex;
    justify-content: flex-end;
    color: var(--van-cell-text-color);
    overflow: hidden;
    span {
      text-align: justify;
    }
  }
}

:deep(.tag-label) {
  font-size: 1.4rem;
}

.list {

}
</style>
