<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">
              <div class="item-inner">
                <img :src="item.icon" class="img" />
                <img :src="item.hoverIcon" class="hover-img" />
                {{ item.title }}
              </div>
            </AppLink>
          </li>
        </ul>
      </div>
    </div>
    <div class="col2">
      <ul>
        <li class="item is-hover" v-for="item in list2" :key="item.title" :style="item.style">
          <AppLink :to="item.path">
            <div class="item-inner">
              <img :src="item.icon" class="img" />
              <img :src="item.hoverIcon" class="hover-img" />
              {{ item.title }}
            </div>
          </AppLink>
        </li>
      </ul>
    </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_4.png',
              hoverIcon: 'https://webapp-pub.ezijing.com/www/pc/digital/icon/yx_4_hover.png',
              title: '数字技能实训平台',
              path: 'digital/yx_1'
            },
            {
              icon: 'https://webapp-pub.ezijing.com/www/pc/digital/icon/yx_7.png',
              hoverIcon: 'https://webapp-pub.ezijing.com/www/pc/digital/icon/yx_7_hover.png',
              title: '数字经济实验室',
              path: ''
            },
            {
              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_1.png',
              hoverIcon: 'https://webapp-pub.ezijing.com/www/pc/digital/icon/yx_1_hover.png',
              title: '数字经济新商科产业学院',
              path: 'digital/yx_2'
            },
            {
              icon: 'https://webapp-pub.ezijing.com/www/pc/digital/icon/yx_6.png',
              hoverIcon: 'https://webapp-pub.ezijing.com/www/pc/digital/icon/yx_6_hover.png',
              title: '未来技术产业学院',
              path: 'digital/yx_5'
            },
            {
              icon: 'https://webapp-pub.ezijing.com/www/pc/digital/icon/yx_5.png',
              hoverIcon: 'https://webapp-pub.ezijing.com/www/pc/digital/icon/yx_5_hover.png',
              title: '1+X金融产品数字化营销',
              path: 'https://x.ezijing.com'
            }
          ]
        },
        {
          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: ''
        //     }
        //   ]
        // }
      ],
      list2: [
        {
          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: '职业技能大赛',
          path: 'digital/ds'
        }
      ]
    }
  }
}
</script>

<style lang="scss" scoped>
.row {
  display: flex;
  column-gap: 30px;
}
.col {
  flex: 1;
  background-color: #fff;
  &:first-child {
    flex: 0 0 694px;
  }
  .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: flex;
    flex-wrap: wrap;
    gap: 20px;
  }
  li {
    border: 1px solid #d5d5d5;
    width: 198px;
    height: 128px;
    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);
    }
  }
  .item-inner {
    height: 128px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    img {
      margin-bottom: 14px;
    }
  }
}
.col2 {
  margin-top: 30px;
  background-color: #fff;
  border-top: 5px solid #aa1941;
  ul {
    padding: 12px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
  }
  li {
    width: 198px;
    height: 60px;
    font-size: 16px;
    color: #666;
    .hover-img {
      display: none;
    }
    &.is-hover,
    &:hover {
      .img {
        display: none;
      }
      .hover-img {
        display: inline;
      }
      color: #fff;
      background-color: var(--main-color);
    }
  }
  .item-inner {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}
</style>
