<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 v-html="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="col3" v-for="(item, index) in newList2" :key="index">
      <div class="left">{{ item.title }}</div>
      <div class="right">
        <template v-for="(cItem, cIndex) in item.children" :key="cIndex">
          <AppLink :to="cItem.path">
            <div class="item">
              <img :src="cItem.icon" class="img" />
              <img :src="cItem.hoverIcon" class="imga" />
              <div class="name">{{ cItem.name }}</div>
            </div>
          </AppLink>
        </template>
      </div>
    </div>
  </AppCard>
</template>

<script setup>
const list = [
  {
    title: '院&nbsp校',
    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: '政&nbsp;府',
    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',
      },
    ],
  },
]

const newList2 = [
  {
    title: '职业技能大赛',
    children: [
      {
        name: '国赛',
        icon: 'https://webapp-pub.ezijing.com/www/pc/240531/ds-icon1.png',
        hoverIcon: 'https://webapp-pub.ezijing.com/www/pc/240531/ds-icon1a.png',
        path: 'digital/ds',
      },
      {
        name: '省赛',
        icon: 'https://webapp-pub.ezijing.com/www/pc/240531/ds-icon2.png',
        hoverIcon: 'https://webapp-pub.ezijing.com/www/pc/240531/ds-icon2a.png',
        path: 'digital/ds',
      },
      {
        name: '行业赛',
        icon: 'https://webapp-pub.ezijing.com/www/pc/240531/ds-icon3.png',
        hoverIcon: 'https://webapp-pub.ezijing.com/www/pc/240531/ds-icon3a.png',
        path: 'digital/ds',
      },
    ],
  },
  {
    title: '数字教材',
    children: [
      {
        name: '数字教材编辑器',
        icon: 'https://webapp-pub.ezijing.com/www/pc/240531/jc-icon1.png',
        hoverIcon: 'https://webapp-pub.ezijing.com/www/pc/240531/jc-icon1a.png',
        path: 'digital/sz',
      },
      {
        name: '数字教材出版',
        icon: 'https://webapp-pub.ezijing.com/www/pc/240531/jc-icon2.png',
        hoverIcon: 'https://webapp-pub.ezijing.com/www/pc/240531/jc-icon2a.png',
        path: 'digital/sz',
      },
      {
        name: '数智化教学',
        icon: 'https://webapp-pub.ezijing.com/www/pc/240531/jc-icon3.png',
        hoverIcon: 'https://webapp-pub.ezijing.com/www/pc/240531/jc-icon3a.png',
        path: 'digital/sz',
      },
    ],
  },
]
</script>

<style lang="scss" scoped>
.row {
  display: flex;
  column-gap: 30px;
}
.col {
  flex: 1;
  background-color: #fff;
  box-shadow: 0px 3px 12px 1px rgba(0, 0, 0, 0.16);
  &: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;
    }
  }
}
.col3 {
  display: flex;
  background-color: #fff;
  margin-top: 30px;
  box-shadow: 0px 3px 12px 1px rgba(0, 0, 0, 0.16);
  .left {
    min-width: 259px;
    line-height: 104px;
    background: #aa1941;
    font-weight: bold;
    font-size: 26px;
    color: #ffffff;
    text-align: center;
  }
  .right {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex: 1;
    .item {
      display: flex;
      align-items: center;
      width: 220px;
      line-height: 64px;
      // border: 1px solid #d5d5d5;
      &:hover {
        background-color: #aa1941;
        .name {
          color: #fff;
        }
        .img {
          display: none;
        }
        .imga {
          display: block;
        }
      }
      img {
        margin-left: 30px;
      }
      .imga {
        display: none;
      }
      .name {
        margin-left: 5px;
        font-size: 16px;
        color: #6c6c6c;
        letter-spacing: 2px;
      }
    }
  }
}
</style>
