<template>
  <view class="card-shadow bg-white rounded-19rpx p-base space-y-10rpx" @click="goPath">
    <view class="text-30rpx"> 请假申请</view>
    <view class="text-24rpx text-hex-999999 flex">
      <view class="text-24rpx w-140rpx">请假类型：</view>
      <view class="">{{ item.type.name }}</view>
    </view>
    <view class="text-24rpx text-hex-999999 flex">
      <view class="text-24rpx w-140rpx">请假事由：</view>
      <view class="">{{ item.reason }}</view>
    </view>
    <view class="flex items-center text-hex-999999 flex">
      <view class="text-24rpx w-140rpx"> 申请时间：</view>
      <view class="text-24rpx">{{ timeFormat(item.created_at, "yyyy-mm-dd hh:MM") }}</view>
    </view>
    <view
      :style="{
        color: statusFun(item.workflow_check.check_status, 'workflow_check', 'color')
      }"
      class="text-24rpx"
      >{{ statusFun(item.workflow_check.check_status, "workflow_check", "name") }}</view
    >
  </view>
</template>
<script setup>
import statusFun from "@/utils/status"
import { timeFormat } from "@climblee/uv-ui/libs/function/index"
const props = defineProps({
  item: Object
})
const goPath = () => {
  uni.navigateTo({
    url: `/pages/ask-leave/detail?id=${props.item.id}`
  })
}
</script>
