<template>
  <div class="home container">
    <div class="part1">
      <div>
        <div class="super-title">青浦区“一张图”区级节点</div>
        <div class="title-sub ">以二三维一体化引擎为核心，构建政务时空数据治理与应用服务生态，赋能城市精细化治理</div>
        <div class="part1-1">
          <div class="part1-1-1">
            <div class="number-container">
              <span class="text">调用总数</span>
              <span v-for="(num, index) in totalCall" :key="index">
                <span v-if="num.indexOf(',') > -1">
                  <span class="separator">,</span>
                </span>
                <span v-else>
                  <span class="number-item">{{ num }}</span>
                </span>
              </span>
              <span class="text">次</span>
            </div>
          </div>
          <div class="part1-1-2">
            <div class="call-count-container">
              <div class="line"></div>
              <div>
                <span class="text1">昨日调用量</span>
                <span class="count">{{ lastDayCall }}</span>
                <span class="text2">次</span>
              </div>
              <div class="line"></div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <div class="darkblue-background">
      <div class="row">
        <div>
          <div class="strong-data blue ">{{ unitNum }}个</div>
          <div class="font middle">授权委办数</div>
        </div>
        <div>
          <div class="strong-data blue ">{{ appNum }}个</div>
          <div class="font middle">授权应用数</div>
        </div>
        <div>
          <div class="strong-data blue ">{{ userNum }}个</div>
          <div class="font middle">授权用户数</div>
        </div>
      </div>
      <div class="second-title ">
        服务调用趋势(近30天)
      </div>
      <div id="echart1"></div>

      <div class="second-title ">
        平台核心运行清单
      </div>
      <!--四组统计-->
      <div class="row">
        <div class="lighter-container" style="flex: 2;">
          <div class="third-title ">
            <el-icon color="#0071e3" size="30px">
              <Stopwatch></Stopwatch>
            </el-icon>
            <div>基础统计</div>
          </div>
          <div class="grid-2x2">
            <div class="lighter-container middle-container">
              <div class="strong-data  blue">{{ weekCall }}</div>
              <div class="title-sub ">近一周总调用</div>
            </div>
            <div class="lighter-container middle-container">
              <div class="strong-data  blue">{{ monthCall }}</div>
              <div class="title-sub ">近一月总调用</div>
            </div>
            <div class="lighter-container middle-container">
              <div class="strong-data  blue">{{ seasonCall }}</div>
              <div class="title-sub ">近三月总调用</div>
            </div>
            <div class="lighter-container middle-container">
              <div class="strong-data  blue">{{ yearCall }}</div>
              <div class="title-sub ">近一年总调用</div>
            </div>
          </div>
        </div>
        <div class="lighter-container" style="flex: 3;">
          <div class="between-row">
            <div class="third-title">
              <el-icon color="#0071e3" size="30px">
                <Histogram />
              </el-icon>
              <div>委办调用情况</div>

            </div>
            <span>
              <el-button v-show="this.chartMluLevel != 'unit'" text size="large" circle @click="chartMluBack()">
                <el-icon color="#0071e3" size="30px">
                  <Back />
                </el-icon>
              </el-button>
              <el-date-picker v-model="chartMluTimeRange" :clearable="false" type="daterange" range-separator="到" start-placeholder="开始日期"
                end-placeholder="结束日期" @change="chartMluFocus()" />
            </span>
          </div>
          <div id="echartMultiLevelUse"></div>

        </div>
      </div>
      <div class="row">
        <div class="lighter-container" style="flex: 3;">
          <div class="third-title ">
            <el-icon color="#0071e3" size="30px">
              <List></List>
            </el-icon>
            <div>热点资源top10</div>
          </div>
          <div class="row">
            <div class="top-list" style="flex-grow: 1;">
              <div v-for="index in 5" :key="index" class="list-item">
                <template v-if="resourceTop[index - 1] != null">
                  <el-avatar size="small" class="circle-number blue">
                    {{ index }}
                  </el-avatar>
                  <div class="font" style="flex-grow: 100;">{{ resourceTop[index - 1].name }}</div>
                  <div class="font blue">{{ resourceTop[index - 1].value }}</div>
                </template>
              </div>
            </div>
            <div class="top-list" style="flex-grow: 1;">
              <div v-for="index in 5" :key="index" class="list-item">
                <template v-if="resourceTop[index + 4] != null">
                  <el-avatar size="small" class="circle-number blue">
                    {{ index + 5 }}
                  </el-avatar>
                  <div class="font" style="flex-grow: 100;">{{ resourceTop[index + 4].name }}</div>
                  <div class="font blue">{{ resourceTop[index + 4].value }}</div>

                </template>
              </div>
            </div>
          </div>
        </div>

        <div class="lighter-container" style="flex: 2;">
          <div class="third-title ">
            <el-icon color="#0071e3" size="30px">
              <School />
            </el-icon>
            <div>委办调用top5</div>
          </div>
          <div class="top-list">
            <div v-for="index in 5" :key="index" class="list-item">
              <template v-if="userTop[index - 1] != null">
                <el-avatar size="small" class="circle-number blue">
                  {{ index }}
                </el-avatar>
                <div class="font" style="flex-grow: 100;">{{ userTop[index - 1].name }}</div>
                <div class="font blue">{{ userTop[index - 1].value }}</div>
              </template>
            </div>
          </div>
        </div>
      </div>

      <div class="title " style="margin-top:90px ;">应用案例</div>
      <div class="title-sub ">技术创新与政务需求深度融合，打造高效、安全、可扩展的时空数据安全平台</div>

      <div class="row" style="margin-top: 90px;">
        <div>
          <div class="strong-data blue ">365个</div>
          <div class="font middle">地名地址</div>
        </div>
        <div>
          <div class="strong-data blue ">366个</div>
          <div class="font middle">坐标转换</div>
        </div>
        <div>
          <div class="strong-data blue ">367个</div>
          <div class="font middle">地图服务</div>
        </div>
      </div>
      <el-tabs v-model="activeUseCase" class="usecase-tabs" @tab-click="handleClick" stretch="true">
        <el-tab-pane label="dataProcass" name="dataProcass">
          <template #label>
            <div class="tab-lab">
              <el-icon :color="activeUseCase == 'dataProcass' ? '#0071e3' : '#fff'" size="30px">
                <Expand />
              </el-icon>
              <div :class="activeUseCase == 'dataProcass' ? 'blue' : ''">数据治理</div>
            </div>
          </template>
        </el-tab-pane>
        <el-tab-pane label="useInService" name="useInService">
          <template #label>
            <div class="tab-lab">
              <el-icon :color="activeUseCase == 'useInService' ? '#0071e3' : '#fff'" size="30px">
                <Location />
              </el-icon>
              <div :class="activeUseCase == 'useInService' ? 'blue' : ''">业务应用</div>
            </div>
          </template></el-tab-pane>
        <el-tab-pane label="decisionHelping" name="decisionHelping">
          <template #label>
            <div class="tab-lab">
              <el-icon :color="activeUseCase == 'decisionHelping' ? '#0071e3' : '#fff'" size="30px">
                <Guide />
              </el-icon>
              <div :class="activeUseCase == 'decisionHelping' ? 'blue' : ''">综合决策</div>
            </div>
          </template></el-tab-pane>
      </el-tabs>
      <div class="warp-row">
        <div v-for="useCaseItem in useCase[activeUseCase]" :key="useCaseItem.title" class="use-case"
          :style="`background-image: url(${useCaseItem.picture})`">
          <div class="use-case-empty"></div>
          <div class="use-case-text">
            <el-tag v-for="item in useCaseItem.tags" style="margin-right: 5px;" :key="item" color="#e2e4f4" size="lager" effect="dark" round>
              <span class="blue">
                {{ item }}
              </span>
            </el-tag>
            <span class="third-title">
              <span style="padding: 10px 0px;">
                {{ useCaseItem.title }}
              </span>
            </span>
            <p class="font grey" style="padding-top: 0px !important;">
              {{ useCaseItem.text }}
            </p>
          </div>
        </div>
      </div>

      <div class="title " style="margin-top:90px ;">实践与探索·六大核心功能</div>
      <div class="title-sub ">聚焦政务场景痛点，打造从数据治理到应用落地的全链路创新解决方案</div>

      <div class="row" style="margin-top: 36px;">
        <div class="lightblue-container six-router">
          <div class="third-title">
            <el-icon color="white" size="45px">
              <Coin />
            </el-icon>
            时空数据管理
          </div>
          <p class="font lightgrey">
            覆盖数据质量检查、加工、管理、服务发布全流程，支持矢量/栅格数据标准化处理，实现多格式转换与瓦片定制，保障数据规范可用。
          </p>
        </div>
        <div class="lightblue-container six-router">
          <div class="third-title">
            <el-icon color="white" size="45px">
              <Orange />
            </el-icon>
            二三维一体化引擎
          </div>
          <p class="font lightgrey">
            嵌入式SDK支撑地图交互、空间分析、数据可视化，涵盖热力图/聚合图/迁徙图等多维呈现，实现精准定位与场景切换。
          </p>
        </div>
        <div class="lightblue-container six-router">
          <div class="third-title">
            <el-icon color="white" size="45px">
              <Guide />
            </el-icon>
            时空门户
          </div>
          <p class="font lightgrey">
            整合平台访问统计、功能演示、服务导航，提供视频教程与业务场景展示，快速上手平台核心能力，支撑政务场景应用。
          </p>
        </div>
      </div>
      <div class="row">
        <div class="lightblue-container six-router">
          <div class="third-title">
            <el-icon color="white" size="45px">
              <Tickets />
            </el-icon>
            微功能
          </div>
          <p class="font lightgrey">
            支持拓扑计算、空间量算、几何运算与数据转换，批量处理海量时空数据，适配规划、管理多场景计算需求。
          </p>
        </div>
        <div class="lightblue-container six-router">
          <div class="third-title">
            <el-icon color="white" size="45px">
              <Open />
            </el-icon>
            应用管理
          </div>
          <p class="font lightgrey">
            统一接入各类时空业务应用，管控访问权限与应用信息，实现“接入-访问-管理”全流程闭环，支撑区级特色应用建设。
          </p>
        </div>
        <div class="lightblue-container six-router">
          <div class="third-title">
            <el-icon color="white" size="45px">
              <Help />
            </el-icon>
            运行管理
          </div>
          <p class="font lightgrey">
            实时监控平台运行数据，负责数据全生命周期管理与权限管控，建立四级管理架构，保障系统合规安全运行。
          </p>
        </div>
      </div>
    </div>
    <div class="dark-background">
      <div class="row">
        <img :src="require('@/assets/images/common/home-bg2.png')" />
        <div class="col">
          <div>
            <div class="super-title">多源数据统一治理</div>
            <div class="super-title">打破格式与基准壁垒</div>
            <p class="grey font">支持矢量、栅格等多格式数据转换，同一坐标/投影基准，通过重复项、逻辑/语义一致性检查，让分散数据规范入库</p>
          </div>
        </div>
      </div>
    </div>
    <div class="darkblue-background col">
      <div class="">
        <div class="super-title">强大空间计算能力，秒级响应复杂分析</div>
        <p class="font middle">内置拓扑计算、空间量算、几何运算等核心功能，支持非空间数据转空间数据，快速解决区域关联、资源覆盖等分析需求</p>
      </div>
    </div>
    <div class="image-background" :style="`background-Image:url('${require('@/assets/images/common/home-bg3.png')}');`">
    </div>
    <div class="bluedark-background dense-col">
      <div>
        <div class="super-title">二三维一体化可视化</div>
        <div class="super-title">场景适配更灵活</div>
      </div>
      <div>
        <div class="font middle">
          GIS通用计算功能，实用便捷超乎想象！
        </div>
        <div class="font middle">
          测距、剖面分析及点线面绘制轻松实现，坐标转换精准高效，路径规划快速准确，地名搜索智能推荐
        </div>
      </div>
    </div>
    <div class="darkblue-background image-background col"
      :style="`background-Image:url('${require('@/assets/images/common/home-bg4.png')}');`">
      <div class="row" style="margin-top: auto;">
        <!-- <ElButton type="primary">
          了解更多
        </ElButton> -->
      </div>
    </div>

    <div class="blue-background col">
      <div class="warp-row">
        <div class="block-page-router">
          <div class="title">
            时空数据治理标准化实践
          </div>
          <p class="font grey">
            构建“检查-加工-发布”全流程数据治理体系，实现矢量/栅格数据标准化处理、多格式转换与瓦片定制，解决区级时空数据格式不统一、质量参差不齐的通电，为全场景应用构牢数据基础
          </p>
          <div class="row" style="margin-top: auto;">
            <div class="font" style="margin-left: auto;" @click="goto('/sksjgl')">
              了解更多→
            </div>
          </div>
        </div>
        <div class="block-page-router">
          <div class="title">
            二三维一体化引擎创新应用
          </div>
          <p class="font grey">
            自研嵌入式 GIS SDK，融合二维地图交互、三维场景渲染能力，创新落地热力图 / 聚合图 / 迁徙图等多维可视化形式，实现区级地理信息 “全景式” 呈现与精准定位。
          </p>
          <div class="row" style="margin-top: auto;">
            <div class="font" style="margin-left: auto;"  @click="goto('/skmh/scene')">
              了解更多→
            </div>
          </div>
        </div>
        <div class="block-page-router">
          <div class="title">
            政务时空门户一体化探索
          </div>
          <p class="font grey">
            整合平台访问统计、功能演示、视频教程等能力，打造适配青浦区政务场景的时空门户总入口，打通 “一网通办”“一网统管” 数据链路，降低政务人员使用门槛。
          </p>
          <div class="row" style="margin-top: auto;">
            <div class="font" style="margin-left: auto;"  @click="goto('/skmh')">
              了解更多→
            </div>
          </div>
        </div>
        <div class="block-page-router">
          <div class="title">
            空间计算微功能场景化落地
          </div>
          <p class="font grey">
            聚焦区级规划、管理等实际需求，落地拓扑计算、空间量算、几何运算等轻量化微功能，支持海量时空数据批量处理，让专业空间分析能力下沉至街镇级应用场景。
          </p>
          <div class="row" style="margin-top: auto;">
            <div class="font" style="margin-left: auto;"  @click="goto('/wgn')">
              了解更多→
            </div>
          </div>
        </div>
        <div class="block-page-router">
          <div class="title">
            政务应用标准化接入管理
          </div>
          <p class="font grey">
            建立区级时空业务应用 “接入 - 授权 - 管控” 全闭环体系，统一规范应用接入流程与权限管理，适配青浦区特色政务应用的快速接入与安全运行。
          </p>
          <div class="row" style="margin-top: auto;">
            <div class="font" style="margin-left: auto;"  @click="goto('/yygl')">
              了解更多→
            </div>
          </div>
        </div>
        <div class="block-page-router">
          <div class="title">
            四级架构运行管理体系构建
          </div>
          <p class="font grey">
            创新构建 “区 — 街镇 — 综合网格 — 村居” 四级运行管理架构，实现平台数据全生命周期管控、运行状态实时监控，保障区级 “一张图” 系统合规、安全、稳定运行。
          </p>
          <div class="row" style="margin-top: auto;">
            <div class="font" style="margin-left: auto;"  @click="goto('/yxgl')">
              了解更多→
            </div>
          </div>
        </div>
      </div>
    </div>
    <div class="bluedark-background col">
      <div>
        <div class="super-title">多应用标准化接入</div>
        <div class="super-title">打破“烟囱式”壁垒</div>
      </div>
      <p class="font middle">
        亮点说明：通过REST API、WebSocket等标准化接口，无缝接入GIS、遥感监测等各类时空应用，统一管理访问权限与运行状态
      </p>
    </div>
    <div class="dark-background image-background col"
      :style="`background-Image:url('${require('@/assets/images/common/home-bg5.png')}');`">
      <div class="row" style="margin-top: auto;">
      </div>
    </div>
  </div>
  <div class="darkblue-background col" style="height: auto;">
    <div class="super-title grey">
      <div>全链路运行监督</div>
      <div>据驱动优化决策</div>
    </div>
    <p class="font grey middle">实时统计服务调用、用户分布、应用活跃度等核心指标，全维度反馈系统运行状态，为资源调配与功能迭代提供数据支撑</p>
    <img :src="require('@/assets/images/common/home-bg6.png')" />
  </div>
</template>

<script>
import { countAppUseByUnitName, countServiceUseByApp, countUnitUse, countUserData, topService, topUnit, totalCount, totalCountGroupByTime } from "@/api/count";
import * as echarts from "echarts";
import moment from "moment";
let chart1 = null;
let chartMultiLevelUse = null;

export default {
  name: "Home",
  data() {
    return {
      lastDayCall: "0",
      totalCall: ["0", "0", "0", ",", "0", "0", "0"],

      serveNum: 0,
      userNum: 0,
      appNum: 0,
      weekCall: 0,
      monthCall: 0,
      seasonCall: 0,
      yearCall: 0,
      currentTab: "data-governance", // 初始选中项
      tabs: [
        { key: "data-governance", icon: "", title: "数据治理" },
        { key: "business-app", icon: "", title: "业务应用" },
        { key: "comprehensive-decision", icon: "", title: "综合决策" }
      ],
      resourceTop: [
      ],
      userTop: [
      ],
      useCase: {
        dataProcass: [{
          tags: ["盈浦街道", "夏阳街道"],
          title: "上海市青浦区教育局·学区查询",
          text: "苹果，学名Malus pumila Mill.，别称西洋苹果、柰，属于蔷薇科苹果属的植物 [1-2]。苹果是全球最广泛种植和销售的水果之一，具有悠久的栽培历史和广泛的分布范围。苹果的原始种群主要起源于中亚的天山山脉附近，尤其是现代哈萨克斯坦的阿拉木图地区，提供了所有现代苹果品种的基因库。苹果通过早期的贸易路线，如丝绸之路，从中亚向外扩散到全球各地。 [3]",
          picture: require('@/assets/images/common/u301.png')
        }, {
          tags: ["盈浦街道", "夏阳街道"],
          title: "上海市青浦区教育局·学区查询",
          text: "苹果，学名Malus pumila Mill.，别称西洋苹果、柰，属于蔷薇科苹果属的植物 [1-2]。苹果是全球最广泛种植和销售的水果之一，具有悠久的栽培历史和广泛的分布范围。苹果的原始种群主要起源于中亚的天山山脉附近，尤其是现代哈萨克斯坦的阿拉木图地区，提供了所有现代苹果品种的基因库。苹果通过早期的贸易路线，如丝绸之路，从中亚向外扩散到全球各地。 [3]",
          picture: require("@/assets/images/common/u301.png")
        }, {
          tags: ["盈浦街道、夏阳街道"],
          title: "上海市青浦区教育局·学区查询",
          text: "苹果，学名Malus pumila Mill.，别称西洋苹果、柰，属于蔷薇科苹果属的植物 [1-2]。苹果是全球最广泛种植和销售的水果之一，具有悠久的栽培历史和广泛的分布范围。苹果的原始种群主要起源于中亚的天山山脉附近，尤其是现代哈萨克斯坦的阿拉木图地区，提供了所有现代苹果品种的基因库。苹果通过早期的贸易路线，如丝绸之路，从中亚向外扩散到全球各地。 [3]",
          picture: require("@/assets/images/common/u661.png")
        }, {
          tags: ["盈浦街道", "夏阳街道"],
          title: "上海市青浦区",
          text: "苹果，学名Malus pumila Mill.，别称西洋苹果、柰，属于蔷薇科苹果属的植物 [1-2]。苹果是全球最广泛种植和销售的水果之一，具有悠久的栽培历史和广泛的分布范围。苹果的原始种群主要起源于中亚的天山山脉附近，尤其是现代哈萨克斯坦的阿拉木图地区，提供了所有现代苹果品种的基因库。苹果通过早期的贸易路线，如丝绸之路，从中亚向外扩散到全球各地。 [3]",
          picture: require("@/assets/images/common/u302.png")
        },
        ],
        useInService: [{
          tags: ["盈浦街道", "夏阳街道"],
          title: "上海市青浦区教育局·学区查询",
          text: "苹果，学名Malus pumila Mill.，别称西洋苹果、柰，属于蔷薇科苹果属的植物 [1-2]。苹果是全球最广泛种植和销售的水果之一，具有悠久的栽培历史和广泛的分布范围。苹果的原始种群主要起源于中亚的天山山脉附近，尤其是现代哈萨克斯坦的阿拉木图地区，提供了所有现代苹果品种的基因库。苹果通过早期的贸易路线，如丝绸之路，从中亚向外扩散到全球各地。 [3]",
          picture: require("@/assets/images/common/u301.png")
        }, {
          tags: ["盈浦街道、夏阳街道"],
          title: "上海市青浦区教育局·学区查询",
          text: "苹果，学名Malus pumila Mill.，别称西洋苹果、柰，属于蔷薇科苹果属的植物 [1-2]。苹果是全球最广泛种植和销售的水果之一，具有悠久的栽培历史和广泛的分布范围。苹果的原始种群主要起源于中亚的天山山脉附近，尤其是现代哈萨克斯坦的阿拉木图地区，提供了所有现代苹果品种的基因库。苹果通过早期的贸易路线，如丝绸之路，从中亚向外扩散到全球各地。 [3]",
          picture: require("@/assets/images/common/u661.png")
        }, {
          tags: ["盈浦街道", "夏阳街道"],
          title: "上海市青浦区教育局·学区查询",
          text: "苹果，学名Malus pumila Mill.，别称西洋苹果、柰，属于蔷薇科苹果属的植物 [1-2]。苹果是全球最广泛种植和销售的水果之一，具有悠久的栽培历史和广泛的分布范围。苹果的原始种群主要起源于中亚的天山山脉附近，尤其是现代哈萨克斯坦的阿拉木图地区，提供了所有现代苹果品种的基因库。苹果通过早期的贸易路线，如丝绸之路，从中亚向外扩散到全球各地。 [3]",
          picture: require("@/assets/images/common/u301.png")
        }, {
          tags: ["盈浦街道", "夏阳街道"],
          title: "上海市青浦区",
          text: "苹果，学名Malus pumila Mill.，别称西洋苹果、柰，属于蔷薇科苹果属的植物 [1-2]。苹果是全球最广泛种植和销售的水果之一，具有悠久的栽培历史和广泛的分布范围。苹果的原始种群主要起源于中亚的天山山脉附近，尤其是现代哈萨克斯坦的阿拉木图地区，提供了所有现代苹果品种的基因库。苹果通过早期的贸易路线，如丝绸之路，从中亚向外扩散到全球各地。 [3]",
          picture: require("@/assets/images/common/u302.png")
        },
        ],
        decisionHelping: [{
          tags: ["盈浦街道", "夏阳街道"],
          title: "上海市青浦区教育局·学区查询",
          text: "苹果，学名Malus pumila Mill.，别称西洋苹果、柰，属于蔷薇科苹果属的植物 [1-2]。苹果是全球最广泛种植和销售的水果之一，具有悠久的栽培历史和广泛的分布范围。苹果的原始种群主要起源于中亚的天山山脉附近，尤其是现代哈萨克斯坦的阿拉木图地区，提供了所有现代苹果品种的基因库。苹果通过早期的贸易路线，如丝绸之路，从中亚向外扩散到全球各地。 [3]",
          picture: require("@/assets/images/common/u301.png")
        }, {
          tags: ["盈浦街道", "夏阳街道"],
          title: "上海市青浦区教育局·学区查询",
          text: "苹果，学名Malus pumila Mill.，别称西洋苹果、柰，属于蔷薇科苹果属的植物 [1-2]。苹果是全球最广泛种植和销售的水果之一，具有悠久的栽培历史和广泛的分布范围。苹果的原始种群主要起源于中亚的天山山脉附近，尤其是现代哈萨克斯坦的阿拉木图地区，提供了所有现代苹果品种的基因库。苹果通过早期的贸易路线，如丝绸之路，从中亚向外扩散到全球各地。 [3]",
          picture: require("@/assets/images/common/u301.png")
        }, {
          tags: ["盈浦街道、夏阳街道"],
          title: "上海市青浦区教育局·学区查询",
          text: "苹果，学名Malus pumila Mill.，别称西洋苹果、柰，属于蔷薇科苹果属的植物 [1-2]。苹果是全球最广泛种植和销售的水果之一，具有悠久的栽培历史和广泛的分布范围。苹果的原始种群主要起源于中亚的天山山脉附近，尤其是现代哈萨克斯坦的阿拉木图地区，提供了所有现代苹果品种的基因库。苹果通过早期的贸易路线，如丝绸之路，从中亚向外扩散到全球各地。 [3]",
          picture: require("@/assets/images/common/u661.png")
        }, {
          tags: ["盈浦街道", "夏阳街道"],
          title: "上海市青浦区",
          text: "苹果，学名Malus pumila Mill.，别称西洋苹果、柰，属于蔷薇科苹果属的植物 [1-2]。苹果是全球最广泛种植和销售的水果之一，具有悠久的栽培历史和广泛的分布范围。苹果的原始种群主要起源于中亚的天山山脉附近，尤其是现代哈萨克斯坦的阿拉木图地区，提供了所有现代苹果品种的基因库。苹果通过早期的贸易路线，如丝绸之路，从中亚向外扩散到全球各地。 [3]",
          picture: require("@/assets/images/common/u302.png")
        },
        ],
      },
      activeUseCase: "dataProcass",
      chartMluLevel: "unit",
      chartMluUnitName: null,
      chartMluAppName: null,
      chartMluTimeRange: null,

    };
  },
  async beforeMount() {
    await this.pullTotalCount()
    await this.pullLastDayCount()
  },
  mounted() {
    this.initChart1();
    this.initchartMultiLevelUse();
    const nowDate = new Date();
    nowDate.setHours(0, 0, 0, 0);
    this.chartMluTimeRange = [new Date(new Date(nowDate).setDate(nowDate.getDate() - 6)), new Date(nowDate)];
    this.chartMluFocusRoot()
    this.pullTopUnit()
    this.pullTopService()
    this.pullMultiTimeRangeCall()
    this.pullUserCount()
  },
  methods: {
    goto(src) {
      this.$router.push({
        path: src,
      });
    },
    // 处理调用总数数字
    handleTotalCallNumber(num) {
      // 667507060
      let str = num.toString();
      let strArr = str.split("").reverse();
      this.totalCall = [];
      for (let i = 0; i < strArr.length; i++) {
        const num = strArr[i];
        this.totalCall.unshift(num);
        if (i % 3 == 2 && i != strArr.length - 1) {
          this.totalCall.unshift(",");
        }
      }
    },
    async initChart1() {
      const nowDate = new Date();
      nowDate.setHours(0, 0, 0, 0);
      let end = new Date(nowDate)
      let start = new Date(nowDate.setDate(nowDate.getDate() - 30))
      start = new Date(moment(start).format("YYYY-MM-DD 00:00:00"));
      end = new Date(moment(end).format("YYYY-MM-DD 23:59:59"));
      let data = await totalCountGroupByTime(start, end)
      let dataMap = {}
      for (let i = 0; i < data.length; i++) {
        const e = data[i];
        dataMap[e.time] = e.count
      }

      let times = []
      let values = []

      for (let i = 0; i < 30; i++) {
        let date = new Date(start);
        date.setDate(start.getDate() + i)
        times.push(this.formatDateMMDD(date))
        values.push(dataMap[date.getTime()] ?? 0)
      }

      // 基于准备好的dom，初始化echarts实例
      var myChart = echarts.init(document.getElementById("echart1"));

      let option = {
        tooltip: {
          trigger: "axis", // 坐标轴触发提示
          axisPointer: { type: "shadow" },
          backgroundColor: "rgba(0, 25, 50, 0.8)",
          borderColor: "#1E90FF",
          textStyle: {
            color: "#fff",
          },
        },
        xAxis: {
          type: "category",
          data: times,
          axisLine: { lineStyle: { color: "#fff" } }, // 坐标轴颜色
          axisTick: { show: false }, // 隐藏刻度
          splitLine: { show: false }, // 隐藏分割线
        },
        yAxis: {
          type: "value",
          axisLine: { lineStyle: { color: "#fff" } },
          splitLine: {
            lineStyle: {
              type: "dashed", // 虚线网格
              color: "#113761",
            },
          },
        },
        series: [
          {
            name: "调用总数",
            type: "line",
            data: values, // 模拟数据
            lineStyle: { color: "#42a5f5" }, // 蓝色线条
            itemStyle: { color: "#42a5f5" }, // 节点颜色
            symbol: "circle", // 节点形状
            symbolSize: 6, // 节点大小
          },
        ],
      };
      // 绘制图表
      myChart.setOption(option);
      chart1 = myChart
    },
    initchartMultiLevelUse() {
      var myChart = echarts.init(document.getElementById("echartMultiLevelUse"));
      let option = {
        tooltip: {
          trigger: 'axis',
          show: true,
          formatter: '{b}: {c}',
          backgroundColor: "rgba(0, 25, 50, 0.8)",
          borderColor: "#1E90FF",
          textStyle: {
            color: "#fff",
          },
        },
        title: {
          text: '所有委办',
          left: 'center',
          top: 20,
          textStyle: {
            color: '#fff',
            fontSize: 18,
            fontWeight: 'bold'
          },
        },
        axisPointer: {
          type: 'shadow'
        },
        grid: {
          left: '3%',
          right: '4%',
          bottom: '3%',
          containLabel: true
        },
        xAxis: [
          {
            type: 'value',
            // axisLine: { lineStyle: { color: "#fff" } },
            splitLine: { show: false }, // 隐藏分割线
          }
        ],
        yAxis: [
          {
            type: 'category',
            axisLine: { lineStyle: { color: "#fff" } },
            inverse: true,
            data: [""]
          }
        ],
        series: [
          {
            cursorSize: 20,
            name: 'Direct',
            type: 'bar',
            barWidth: '60%',
            data: [0]
          }
        ],
        dataZoom: [
          {
            type: 'inside', // 内置型，可以用鼠标滚轮缩放
            yAxisIndex: 0,
            zoomOnMouseWheel: false, // 滚轮缩放
            moveOnMouseWheel: true, // 滚轮移动
            zoomLock: false,
            minValueSpan: 12, // 最小显示数据数量
            maxValueSpan: 12 // 最大显示数据数量
          }
        ]
      };

      myChart.setOption(option);

      myChart.on("click", this.chartMluClick)

      chartMultiLevelUse = myChart
    },
    async chartMluFocus(level, farther) {
      if (level == null) {
        level = this.chartMluLevel
      }
      switch (level) {
        case "unit":
        default: {
          await this.chartMluFocusRoot();
          this.chartMluUpdateTitle("所有委办")
          break;
        }
        case "app": {
          let unit = farther ?? this.chartMluUnitName ?? ""
          await this.chartMluFocusApp(unit);
          this.chartMluUpdateTitle("委办：" + unit)
          break;
        }
        case "service": {
          let app = farther ?? this.chartMluAppName ?? ""
          await this.chartMluFocusService(app);
          this.chartMluUpdateTitle("应用：" + app)
          break;
        }
      }

    },
    chartMluClick(event) {
      switch (this.chartMluLevel) {
        case "unit": {
          this.chartMluLevel = "app";
          this.chartMluUnitName = event.name
          break;
        }
        case "app": {
          this.chartMluLevel = "service";
          this.chartMluAppName = event.name
          break;
        }
        case "service":
        default: {
          // do nothing
        }
      }
      this.chartMluFocus();
    },
    chartMluBack(level) {
      //自动回退
      if (level == null) {
        switch (this.chartMluLevel) {
          default:
          case "unit": level = "unit"; break;
          case "app": level = "unit"; break;
          case "service": level = "app"; break;
        }
      }
      this.chartMluLevel = level;
      this.chartMluFocus()
    },
    async chartMluFocusRoot() {
      let start = this.chartMluTimeRange[0], end = this.chartMluTimeRange[1];
      start = new Date(moment(start).format("YYYY-MM-DD 00:00:00"));
      end = new Date(moment(end).format("YYYY-MM-DD 23:59:59"));
      const data = await countUnitUse(start, end);
      const names = [];
      const values = [];
      for (let index = 0; index < data.length; index++) {
        const e = data[index];
        names.push(e.name);
        values.push(e.count);
      }
      this.chartMluUpdateData(names, values)
    },
    async chartMluFocusApp(father) {
      let start = this.chartMluTimeRange[0], end = this.chartMluTimeRange[1];
      start = new Date(moment(start).format("YYYY-MM-DD 00:00:00"));
      end = new Date(moment(end).format("YYYY-MM-DD 23:59:59"));
      const data = await countAppUseByUnitName(start, end, father);
      const names = [];
      const values = [];
      for (let index = 0; index < data.length; index++) {
        const e = data[index];
        names.push(e.name);
        values.push(e.count);
      }
      this.chartMluUpdateData(names, values)
    },
    async chartMluFocusService(father) {
      let start = this.chartMluTimeRange[0], end = this.chartMluTimeRange[1];
      start = new Date(moment(start).format("YYYY-MM-DD 00:00:00"));
      end = new Date(moment(end).format("YYYY-MM-DD 23:59:59"));
      const data = await countServiceUseByApp(start, end, father);
      const names = [];
      const values = [];
      for (let index = 0; index < data.length; index++) {
        const e = data[index];
        names.push(e.name);
        values.push(e.count);
      }
      this.chartMluUpdateData(names, values)
    },
    async pullTopUnit() {
      let data = await topUnit(5)
      for (let i = 0; i < data.length; i++) {
        const e = data[i];
        e.value = this.numberFormatter(e.count);
      }
      this.userTop = data
    },
    async pullTopService() {
      let data = await topService(10)
      for (let i = 0; i < data.length; i++) {
        const e = data[i];

        e.value = this.numberFormatter(e.count);
      }
      this.resourceTop = data
    },
    async pullTotalCount() {
      this.handleTotalCallNumber((await totalCount())[0].count)
    },
    async pullLastDayCount() {
      const nowDate = new Date();
      nowDate.setHours(0, 0, 0, 0);
      let end = new Date(nowDate)
      let start = new Date(nowDate.setDate(nowDate.getDate() - 1))
      start = new Date(moment(start).format("YYYY-MM-DD 00:00:00"));
      end = new Date(moment(end).format("YYYY-MM-DD 23:59:59"));
      let data = (await totalCount(start, end))[0]
      this.lastDayCall = data == null ? 0 : data.count
    },
    async pullMultiTimeRangeCall() {
      this.weekCall = await this.pullTotalCountByDays(7)
      this.monthCall = await this.pullTotalCountByDays(30)
      this.seasonCall = await this.pullTotalCountByDays(91)
      this.yearCall = await this.pullTotalCountByDays(365)
    },
    async pullTotalCountByDays(days) {
      const nowDate = new Date();
      nowDate.setHours(0, 0, 0, 0);
      let end = new Date(nowDate)
      let start = new Date(nowDate.setDate(nowDate.getDate() - days))
      start = new Date(moment(start).format("YYYY-MM-DD 00:00:00"));
      end = new Date(moment(end).format("YYYY-MM-DD 23:59:59")); 
      let data = (await totalCount(start, end))[0]
      return data == null ? 0 : data.count
    },
    async pullUserCount() {
      let data = await countUserData();
      this.appNum = data.application;
      this.unitNum = data.unit;
      this.userNum = data.username;


    },
    chartMluUpdateData(names, values) {
      chartMultiLevelUse.setOption({
        yAxis: [
          {
            data: names,
          }
        ],
        series: [
          {
            data: values
          }
        ]
      })
      this.chartMluCheckChangeToLog(values)
    },
    chartMluCheckChangeToLog(values) {
      let toLog = false;
      values.sort((a, b) => a - b);
      let min = values[0];
      let max = values[values.length - 1]
      if (max / min > 3000) {
        toLog = true
      }

      if (toLog) {
        chartMultiLevelUse.setOption(
          {
            xAxis: [{
              type: 'log',
              logBase: 10,
              min: 1,

              axisLine: { lineStyle: { color: "#fff" } },
              axisLabel: {
                formatter: this.numberFormatter
              },
            }]
          }
        )
      } else {
        chartMultiLevelUse.setOption(
          {
            xAxis: [{
              type: 'value',
              min: 0,

              axisLine: { lineStyle: { color: "#fff" } },
            }]
          }
        )
      }
    },
    chartMluUpdateTitle(newTitle) {
      chartMultiLevelUse.setOption({
        title: {
          text: newTitle,
        }
      })
    },
    numberFormatter(num, decimals = 1) {
      if (num >= 1000000000000) {

        return parseFloat((num / 1000000000000).toFixed(decimals)).toString() + '亿万';
      }
      if (num >= 100000000) {
        return parseFloat((num / 100000000).toFixed(decimals)).toString() + '亿';
      }
      if (num >= 10000) {
        return parseFloat((num / 10000).toFixed(decimals)).toString() + '万';
      }
      return num.toString();
    },
    formatDateMMDD(date) {
      // 月份从0开始，所以要 +1
      const month = String(date.getMonth() + 1).padStart(2, '0');
      const day = String(date.getDate()).padStart(2, '0');

      return `${month}/${day}`;
    }


  }
}
</script>

<style lang="less" scoped>
.font,
.title,
.super-title,
.title-sub,
.second-title,
.third-title,
.strong-data {
  color: #fff;
}

.icon {
  color: #fff;
  fill: currentColor;
}

.middle {
  text-align: center;
  margin-top: 20px;
}

.darkblue-background,
.dark-background,
.bluedark-background,
.blue-background,
.image-background {
  padding-top: 40px;
  padding-bottom: 40px;
  margin-left: 0;
  padding-left: 90px;
  padding-right: 90px;
  min-height: 600px;
}

.darkblue-background {
  background: linear-gradient(to bottom,
      #02060c 0%,
      #0f3460 40%,
      #0f3460 100%);
}

.dark-background {
  background: #0a0a08
}

.blue-background {
  background: #0f3460
}

.bluedark-background {
  background: linear-gradient(to bottom,
      #0f3460 0%,
      #0f3460 60%,
      #02060c 100%);
}

.image-background {
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% auto;
}

.lighter-container {
  background-color: #eeeeee0b;
  padding: 20px;
  margin: 15px;
  vertical-align: middle;
  border-radius: 10px;
}

.lightblue-container {
  border-radius: 10px;
  padding: 20px;
  margin: 15px;
  background: linear-gradient(to bottom,
      #215476 0%,
      #28638b 66%,
      #337aac 100%);
  font-size: 20px;

  .third-title {
    font-size: 28px;
    padding: 0;
  }
}

.middle-container {
  display: flex !important;
  justify-content: center;
  flex-direction: column;
  padding: 0;
  align-items: stretch;
}

.row,
.warp-row,
.between-row {
  display: flex !important;
  justify-content: space-around;
  padding: 0;
  align-items: stretch;
}

.warp-row {
  flex-wrap: wrap;
}

.between-row {
  justify-content: space-between;
}

.col {
  display: flex !important;
  justify-content: space-around;
  flex-direction: column;
}

.dense-col {
  display: flex !important;
  justify-content: center;
  flex-direction: column;
}

.start-reverse-col {
  display: flex !important;
  justify-content: start;
  flex-direction: column-reverse;
}

.dense-col>*,
.start-reverse-col>* {
  margin: 10px;
}




.grid-2x2 {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
  height: 80%;
}

.strong-data {
  font-size: 32px;
  font-weight: bold;
  text-align: center;
}

.title {
  font-size: 36px;
  margin-top: 10px;
  text-align: center;
  font-weight: bold;
}

.super-title {
  font-size: 44px;
  margin-top: 10px;
  text-align: center;
  font-weight: bold;

}

.title-sub {
  font-size: 16px;
  margin-top: 10px;
  color: rgb(192, 192, 192);
  text-align: center;
}

.second-title {
  font-size: 20px;
  margin-top: 10px;
  padding-left: 10px;
  border-left: 2px solid #3498db;
  font-weight: bold;
}

.third-title {
  font-size: 18px;
  align-items: center;
  display: flex;
  font-weight: bold;
  i{
    margin-right: 5px;
  }
}

.top-list {
  display: flex;
  flex-direction: column;
}

.top-list .list-item {
  display: flex;
  justify-content: space-between;
  margin: 15px;
  margin-left: 30px;
  margin-right: 30px;
}

.usecase-tabs {
  width: 60%;
  margin: auto;
  margin-top: 60px;
  margin-bottom: 30px;
}

.usecase-tabs .tab-lab {
  display: flex;
  align-items: center;
  font-size: 24px;
  color: #fff;
}

.use-case {
  margin: 20px;
  width: 45%;
  height: 500px;
  border-radius: 10px;

  background-size: 100% auto;
  /* 横向填满，纵向按比例缩放 */
  background-repeat: no-repeat;

  .use-case-empty {
    width: 100%;
    height: 50%;
  }

  .use-case-text {
    padding: 15px;
    width: 100%;
    height: 50%;
    border-radius: 10px;
    box-sizing: border-box;
    background: linear-gradient(to bottom,
        #377f7f 0%,
        #377f7f 80%,
        #205161 100%);

    .third-title {
      padding: 0;
    }
  }
}

.six-router {
  width: 30%;
  // height: 300px;
  font-size: 28px;

  .third-title {
    font-size: 32px;
  }
}

.circle-number {
  // display: block;
  margin-right: 10px;
  background-color: #eeeeee00;
  border: 1px solid #2272d4;  
}

.block-page-router {
  display: flex;
  flex-direction: column;
  margin: 15px;
  padding: 15px;
  box-sizing: border-box;
  width: 30%;
  height: 240px;
  border: #2272d4 solid 1px;
  border-radius: 13px;
  background-color: #1e3348;

}


.blue {
  color: #3498db;
}

.grey {
  color: rgb(192, 192, 192);
  padding: 20px 0px;
}

.lightgrey {
  color: rgb(229, 229, 229);
  padding: 20px 0px
}

#echart1 {
  width: 100%;
  height: 450px;
}

#echartMultiLevelUse {
  width: 100%;
  height: 450px;
}

.container {
  width: 100%;
  margin: 0 auto;
}

.home {
  position: relative;

  .part1 {
    width: 100%;
    height: calc(100vh - 120px);
    background: url(~@/assets/images/common/home-bg1.png);
    background-size: 100% auto;
    position: relative;
    overflow: hidden;
    display: grid;
    justify-content: center;
    align-items: center;

    .part1-1 {
      width: 100%;
      height: 200px;
      //background: #09284c;
      margin: 0 auto;
      margin-top: 120px;
      overflow: hidden;

      .part1-1-1 {
        height: 70px;
        width: fit-content;
        margin: 0 auto;
        margin-top: 30px;

        .number-container {
          display: flex;
          align-items: flex-start;
          font-size: 2em;
        }

        .number-item {
          width: 57px;
          height: 70px;
          background-color: rgb(10 71 137 / 70%);
          border: 1px solid #2663a5;
          box-shadow: 0 4px 20px #2663a5;
          border-radius: 10px;
          color: white;
          display: flex;
          justify-content: center;
          align-items: center;
          margin-right: 20px;
          font-size: 44px;
          line-height: 70px;
          font-weight: bold;
        }

        .separator {
          margin-right: 20px;
          font-size: 35px;
          text-align: end;
          color: #ffffff;
        }

        .text {
          font-size: 24px;
          line-height: 70px;
          margin-right: 20px;
          color: #ffffff;
          font-weight: bold;
        }
      }

      .part1-1-2 {
        height: 50px;
        width: 700px;
        margin: 0 auto;
        margin-top: 30px;
        background: #8080804d;
        border-radius: 5px;
        line-height: 50px;

        div {
          display: inline-block;
          vertical-align: top;

          &.line {
            height: 2px;
            background: #808080;
            width: 100px;
            margin: 24px 20px;
            margin-right: 20px;
          }

          &:nth-child(2) {
            width: 420px;
            text-align: center;
            color: #ffffff;
            font-size: 20px;
            font-weight: bold;

            .text1 {
              margin-right: 20px;
            }

            .text2 {
              margin-left: 20px;
            }
          }

          &:nth-child(4) {
            float: right;
          }
        }
      }
    }
  }


  .part2 {
    background: #08224a;
    padding-bottom: 1px;

    .part1-2 {
      color: #ffffff;

      //      margin-top: 20px;
      .part1-2-1,
      .part1-2-2,
      .part1-2-3 {
        display: inline-block;
        text-align: center;
        font-weight: bold;
        width: calc(100% / 3);

        div:nth-child(1) {
          font-size: 24px;
        }

        div:nth-child(2) {
          margin-top: 10px;
          font-size: 32px;
        }
      }
    }


    .chapter {
      text-align: center;
      font-size: 40px;
      width: 100%;
      height: 80px;
      line-height: 80px;
      color: #ffffff;
      font-weight: bold;
      border-bottom: 2px solid gray;
      margin-bottom: 20px;
    }

    .row {
      display: flex;
      justify-content: space-between;
      margin-bottom: 20px;
      padding: 0 100px;
    }

    .service {
      flex: 1;
      margin: 0 30px;
      text-align: center;
    }

    .title {
      position: relative;
      padding-bottom: 10px;
      margin-bottom: 15px;
      height: 50px;
      line-height: 90px;
      font-size: 30px;
    }

    .title::before {
      content: "";
      position: absolute;
      left: 0;
      right: 0;
      top: 0;
      height: 15px;
    }

    .yellow {
      color: #f1c40f;
    }

    .yellow::before {
      background-color: #f1c40f;
    }

    .gray {
      color: #bdc3c7;
    }

    .gray::before {
      background-color: #bdc3c7;
    }

    .blue {
      color: #3498db;
    }

    .blue::before {
      background-color: #3498db;
    }

    .orange {
      color: #e67e22;
    }

    .orange::before {
      background-color: #e67e22;
    }

    .green {
      color: #27ae60;
    }

    .green::before {
      background-color: #27ae60;
    }

    .yellow-green {
      color: #b2be2c;
    }

    .yellow-green::before {
      background-color: #b2be2c;
    }

    p {
      font-size: 20px;
      line-height: 2;
      color: #ffffff;
    }
  }

  .part3 {
    .container {
      position: relative;
      width: 100%;
      height: 940px;
      background-image: url("~@/assets/images/common/u30.png");
      /* 替换为实际图片路径 */
      background-size: cover;
      background-position: center;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      text-align: center;
      color: #000000;
      font-family: Arial, sans-serif;
      overflow: hidden;
    }

    h1 {
      position: absolute;
      top: 30px;
      font-size: 40px;
      font-weight: bold;
    }

    p {
      margin-bottom: 30px;
      font-weight: bold;
      font-size: 24px;
      line-height: 2;
    }

    .el-button {
      position: absolute;
      bottom: 150px;
    }
  }

  .part4 {
    background: #08224a;
    padding-bottom: 1px;

    .chapter {
      text-align: center;
      font-size: 40px;
      width: 100%;
      height: 80px;
      line-height: 80px;
      color: #ffffff;
      font-weight: bold;
      /* border-bottom: 2px solid gray; */
      margin-bottom: 20px;
    }

    .row {
      display: flex;
      justify-content: space-between;
      margin-bottom: 40px;
      padding: 0 100px;
    }


    .service {
      flex: 1;
      margin: 0 30px;
      width: 500px;
      height: 320px;
      border: 1px solid gray;
      border-radius: 8px;
      padding: 10px 10px;
      box-sizing: border-box;
      overflow: hidden;
      position: relative;
    }

    .title {
      position: relative;
      height: 30px;
      line-height: 30px;
      font-size: 30px;
      text-align: left;
      color: #ffffff;
      padding-bottom: 20px;
    }

    p {
      text-indent: 2rem;
      font-size: 20px;
      line-height: 2;
      color: #ffffff;
    }

    .el-button {
      position: absolute;
      bottom: 10px;
      left: 10px;
      font-size: 20px;
      color: #ffffff;

      &:hover {
        color: #3498db;
      }
    }
  }

  .part5 {
    background: #08224a;
    padding-bottom: 1px;

    .chapter {
      text-align: center;
      font-size: 40px;
      width: 100%;
      height: 80px;
      line-height: 80px;
      color: #ffffff;
      font-weight: bold;
      /* border-bottom: 2px solid gray; */
      margin-bottom: 20px;
    }

    .part5-1 {
      color: #ffffff;
      margin-top: 20px;
      margin-bottom: 20px;

      .part5-1-1,
      .part5-1-2,
      .part5-1-3 {
        display: inline-block;
        text-align: center;
        font-weight: bold;
        width: calc(100% / 3);

        div {
          font-size: 24px;
        }

        div:nth-child(2) {
          margin-top: 10px;
          font-size: 24px;
        }

        div p {
          display: inline-block;
          font-size: 40px;
        }
      }
    }

    .part5-2 {
      margin-top: 40px;
      padding-bottom: 1px;
      height: fit-content;

      .tab-container {
        display: flex;
        gap: 40px;
        /* 选项卡间距 */
        // border-bottom: 1px solid #eee; /* 可选底部分隔线 */
        width: fit-content;
        margin: 0 auto;
        position: relative;
        margin-bottom: 40px;
        height: 55px;
      }

      .tab-container::after {
        content: "";
        display: block;
        height: 1px;
        width: 100%;
        background: #eeeeee;
        /* 下划线颜色 */
        position: absolute;
        bottom: 0;
      }

      .tab-item {
        color: #ffffff;
        cursor: pointer;
        overflow: hidden;
        position: relative;
        font-size: 30px;
        height: 55px;
      }

      .tab-item-active {
        color: #66f;
        /* 选中文字颜色 */
      }

      .tab-item-active::after {
        content: "";
        display: block;
        height: 2px;
        width: 100%;
        background: #66f;
        /* 下划线颜色 */
        margin-top: 5px;
        position: absolute;
        bottom: 0;
        z-index: 1;
      }

      .tab-icon {
        margin-right: 5px;
        /* 图标与文字间距 */
      }

      .row {
        display: flex;
        justify-content: space-between;
        margin-bottom: 40px;
        padding: 0 120px;

        > :nth-child(1) {
          background: url(~@/assets/images/common/u301.png) no-repeat 0 0/100%;
        }

        > :nth-child(2) {
          background: url(~@/assets/images/common/u302.png) no-repeat 0 0/100%;
        }
      }

    }
  }
}
</style>
