<!-- 面试日程 -->
<template>
  <div style="height: 100%; overflow: hidden;background-color: var(--default-bgc);">
    <div class="white-bgc px-3 py-5" style="font-size: 16px; display: flex; justify-content: space-between; border-bottom: 1px solid #e3e3e3;">
      <div>面试日程</div>
      <div class="defaultLink" @click="null">查看全部</div>
    </div>
    <!-- 滚动区域 -->
     <div class="" style="height: calc(100% - 86px); overflow-y: auto;">
      <div v-for="item in dataList" :key="'schedule' + item">
        <div class="color-666 px-8 py-3" style="">{{ timesTampChange(item?.time, 'M月D日') || '--' }}</div>
        <div class="white-bgc pa-6">
          <div class="d-flex justify-space-between">
            <div>{{ item?.enterprise?.anotherName || '--' }}</div>
            <div>{{ getText(item?.status+'', statusList) || '--' }}</div>
          </div>
          <div>
            <span>时间：</span>
            <span>{{ timesTampChange(item?.time, 'h:m') || '--' }}</span>
          </div>
          <div>
            <span>职位：</span>
            <span>{{ getText(item?.status+'', statusList) || '--' }}</span>
          </div>
        </div>
      </div>
      <div class="text-center color-666 my-8" style="cursor: pointer;">{{ $t('common.more') }}</div>
     </div>
  </div>
</template>

<script setup>
import { getUserInterviewInvitePage } from '@/api/recruit/personal/personalCenter'
import { getDict } from '@/hooks/web/useDictionaries'
import { getText } from '@/utils/getText'
import { timesTampChange } from '@/utils/date'
import { ref } from 'vue'
defineOptions({name: 'PersonalCenter-interviewSchedule'})

const dataList = ref([])
const getSkillListFunc = async () => {
  const res = await getUserInterviewInvitePage()
  dataList.value = res?.list || []
  console.log('1', dataList.value[0])
}
getSkillListFunc()

// 状态字典
const statusList = ref()
const getStatusList = async () => {
  const { data } = await getDict('menduner_interview_invite_status')
  statusList.value = data
}
getStatusList()

</script>
<style lang="scss" scoped>
::-webkit-scrollbar {
  width: 4px;
  height: 10px;
  display: none;
}
::-webkit-scrollbar-thumb, .temporaryAdd ::-webkit-scrollbar-thumb, .details_edit ::-webkit-scrollbar-thumb {
  // 滚动条-颜色
  background: #c3c3c379;
}
::-webkit-scrollbar-track, .temporaryAdd ::-webkit-scrollbar-track, .details_edit ::-webkit-scrollbar-track {
  // 滚动条-底色
  background: #e5e5e58f;
}
</style>
