<template>
    <el-header>
        <Header />
    </el-header>
    <div class="service-list-container">
      <div class="service-content">
        <ul class="service-list">
          <li>
            <el-image src="src/assets/time.png"></el-image>
            <div>
              <p>运费时效</p>
              <p>查预估费用和预计送达时间</p>
            </div>
          </li>
          <li>
            <el-image src="src/assets/serviceSpot.png"></el-image>
            <div>
              <p>服务网点</p>
              <p>查各地网点、丰巢柜、合作点</p>
            </div>
          </li>
          <li>
            <el-image src="src/assets/require.png"></el-image>
            <div>
              <p>收寄标准</p>
              <p>查物品能不能寄</p>
            </div>
          </li>
          <li>
            <el-image src="src/assets/serviceRange.png"></el-image>
            <div>
              <p>服务范围</p>
              <p>查地址能不能收派</p>
            </div>
          </li>
        </ul>	
        <ul class="service-list">	
          <li>
            <el-icon><DataLine /></el-icon>
            <div>
              <p>汇率查询</p>
            </div>
          </li>
          <li>
            <el-icon><Document /></el-icon>
            <div>
              <p>常用表格</p>
            </div>
          </li>
          <li>
            <el-icon><SetUp /></el-icon>
            <div>
              <p>清关服务</p>
            </div>
          </li>
          <li>
            <el-icon><DataBoard /></el-icon>
            <div>
              <p>无着件公示</p>
            </div>
          </li>
          <li>
            <el-icon><HomeFilled /></el-icon>
            <div>
              <p>特殊入仓地址查询</p>
            </div>
          </li>
          <li>
            <el-icon><Download /></el-icon>
            <div>
              <p>电子回单下载</p>
            </div>
          </li>
        </ul>
      </div>
    </div>
  </template>
  
  <script lang="ts" setup>
  import { ref } from 'vue';
  import {
    DataLine,
    Document,
    SetUp,
    DataBoard,
    HomeFilled,
    Download
  } from '@element-plus/icons-vue';
  </script>
  
  <style scoped>
  .service-list-container {
    position: fixed;
    top: 60px; /* header 高度 */
    right: 0;
    width: calc(100% - 220px); /* 减去侧边栏宽度 */
    height: calc(100vh - 60px);
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
  }
  
  .service-content {
    max-width: 1200px;
    margin: 20px auto;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px 0 rgba(0,0,0,0.1);
    padding: 20px;
  }
  
  .service-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-bottom: 20px;
  }
  
  .service-list li {
    flex: 0 0 200px;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
    background-color: #f9f9f9;
  }
  
  .service-list li:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }
  
  .service-list img {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
  }
  
  .service-list .el-icon {
    font-size: 30px;
    margin: 10px 0;
    color: #409EFF;
  }
  
  .service-list p {
    margin: 5px 0;
  }
  
  .service-list p:first-child {
    font-weight: bold;
    font-size: 16px;
  }
  
  .service-list p:last-child {
    color: #666;
    font-size: 14px;
  }
  
  /* 响应式布局 */
  @media screen and (max-width: 768px) {
    .service-list-container {
      width: calc(100% - 64px); /* 折叠时的侧边栏宽度 */
    }
    
    .service-list li {
      flex: 0 0 150px;
    }
  }
  </style>