<!-- AIGC网络直播实验室 -->
<script setup>
import { ref } from 'vue'

// 核心模块
const mkList = ref([
  {
    icon: 'https://webapp-pub.ezijing.com/www/pc/digital/yx_1_1/mk_1.png',
    title: '网络仿真教学平台',
    children: [
      {
        icon: 'https://webapp-pub.ezijing.com/www/pc/digital/yx_1_1/mk_1_1.png',
        title: '支持复杂网络拓扑拖拽式构建',
      },
      {
        icon: 'https://webapp-pub.ezijing.com/www/pc/digital/yx_1_1/mk_1_2.png',
        title: '内置 TCP/IP 协议深度解析课程',
      },
      {
        icon: 'https://webapp-pub.ezijing.com/www/pc/digital/yx_1_1/mk_1_3.png',
        title: '真实路由器/交换机 OS 模拟环境',
      },
      {
        icon: 'https://webapp-pub.ezijing.com/www/pc/digital/yx_1_1/mk_1_4.png',
        title: 'SDN 软件定义网络实验支持',
      },
    ],
  },
  {
    icon: 'https://webapp-pub.ezijing.com/www/pc/digital/yx_1_1/mk_2.png',
    title: '教务与资源管理',
    children: [
      {
        icon: 'https://webapp-pub.ezijing.com/www/pc/digital/yx_1_1/mk_2_1.png',
        title: '网络流量可视化与实时数据包分析',
      },
      {
        icon: 'https://webapp-pub.ezijing.com/www/pc/digital/yx_1_1/mk_2_2.png',
        title: '支持移动互联网与 Wi-Fi 协议仿真',
      },
      {
        icon: 'https://webapp-pub.ezijing.com/www/pc/digital/yx_1_1/mk_2_3.png',
        title: '实验报告自动拓扑截图与配置比对',
      },
      {
        icon: 'https://webapp-pub.ezijing.com/www/pc/digital/yx_1_1/mk_2_4.png',
        title: '全面支撑网络工程专业建设数据要求',
      },
    ],
  },
  {
    icon: 'https://webapp-pub.ezijing.com/www/pc/digital/yx_1_1/mk_3.png',
    title: '流量实训管理平台',
    children: [
      {
        icon: 'https://webapp-pub.ezijing.com/www/pc/digital/yx_1_1/mk_3_1.png',
        title: 'VPN 与加密通信隧道构建实验',
      },
      {
        icon: 'https://webapp-pub.ezijing.com/www/pc/digital/yx_1_1/mk_3_2.png',
        title: '多维度的网络故障排查评分机制',
      },
      {
        icon: 'https://webapp-pub.ezijing.com/www/pc/digital/yx_1_1/mk_3_3.png',
        title: '防火墙策略配置与 ACL 规则验证',
      },
      {
        icon: 'https://webapp-pub.ezijing.com/www/pc/digital/yx_1_1/mk_3_4.png',
        title: '与网络技术技能大赛无缝衔接',
      },
    ],
  },
])

const zyList = ref([
  { title: '案例1:基于 ARP 欺骗的中间人攻击与防御实战', industry: '局域网安全', hours: 12 },
  { title: '案例2:OSPF 路由协议认证配置与路由毒化分析', industry: '路由安全', hours: 12 },
  { title: '案例3:企业级防火墙双机热备与策略绕过测试', industry: '边界防御', hours: 16 },
  { title: '案例4:DDoS SYN Flood 洪泛攻击流量分析与清洗', industry: '流量分析', hours: 8 },
  { title: '案例5:IPSec VPN 隧道构建与加密数据截获分析', industry: '传输安全', hours: 16 },
  { title: '案例6:交换机 VLAN 跳跃攻击原理与端口安全配置', industry: '交换安全', hours: 12 },
  { title: '案例7:Wireshark 数据包深度嗅探与敏感信息提取', industry: '协议分析', hours: 24 },
  { title: '案例8:DNS 劫持攻击复现与 DNSSEC 安全部署', industry: '基础服务', hours: 8 },
  { title: '案例9:企业内网 ACL 访问控制列表规划与渗透测试', industry: '访问控制', hours: 16 },
  { title: '案例10:SDN 环境下流表溢出攻击与控制器防护', industry: '新型网络', hours: 12 },
])

const numList = ref([
  { num: '12', desc: '个网络工程案例' },
  { num: '60', desc: '个拓扑工程文件' },
  { num: '120', desc: '个配置演示视频' },
  { num: '35', desc: '份标准流量包' },
  { num: '500+', desc: '份标准流量包' },
])

const tabActive = ref(0)

const tabList = ref([
  {
    title: '流量分析报告',
    tag: '攻击溯源',
    name: '异常流量溯源分析',
    items: [
      '基于真实 Wireshark 抓包数据，还原网络攻击全过程；',
      '详细标注 TCP 三次握手异常及 DDoS 攻击特征指纹；',
      '提供完整的流量清洗策略建议与防火墙规则配置模板。',
    ],
    img: 'https://webapp-pub.ezijing.com/www/pc/next/platform/new-engineering/4/tab1.png',
  },
  {
    title: '设备配置指导书',
    tag: '配置命令',
    name: '标准设备配置手册',
    items: [
      '包含华为/思科主流厂商设备的标准命令行（CLI）配置代码；',
      '分步骤讲解 VLAN 划分、路由协议配置及 ACL 部署流程；',
      '提供拓扑连线图与接口地址规划表，快速搭建实验环境。',
    ],
    img: 'https://webapp-pub.ezijing.com/www/pc/next/platform/new-engineering/4/tab2.png',
  },
  {
    title: '协议原理PPT',
    tag: '理论课件',
    name: '网络协议原理课件',
    items: [
      '图解 OSI 七层模型与 TCP/IP 四层架构的数据封装过程；',
      '动态演示 ARP 解析、DHCP 交互及 TCP 滑动窗口机制；',
      '重点剖析协议头部字段在安全防御中的关键作用。',
    ],
    img: 'https://webapp-pub.ezijing.com/www/pc/next/platform/new-engineering/4/tab3.png',
  },
  {
    title: '抓包演示视频',
    tag: '实验录像',
    name: '协议抓包与攻防实录',
    items: [
      '高清录制网络攻击下的数据包变化过程（如明文密码截获）；',
      '演示使用 Wireshark 进行过滤器筛选与流追踪的操作技巧；',
      '对比防御策略生效前后的网络连通性与流量特征差异。',
    ],
    img: 'https://webapp-pub.ezijing.com/www/pc/next/platform/new-engineering/4/tab4.png',
  },
])

// 标准服务
const bzfwList = ref([
  {
    icon: 'https://webapp-pub.ezijing.com/www/pc/digital/yx_1_1/bzfw_1.png',
    title: '产品服务',
    desc: `实验室拓扑规划
仿真引擎部署调试
公有云账号分发
设备镜像库升级`,
  },
  {
    icon: 'https://webapp-pub.ezijing.com/www/pc/digital/yx_1_1/bzfw_2.png',
    title: '资源服务',
    desc: `配套流量包资源
攻击特征库更新
网络协议案例升级
行业标准规范同步`,
  },
  {
    icon: 'https://webapp-pub.ezijing.com/www/pc/digital/yx_1_1/bzfw_3.png',
    title: '培训服务',
    desc: `网络设备配置培训
师资培训服务
HCIE/CCIE 讲师指导
网络技能大赛集训`,
  },
  {
    icon: 'https://webapp-pub.ezijing.com/www/pc/digital/yx_1_1/bzfw_4.png',
    title: '技术支持',
    desc: `实验环境定期巡检
平台日常管理维护
远程技术协助
故障应急响应`,
  },
])

// 增值服务
const zzfwList = ref(['网络工程专业建设', '实训室空间设计', '行业专家讲座', '一流课程申报支持'])
</script>
<!-- 引产入校 -->
<template>
  <div>
    <div class="banner">
      <img src="https://webapp-pub.ezijing.com/www/pc/next/platform/new-engineering/4/banner.jpg" />
      <div class="cover">
        <div class="cover-inner">
          <h2>网络安全实验室</h2>
          <span></span>
          <h6>互联 · 协议 · 仿真 · 防御</h6>
          <p>
            聚焦网络基础设施安全与通信协议分析，提供从路由交换基础到高级网络攻防的全场景实训。内置 Wireshark
            流量分析、GNS3 网络仿真及企业级下一代防火墙（NGFW）虚拟环境，满足网络工程与安全运维人才培养需求。
          </p>
        </div>
      </div>
    </div>
    <section class="section">
      <div class="section-inner">
        <h2 class="section-title">核心模块</h2>
        <div class="mk-list">
          <div class="mk-item" v-for="item in mkList" :key="item.title">
            <div class="box">
              <img :src="item.icon" />
              <p>{{ item.title }}</p>
            </div>
            <ul>
              <li v-for="item in item.children" :key="item.title">
                <img :src="item.icon" />
                <p>{{ item.title }}</p>
              </li>
            </ul>
          </div>
        </div>
      </div>
    </section>
    <section class="section">
      <div class="section-inner">
        <h2 class="section-title">案例资源介绍</h2>
        <p class="section-info">源自真实企业网络架构，覆盖路由交换、边界安全与流量分析全场景</p>
        <div class="zy">
          <table class="table">
            <thead>
              <tr>
                <th>场景名称</th>
                <th>所属行业</th>
                <th>学时</th>
              </tr>
            </thead>
            <tbody>
              <tr v-for="item in zyList" :key="item.title">
                <td>{{ item.title }}</td>
                <td>{{ item.industry }}</td>
                <td>{{ item.hours }}</td>
              </tr>
            </tbody>
          </table>
          <ul class="num">
            <li v-for="item in numList" :key="item.desc">
              <span>{{ item.num }}</span>
              <em>{{ item.desc }}</em>
            </li>
          </ul>
        </div>
        <div class="tab">
          <ul class="tab-header">
            <li
              v-for="(item, index) in tabList"
              :class="{ 'is-active': index === tabActive }"
              :key="index"
              @mouseover="tabActive = index">
              {{ item.title }}
            </li>
          </ul>
          <div class="tab-body" v-for="(item, index) in tabList" :key="index" v-show="index === tabActive">
            <div class="tab-body-pic">
              <img :src="item.img" :alt="item.title" />
            </div>
            <div class="tab-body-content">
              <span>{{ item.tag }}</span>
              <h4>{{ item.title }}</h4>
              <ul>
                <li v-for="subItem in item.items" :key="subItem">{{ subItem }}</li>
              </ul>
            </div>
          </div>
        </div>
        <h2 class="section-title">产品配套服务</h2>
        <h3 class="section-subtitle">标准服务</h3>
        <ul class="bz-list">
          <li v-for="item in bzfwList" :key="item.title">
            <img :src="item.icon" />
            <div class="cover">
              <h4>{{ item.title }}</h4>
              <p v-html="item.desc"></p>
            </div>
          </li>
        </ul>
        <h3 class="section-subtitle">增值服务</h3>
        <ul class="zz-list">
          <li v-for="item in zzfwList" :key="item">{{ item }}</li>
        </ul>
      </div>
    </section>
  </div>
</template>

<style lang="scss" scoped>
.banner {
  position: relative;
  img {
    width: 100%;
    height: 650px;
    object-fit: cover;
  }
  .cover {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    line-height: 1;
    color: #ffffff;
    h2 {
      font-size: 60px;
      font-family:
        Source Han Sans CN-Bold,
        Source Han Sans CN;
      font-weight: bold;
      line-height: 1;
    }
    h3 {
      margin-bottom: 20px;
      font-size: 24px;
      font-family:
        Source Han Sans CN-Medium,
        Source Han Sans CN;
      font-weight: 500;
      line-height: 1;
      letter-spacing: 4px;
    }
    span {
      margin: 46px 0;
      width: 60px;
      height: 6px;
      background: #ffffff;
    }
    h6 {
      font-size: 24px;
      font-family:
        Source Han Sans CN-Medium,
        Source Han Sans CN;
      font-weight: 500;
      line-height: 1;
    }
    p {
      margin-top: 30px;
      max-width: 600px;
      font-size: 18px;
      font-family:
        Source Han Sans CN-Regular,
        Source Han Sans CN;
      line-height: 30px;
    }
    a {
      margin-top: 28px;
      width: 112px;
      height: 36px;
      font-size: 16px;
      font-family:
        Source Han Sans CN-Regular,
        Source Han Sans CN;
      font-weight: 400;
      color: #ffffff;
      line-height: 36px;
      background: #aa1941;
      text-align: center;
    }
  }
  .cover-inner {
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    flex-direction: column;
  }
}

.section-inner {
  width: 1200px;
  margin: 90px auto;
}
.section-title {
  margin-bottom: 40px;
  font-size: 30px;
  font-family: Source Han Sans CN;
  font-weight: bold;
  line-height: 32px;
  color: #333333;
  text-align: center;
}
.section-title-desc {
  margin-bottom: 50px;
  font-family:
    Source Han Sans CN,
    Source Han Sans CN;
  font-weight: 400;
  font-size: 18px;
  color: #666666;
  line-height: 30px;
  text-align: center;
}
.section-subtitle {
  display: inline-block;
  margin: 36px 0;
  font-size: 20px;
  line-height: 32px;
  color: #424242;
  border-bottom: 1px solid var(--main-color);
}
.section-desc {
  font-size: 16px;
  font-family: Source Han Sans CN;
  font-weight: 400;
  line-height: 34px;
  color: #666666;
}
.section-info {
  margin: 40px 0 70px;
  font-size: 18px;
  font-family: Source Han Sans CN;
  font-weight: 400;
  line-height: 34px;
  color: #666666;
  text-align: center;
}

.section-pic {
  text-align: center;
  img {
    max-width: 100%;
  }
}
.mk-list {
  display: flex;
  gap: 60px;
  .mk-item {
    flex: 1;
  }
  .box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 260px;
    background-color: var(--main-color);
    color: #fff;
    p {
      margin-top: 40px;
      font-size: 18px;
      font-family:
        Source Han Sans CN-Medium,
        Source Han Sans CN;
      font-weight: 500;
      color: #ffffff;
    }
    span {
      margin-top: 15px;
    }
  }
  ul {
    margin-top: 40px;
  }
  li {
    margin-top: 25px;
    img {
      margin: 0 18px;
    }
    display: flex;
    align-items: center;
    height: 60px;
    background: #f2f2f2;
    font-size: 15px;
    font-family:
      Source Han Sans CN-Medium,
      Source Han Sans CN;
    font-weight: 500;
    color: #424242;
  }
}
.bz-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 38px;
  li {
    position: relative;
    transition: all 0.3s;
    &:hover {
      transform: scale(1.06);
    }
  }
  .cover {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
  }
  img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  h4 {
    padding: 64px 0 45px;
    font-size: 24px;
    font-family:
      Source Han Sans CN-Medium,
      Source Han Sans CN;
    font-weight: 500;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  p {
    font-size: 16px;
    font-family:
      Source Han Sans CN-Regular,
      Source Han Sans CN;
    font-weight: 400;
    color: #ffffff;
    line-height: 40px;
    text-align: center;
    white-space: pre-wrap;
  }
}
.zz-list {
  display: flex;
  gap: 25px;
  li {
    flex: 1;
    font-size: 22px;
    font-family:
      Source Han Sans CN-Medium,
      Source Han Sans CN;
    font-weight: 500;
    color: #333333;
    line-height: 80px;
    text-align: center;
    border: 1px solid var(--main-color);
    border-left-width: 10px;
  }
}
.al-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  li {
    img {
      width: 100%;
    }
    transition: all 0.3s;
    &:hover {
      transform: scale(1.06);
    }
  }
}
.zy {
  display: flex;
  .table {
    flex: 1;
  }
  .num {
    margin-left: 35px;
  }
}
.num {
  width: 320px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  li {
    padding: 20px;
    height: 130px;
    background: #ffffff;
    box-shadow: 0px 0px 8px 1px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    &:first-child {
      grid-column: span 2;
    }
    &:hover {
      color: #fff;
      background-color: var(--main-color);
      span {
        color: #fff;
      }
    }
    span {
      font-size: 30px;
      font-weight: bold;
      font-family: SourceHanSansCN-Bold;
      color: var(--main-color);
    }
    em {
      font-style: normal;
      font-size: 14px;
      font-family: Source Han Sans CN;
    }
  }
}
.table {
  thead {
    th {
      padding: 20px;
      font-size: 18px;
      font-family: Source Han Sans CN;
      font-weight: bold;
      line-height: 1;
      color: #fff;
      background-color: #aa1941;
      border: 1px solid #aa1941;
    }
    th:nth-child(2) {
      background: #931638;
    }
  }
  tbody {
    td {
      font-size: 16px;
      font-family: Source Han Sans CN;
      font-weight: 400;
      line-height: 1;
      color: #262626;
      padding: 10px;
      border: 1px solid #8b8b8b;
    }
    td:nth-child(1) {
      padding-left: 40px;
    }
    td:nth-child(2),
    td:nth-child(3) {
      text-align: center;
    }
  }
}
.tab {
  display: flex;
  margin: 60px 0 90px;
}
.tab-header {
  margin-right: 38px;
  li {
    width: 270px;
    height: 70px;
    font-size: 18px;
    font-family:
      Source Han Sans CN-Medium,
      Source Han Sans CN;
    font-weight: 500;
    line-height: 70px;
    color: #333333;
    background: #fff;
    text-align: center;
    border: 1px solid #d5d5d5;
    cursor: pointer;
    &.is-active {
      color: #fff;
      background-color: var(--main-color);
      border: 1px solid var(--main-color);
    }
    & + li {
      margin-top: 22px;
    }
  }
}
.tab-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  background-color: #fff;
  box-shadow: 0px 0px 8px 1px rgba(0, 0, 0, 0.1);
  &-pic {
    position: relative;

    margin: 0 90px;
    width: 200px;
    height: 240px;
    img {
      position: relative;
      max-width: 100%;
      height: auto;
      z-index: 10;
    }
    &::before {
      z-index: 1;
      content: '';
      position: absolute;
      left: 10px;
      top: 10px;
      width: 100%;
      height: 100%;
      background: #ededed;
    }
  }
  &-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    span {
      width: 80px;
      height: 30px;
      font-size: 12px;
      line-height: 30px;
      text-align: center;
      color: var(--main-color);
      background: #f8e9ed;
      border-radius: 8px 8px 8px 8px;
    }
    h4 {
      margin: 20px 0 40px;
      font-weight: bold;
      font-size: 22px;
    }
    li {
      position: relative;
      font-size: 16px;
      color: #333333;
      line-height: 36px;
      padding-left: 20px;
      &::after {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 8px;
        height: 8px;
        background-color: var(--main-color);
        border-radius: 50%;
      }
    }
  }
}
</style>
