<template>
  <div
    v-if="!showSisView"
    id="screen"
    :style="{
      width: `${style.width}px`,
      height: `${style.height}px`,
      transform: `${style.transform}`,
    }"
  >
    <div class="main">
      <div class="header-body" v-if="hideHeard === '0'">
        <!-- <div class="header-title" @click="handleClickJump()"> -->
        <!-- <img v-if="$store.state.themeName === 'dark'" src="./assets/projectLogo.png" alt="" />
        <img v-if="$store.state.themeName === 'light'" src="./assets/light-projectLogo.png" alt="" /> -->
        <!-- <img src="./assets/logonx.png" alt="" /> -->
        <!-- <span
            :style="
              $store.state.themeName === 'dark'
                ? 'color:#fff; font-size:18px;font-family: SimHei'
                : 'color:#000'
            "
          >
            &gt;&gt;&nbsp;演示平台</span
          > -->
        <!-- </div> -->
        <div class="header-menu-nxf">
          <nxf-header />
        </div>
        <!-- <div class="header-menu-body">
          <tab-header />
        </div> -->
      </div>
      <!-- <div
        class="menu-body"
        :class="{ hover: isFixed ? true : isShowMenu }"
        @mouseenter="showMenu"
        @mouseleave="hideMenu"
        v-show="$store.state?.menuData?.length"
      >
        <Menu />
      </div> -->
      <div class="elmenuSty" style="background: #08172c; height: 100%">
        <el-menu
          :default-active="$route.path"
          router
          :unique-opened="true"
          :collapse="isCollapse"
          :collapse-transition="false"
          text-color="#fff"
          background-color="#132444"
          active-text-color="#fff"
          :style="`height:${
            switchTabShow() ? 'calc(100% - 72px - 80px)' : '100%'
          };margin-top:${switchTabShow() ? '30px' : '0'};${
            showMenuData?.[0]?.width && !isCollapse
              ? `width: ${showMenuData?.[0]?.width}`
              : ''
          }`"
        >
          <template v-for="menu in showMenuData">
            <el-sub-menu
              :key="menu.index"
              :index="menu.index"
              v-if="menu.children"
              :disabled="menu.index === '' ? true : false"
            >
              <template #title>
                <div class="elGrounpTitleAll" v-if="!isCollapse">
                  <!-- <div v-html="menu.svg" class="svgSty"></div> -->
                  <span style="margin-left: 10px" class="chSpna">{{
                    menu.name
                  }}</span>
                </div>
                <div class="elGrounpTitle" v-else>
                  <div v-html="menu.svg" class="svgSty"></div>
                </div>
              </template>
              <!-- :class="getSelectState(menuitem)" -->
              <el-menu-item-group
                v-for="(menuitem, index) in menu.children"
                :key="index"
                class="elsubMenu"
                :class="getSelectState(menuitem.index)"
              >
                <el-menu-item :index="menuitem.index" class="grounpItem">
                  <!-- <span class="grounpItemSty"></span> -->
                  <span class="grounpItemSpan">{{ menuitem.name }}</span>
                </el-menu-item>
              </el-menu-item-group>
            </el-sub-menu>
            <el-menu-item
              :key="menu.index"
              :index="menu.index"
              :route="menu.index"
              v-else
              class="noGrounpItem"
              :style="noGrounpItemFn(menu.index)"
            >
              <div class="elMenuTitle elMenuTitleAll" v-if="!isCollapse">
                <!-- <div v-html="menu.svg" class="svgSty"></div> -->
                <span class="titspan" :class="getSelectState(menu.index)">{{
                  menu.name
                }}</span>
              </div>
              <div class="elMenuTitle" v-else>
                <div v-html="menu.svg" style="display: flex"></div>
              </div>
            </el-menu-item>
          </template>
        </el-menu>
      </div>
      <div class="main-body" :style="pagestyFn(routepath)">
        <!-- :style="{ paddingLeft: isFixed && menuLength > 0 ? '52px' : 0 }" -->
        <router-view />
      </div>
      <alarmBadge />
    </div>

    <div class="curTabsBox" v-if="switchTabShow()">
      <div
        class="item"
        :class="activeTab === 'yxzb' ? 'active' : ''"
        @click="openWeb"
      >
        运行指标
      </div>
      <div
        class="item"
        :class="activeTab === 'jjfx' ? 'active' : ''"
        @click="jumpUrl"
      >
        经济分析
      </div>
    </div>
    <!-- <div v-else class="login"><login-page @onLogin="login" /></div> -->
  </div>
</template>

<script>
import { alarm_history, fetchStationListAll } from "@/api/zhbj/index.js";
// 导入header.vue文件
import alarmBadge from "@/components/alarm-badge/index.vue";
import Menu from "@/views/layout/Menu.vue";
import Header from "@/views/layout/Header.vue";
import nxfHeader from "@/views/layout/nxfHeader.vue";
import tabHeader from "@/views/layout/tabHeader.vue";
import LoginPage from "./views/layout/login-page.vue";
import { GetBoosterlist } from "@/api/factoryMonitor/index.js";
import { getApiWeatherstation } from "@/api/monthlyPerformanceAnalysis";
import { getAllStation } from "@/api/common.js";
import SvgIcon from "@com/coms/icon/svg-icon.vue";
import { GetDeviceTableData } from "@/api/zhbj/index.js";
import { ElNotification } from "element-plus";
import dayjs, { locale } from "dayjs";
import $ from "jquery";
export default {
  components: {
    Menu,
    Header,
    tabHeader,
    nxfHeader,
    LoginPage,
    alarmBadge,
    SvgIcon,
  },

  data() {
    return {
      activeTab: "jjfx",
      routepath: "",
      showMenuData: [],
      isCollapse: false,
      isShowMenu: false,
      // 当前子系统
      root: "",
      //   isLogined: localStorage.getItem("loginState") || false,
      showSisView: false,
      memuCloseTimeout: null,
      menuData: [],
      hideMenus: "0",
      hideHeard: "0",
      style: {
        width: "1920",
        height: "1080",
        fontsize: "16px",
        transform: "scaleY(1) scaleX(1) translate(-50%, -50%)",
      },
      alarmConfigArray: [],
      //请求参数
      requestAlarmHistoryParams: [
        {
          alarmType: "booststation",
          deviceType: "",
        },
        {
          alarmType: "inverter",
          deviceType: "",
        },
        {
          alarmType: "windturbine",
          deviceType: "",
        },
        {
          alarmType: "custom",
          deviceType: "inverter",
        },
        {
          alarmType: "custom",
          deviceType: "windturbine",
        },
      ],
      realList: [],
      dialogList: [],
      alarmList: [],
      //预警模块
      warnDatas: [
        {
          svg: `<svg t="1711616550762" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="28474" width="25" height="25"><path d="M554.666667 341.333333v128h85.333333l-128 213.333334V554.666667h-85.333333l128-213.333334z m384 170.666667c0 234.666667-192 426.666667-426.666667 426.666667S85.333333 746.666667 85.333333 512 277.333333 85.333333 512 85.333333v128c-166.4 0-298.666667 132.266667-298.666667 298.666667s132.266667 298.666667 298.666667 298.666667 298.666667-132.266667 298.666667-298.666667h128z m-46.933334 42.666667h-42.666666c-21.333333 166.4-166.4 298.666667-337.066667 298.666666-187.733333 0-341.333333-153.6-341.333333-341.333333C170.666667 337.066667 302.933333 196.266667 469.333333 174.933333v-42.666666C277.333333 153.6 128 315.733333 128 512c0 213.333333 170.666667 384 384 384 196.266667 0 358.4-149.333333 379.733333-341.333333z m-89.6-106.666667l123.733334-29.866667C891.733333 256 763.733333 128 601.6 93.866667l-29.866667 123.733333c119.466667 29.866667 204.8 115.2 230.4 230.4z" fill="" p-id="28475"></path></svg>`,
          name: "矩阵提醒",
          index: "/integratedAlarm/detailmatrix",
        },
        {
          svg: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" width="25" height="25"><path fill="#33CAB7" d="M640 288h-64V128H128v704h384v32a32 32 0 0 0 32 32H96a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32h512a32 32 0 0 1 32 32z"></path><path fill="#33CAB7" d="M128 320v512h768V320zm-32-64h832a32 32 0 0 1 32 32v576a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V288a32 32 0 0 1 32-32"></path><path fill="#33CAB7" d="M704 640a64 64 0 1 1 0-128 64 64 0 0 1 0 128"></path></svg>`,
          name: "综合报警",
          index: "/integratedAlarm/safe/realwarning",
          width: "276px",
          children: [
            {
              name: "实时预警",
              index: "/integratedAlarm/safe/realwarning",
            },
            {
              name: "预警查询",
              index: "/integratedAlarm/safe/customWarning",
            },
            // {
            //   name: "报警查询",
            //   index: "/integratedAlarm/safe/historyWarning",
            // },
          ],
        },
        {
          svg: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" width="25" height="25"><path fill="#33CAB7" d="M416 896V128h192v768zm-288 0V448h192v448zm576 0V320h192v576z"></path></svg>`,
          name: "可靠性分析",
          index: "/integratedAlarm/reliability/customAnalyse",
          children: [
            {
              name: "预警分析",
              index: "/integratedAlarm/reliability/customAnalyse",
            },
            {
              name: "报警分析",
              index: "/integratedAlarm/reliability/historyAnalyse",
            },
          ],
        },
        {
          svg: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" width="25" height="25"><path fill="#33cab8" d="M389.44 768a96.064 96.064 0 0 1 181.12 0H896v64H570.56a96.064 96.064 0 0 1-181.12 0H128v-64zm192-288a96.064 96.064 0 0 1 181.12 0H896v64H762.56a96.064 96.064 0 0 1-181.12 0H128v-64zm-320-288a96.064 96.064 0 0 1 181.12 0H896v64H442.56a96.064 96.064 0 0 1-181.12 0H128v-64z"></path></svg>`,
          name: "报警配置",
          index: "/integratedAlarm/alarmConfig/customConfig",
          children: [
            {
              name: "预警配置",
              index: "/integratedAlarm/alarmConfig/customConfig",
            },
            {
              name: "报警配置",
              index: "/integratedAlarm/alarmConfig/historyConfig",
            },
            {
              name: "预警排查方案",
              index: "/integratedAlarm/alarmConfig/earlyWarning",
            },
            {
              name: "规则修改日志",
              index: "/integratedAlarm/alarmConfig/logs",
            },
          ],
        },
        {
          svg: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" width="25" height="25"><path fill="#33cab7" d="M118.656 438.656a32 32 0 0 1 0-45.248L416 96l4.48-3.776A32 32 0 0 1 461.248 96l3.712 4.48a32.064 32.064 0 0 1-3.712 40.832L218.56 384H928a32 32 0 1 1 0 64H141.248a32 32 0 0 1-22.592-9.344zM64 608a32 32 0 0 1 32-32h786.752a32 32 0 0 1 22.656 54.592L608 928l-4.48 3.776a32.064 32.064 0 0 1-40.832-49.024L805.632 640H96a32 32 0 0 1-32-32"></path></svg>`,
          name: "设备模型配置",
          index: "/integratedAlarm/deviceConfig",
        },
        {
          svg: `<svg t="1711617136510" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="53900" width="25" height="25"><path d="M768 960H128c-17.67 0-32-14.33-32-32V224c0-17.67 14.33-32 32-32h640c17.67 0 32 14.33 32 32v704c0 17.67-14.33 32-32 32z m-608-64h576V256H160v640z" p-id="53901" fill="#33CAB7"></path><path d="M896 864c-17.67 0-32-14.33-32-32V128H225c-17.67 0-32-14.33-32-32s14.33-32 32-32h671c17.67 0 32 14.33 32 32v736c0 17.67-14.33 32-32 32zM288 832h-64V608c0-17.67 14.33-32 32-32s32 14.33 32 32v224zM480 832h-64V672c0-17.67 14.33-32 32-32s32 14.33 32 32v160z" p-id="53902" fill="#33CAB7"></path><path d="M672 832h-64V544c0-17.67 14.33-32 32-32s32 14.33 32 32v288z" p-id="53903" fill="#33CAB7"></path><path d="M448.02 512c-9.07 0-18.03-3.84-24.31-11.18L352 417.17l-71.7 83.65c-11.5 13.42-31.7 14.97-45.12 3.47-13.42-11.5-14.97-31.7-3.47-45.12l96-112a32 32 0 0 1 24.3-11.17 32 32 0 0 1 24.3 11.17l77.55 90.47 168.41-112.27c14.7-9.8 34.57-5.83 44.38 8.88 9.8 14.71 5.83 34.57-8.88 44.38l-192 128a32.008 32.008 0 0 1-17.75 5.37z" p-id="53904" fill="#33CAB7"></path></svg>`,
          name: "优化建议报告",
          index: "/integratedAlarm/optimizationSuggestions",
        },
      ],
      //经济运行
      economyDatas: [
        {
          svg: `<svg t="1711612156671" class="icon" viewBox="0 0 1024 1024" version="1.1"
                                xmlns="http://www.w3.org/2000/svg" p-id="2759" width="25" height="25">
                                <path
                                    d="M512 668.224l369.696-184.832a32 32 0 0 1 28.608 57.216l-384 192a32 32 0 0 1-28.608 0l-384-192a32 32 0 0 1 28.608-57.216L512 668.224z"
                                    fill="#33CAB7" p-id="2760"></path>
                                <path
                                    d="M512 860.224l369.696-184.832a32 32 0 0 1 28.608 57.216l-384 192a32 32 0 0 1-28.608 0l-384-192a32 32 0 0 1 28.608-57.216L512 860.224zM113.696 348.64a32 32 0 0 1 0-57.28l384-192a32 32 0 0 1 28.608 0l384 192a32 32 0 0 1 0 57.28l-384 192a32 32 0 0 1-28.608 0l-384-192zM512 476.224L824.448 320 512 163.776 199.552 320 512 476.224z"
                                    fill="#33CAB7" p-id="2761"></path>
                            </svg>`,
          name: "对标分析",
          index:
            "/economicsOperation/benchmarkingManagement/performanceRankingList",
          children: [
            {
              name: "绩效榜",
              index:
                "/economicsOperation/benchmarkingManagement/performanceRankingList",
            },
            // {
            //   name: "五项对标损失",
            //   index: "/economicsOperation/benchmarkingManagement/loseRate",
            // },
            {
              name: "场内对标",
              index:
                "/economicsOperation/benchmarkingManagement/siteBenchmarking",
            },
            {
              name: "场际对标",
              index:
                "/economicsOperation/benchmarkingManagement/intervalBenchmarking",
            },
            {
              name: "项目对标",
              index:
                "/economicsOperation/benchmarkingManagement/projectBenchmarking",
            },
            {
              name: "线路对标",
              index:
                "/economicsOperation/benchmarkingManagement/wiringBenchmarking",
            },
          ],
        },
        {
          svg: `<svg t="1711615881402" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4941" width="25" height="25"><path d="M884.38619844 385.57820094L534.26209813 32.02571281H305.41721469a57.85404375 57.85404375 0 0 0-42.85484719 17.14193906 57.85404375 57.85404375 0 0 0-17.14193906 42.85484719v731.53223906a58.28259188 58.28259188 0 0 0 59.56823812 59.13968907h521.11494a57.85404375 57.85404375 0 0 0 42.85484719-17.14193907 56.56839844 56.56839844 0 0 0 17.57048719-42.85484718V385.57820094zM534.26209813 110.45008345l273.41392406 275.12811749H539.40467938c-3.42838781 0-4.71403313 0-4.71403313-5.14258125z m296.55554156 713.10465468c0 3.42838781 0 5.14258125-4.71403313 5.14258125H305.41721469c-3.42838781 0-4.71403313 0-4.71403313-5.14258125V91.16540187c0-3.42838781 0-5.14258125 4.71403313-5.14258124H480.26499031v294.41279906a58.71114094 58.71114094 0 0 0 16.71339094 42.85484719 56.99694656 56.99694656 0 0 0 42.85484719 17.14193812h291.84150843zM196.99445187 937.54863125h-5.14258218V141.30557281a56.99694656 56.99694656 0 0 0-37.28371688 16.71339 57.85404375 57.85404375 0 0 0-17.14193812 42.8548472V931.97750094a58.28259188 58.28259188 0 0 0 59.56823719 59.99678625h520.68639187a57.85404375 57.85404375 0 0 0 42.85484719-17.14193907 56.13984937 56.13984937 0 0 0 17.14193812-36.85516875H196.99445187z" p-id="4942"></path></svg>`,
          name: "电量损失分解",
          index: "/economicsOperation/thematicAnalysis/comprehensiveAnalysis",
          children: [
            {
              name: "综合分析",
              index:
                "/economicsOperation/thematicAnalysis/comprehensiveAnalysis",
            },
            {
              name: "风能利用率",
              index: "/economicsOperation/thematicAnalysis/windEnergy",
            },
            {
              name: "五项损失率",
              index: "/economicsOperation/thematicAnalysis/failure",
            },
            {
              name: "可靠性分析",
              index: "/economicsOperation/thematicAnalysis/MTBF",
            },
            {
              name: "发电量分析",
              index: "/economicsOperation/thematicAnalysis/generation",
            },
          ],
        },
        {
          index: "/economicsOperation/stationAnalyse/stationElectricAnalyse",
          svg: `<svg t="1711616142393" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="12350" width="25" height="25"><path d="M873.65 550.87a41.17 41.17 0 0 1 40.49 47.66C878.86 819.5 675 984.13 438.37 955.26c-191.86-23.41-347.41-179-370.8-371-28.85-236.71 135.71-440.61 356.59-475.9a41.16 41.16 0 0 1 47.64 40.51v402zM492.26 877c154.61 0 286.94-100.4 330.63-244.6H390.3V199.64C231.59 247.93 127.72 404 148.49 574.44c18.87 154.87 144.9 281 299.75 299.87a364.06 364.06 0 0 0 44 2.7z" fill="#949DA6" p-id="12351"></path><path d="M960.23 466.79a41.14 41.14 0 0 1-40.94 43.31H512.56V103.18a41.11 41.11 0 0 1 43.29-40.93c218.08 11.51 392.87 186.37 404.38 404.54zM874 428.56C848.72 285.1 736.21 172.88 594.06 148.28v280.28z" fill="#949DA6" p-id="12352"></path></svg>`,
          name: "整站分析",
          children: [
            {
              name: "综合场用电量分析",
              index:
                "/economicsOperation/stationAnalyse/stationElectricAnalyse",
            },
            {
              name: "风资源分析",
              index: "/economicsOperation/stationAnalyse/WindAndPhotovoltaic",
            },
            {
              name: "微观选址分析",
              index: "/economicsOperation/stationAnalyse/posAnalysis",
            },
            {
              name: "AGC曲线偏差分析",
              index: "/economicsOperation/stationAnalyse/agcAnalysis",
            },
            {
              name: "风机功率风速分析",
              index: "/economicsOperation/stationAnalyse/fjglfsAnalysis",
            },
          ],
        },
        {
          index: "/economicsOperation/windAnalyse/powerAnalyse",
          svg: `<svg t="1711616215524" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="13469" width="25" height="25"><path d="M979.2 1017.6H89.6c-44.8 0-83.2-38.4-83.2-83.2V51.2C6.4 32 25.6 12.8 44.8 12.8s38.4 19.2 38.4 38.4v889.6l896 6.4c19.2 0 38.4 19.2 38.4 38.4s-19.2 32-38.4 32z" p-id="13470"></path><path d="M179.2 832v-128c0-19.2 19.2-38.4 38.4-38.4s38.4 19.2 38.4 38.4v128c0 19.2-19.2 38.4-38.4 38.4s-38.4-12.8-38.4-38.4zM377.6 832V601.6c0-19.2 19.2-38.4 38.4-38.4s38.4 19.2 38.4 38.4V832c0 19.2-19.2 38.4-38.4 38.4-25.6 0-38.4-12.8-38.4-38.4zM569.6 832v-128c0-19.2 19.2-38.4 38.4-38.4s38.4 19.2 38.4 38.4v128c0 19.2-19.2 38.4-38.4 38.4s-38.4-12.8-38.4-38.4zM768 832v-192c0-19.2 19.2-38.4 38.4-38.4s38.4 19.2 38.4 38.4v192c0 19.2-19.2 38.4-38.4 38.4s-38.4-12.8-38.4-38.4zM800 102.4h-140.8c-19.2 0-38.4 19.2-38.4 38.4s19.2 38.4 38.4 38.4h57.6L531.2 364.8 460.8 294.4c-12.8-19.2-38.4-19.2-57.6-6.4L192 505.6c-12.8 12.8-12.8 38.4 0 51.2 12.8 19.2 38.4 19.2 51.2 0l185.6-185.6 64 64 6.4 6.4V448c12.8 12.8 38.4 12.8 51.2 0L768 236.8v57.6c0 19.2 19.2 38.4 38.4 38.4s38.4-19.2 38.4-38.4V147.2c0-19.2-19.2-44.8-44.8-44.8z" p-id="13471"></path></svg>`,
          name: "机组分析",
          children: [
            {
              name: "功率曲线拟合",
              index: "/economicsOperation/windAnalyse/powerAnalyse",
            },
            {
              name: "功率曲线查询",
              index: "/economicsOperation/windAnalyse/powerSearch",
            },
            {
              name: "曲线偏差率分析",
              index: "/economicsOperation/windAnalyse/qxpclfx",
            },
            {
              name: "曲线区间偏差率分析",
              index: "/economicsOperation/windAnalyse/qxqjpcl",
            },
            {
              name: "切入切出分析",
              index: "/economicsOperation/windAnalyse/cutInAndOutAnalysis",
            },
            {
              name: "单机性能分析",
              index: "/economicsOperation/windAnalyse/singleWindAnasyle",
            },
            {
              name: "单机月度分析",
              index: "/economicsOperation/windAnalyse/monthlyAnalysis",
            },
            {
              name: "性能等级评估",
              index: "/economicsOperation/windAnalyse/performanceAssess",
            },
            {
              name: "各出力部件温度分析",
              index: "/economicsOperation/windAnalyse/partsTemperatureAnalyse",
            },
          ],
        },
        {
          index: "/economicsOperation/efficiency/restorationEfficiency",
          svg: `<svg t="1711616258471" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="14608" width="25" height="25"><path d="M793.6 640c-19.2-32-51.2-64-89.6-83.2V128c0-70.4-51.2-128-121.6-128C512 0 460.8 57.6 460.8 128v435.2c-38.4 12.8-64 44.8-89.6 76.8-25.6 38.4-38.4 83.2-38.4 134.4 0 64 25.6 128 70.4 172.8S518.4 1024 582.4 1024c64 0 128-25.6 172.8-70.4s70.4-108.8 70.4-172.8c6.4-51.2-6.4-96-32-140.8z m-211.2 339.2c-115.2 0-204.8-96-204.8-204.8 0-76.8 44.8-147.2 115.2-185.6l12.8-6.4V128c0-44.8 38.4-83.2 83.2-83.2 44.8 0 83.2 38.4 83.2 83.2v460.8l12.8 6.4c70.4 38.4 115.2 108.8 115.2 185.6-6.4 108.8-102.4 198.4-217.6 198.4z" p-id="14609"></path><path d="M620.8 665.6V262.4c0-19.2-19.2-38.4-38.4-38.4s-38.4 19.2-38.4 38.4v403.2c-44.8 12.8-70.4 57.6-70.4 102.4 0 57.6 51.2 108.8 108.8 108.8s108.8-51.2 108.8-108.8c0-44.8-25.6-89.6-70.4-102.4zM352 185.6H153.6c-25.6 0-38.4-12.8-38.4-38.4 0-19.2 12.8-38.4 38.4-38.4h204.8c19.2 0 38.4 19.2 38.4 38.4-6.4 25.6-19.2 38.4-44.8 38.4zM352 307.2h-128c-19.2 0-38.4-19.2-38.4-38.4s19.2-38.4 38.4-38.4h128c19.2 0 38.4 19.2 38.4 38.4 0 25.6-12.8 38.4-38.4 38.4zM352 435.2h-38.4c-19.2 0-38.4-19.2-38.4-38.4s19.2-38.4 38.4-38.4h44.8c19.2 0 38.4 19.2 38.4 38.4-6.4 19.2-19.2 38.4-44.8 38.4z" p-id="14610"></path></svg>`,
          name: "运维三率",
          children: [
            {
              name: "复位及时率",
              index: "/economicsOperation/efficiency/restorationEfficiency",
            },
            {
              name: "消缺及时率",
              index: "/economicsOperation/efficiency/consumeEfficiency",
            },
            {
              name: "状态转换率",
              index: "/economicsOperation/efficiency/stateEfficiency",
            },
          ],
        },
        {
          index: "/economicsOperation/rateAnalysis",
          svg: `<svg t="1711616084528" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10256" width="25" height="25"><path d="M819.2 256h-102.4v460.8h102.4z m-256-102.4H460.8v563.2h102.4zM307.2 358.4H204.8v358.4h102.4z m-204.8 409.6v102.4h819.2v-102.4z" fill="" p-id="10257"></path></svg>`,
          name: "对风偏差分析",
        },
        {
          index: "/economicsOperation/singleMachineDev",
          svg: `<svg t="1711616690183" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="35383" width="25" height="25"><path d="M167.68 753.92V1.28h-64v816.64h816.64v-64z" fill="#33CAB7" p-id="35384"></path><path d="M395.52 327.68L193.28 124.16v90.88l157.44 157.44zM481.28 674.56l44.8-44.8-122.88-122.88 75.52-75.52 139.52 139.52 64-64L828.16 652.8l44.8-44.8-145.92-145.92L856.32 332.8v62.72h64V224H748.8v64h62.72l-193.28 192-139.52-139.52L193.28 625.92V716.8L358.4 551.68z" fill="#33CAB7" p-id="35385"></path></svg>`,
          name: "测风塔单机偏差分析",
        },
        {
          index: "/economicsOperation/weatherMachine",
          svg: `<svg t="1711616550762" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="28474" width="25" height="25"><path d="M554.666667 341.333333v128h85.333333l-128 213.333334V554.666667h-85.333333l128-213.333334z m384 170.666667c0 234.666667-192 426.666667-426.666667 426.666667S85.333333 746.666667 85.333333 512 277.333333 85.333333 512 85.333333v128c-166.4 0-298.666667 132.266667-298.666667 298.666667s132.266667 298.666667 298.666667 298.666667 298.666667-132.266667 298.666667-298.666667h128z m-46.933334 42.666667h-42.666666c-21.333333 166.4-166.4 298.666667-337.066667 298.666666-187.733333 0-341.333333-153.6-341.333333-341.333333C170.666667 337.066667 302.933333 196.266667 469.333333 174.933333v-42.666666C277.333333 153.6 128 315.733333 128 512c0 213.333333 170.666667 384 384 384 196.266667 0 358.4-149.333333 379.733333-341.333333z m-89.6-106.666667l123.733334-29.866667C891.733333 256 763.733333 128 601.6 93.866667l-29.866667 123.733333c119.466667 29.866667 204.8 115.2 230.4 230.4z" fill="" p-id="28475"></path></svg>`,
          name: "气象单机偏差分析",
        },
        {
          index: "/economicsOperation/economicsReport",
          svg: `<svg t="1711616350515" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="17550" width="25" height="25"><path d="M361.39008 444.68224l-47.20128 78.69952c-0.78848-0.08192-1.73056-0.08192-2.51392-0.08192-4.5568 0-8.87808 0.71168-12.95872 1.96608l-32.44032-32.44032a43.776 43.776 0 0 0 1.96608-12.95872c0-23.95648-19.4816-43.43296-43.43808-43.43296s-43.42784 19.4816-43.42784 43.43296c0 8.33024 2.3552 16.0256 6.36416 22.62528l-47.2832 78.6944c-0.78848-0.0768-1.73056-0.0768-2.51392-0.0768-23.95648 0-43.43296 19.47648-43.43296 43.43296s19.4816 43.43296 43.43296 43.43296 43.43296-19.4816 43.43296-43.43296a43.4176 43.4176 0 0 0-6.35904-22.62016l47.27808-78.78656a43.9296 43.9296 0 0 0 15.47264-1.87904l32.44032 32.44032a43.71968 43.71968 0 0 0-1.96608 12.9536c0 23.9616 19.4816 43.43296 43.43296 43.43296s43.35616-19.47648 43.35616-43.43296c0-8.32512-2.3552-16.02048-6.35904-22.61504 0 0 49.00352-78.62272 49.79712-78.62272l-37.07904-20.73088z" fill="#575757" p-id="17551"></path><path d="M363.71968 521.51296l47.2832-78.78656a43.91936 43.91936 0 0 0 15.46752-1.87904l131.66592 131.66592a43.94496 43.94496 0 0 0-1.96608 12.95872c0 23.95648 19.4816 43.43296 43.43296 43.43296 23.9616 0 43.36128-19.4816 43.36128-43.43296a43.3152 43.3152 0 0 0-6.36416-22.62016l47.2832-78.70464c0.78336 0.08192 1.72544 0.08192 2.51392 0.08192 23.95648 0 43.43296-19.4816 43.43296-43.43296s-19.4816-43.35616-43.43296-43.35616c-23.95648 0-43.43296 19.4816-43.43296 43.43296 0 8.32512 2.3552 16.0256 6.35904 22.62016l-47.2064 78.70464c-0.78336-0.08192-1.73056-0.08192-2.51392-0.08192-4.5568 0-8.87296 0.70656-12.9536 1.96096L454.9888 412.416a43.94496 43.94496 0 0 0 1.96096-12.95872c0-23.95648-19.4816-43.43296-43.43296-43.43296s-43.43296 19.4816-43.43296 43.43296a43.4176 43.4176 0 0 0 6.36416 22.62528s-49.01376 78.61248-49.80224 78.61248l37.07392 20.81792z" fill="#575757" p-id="17552"></path><path d="M780.20608 704.46592l139.57632 140.04224c12.8768 12.20096 12.8768 32.93184 0.44544 45.3632-12.42112 12.90752-33.14688 13.35296-45.60384 0.45056l-140.49792-140.26752c-27.17184 22.57408-57.5744 41.2416-90.74688 54.81984a350.37696 350.37696 0 0 1-135.67488 27.20256c-103.42912 0-202.0096-45.85984-269.27616-125.33248-33.86368-39.59808 17.51552-76.68224 56.20736-34.06848 54.8352 60.11904 131.77344 94.19776 213.0688 94.19776 39.38816 0 76.70272-7.82336 110.55104-21.87264a286.208 286.208 0 0 0 93.52192-62.18752l0.47104-0.47104c26.49088-26.72128 48.14848-58.48576 62.88384-93.97248 13.81888-33.39776 21.66272-70.9376 21.66272-110.336a290.7904 290.7904 0 0 0-21.21728-108.9536l-0.45056-1.3824a286.98112 286.98112 0 0 0-61.27104-92.37504l-1.6128-1.59744c-26.9568-26.49088-58.74688-48.13312-93.98784-62.44352-33.60768-14.49472-71.15264-22.08256-110.55104-22.08256-117.69344 0-219.03872 71.85408-263.74656 172.49792-5.5296 11.99104-16.58368 19.12832-29.72672 19.12832h-0.20992c-11.52 0-20.96128-5.53984-27.19232-14.73024-6.21056-9.46176-6.912-20.51584-2.29376-31.12448C240.27648 209.92 367.43168 124.22656 507.6992 124.22656c47.6672 0 93.52704 9.6768 135.68 27.17184 43.30496 17.75104 82.44736 44.24704 114.69824 76.47744l1.82272 1.63328c31.80544 32.4608 57.14432 70.7072 74.87488 113.1008l0.68608 1.82272c17.04448 41.48224 26.27072 86.13888 26.27072 133.59616a350.45888 350.45888 0 0 1-26.9568 134.97856 356.87936 356.87936 0 0 1-54.56896 91.45856z" fill="#575757" p-id="17553"></path></svg>`,
          name: "经济运行分析报告",
        },
      ],
      //智能报表
      reportDatas: [
        {
          index: "/nxreport/scrb/fdcscrb",
          svg: `<svg t="1711617175108" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="55166" width="25" height="25"><path d="M800 32h-576a128 128 0 0 0-128 128v704a128 128 0 0 0 128 128h576a128 128 0 0 0 128-128v-704a128 128 0 0 0-128-128z m64 832a64 64 0 0 1-64 64h-576a64 64 0 0 1-64-64v-704a64 64 0 0 1 64-64h576a64 64 0 0 1 64 64v704z" fill="#33CAB7" p-id="55167"></path><path d="M736 736h-448a32 32 0 0 0 0 64h448a32 32 0 0 0 0-64zM736 576h-448a32 32 0 0 0 0 64h448a32 32 0 0 0 0-64zM736 192a64 64 0 0 0-64 64c0 5.568 1.792 10.496 3.136 15.616L591.616 355.136C586.496 353.792 581.568 352 576 352c-4.608 0-8.704 1.664-12.992 2.624l-53.632-53.632C510.336 296.704 512 292.608 512 288a64 64 0 1 0-128 0c0 5.568 1.792 10.496 3.136 15.616L303.616 387.136C298.496 385.792 293.568 384 288 384a64 64 0 1 0 0 128 64 64 0 0 0 64-64c0-5.568-1.792-10.496-3.136-15.616l83.52-83.52c5.12 1.344 10.048 3.136 15.616 3.136 5.248 0 9.856-1.792 14.72-3.008l52.288 52.288C513.792 406.144 512 410.752 512 416a64 64 0 1 0 128 0c0-5.568-1.792-10.496-3.136-15.616l83.52-83.52c5.12 1.344 10.048 3.136 15.616 3.136a64 64 0 1 0 0-128z" fill="#33CAB7" p-id="55168"></path></svg>`,
          name: "生产日报",
          children: [
            {
              name: "风电场站生产日报",
              index: "/nxreport/scrb/fdcscrb",
            },
          ],
        },
        {
          index: "/nxreport/dlcsdmb/huiandlcsdmb",
          svg: `<svg t="1711617136510" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="53900" width="25" height="25"><path d="M768 960H128c-17.67 0-32-14.33-32-32V224c0-17.67 14.33-32 32-32h640c17.67 0 32 14.33 32 32v704c0 17.67-14.33 32-32 32z m-608-64h576V256H160v640z" p-id="53901" fill="#33CAB7"></path><path d="M896 864c-17.67 0-32-14.33-32-32V128H225c-17.67 0-32-14.33-32-32s14.33-32 32-32h671c17.67 0 32 14.33 32 32v736c0 17.67-14.33 32-32 32zM288 832h-64V608c0-17.67 14.33-32 32-32s32 14.33 32 32v224zM480 832h-64V672c0-17.67 14.33-32 32-32s32 14.33 32 32v160z" p-id="53902" fill="#33CAB7"></path><path d="M672 832h-64V544c0-17.67 14.33-32 32-32s32 14.33 32 32v288z" p-id="53903" fill="#33CAB7"></path><path d="M448.02 512c-9.07 0-18.03-3.84-24.31-11.18L352 417.17l-71.7 83.65c-11.5 13.42-31.7 14.97-45.12 3.47-13.42-11.5-14.97-31.7-3.47-45.12l96-112a32 32 0 0 1 24.3-11.17 32 32 0 0 1 24.3 11.17l77.55 90.47 168.41-112.27c14.7-9.8 34.57-5.83 44.38 8.88 9.8 14.71 5.83 34.57-8.88 44.38l-192 128a32.008 32.008 0 0 1-17.75 5.37z" p-id="53904" fill="#33CAB7"></path></svg>`,
          name: "电量参数底码表",
          children: [
            {
              name: "惠安风电场电量底码(每日)",
              index: "/nxreport/dlcsdmb/huiandlcsdmb",
            },
          ],
        },
        {
          index: "/nxreport/zbyxcsjlb/huiansyzyxcs",
          svg: `<svg t="1720492799929" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1042" width="25" height="25"><path d="M570.81 930.78H191.75a40 40 0 0 1-39.9-39.94V120.72a40 40 0 0 1 39.9-39.94h643.89a40 40 0 0 1 39.9 39.94v282.56a25 25 0 0 1-50 0v-272.5H201.85v750h369a25 25 0 0 1 0 50z" p-id="1043"></path><path d="M580 433.06H316.18a27.65 27.65 0 0 0 0 55.29H580a27.65 27.65 0 0 0 0-55.29zM599.6 273.45H316.18a27.65 27.65 0 0 0 0 55.29H599.6a27.65 27.65 0 0 0 0-55.29zM489 607.58H316.18a27.65 27.65 0 0 0 0 55.29H489a27.65 27.65 0 0 0 0-55.29zM777.22 882.4c-113 0-205-92-205-205s92-205 205-205 205 92 205 205-91.97 205-205 205z m0-360c-85.47 0-155 69.53-155 155s69.53 155 155 155 155-69.54 155-155-69.54-155-155-155z" p-id="1044"></path><path d="M782.84 611.5c45.84 0 84.69 43.75 97.79 60.36a10.12 10.12 0 0 1 0 12.61c-13.1 16.62-52 60.36-97.79 60.36s-84.69-43.74-97.79-60.36a10.09 10.09 0 0 1 0-12.61c13.1-16.61 51.95-60.36 97.79-60.36z m0 35.9a30 30 0 0 0-27.71 19 31.31 31.31 0 0 0 6.5 33.52 29.44 29.44 0 0 0 32.69 6.67 30.78 30.78 0 0 0 18.52-28.42c0-17-13.43-30.77-30-30.77z" p-id="1045" fill="#33CAB7"></path></svg>`,
          name: "值班运行参数记录表",
          children: [
            {
              name: "惠安风电升压站运行参数",
              index: "/nxreport/zbyxcsjlb/huiansyzyxcs",
            },
            {
              name: "惠安风电一期风机运行参数",
              index: "/nxreport/zbyxcsjlb/huianfjyxcsyq",
            },
            {
              name: "惠安风电二期风机运行参数",
              index: "/nxreport/zbyxcsjlb/huianfjyxcseq",
            },
            {
              name: "单台风机电量统计",
              index: "/nxreport/zbyxcsjlb/dtfjdltj",
            },
            {
              name: "惠安风电电量统计",
              index: "/nxreport/zbyxcsjlb/huianfddltj",
            },
          ],
        },
        {
          index: "/nxreport/czzbjshjlb/huianfdzb",
          svg: `<svg t="1720492799929" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1042" width="25" height="25"><path d="M570.81 930.78H191.75a40 40 0 0 1-39.9-39.94V120.72a40 40 0 0 1 39.9-39.94h643.89a40 40 0 0 1 39.9 39.94v282.56a25 25 0 0 1-50 0v-272.5H201.85v750h369a25 25 0 0 1 0 50z" p-id="1043"></path><path d="M580 433.06H316.18a27.65 27.65 0 0 0 0 55.29H580a27.65 27.65 0 0 0 0-55.29zM599.6 273.45H316.18a27.65 27.65 0 0 0 0 55.29H599.6a27.65 27.65 0 0 0 0-55.29zM489 607.58H316.18a27.65 27.65 0 0 0 0 55.29H489a27.65 27.65 0 0 0 0-55.29zM777.22 882.4c-113 0-205-92-205-205s92-205 205-205 205 92 205 205-91.97 205-205 205z m0-360c-85.47 0-155 69.53-155 155s69.53 155 155 155 155-69.54 155-155-69.54-155-155-155z" p-id="1044"></path><path d="M782.84 611.5c45.84 0 84.69 43.75 97.79 60.36a10.12 10.12 0 0 1 0 12.61c-13.1 16.62-52 60.36-97.79 60.36s-84.69-43.74-97.79-60.36a10.09 10.09 0 0 1 0-12.61c13.1-16.61 51.95-60.36 97.79-60.36z m0 35.9a30 30 0 0 0-27.71 19 31.31 31.31 0 0 0 6.5 33.52 29.44 29.44 0 0 0 32.69 6.67 30.78 30.78 0 0 0 18.52-28.42c0-17-13.43-30.77-30-30.77z" p-id="1045" fill="#33CAB7"></path></svg>`,
          name: "场站指标及损耗记录表",
          children: [
            {
              name: "惠安风电指标",
              index: "/nxreport/czzbjshjlb/huianfdzb",
            },
          ],
        },
        {
          index: "/nxreport/czswdlgl/haswdlr",
          svg: `<svg t="1711617560802" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="69812" width="25" height="25"><path d="M495.7 495.2v-17.3H270.9c-6.7 0-18.2 14.1-18.2 21v7.5c0 6.8 11.6 23.4 18.2 23.4h172.9c12.6-19.4 33.2-22.3 51.9-34.6z" p-id="69813" fill="#33CAB7"></path><path d="M461.4 858.2H170.6c-13.4 0-20.8-3.4-20.8-17.2V183.9c0-13.7 3.9-17.3 17.3-17.3h518.7c13.4 0 17.4 8.7 17.4 22.5V426c16.6 1.4 33.5 0.6 51.9 0V166.6c0-27.4-25-51.9-51.7-51.9h-557c-26.7 0-48.4 22.2-48.4 49.6v693.8c0 27.4 25.2 52 51.9 52H513c-18.5-14.3-37.3-33.4-51.6-51.9z" p-id="69814" fill="#33CAB7"></path><path d="M409.3 650.8c0.6-5.1-1.7-12.4 0-17.3H270.9c-6.7 0-18.2 7.2-18.2 14v24.8c0 6.8 11.6 13.1 18.2 13.1h138.3c-0.2-9.4-1.7-19.4 0.3-28.8 0.1-0.4 0.8-16.6-0.2-5.8zM597.1 374.9l2.4-0.8v-17.3c0-6.8-10.6-17.3-17.3-17.3H270.9c-6.7 0-18.2 3.8-18.2 10.6v24.8c0 6.8 11.6 16.5 18.2 16.5h311.2c6.8 0 15-9.6 15-16.5zM712.9 564.4c-5.1-5.1-11.7-7.6-18.3-7.6-6.6 0-13.3 2.5-18.3 7.6l-97.8 97.8c-10.1 10.1-10.1 26.6 0 36.7 5.1 5.1 11.7 7.6 18.3 7.6 6.6 0 13.3-2.5 18.3-7.6l53.5-53.5v152.5c0 14.3 11.6 25.9 25.9 25.9 14.3 0 25.9-11.6 25.9-25.9V645.3l53.5 53.5c5.1 5.1 11.7 7.6 18.3 7.6 6.6 0 13.3-2.5 18.3-7.6 10.1-10.1 10.1-26.5 0-36.7l-97.6-97.7z" p-id="69815" fill="#33CAB7"></path><path d="M694.6 460.6c-128.9 0-233.4 104.5-233.4 233.4s104.5 233.4 233.4 233.4C823.5 927.5 928 822.9 928 694S823.5 460.6 694.6 460.6z m0 415C594.4 875.6 513 794.1 513 694s81.4-181.6 181.6-181.6c100.1 0 181.6 81.4 181.6 181.6s-81.5 181.6-181.6 181.6z" p-id="69816" fill="#33CAB7"></path></svg>`,
          name: "场站上网电量，功率(试运行)",
          children: [
            {
              name: "惠安上网电量(日)",
              index: "/nxreport/czswdlgl/haswdlr",
            },
            {
              name: "惠安上网电量(月)",
              index: "/nxreport/czswdlgl/haswdly",
            },
            {
              name: "惠安功率预测(日)",
              index: "/nxreport/czswdlgl/haglycr",
            },
            {
              name: "惠安功率预测(月)",
              index: "/nxreport/czswdlgl/haglycy",
            },
          ],
        },
        {
          index: "/nxreport/czzdybb",
          svg: `<svg t="1711617616189" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="71308" width="25" height="25"><path d="M787.4 918H238.8c-72 0-130.6-58.6-130.6-130.6V238.8c0-72 58.6-130.6 130.6-130.6h548.6c72 0 130.6 58.6 130.6 130.6v548.6c0 72-58.6 130.6-130.6 130.6zM238.8 168.2c-38.9 0-70.6 31.7-70.6 70.6v548.6c0 38.9 31.7 70.6 70.6 70.6h548.6c38.9 0 70.6-31.7 70.6-70.6V238.8c0-38.9-31.7-70.6-70.6-70.6H238.8z" p-id="71309" fill="#33CAB7"></path><path d="M451.1 728.8c-3.1 0-6.3-0.5-9.5-1.5-15.7-5.2-24.2-22.2-19-38l128-383.9c5.2-15.7 22.2-24.2 38-19 15.7 5.2 24.2 22.2 19 38l-128 383.9c-4.2 12.5-15.9 20.5-28.5 20.5zM643.1 661.9c-8.3 0-16.5-3.4-22.4-10.1-11-12.4-9.9-31.3 2.5-42.4l105.6-94-107.5-113c-11.4-12-10.9-31 1.1-42.4 12-11.4 31-10.9 42.4 1.1l128.8 135.6c5.6 5.9 8.6 13.8 8.2 21.9-0.3 8.1-4 15.7-10 21.2L663 654.3c-5.7 5.1-12.8 7.6-19.9 7.6zM385.9 661.9c-7.1 0-14.2-2.5-19.9-7.6L237.2 539.7c-6.1-5.4-9.7-13-10-21.2-0.3-8.1 2.6-16 8.2-21.9L364.2 361c11.4-12 30.4-12.5 42.4-1.1s12.5 30.4 1.1 42.4L300.2 515.5l105.6 94c12.4 11 13.5 30 2.5 42.4-5.9 6.6-14.2 10-22.4 10z" p-id="71310" fill="#33CAB7"></path></svg>`,
          name: "自定义报表",
        },
      ],
    };
  },

  computed: {
    isLogined() {
      return this.$store.state.user?.loginState;
    },
    isFixed() {
      return this.$store.state?.isFixed;
    },
    menuLength() {
      //   return this.$store.state?.menuData?.length;
      return this.showMenuData.length;
    },
  },

  async created() {
    // await this.initWebSocket();
    // this.getAlarmConfig();
    // this.x = 80;
    // this.y = 80;
    // let requestResult = [];
    // this.requestAlarmHistoryParams.forEach(({ alarmType, deviceType }) => {
    //   requestResult.push(this.getAlarmHistory(alarmType, deviceType));
    // });
    // Promise.all(requestResult)
    //   .then((promiseResult) => {
    //     this.alarmList = [];
    //     promiseResult.forEach(({ data }) => {
    //       data?.ls?.forEach((ele) => {
    //         this.pushALarmItem(ele);
    //       });
    //     });
    //     this.dialogList.sort((a, b) => {
    //       return b.ts - a.ts;
    //     });
    //     this.realList.sort((a, b) => {
    //       return b.ts - a.ts;
    //     });
    //     this.$store.commit("changeAlarmlist", this.alarmList);
    //     this.$store.commit("setWarning", this.dialogList);
    //     this.$store.commit("setWarningList", this.realList);
    //     // if (!this.socketLeaveFlag) {
    //     //   // 没有离开——重连
    //     //   // websocket重连
    //     //   this.socketReconnect1();
    //     // }
    //   })
    //   .catch(() => {
    //     requestResult.forEach((ele, index) => {
    //       ele
    //         .then(({ data }) => {
    //           data?.ls?.forEach((ele) => {
    //             this.pushALarmItem(ele);
    //           });
    //         })
    //         .catch((error) => {
    //           ElNotification({
    //             type: "error",
    //             title: "查询历史未处理报警请求出错！",
    //             dangerouslyUseHTMLString: true,
    //             message: `<div class="currentRequestErrorNotification">
    //                             <p><span>主要参数：</p>
    //                             <p style="color:var(--el-color-primary)"><span class="errorTitle">alarmType:</span><span class="errorDesc">"${this.requestAlarmHistoryParams[index].alarmType}"</span></p>
    //                             <p style="color:var(--el-color-primary)"><span class="errorTitle">deviceType:</span><span class="errorDesc">"${this.requestAlarmHistoryParams[index].deviceType}"</span></p>
    //                             <p style="color:var(--el-color-danger)"><span class="errorTitle">错误正文:</span><span class="errorDesc">${error}</span></p>
    //                          </div>`,
    //           });
    //           throw error;
    //         });
    //     });
    //   });
  },

  mounted() {
    this.initMenu();
    let that = this;
    that.setScale();
    /*窗口改变事件*/
    $(window).resize(() => {
      that.setScale();
    });
    
  },

  unmounted() {
    console.log("离开标记", this.socketLeaveFlag);
  },

  methods: {
    openWeb() {
      this.activeTab = "yxzb";
      window.location.href = `${process.env.VUE_APP_URL}/index.html/#/runtime/b0d3f1f4-3e5d-429b-af81-2661e7099caa/862c8272-8cf8-435c-b3fc-b28936b4bfe0?instanceId=82546b6b-59a3-7a1b-fbd4-b2d4516cf991`;
    },

    jumpUrl() {
      this.activeTab = "jjfx";
      this.$router.push({ path: "/economicsOperation" });
    },

    switchTabShow() {
      return (
        window.location.href.indexOf("#/integratedAlarm") === -1 &&
        window.location.href.indexOf("#/nxreport") === -1
      );
    },

    getSelectState(idx) {
      //   routepath === $route.path ? 'isSelect' : ''
      const href = window.location.href;
      const path = this.$route.path;

      const reg = new RegExp(path);

      //   return idx !== "/" && reg.test(path) ? "isSelect" : "";
      return idx !== "/" && path.indexOf(idx) !== -1 ? "isSelect" : "";
    },
    initMenu() {
      let str = window.location.href;
      if (str.indexOf("integratedAlarm") > -1) {
        this.showMenuData = this.warnDatas;
        this.$nextTick(() =>{
            document.title = '预警系统'
        })
      } else if (str.indexOf("economicsOperation") > -1) {
        this.showMenuData = this.economyDatas;
        this.$nextTick(() =>{
            document.title = '经济运行'
        })
      } else if (str.indexOf("nxreport") > -1) {
        this.showMenuData = this.reportDatas;
        this.$nextTick(() =>{
            document.title = '智能报表'
        })
      } else {
        this.showMenuData = this.warnDatas;
        this.$nextTick(() =>{
            document.title = '预警系统'
        })
      }
    },
    pagestyFn(path) {
      let str = "";
      if (this.isFixed && this.menuLength > 0) {
        if (path.indexOf("economicsOperation") > -1) {
          str = "padding-left: 220px";
        } else if (path.indexOf("nxreport") > -1) {
          str = "padding-left: 280px";
        } else if (path.indexOf("integratedAlarm") > -1) {
          str = "padding-left: 220px";
        }
      }

      return `${str};height:${
        this.switchTabShow()
          ? "calc(100% - 80px - 20px); margin-top:20px;"
          : "calc(100% - 80px);"
      }`;
    },
    noGrounpItemFn(path) {
      let str = "66px";
      if (!this.isCollapse) {
        if (path.indexOf("economicsOperation") > -1) {
          str = "width: 220px";
        } else if (path.indexOf("nxreport") > -1) {
          str = "width: 280px";
        } else if (path.indexOf("integratedAlarm") > -1) {
          str = "width: 220px";
        }
      } else {
        str = "width: 66px";
      }
      return str;
    },
    //获取报警配置
    getAlarmConfig() {
      if (localStorage.getItem("alarmConfigArray")) {
        this.alarmConfigArray = JSON.parse(
          localStorage.getItem("alarmConfigArray")
        );
      } else {
        this.alarmConfigArray = [
          {
            id: "1",
            alarmLevel: 1,
            isAlart: false,
            isAlarmSound: false,
            isContinuousAlarm: false,
          },
          {
            id: "2",
            alarmLevel: 2,
            isAlart: false,
            isAlarmSound: false,
            isContinuousAlarm: false,
          },
          {
            id: "3",
            alarmLevel: 3,
            isAlart: false,
            isAlarmSound: false,
            isContinuousAlarm: false,
          },
          {
            id: "4",
            alarmLevel: 4,
            isAlart: true,
            isAlarmSound: true,
            isContinuousAlarm: false,
          },
          {
            id: "5",
            alarmLevel: 5,
            isAlart: true,
            isAlarmSound: true,
            isContinuousAlarm: true,
          },
        ];
        localStorage.setItem(
          "alarmConfigArray",
          JSON.stringify(this.alarmConfigArray)
        );
      }
    },
    //查历史报警
    getAlarmHistory(alarmType, deviceType) {
      let params = {
        pageNum: 1,
        pageSize: 50,
        alarmId: "",
        alarmType,
        deviceType,
        stationid: "",
        deviceid: "",
        modelId: "",
        components: "",
        description: "",
        isclose: false,
        // begin: dayjs().add(-1, "hour").format("YYYY-MM-DD HH:mm:ss"),
        // end: dayjs().format("YYYY-MM-DD HH:mm:ss"),
        begin: `${dayjs().add(-1, "hour").format("YYYY-MM-DD")} 00:00:00`,
        end: `${dayjs().format("YYYY-MM-DD")} 23:59:59`,
      };
      if (params.alarmType == "windturbine") {
        params.stationid = "";
      } else if (params.alarmType == "inverter") {
        params.stationid = "";
      }
      return alarm_history(params, 12000);
    },
    pushALarmItem(alarmItem, type) {
      const configItem = this.getConfigItem(alarmItem.rank);
      const alarmOption = {
        id: alarmItem.id ? alarmItem.id : alarmItem.tbname,
        lv: alarmItem.rank,
        modelId: alarmItem.modelId,
        lvName: this.getLvName(alarmItem),
        rank: alarmItem.rank,
        confirmed: alarmItem.confirmed,
        class: `animate__bounceInRight lv${alarmItem.rank}`,
        deviceId: alarmItem.deviceId,
        faultCause: alarmItem.faultCause,
        resolvent: alarmItem.resolvent,
        characteristic: alarmItem.characteristic,
        code: alarmItem.code,
        wpName: alarmItem.stationName
          ? alarmItem.stationName
          : alarmItem.wpName,
        stationId: alarmItem.stationId ? alarmItem.stationId : alarmItem.wpId,
        isClose: alarmItem.closeTime ? true : alarmItem.endts ? true : false,
        isCloseName: alarmItem.closeTime
          ? "已解除"
          : alarmItem.endts
          ? "已解除"
          : "未解除",
        alarmId: alarmItem.alarmId,
        alarmType: alarmItem.alarmType,
        alarmName: this.getAlarmName(alarmItem),
        description: alarmItem.description,
        deviceType: alarmItem.deviceType,
        oval: alarmItem.oval,
        triggerType: alarmItem.triggerType,
        ts: alarmItem.ts
          ? dayjs(alarmItem.ts).valueOf()
          : dayjs(alarmItem.updateTime).valueOf(),
        endts: alarmItem.endts
          ? dayjs(alarmItem.endts).format("YYYY-MM-DD HH:mm:ss")
          : null,
        closeTime: alarmItem.closeTime
          ? dayjs(alarmItem.closeTime).format("YYYY-MM-DD HH:mm:ss")
          : null,
        deviceName: alarmItem.deviceName
          ? alarmItem.deviceName
          : alarmItem.code,
        tsName: alarmItem.ts
          ? new Date(alarmItem.ts).formatDate("MM-dd hh:mm:ss")
          : new Date(alarmItem.updateTime).formatDate("MM-dd hh:mm:ss"),
        fullTsName: alarmItem.ts
          ? new Date(alarmItem.ts).formatDate("yyyy-MM-dd hh:mm:ss")
          : new Date(alarmItem.updateTime).formatDate("yyyy-MM-dd hh:mm:ss"),
      };
      if (
        alarmOption.alarmType == "booststation" &&
        alarmOption.deviceType != "custom"
      ) {
        if (
          configItem.isAlarmSound ||
          configItem.isAlart ||
          configItem.isContinuousAlarm
        ) {
          let a = {};
          a[`${alarmOption.stationId}`] =
            alarmOption.closeTime || alarmOption.confirmed ? false : true;
          this.alarmList.push(a);
          this.alarmList = [
            ...new Set(this.alarmList.map((t) => JSON.stringify(t))),
          ].map((s) => JSON.parse(s));
        }
      }
      if (
        configItem.isAlarmSound ||
        configItem.isAlart ||
        configItem.isContinuousAlarm
      ) {
        if (type && type == "ws") {
          this.dialogList.unshift(alarmOption);
        } else {
          this.dialogList.push(alarmOption);
        }
      }
      if (type && type == "ws") {
        this.realList.unshift(alarmOption);
      } else {
        this.realList.push(alarmOption);
      }

      //    && alarmOption.deviceType != "custom"
      this.playAudioEffect();
    },
    getAlarmName(alarmItem) {
      let alarmName = "";
      if (alarmItem.deviceType === "booststation") {
        alarmName = "升压站报警";
      } else if (alarmItem.deviceType === "inverter") {
        alarmName = "光伏报警";
      } else if (alarmItem.deviceType === "windturbine") {
        alarmName = "设备报警";
      } else if (alarmItem.deviceType === "station") {
        alarmName = "场站";
      }

      if (alarmItem.alarmType === "custom") {
        alarmName = "自定义报警";
      }
      return alarmName;
    },
    getLvName(alarmItem) {
      if (alarmItem.rank === 1) {
        return "低级";
      } else if (alarmItem.rank === 2) {
        return "低中级";
      } else if (alarmItem.rank === 3) {
        return "中级";
      } else if (alarmItem.rank === 4) {
        return "中高级";
      } else if (alarmItem.rank === 5) {
        return "高级";
      }
    },

    playAudioEffect() {
      const lv1Config = this.getConfigItem(1);
      let lv1Play = false;
      if (lv1Config.isAlarmSound) {
        lv1Play = this.dialogList.some((ele) => {
          return ele.lv === 1 && !ele.confirm;
        });
      }
      const lv2Config = this.getConfigItem(2);
      let lv2Play = false;
      if (lv2Config.isAlarmSound) {
        lv2Play = this.dialogList.some((ele) => {
          return ele.lv === 2 && !ele.confirm;
        });
      }
      const lv3Config = this.getConfigItem(3);
      let lv3Play = false;
      if (lv3Config.isAlarmSound) {
        lv3Play = this.dialogList.some((ele) => {
          return ele.lv === 3 && !ele.confirm;
        });
      }
      const lv4Config = this.getConfigItem(4);
      let lv4Play = false;
      if (lv4Config.isAlarmSound) {
        lv4Play = this.dialogList.some((ele) => {
          return ele.lv === 4 && !ele.confirm;
        });
      }
      const lv5Config = this.getConfigItem(5);
      let lv5Play = false;
      if (lv5Config.isAlarmSound) {
        lv5Play = this.dialogList.some((ele) => {
          return ele.lv === 5 && !ele.confirm;
        });
      }
      //   console.log(lv1Play, lv2Play, lv3Play, lv4Play, lv5Play);
      if (lv5Play && !this.seriousWarning) {
        this.seriousWarning = true;
        this.audioElement = new Audio();
        this.audioElement.src = "./static/sound/lv5.mp3";
        this.audioElement.loop = true;
        false && this.audioElement?.play();
      } else if (
        (lv1Play || lv2Play || lv3Play || lv4Play) &&
        !this.seriousWarning
      ) {
        this.audioElement = new Audio();
        this.audioElement.src = "./static/sound/lv4.mp3";
        this.audioElement.addEventListener("ended", () => {
          this.audioElement?.removeEventListener(
            "ended",
            this.stopPlayAudioEffect
          );
        });
        false && this.audioElement?.play();
      } else {
        if (!this.seriousWarning) {
          this.stopPlayAudioEffect();
        }
      }
    },
    getConfigItem(lv) {
      return (
        this.alarmConfigArray.find((ele) => {
          return ele.alarmLevel === lv;
        }) || {}
      );
    },
    stopPlayAudioEffect() {
      this.seriousWarning = false;
      if (this.audioElement) {
        this.audioElement.pause();
        this.audioElement.currentTime = 0;
        this.audioElement.loop = false;
      }
      this.audioElement = null;
    },
    async initWebSocket() {
      this.$ws.initWebSocket();
    },
    getScale() {
      const w = window.innerWidth / this.style.width;
      const h = window.innerHeight / this.style.height;
      const d = window.devicePixelRatio;
      //   let f = 16;
      //   if (d > 1) {
      //     f = 18;
      //   }
      return { x: w, y: h };
    },
    setScale() {
      let scale = this.getScale();
      this.style.transform =
        "scaleY(" + scale.y + ") scaleX(" + scale.x + ") translate(-50%, -50%)";
    },
    // 切换子系统事件
    HeaderMenuClick(data) {
      this.root = data.id;
    },
    showMenu() {
      if (!this.isFixed) {
        this.isShowMenu = true;
        clearTimeout(this.memuCloseTimeout);
        this.memuCloseTimeout = null;
      }
    },
    hideMenu() {
      if (!this.isFixed) {
        this.memuCloseTimeout = setTimeout(() => {
          this.isShowMenu = false;
        }, 500);
      }
    },
    getBooster() {
      // GetBoosterlist().then((res) => {
      //   if (res.data && res.data.code == 200) {
      //     this.$store.commit("changeBooster", res.data.data);
      //   }
      // });
    },
    // 获取测风塔
    async getCftlist() {
      // const { data: datas } = await getApiWeatherstation();
      // this.$store.commit("changeCft", datas.data);
    },
    // 获取全部场站（不分风电光伏）
    async getAllStation() {
      const { data: datas } = await getAllStation();
      if (datas) {
        this.$store.commit("changeStationAll", datas);
      } else {
        this.$store.commit("changeStationAll", []);
      }
    },
    login() {
      this.$store.commit("user/SET_LOGINSTATE", true);
    },
  },

  watch: {
    "$store.state.menuData"(res) {
      this.menuData = res || [];
    },
    isLogined: {
      handler(res) {
        if (!res && this.socketObj) {
          // 离开标记
          this.socketLeaveFlag = true;
          // 关闭WebSocket
          this.socketObj.close();
        }
        if (res) {
          this.getBooster();
          this.getCftlist();
          this.getAllStation();
        }
      },
      immediate: true,
    },
    "$store.state.moudleName"(msg) {
      if (window.__MODE__.showModuleName && msg) {
        this.BASE.showMsg({
          type: this.$store.state.themeName === "dark" ? "success" : "warning",
          showClose: true,
          msg,
        });
      }
    },
    $route(to, from) {
      // 当路由发生变化时，更新 currentPath
      this.routepath = to.path;
      this.initMenu();
    },
  },
};
</script>

<style lang="less">
@import "~@/assets/styles/main.less";

.curTabsBox {
  position: absolute;
  left: 0;
  top: 72px;
  background: #030713;
  z-index: 2003;
  // width: 220px;
  width: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: center;

  .item {
    font-size: 16px;
    margin: 0 16px;
    line-height: 34px;
    color: #97a8ca;
    cursor: pointer;

    &.active {
      color: #f8f8ff;
      border-bottom: 2px solid #40a7ee;
    }
  }
}
#screen {
  z-index: 100;
  transform-origin: 0 0;
  position: fixed;
  left: 50%;
  top: 50%;
  transition: 0.3s;
}
.alarmDeligo {
  z-index: 2003;
  position: relative;

  img {
    width: 43px;
    max-width: 43px;
    height: 43px;
    z-index: 3;
  }

  img:first-child {
    width: 53px;
    height: 57px;
    max-width: 53px;
    top: -7px;
    left: -5px;
    position: absolute;
    z-index: 3;
  }
}

* {
  box-sizing: border-box;

  &::-webkit-scrollbar {
    width: 6px;
    height: 8px;
  }

  &::-webkit-scrollbar-track-piece {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
  }

  &::-webkit-scrollbar-thumb {
    background-color: fade(@gray, 75);
    border-radius: 4px;
    outline: none;
    outline-offset: 0px;
    border: none;
  }
}

body {
  margin: 0;
  background: #fff;
  color: #fff;
  // background-image: url("./assets/background.png");
  background: rgb(4, 12, 11);
  background-size: cover;
  font-size: @fontsize;
  font-family: @defalut-font-family;
}
@menuWidth: 51.28px;
// @headerHeight: 110px;
@headerHeight: 80px;
.main {
  width: 100%;
  height: 100%;
  display: flex;
  flex-wrap: wrap;
  overflow: hidden;

  .header-body {
    z-index: 2;
    // background: radial-gradient(closest-corner at 22% 40%, #2d5a47, #040d0a, #040d0a);
    // flex: 0 0 100%;

    width: 100%;
    // display: flex;
    // flex-direction: row;
    height: @headerHeight;
    border-bottom: 1px solid #142b29;
    .header-title {
      padding-left: 20px;
      margin: auto;
      color: #fff;
    }
    .header-menu-nxf {
      height: 72px;
      flex-grow: 1;
      background-image: url("./assets/nxfImg/header2.png");
      background-repeat: no-repeat;
      background-size: cover;
    }
    .header-menu-body {
      height: 38px;
      flex-grow: 1;
      background: #08172c;
    }
  }
  .menu-body {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;

    flex: 0 0 @menuWidth;
    width: @menuWidth;
    height: calc(100% - @headerHeight);
    // height: calc(100vh - 59px);
    top: @headerHeight;
    // top: 59px;
    background-color: fade(#192a26, 75%);
    z-index: 2002;
    opacity: 0;
    transition: opacity 0.2s;
    transition-timing-function: ease-in;
    // transform: translate(-@menuWidth);

    &:hover,
    &.hover {
      opacity: 1;
      transition: opacity 0.2s;
      transition-timing-function: ease-out;
      transform: translate(0);
    }
  }

  .elmenuSty {
    position: absolute;
    display: flex;
    // flex-direction: column;
    // align-items: center;
    // justify-content: space-between;

    // flex: 0 0 @menuWidth;
    // width: @menuWidth;
    // height: calc(100% - @headerHeight);
    top: @headerHeight;
    background-color: fade(#192a26, 75%);
    z-index: 2002;
    // opacity: 0;
    transition: opacity 0.2s;
    transition-timing-function: ease-in;

    img {
      width: 25px;
      height: 25px;
    }

    .menu-list {
      width: 100%;
      height: 40px;
      line-height: 40px;
      position: absolute;
      bottom: 50px;

      .menu-item {
        height: 40px;
        line-height: 40px;
        display: flex;
        justify-content: center;
        align-items: center;

        img {
          width: 25px;
          height: 25px;
        }
      }
    }

    .el-menu {
      min-width: 66px;
      border-right: transparent;

      .el-sub-menu {
        margin: 0 5px;

        .el-sub-menu__title {
          // height: 1px !important;
          background: none;

          .elGrounpTitleAll {
            display: flex;
            height: 45px;
            line-height: 45px;
            position: relative;
            top: 5px;

            .svgSty {
              line-height: 45px;
              position: relative;
            }
            .chSpna {
              color: #a5b7df !important;
            }
          }

          .elGrounpTitleAll:hover{
            // .chSpna{
                background: #1c69bb;
                padding: 0 10px;
                color: #a5b7df;
            // }
                
            }

          .elGrounpTitle {
            .svgSty {
              line-height: 45px;
              position: relative;
              top: -10px;
              left: -5px;
            }
          }
        }
      }

      .is-opened {
        .el-sub-menu__title {
          border-radius: 8px 8px 0 0;
          background: #001d53;

          .elMenuTitleAll {
            display: flex;
            position: relative;
            left: -5px;

            .svgSty {
              line-height: 45px;
              position: relative;
              top: -10px;
            }
          }
        }

        .el-menu {
          border-radius: 0 0 8px 8px;
          //   padding: 10px 0 10px 0;
          background: #132444;

          .elsubMenu {
            // width: 130px;
            width: calc(100% - 70px);
            height: 30px;
            // margin: 10px 0;
            position: relative;
            left: 50px;
            // background: #1c69bb;

            .grounpItem {
              height: 30px;
              position: relative;
              top: -24px;

              .grounpItemSty {
                width: 7px;
                height: 7px;
                background: #b1b8cb;
                border-radius: 50%;
                position: relative;
                left: -60px;
              }

              .grounpItemSpan {
                position: relative;
                left: -30px;
              }
            }

            // .is-active {
            //     max-width: 160px !important;
            //   background: rgba(0, 70, 199, 0.4);
            //   border: 1px solid #115fc8;

            //   .grounpItemSty {
            //     background: #1c99ff;
            //     position: relative;
            //     left: -61px;
            //   }
            // }
          }
          .isSelect {
            background: #1c69bb;
            .grounpItemSpan {
              color: #a5b7df;
            }
          }

          .elsubMenu:hover {
            background: #1c69bb;
            .grounpItemSpan {
              color: #a5b7df;
            }
          }
        }
      }

      .noGrounpItem {
        // padding: 0px 20px;
        background: none;
        position: relative;
        // left: 5px;

        .elMenuTitleAll {
          display: flex;
          height: 45px;
          line-height: 45px;

          .svgSty {
            line-height: 45px;
            position: relative;
          }
        }
        .elMenuTitle {
          height: 45px;
          position: relative;
          top: 5px;
          .svgSty {
            position: relative;
            top: 3px;
            left: 5px;
          }
          .titspan {
            margin-left: 10px;
            color: #a5b7df;
            position: relative;
            top: 4px;
            left: 6px;
          }
          &.is-active {
            background: #001d53;
            border-radius: 8px;
            padding: 5px;
            position: relative;
            top: 5px;
          }
          .titspan:hover {
            padding: 0 10px;
            background: #1c69bb;
          }
          .isSelect {
            background: #1c69bb;
            padding: 0 10px;
            .grounpItemSpan {
              color: #a5b7df;
            }
          }
        }
      }

      .is-active {
        // .elMenuTitle {
        //   background: #001d53;
        //   border-radius: 8px;
        //   padding: 5px;
        //   position: relative;
        //   top: 5px;
        //   .svgSty{
        //         line-height: 33px;
        //     }
        //   .titspan{
        //         margin-left: 10px;
        //         position: relative;
        //         top: -4px;
        //     }
        // }

        .elMenuTitleAll {
          display: flex;
          width: 100%;
        }
      }
    }
  }

  .elmenuSty {
    .el-menu {
      .el-sub-menu {
        .el-sub-menu__title {
          color: #a5b7df;

          svg {
            path {
              fill: #a5b7df;
            }
          }
        }

        .el-sub-menu__title:hover,
        .is-active {
          color: #a5b7df;

          .chSpna {
            color: #a5b7df !important;
          }

          svg {
            path {
              fill: #a5b7df;
            }
          }
        }
      }

      .el-menu-item {
        color: #a5b7df;

        svg {
          path {
            fill: #a5b7df;
          }
        }
      }

      .el-menu-item:hover,
      .is-active {
        color: #1c69bb;
        background: transparent !important;

        .titspan {
          color: #a5b7df !important;
        }

        svg {
          path {
            fill: #1c69bb;
          }
        }
      }
    }
  }

  .main-body {
    flex: 0 0 100%;
    max-width: 100%;
    // padding: 1.481vh;
    // transition: flex 0.1s, margin-left 0.1s;
    // transition-timing-function: ease-in-out;
    // &.show-menu {
    //   flex: 0 0 calc(100vw - @menuWidth);
    //   margin-left: @menuWidth;
    //   transition: flex 0.1s, margin-left 0.1s;
    //   transition-timing-function: ease-in-out;
    // }
  }
  .el-table__body tr.current-row > td {
    color: #fff;
    background: rgba(66, 66, 66, 0.66) !important;
  }

  .el-transfer-panel {
    width: 450px !important;
    height: 73vh;
    background-color: #111d1c !important;
    border: 1px solid #999999 !important;

    .el-transfer-panel__body {
      height: 100% !important;

      .el-transfer-panel__list {
        height: 100% !important;
      }
    }
  }
  .el-transfer-panel .el-transfer-panel__header {
    background-color: #111d1c !important;
    color: #05bb4c !important;

    .el-checkbox .el-checkbox__label {
      color: #05bb4c !important;
    }
  }
  .el-button--primary.is-disabled,
  .el-button--primary.is-disabled:active,
  .el-button--primary.is-disabled:focus,
  .el-button--primary.is-disabled:hover {
    background-color: #05bb4c;
    border-color: #05bb4c;
  }
}
.login {
  width: 100%;
  height: 100%;
  background: url("~@/assets/login-bg.png") no-repeat;
  background-size: cover;
  position: relative;
}
.el-badge {
  &.active {
    .el-badge__content--danger {
      opacity: 0 !important;
    }
  }
}
.el-badge__content--danger {
  background: #ff4e00 !important;
  border: none !important;
}
.el-badge__content.is-fixed {
  top: 7px !important;
  right: 14px !important;
  z-index: 2003 !important;
}

.trans {
  animation: circleProgess 3s linear infinite;
}

@keyframes circleProgess {
  0% {
    transform: rotateZ(360deg);
  }

  25% {
    transform: rotateZ(270deg);
  }

  50% {
    transform: rotateZ(180deg);
  }

  75% {
    transform: rotateZ(90deg);
  }

  100% {
    transform: rotateZ(0deg);
  }
}
.el-tree-node__content {
  height: 40px !important;
}
.el-tree-node__label {
  font-size: 14px !important;
}
.el-pagination.is-background .el-pager li:not(.disabled).active {
  background-color: #05bb4c !important;
}
.el-table__body tr.hover-row > td.el-table__cell {
  background-color: rgba(2, 2, 2) !important;
}
#appBody.light .el-table th.el-table__cell > .cell {
  height: 8.2vh !important;
}
.power-benchmarking-page
  .top
  .top-left
  .table.el-table
  thead
  tr:last-child
  th
  .cell {
  height: 116px !important;
}
* {
  -webkit-touch-callout: none; /*系统默认菜单被禁用*/
  -webkit-user-select: none; /*webkit浏览器*/
  -khtml-user-select: none; /*早期浏览器*/
  -moz-user-select: none; /*火狐*/
  -ms-user-select: none; /*IE10*/
  user-select: none;
}
input {
  -webkit-user-select: auto; /*webkit浏览器*/
}
textarea {
  -webkit-user-select: auto; /*webkit浏览器*/
}
.gfSelect .el-input__suffix {
  display: none !important;
}
body .gfSelect .el-input__inner {
  background: rgba(83, 98, 104, 0);
  color: #ffffff;
  font-size: 16px;
}
.main-body {
  .query {
    display: flex;
    // justify-content: space-between;

    &.left {
      justify-content: flex-start;
    }

    .query-items {
      flex: 0 0 auto;
      display: flex;

      .query-item {
        flex: 0 0 auto;
        display: flex;
        margin: 0 1.4815vh;

        .el-input {
          &.placeholder-left {
            input {
              &::placeholder {
                text-align: left;
              }
            }
          }
        }
        .placeholder-left {
          .el-input {
            input {
              height: 33px !important;
              &::placeholder {
                text-align: left;
              }
            }
          }
        }

        .lable {
          flex: 0 0 auto;
          margin-right: 1.4815vh;
          line-height: 33px;
          color: @gray-l;
        }

        .search-input {
          position: relative;

          // input {
          //   box-sizing: border-box;
          //   flex: 0 0 200px;
          //   border: 0px solid @darkgray;
          //   color: @white;
          //   outline: unset;
          //   border-radius: 0%;
          //   padding-right: 40px;
          //   background: fade(#536268, 20);
          //   height: 33px;
          //   line-height: 33px;

          //   &::placeholder {
          //     font-size: 12px;
          //     text-align: right;
          //     color: @darkgray;
          //   }
          // }

          // .unit {
          //   position: absolute;
          //   right: 12px;
          //   top: 6px;
          //   line-height: 33px;
          //   margin: auto;
          // }
        }
      }
    }

    .query-actions {
      flex: 0 0 auto;
      margin-left: 50px;
      display: flex;
      justify-content: flex-start;
      align-items: center;

      .btn {
        cursor: pointer;
      }
    }
  }

  input {
    box-sizing: border-box;
    flex: 0 0 200px;
    border: 0px solid @darkgray;
    color: @white;
    outline: unset;
    border-radius: 0%;
    padding-right: 40px;
    background: fade(#536268, 20);
    height: 33px;
    line-height: 33px;

    &::placeholder {
      font-size: 12px;
      text-align: right;
      color: @darkgray;
    }
  }

  input[type="checkbox"] {
    position: relative;
    display: inline-block;
    appearance: none;
    width: 14px;
    height: 14px;
    outline: none;
    border: 1px solid @gray;
    background-color: #000;
    border-radius: 20%;
    margin: 0;
    padding: 0;

    &:checked {
      border-color: @green;
      background: @green;
    }

    &::after {
      display: inline-block;
      content: " ";
      position: absolute;
      left: 30%;
      top: 5%;
      width: 3px;
      height: 7px;
      border-color: #fff;
      border-style: solid;
      border-width: 0px 2px 2px 0px;
      transform: rotate(45deg);
      opacity: 0;
    }

    &:checked::after {
      content: "";
      opacity: 1;
      transition: opacity 0.3s ease-out;
    }
  }
}
</style>
