<!-- 人才库 - 人才详情 -->
<template>
  <div class="d-flex justify-center mb-8">
    <div v-if="Object.keys(cvData).length" style="width: 940px;background: #fff;" class="px-8 pb-12 pt-3 my-n3 mr-3">
      <!-- 基本信息 -->
      <baseInfo class="mt-5" :data="cvData.person"></baseInfo>
      <!-- 个人优势 -->
      <div class="d-flex mt-8">
        <span class="mr-6">{{ $t('resume.personalAdvantages') }}</span>
        <div style="flex: 1; white-space: pre-line; font-size: 15px;" v-if="cvData?.person?.advantage" v-html="cvData.person.advantage"></div>
      </div>
      <!-- 职业技能 -->
      <div class="d-flex mt-8">
        <span class="mr-6">{{ $t('resume.vocationalSkills') }}</span>
        <vocationalSkills style="flex: 1;" :data="cvData.skillList"></vocationalSkills>
      </div>
      <!-- 求职意向 -->
      <div class="d-flex mt-8">
        <span class="mr-6">{{ $t('resume.jobIntention') }}</span>
        <jobIntention style="flex: 1;" :data="cvData.interestedList"></jobIntention>
      </div>
      <!-- 工作经历 -->
      <div class="d-flex mt-8">
        <span class="mr-6">{{ $t('resume.workExperience') }}</span>
        <workExperience style="flex: 1;" :data="cvData.workList"></workExperience>
      </div>
      <!-- 项目经历 -->
      <div class="d-flex mt-8">
        <span class="mr-6">{{ $t('resume.projectExperience') }}</span>
        <projectExperience style="flex: 1;" :data="cvData.projectList"></projectExperience>
      </div>
      <!-- 培训经历 -->
      <div class="d-flex mt-8">
        <span class="mr-6">{{ $t('resume.trainingExperience') }}</span>
        <trainingExperience style="flex: 1;" :data="cvData.trainList"></trainingExperience>
      </div>
      <!-- 教育经历 -->
      <div class="d-flex mt-8">
        <span class="mr-6">{{ $t('resume.educationExp') }}</span>
        <educationExp style="flex: 1;" :data="cvData.eduList"></educationExp>
      </div>
      <!-- 附件简历 -->
      <!-- <div class="d-flex mt-8">
        <span class="mr-6">{{ $t('resume.attachmentResume') }}</span>
        <attachmentResume style="flex: 1;"></attachmentResume>
      </div> -->
    </div>
    <!-- <div class="operate pa-3">
      <v-list>
        <v-list-subheader class="title">简历助手</v-list-subheader>
        <v-list-item
          v-for="(item, i) in operateItems" :key="'简历助手' + i"
          color="primary"
          :prepend-icon="item.icon"
          :title="item.text"
          @click="{}"
        >
        </v-list-item>
      </v-list>
    </div> -->
  </div>
</template>

<script setup>
defineOptions({name: 'enterprise-talentPool-details'})
import baseInfo from './details/baseInfo.vue'
import vocationalSkills from './details/vocationalSkills.vue'
import jobIntention from './details/jobIntention.vue'
import workExperience from './details/workExperience.vue'
import projectExperience from './details/projectExperience.vue'
import trainingExperience from './details/trainingExperience.vue'
import educationExp from './details/educationExp.vue'
// import attachmentResume from './details/attachmentResume.vue'
import { getPersonCvDetail } from '@/api/enterprise'
import { ref } from 'vue'
import { useRouter, useRoute } from 'vue-router'

const route = useRoute()
const router = useRouter()
// const operateItems = [
//   { text: '邀请面试', icon: 'mdi-account-check' },
//   { text: '不合适', icon: 'mdi-close-circle-outline' },
//   { text: '发起对话', icon: 'mdi-chat-processing-outline' },
//   { text: '加入人才库', icon: 'mdi-tab-plus' },
//   { text: '操作记录', icon: 'mdi-clock-edit-outline' },
// ]

// 获取人才详情
const cvData = ref({})
const getCvDetail = async () => {
  const { id } = route.query
  const { id: userId } = router.currentRoute.value.params
  if (!id || !userId) return
  const data = await getPersonCvDetail(userId, id)
  cvData.value = data
}
getCvDetail()

</script>
<style lang="scss" scoped>
.operate {
  width: 240px;
  height: 500px; // 272px
  position: sticky;
  top: 60px;
}
</style>
