<template>
  <view
    @click="onClick"
    class="card-shadow bg-white rounded-19rpx p-base space-y-10rpx"
  >
    <view class="flex items-center justify-between">
      <view class="text-30rpx"> {{ item.job.name }}</view>
      <view
        class="text-24rpx"
        :style="{
          color: statusFun(item.promotion_status, 'promotion_status', 'color'),
        }"
        >{{ item.promotion_status_text }}</view
      >
    </view>
    <view class="text-24rpx text-hex-999999 flex">
      <view class="w-140rpx">推荐人</view>
      <view class="">{{ item?.invitor?.name }}</view>
    </view>
    <view class="text-24rpx text-hex-999999 flex">
      <view class="w-140rpx">晋升职位</view>
      <view class="">{{ item.job.name }}</view>
    </view>

    <!-- <template v-if="options?.includes(item.promotion_status)">
      <view class="py-10rpx">
        <uv-line color="#f5f5f5"></uv-line>
      </view>
      <view class="flex justify-end items-center">
        <uv-button type="primary" size="mini">去提交</uv-button>
      </view>
    </template> -->
  </view>
</template>
<script setup>
import statusFun from '@/utils/status'
const props = defineProps({
  item: Object,
  options: {
    type: Array,
    default: () => [],
  },
  type: {
    type: Number,
    default: 0,
  },
  subject_type: String,
})

const onOption = (e) => {}

const onClick = () => {
  let url
  if (props.type == 3) {
  } else {
    url = `/pages/work/detail?id=${props.item.id}`
  }
  goPath(url)
}

const goPath = (url) => {
  uni.navigateTo({
    url,
  })
}
</script>
