<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">
        <div class="title">
          <h2>{{ item.title }}</h2>
          <p>{{ item.desc }}</p>
        </div>
        <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: '院校',
          desc: '数字人才核心能力培养',
          children: [
            {
              icon: 'https://webapp-pub.ezijing.com/www/pc/digital/icon/yx_1.png',
              hoverIcon: 'https://webapp-pub.ezijing.com/www/pc/digital/icon/yx_1_hover.png',
              title: 'IDE数字经济产业学院',
              path: 'digital/yx_2'
            },
            {
              icon: 'https://webapp-pub.ezijing.com/www/pc/digital/icon/yx_2.png',
              hoverIcon: 'https://webapp-pub.ezijing.com/www/pc/digital/icon/yx_2_hover.png',
              title: 'ICT数字经济产业学院',
              path: 'digital/yx_2'
            },
            {
              icon: 'https://webapp-pub.ezijing.com/www/pc/digital/icon/yx_3.png',
              hoverIcon: 'https://webapp-pub.ezijing.com/www/pc/digital/icon/yx_3_hover.png',
              title: '专业数字化改造和提升',
              path: 'digital/yx_3'
            },
            {
              icon: 'https://webapp-pub.ezijing.com/www/pc/digital/icon/yx_4.png',
              hoverIcon: 'https://webapp-pub.ezijing.com/www/pc/digital/icon/yx_4_hover.png',
              title: '数字技能实训中心',
              path: 'digital/yx_1'
            }
          ]
        },
        {
          title: '政府',
          desc: '数字技能公共实训基地',
          children: [
            {
              icon: 'https://webapp-pub.ezijing.com/www/pc/digital/icon/zf_1.png',
              hoverIcon: 'https://webapp-pub.ezijing.com/www/pc/digital/icon/zf_1_hover.png',
              title: '1个数字展区',
              path: 'digital/zf_1'
            },
            {
              icon: 'https://webapp-pub.ezijing.com/www/pc/digital/icon/zf_2.png',
              hoverIcon: 'https://webapp-pub.ezijing.com/www/pc/digital/icon/zf_2_hover.png',
              title: '3个技能实训区',
              path: 'digital/zf_1'
            },
            {
              icon: 'https://webapp-pub.ezijing.com/www/pc/digital/icon/zf_3.png',
              hoverIcon: 'https://webapp-pub.ezijing.com/www/pc/digital/icon/zf_3_hover.png',
              title: '8个实训中心',
              path: 'digital/zf_1'
            },
            {
              icon: 'https://webapp-pub.ezijing.com/www/pc/digital/icon/zf_4.png',
              hoverIcon: 'https://webapp-pub.ezijing.com/www/pc/digital/icon/zf_4_hover.png',
              title: '5个运营中心',
              path: 'digital/zf_1'
            }
          ]
        }
        // {
        //   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: 30px;
}
.col {
  flex: 1;
  background-color: #fff;
  .title {
    padding: 25px 0;
    text-align: center;
    background-color: var(--main-color);
    h2 {
      font-size: 26px;
      font-family: Source Han Sans CN-Bold, Source Han Sans CN;
      font-weight: bold;
      line-height: 1;
      color: #ffffff;
    }
    p {
      margin-top: 12px;
      font-size: 16px;
      font-family: Source Han Sans CN-Regular, Source Han Sans CN;
      line-height: 1;
      color: #ffffff;
    }
  }
  ul {
    margin: 42px 30px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
  li {
    display: flex;
    align-items: center;
    padding: 0 10px;
    border: 1px solid #d5d5d5;
    height: 90px;
    font-size: 16px;
    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);
    }
  }
}
</style>
