<template>
  <AppCard titleAlign="center">
    <template #title>
      <nuxt-link to="/digital/yx_1">产教融合</nuxt-link>
    </template>
    <div class="row">
      <div class="col" v-for="item in list" :key="item.title">
        <h2>{{ item.title }}</h2>
        <ul>
          <li class="item" v-for="item in item.children" :key="item.title" :style="item.style">
            <AppLink :to="item.path">
              <img :src="item.icon" class="img" />
              <img :src="item.hoverIcon" class="hover-img" />
              {{ item.title }}
            </AppLink>
          </li>
        </ul>
      </div>
    </div>
  </AppCard>
</template>

<script>
import AppLink from '@/components/Link'
export default {
  components: { AppLink },
  data() {
    return {
      list: [
        {
          title: '院校',
          children: [
            {
              icon: 'https://webapp-pub.ezijing.com/www/pc/digital/yx_1.png',
              hoverIcon: 'https://webapp-pub.ezijing.com/www/pc/digital/yx_1_hover.png',
              title: '数字技能实训中心',
              path: 'digital/yx_1'
            },
            {
              icon: 'https://webapp-pub.ezijing.com/www/pc/digital/yx_2.png',
              hoverIcon: 'https://webapp-pub.ezijing.com/www/pc/digital/yx_2_hover.png',
              title: '国际数字人才现代产业学院',
              path: 'digital/yx_2'
            },
            {
              icon: 'https://webapp-pub.ezijing.com/www/pc/digital/yx_3.png',
              hoverIcon: 'https://webapp-pub.ezijing.com/www/pc/digital/yx_3_hover.png',
              title: '专业数字化改造和提升',
              path: 'digital/yx_3'
            }
          ]
        },
        {
          title: '政府',
          children: [
            {
              icon: 'https://webapp-pub.ezijing.com/www/pc/digital/zf_1.png',
              hoverIcon: 'https://webapp-pub.ezijing.com/www/pc/digital/zf_1_hover.png',
              title: '数字技能公共实训基地',
              path: 'digital/zf_1',
              style: { minHeight: '120px' }
            }
          ]
        },
        {
          title: '企业',
          children: [
            {
              icon: 'https://webapp-pub.ezijing.com/www/pc/digital/qy_1.png',
              hoverIcon: 'https://webapp-pub.ezijing.com/www/pc/digital/qy_1_hover.png',
              title: '全球数字领导力学者DBA',
              path: 'https://dld.ezijing.com'
            },
            {
              icon: 'https://webapp-pub.ezijing.com/www/pc/digital/qy_2.png',
              hoverIcon: 'https://webapp-pub.ezijing.com/www/pc/digital/qy_2_hover.png',
              title: '数字时代领航人才EMBA',
              path: 'https://marywood.ezijing.com'
            },
            {
              icon: 'https://webapp-pub.ezijing.com/www/pc/digital/qy_3.png',
              hoverIcon: 'https://webapp-pub.ezijing.com/www/pc/digital/qy_3_hover.png',
              title: '企业人才定制化服务',
              path: ''
            }
          ]
        }
      ]
    }
  }
}
</script>

<style lang="scss" scoped>
.row {
  display: flex;
  column-gap: 60px;
}
.col {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 440px;
  background-color: #fff;
  h2 {
    padding: 48px 0 40px;
    font-size: 24px;
    line-height: 1;
    font-weight: 500;
    color: #333333;
    text-align: center;
  }
  ul {
    margin-bottom: 40px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  li {
    display: flex;
    align-items: center;
    margin: 0 30px;
    padding: 15px 0 15px 20px;
    border: 1px solid #d5d5d5;
    min-height: 80px;
    font-size: 18px;
    color: #666;
    .hover-img {
      display: none;
    }
    &:hover {
      .img {
        display: none;
      }
      .hover-img {
        display: inline;
      }
      color: #fff;
      background-color: var(--main-color);
      border-color: var(--main-color);
    }
  }
  li + li {
    margin-top: 20px;
  }
}
</style>
