<template>
  <div v-loading="loading" class="skill-container flx-center">
    <div class="container">
      <img :src="baseURL + '/' + skillTrainData?.HbData?.[0].FPOSTERPICTURE" height="560" />
      <div class="train-list">
        <div v-for="(item, index) in trainList" :key="index" class="train-item">
          {{ item.name }}
        </div>
      </div>
      <div style="margin-bottom: 360px">
        <contentBlock :list="skillTrainData?.JcAqData" />
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { baseURL } from '@/services'
import { getSkillTraining } from '@/services/api/skillTraining'
import contentBlock from '@/components/contentBlock.vue'

const loading = ref(true)
const queryList = ref({ pageIndex: 1, pageSize: 10 })
const skillTrainData: any = ref()
const trainList = [
  { name: '基础安全培训' },
  { name: '专业技能培训' },
  { name: '专业知识培训' },
  { name: '职业发展培训' },
  { name: '团队管理培训' }
]

const init = async () => {
  const res: any = await getSkillTraining(queryList.value)
  if (res.code === 200) {
    console.log(res)
    skillTrainData.value = res.data
    loading.value = false
  }
}

init()
</script>

<style lang="scss" scoped>
@import './index.scss';
</style>
