<template>
  <div :class="$store.state.themeName === 'light' ? 'home_light' : 'home'">
    <div class="top-mid-panel">
      <Map ref="map"></Map>
    </div>
  </div>
</template>

<script>
import Map from "./components/map.vue";
export default {
  name: "Home",
  data() {
    return {};
  },
  components: {
    Map,
  },
};
</script>

<style lang="less">
.top-distance {
  //   top: 97px !important;
}
.el-col + .el-col {
  padding-left: 0;
}
.home {
  width: 100%;
  height: 100%;
  background: url('~@/assets/newHome_h.png');
  background-repeat: round;
  .date {
    display: flex;
    flex-direction: row;
    align-items: center;
    font-size: 12px;
    font-family: Microsoft YaHei;
    font-weight: 400;
    color: #b3b3b3;
    position: absolute;
    right: 0;
    top: -20px;

    .day {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 30px;
      height: 22px;
      border: 1px solid #0f5e30;
      border-radius: 11px 0px 0px 11px;
      background: rgba(67, 81, 107, 0.2);

      &.active {
        background: rgba(5, 187, 76, 0.4);
        color: #ffffff;
      }
    }

    .mouth {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 30px;
      height: 22px;
      border-top: 1px solid #0f5e30;
      border-bottom: 1px solid #0f5e30;
      background: rgba(67, 81, 107, 0.2);

      &.active {
        background: rgba(5, 187, 76, 0.4);
        color: #ffffff;
      }
    }

    .year {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 30px;
      height: 22px;
      border: 1px solid #0f5e30;
      border-radius: 0px 11px 11px 0px;
      background: rgba(67, 81, 107, 0.2);

      &.active {
        background: rgba(5, 187, 76, 0.4);
        color: #ffffff;
      }
    }
  }
  @keyframes safe_power {
    0% {
      transform: translateX(-100px);
    }

    100% {
      transform: translateX(0);
    }
  }
  .safe_power {
    animation: safe_power 1.5s linear;
  }
  .sx-left-box {
    padding-left: 30px;
    position: relative;
    // z-index: 6;
    max-width: 650px;
  }
  .security-days {
    // position: absolute;
    // top: 65px;
    // left: 37px;
    // font-weight: 400;
    // z-index: 4;
    .text {
      font-size: 20px;
      font-family: Microsoft YaHei;
      margin-bottom: 12px;
      color: #ffffff;
    }
    .num {
      font-size: 35px;
      font-family: Bicubik;
      color: #05bb4c;
      .unit {
        font-size: 12px;
        font-family: Microsoft YaHei;
        margin-left: 5px;
      }
    }
    .security {
      margin-top: 15px;
      .unit-t {
        font-size: 14px;
        font-family: Adobe Heiti Std;
        color: #05bb4c;
        margin-left: 5px;
      }
    }
    .lineBox {
      .fd-rl,
      .gf-rl {
        font-size: 14px;
        font-family: Microsoft YaHei;

        color: #ffffff;
        .font-num {
          font-size: 16px;
          font-family: Bicubik;
          color: #05bb4c;
          margin: 0 5px;
        }
        .unit {
          font-size: 12px;
          color: #5e6269;
        }
      }
      .gf-rl {
        margin-top: 12px;
        .font-num {
          color: #ff8300;
        }
      }
    }
  }
  .qjny-info {
    // width: 406px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    margin-top: 20px;
    position: relative;
    padding: 20px 10px;
    z-index: 5;
    // left: 37px;
    .qty_img {
      position: relative;
      left: -39px;
      top: -16px;
      animation: move 1s infinite linear;
    }

    .qty_content {
      margin-top: -25px;
    }

    ul {
      display: flex;

      li {
        width: 170px;
        height: 170px;
        margin-left: 20px;
        line-height: 30px;
      }

      .line {
        border-right: 1px dashed #252e43;
        width: 1px;
        margin-left: 0;
        margin-right: 5px;
      }
    }

    .qty_tit {
      font-size: 14px;
      position: relative;
      left: 75px;
      bottom: 50px;
      color: #999999;

      .qty_u {
        position: relative;
        top: 23px;
        left: -38px;
      }
    }

    .qty_value {
      font-size: 14px;
      position: relative;
      top: 26px;
      left: -54px;
      color: #05bb4c;
      font-family: "AgencyFB-Reg";
      font-weight: bold;

      .qty_u {
        font-size: 12px;
        color: #999999;
        margin-left: 20px;
      }
    }

    .qty_imag {
      font-size: 14px;
      color: #999999;

      .qty_val {
        font-family: "AgencyFB-Reg";
        font-weight: bold;
        color: #ffffff;
        margin: 0 20px;
      }

      .qty_unit {
        font-size: 12px;
        color: #999999;
      }
    }

    .qty_imag:first-of-type {
      margin-top: 10px;
    }
  }
  .switch-jrqk {
    position: absolute;
    top: 40%;
    left: 80%;
    backdrop-filter: blur(5px);
    z-index: 5;
    font-size: 16px;
    color: #fff;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 20px 10px;
    border: 1px solid #05bb4c;

    > div {
      margin-bottom: 10px;

      > img {
        display: inline-block;
        margin-right: 10px;
        vertical-align: -4%;
      }
    }
  }
  .ecoName {
    width: 406px;
    height: 138px;
    margin-top: 30px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    // top: 570px;
    // position: absolute;
    z-index: 4;
    // left: 37px;

    .ecoTitle {
      width: 350px;
      height: 45px;
      border-bottom: 1px solid #252e43;
      margin: 0 auto;
      font-size: 16px;
      font-weight: 400;
      color: #ffffff;
      line-height: 45px;
      position: relative;

      span {
        position: absolute;
        right: 0;
        font-size: 12px;
        font-family: Source Han Sans SC;
        color: #b1b1b1;
      }
    }

    ul {
      display: flex;
      text-align: center;
      width: 350px;
      height: 92px;
      margin: 0 auto;
      justify-content: space-between;
      align-items: center;

      .eco_count {
        line-height: 23px;
        width: 25%;
        .kind {
          height: 23px;
          text-align: center;
          svg {
            width: 40px;
            height: 40px;
            margin-top: -10px;
          }
        }
        .eco_val {
          font-size: 14px;
          font-family: SourceHanSansCN;
          color: #ffffff;
          &.text-ellipsis {
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
            -o-text-overflow: ellipsis;
          }
        }

        .eco_name {
          font-size: 12px;
          color: #b3b3b3;
        }
      }
    }
  }
  .my_echarts {
    width: 600px;
    height: 250px;
    margin-top: 30px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    // position: absolute;
    // top: 730px;
    // left: 37px;
    z-index: 4;
  }
  @keyframes card {
    0% {
      right: -100px;
    }

    100% {
      right: 37px;
    }
  }
  .sx-right-box {
    position: absolute;
    right: 37px;
    width: 434px;
    top: 67px;
    z-index: 5;
    animation: card 1.5s linear;
  }

  .card {
    background: rgba(0, 0, 0, 0.3);
    padding: 25px;
  }
  .wind_card {
    z-index: 5;
    height: 158px;
    margin-bottom: 30px;
    .el-col {
      flex: 1;
      position: relative;
    }

    .grid-content {
      text-align: center;
      cursor: pointer;
      font-size: 14px;
      .img {
        position: relative;
        width: 84px;
        height: 84px;
        background: url("~@/assets/imgs/instrumentPanel.png") no-repeat;

        img {
          position: absolute;
          top: 50%;
          left: 50%;
          transform: rotateZ(360deg);
          transform-origin: left top;
        }

        .information {
          font-size: 14px;
          color: #2b99ff;
          font-family: "Arial";
          position: absolute;
          width: 100%;
          top: 32px;
        }

        > .unit {
          width: 100%;
          color: #7d838c;
          text-align: center;
          position: absolute;
          top: 65px;
        }
        p {
          position: absolute;
          left: 50%;
          bottom: -27%;
          white-space: nowrap;
          transform: translateX(-50%);
        }
      }
    }
  }
  .electric_card {
    height: 320px;
    position: relative;
    margin-bottom: 30px;
    .el-row.fdl-wrapper {
      align-items: center;

      .power-div {
        width: 100%;
        .power-name {
          color: #999999;
        }
      }
      .el-col:first-child {
        text-align: right;
        margin-right: 10px;
        color: #b3b3b3;
      }

      .el-col:last-child {
        text-align: left;
        margin-left: 10px;
        font-size: 14px;
        font-family: "Arial";
      }
    }

    .el-row:nth-child(2) {
      .electric {
        .progress_bar {
          background: linear-gradient(90deg, #561f00, #853000, #f78712);

          .img {
            background: url("~@/assets/imgs/generatingCapacityDay.png")
              no-repeat;
          }
        }

        .count {
          color: #ff8300;
        }
      }
    }

    .el-header {
      display: flex;
      height: 30px;
      justify-content: flex-end;

      .title {
        font-size: 16px;
        font-family: "SourceHanSansSC-Regular";
      }

      .unit {
        color: #b1b1b1;
      }
    }

    .summarize {
      position: absolute;
      bottom: 0;
      margin-bottom: 0;
      margin-left: -25px;
      width: 100%;
      height: 80px;
      background-color: rgba(0, 0, 0, 0.2);
      border-bottom-left-radius: 8px;
      border-bottom-right-radius: 8px;
      color: #b3b3b3;
      padding: 0 35px;
      justify-content: space-between;
    align-items: center;
      .summarize-left {
        text-align: left !important;
        cursor: pointer;
      }

      .summarize-right {
        text-align: left !important;
        cursor: pointer;
      }

      p:last-child {
        margin-top: 8px;

        span:first-child {
          font-size: 18px;
          color: #ffffff;
          display: inline-block;
          width: 110px;
          text-align: left;
          font-family: "Arial";
        }
      }

      .line {
        width: 1px;
        height: 48px;
        background: #252e43;
      }
    }
  }
  .station_card {
    height: 302px;
    top: 557px;
    right: 37px;
    padding: 24px 14px;
    color: #7d838c;
    z-index: 5;

    > .card_header {
      line-height: 48px;

      .el-col:first-child {
        img {
          margin-right: 30px;
          vertical-align: -10%;
        }

        span {
          font-size: 20px;
          color: #05bb4c;
          display: inline-block;
          width: 70px;
          font-family: Arial;
          line-height: 33px;
        }
      }

      .el-col:last-child {
        text-align: right;

        span {
          padding: 0 6px;
          font-size: 20px;
          text-align: center;
          font-family: AgencyFB-Reg-Light;
          color: #ffffff;
          line-height: 33px;
        }
      }
    }

    > .el-row:last-child {
      border: none;
      margin-bottom: 0;
    }
  }

  .infos-echarts {
    padding: 10px;
    background-color: rgba(3, 5, 9, 0.5);
  }
  .model-bg-new-right {
    width: 100%;
    min-height: 135px;
    background-color: rgba(3, 5, 9, 0.5);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    // padding: 1% 5%;
    .power-charts {
      display: flex;
      flex-direction: row;
      align-items: flex-end;
      width: 100%;
      margin-top: 10px;
      .power-name-old {
        width: 80px;
        margin-bottom: 10px;
        color: #999999;
      }
      .power-name {
        width: 80px;
        margin-bottom: 20px;
        color: #999999;
      }
      .power-item {
        display: flex;
        flex-direction: column;
        width: 360px;
        .power-value-old {
          display: flex;
          flex-direction: row;
          align-items: center;
          justify-content: space-between;
          margin-bottom: -12px;
          padding: 0 15px;
          .green-value {
            color: #05bb4c;
          }
          .purple-value {
            color: #4b55ae;
          }
        }
        .power-value {
          font-size: 12px;
          margin-bottom: -31px;
          font-family: Bicubik;
          margin-left: 255px;
          span:nth-child(1) {
            width: 5px;
            height: 5px;
            border-radius: 5px;
            display: inline-block;
            background-color: #fff;
            margin-right: 5px;
          }
          .green-value {
            color: #05bb4c;
          }
          .purple-value {
            color: #4b55ae;
          }
        }
      }
    }
    .infos {
      display: flex;
      flex-direction: column;
      width: 50%;
      height: 100%;
      width: 100%;
      .titles {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        // padding: 0 15px;
        height: 50%;
        .amount {
          display: flex;
          flex-direction: row;
          align-items: center;

          .amount-image {
            margin-left: -42px;
          }

          .amount-nums {
            font-size: 12px;
            color: #7d838c;
            margin-left: 10px;
            display: flex;
            flex-direction: row;
            align-items: baseline;

            .num-item {
              font-size: 20px;
              color: #ffffff;
              margin-right: 5px;
            }
          }
        }

        .info-nums {
          display: flex;
          align-items: baseline;
          font-size: 14px;
          color: #7d838c;

          .nums {
            font-size: 20px;
            color: #ffffff;
            margin: 0 5px;
          }
        }
      }
      .tabSwitchover {
        // height: 23px;
        margin-top: 5px;
        .tabSwitchover-item {
          width: 42px;
          line-height: 23px;
          text-align: center;
          color: #b3b3b3;
          float: left;
          cursor: pointer;
        }
        .tab-active {
          border-bottom: 1px solid rgb(39, 219, 54);
          background: linear-gradient(
            to top,
            rgba(5, 187, 76, 0.5),
            rgba(5, 187, 76, 0)
          );
        }
        .unit {
          text-align: right;
          color: #b1b1b1;
          font-size: 12px;
          // float: right;
        }
      }
      .types {
        display: flex;
        flex-direction: row;
        align-items: center;
        height: 50%;
        width: 100%;
        margin-top: 15px;
        padding-bottom: 10px;
        border-bottom: 1px solid #302c2c;
        .type-model {
          display: flex;
          flex-direction: column;
          justify-content: space-between;
          align-items: center;
          width: 16%;
          // height: 75%;
          font-size: 16px;
          .type-name {
            font-size: 14px;
            font-family: Agency FB;
            margin-bottom: 10px;
          }
          .type-num {
            height: 15px;
          }
        }
      }
    }
  }
  .base-info {
    height: 186px;
    background: rgba(3, 5, 9, 0.5);
    position: absolute;
    bottom: 4%;
    left: 43px;
    display: flex;
    flex-direction: row;
    border-radius: 6px;
    .charts {
      width: 100%;
      height: 100%;
      position: relative;
      margin-left: 1%;
      .energy-title {
        // margin-left: 2%;
        margin-top: 1%;
        font-size: 16px;
        color: #fff;
      }
      .dots {
        width: 0.185vh;
        height: 0.185vh;
        border-radius: 50%;
        background-color: @write;
        position: absolute;

        &.left {
          left: 0.37vh;
        }

        &.top {
          top: 0.37vh;
        }
      }

      .charts-item {
        // margin-left: 5%;
        margin-top: 10px;
      }
    }
  }
  .model-bg-new {
    width: 100%;
    min-height: 135px;
    background-color: rgba(3, 5, 9, 0.5);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    padding: 10px;

    .titles {
      height: 45px;
      border-bottom: 1px solid #333333;
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: space-between;

      .name {
        font-size: 16px;
        color: #ffffff;
      }

      .unit {
        font-size: 12px;
        color: #b1b1b1;
      }
    }

    .save {
      display: flex;
      flex-direction: row;
      align-items: center;
      width: 100%;
      margin: 17px 0;

      .save-item {
        width: 25%;
        display: flex;
        flex-direction: column;
        align-items: center;

        .kind {
          width: 20px;
          height: 22px;

          .kind-img {
            width: 100%;
            height: 100%;
          }
        }

        .save-value {
          font-size: 16px;
          color: #ffffff;
          margin: 10px 0;
        }

        .save-name {
          font-size: 12px;
          color: #b3b3b3;
        }
      }
    }
  }
  .model-bg {
    width: 100%;
    min-height: 135px;
    // background-color: rgba(3, 5, 9, 0.5);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    padding: 1% 5%;

    .titles {
      height: 45px;
      border-bottom: 1px solid #333333;
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: space-between;

      .name {
        font-size: 16px;
        color: #ffffff;
      }

      .unit {
        font-size: 12px;
        color: #b1b1b1;
      }
    }

    .save {
      display: flex;
      flex-direction: row;
      align-items: center;
      width: 100%;
      margin: 17px 0;

      .save-item {
        width: 25%;
        display: flex;
        flex-direction: column;
        align-items: center;

        .kind {
          width: 20px;
          height: 22px;

          .kind-img {
            width: 100%;
            height: 100%;
          }
        }

        .save-value {
          font-size: 16px;
          color: #ffffff;
          margin: 10px 0;
        }

        .save-name {
          font-size: 12px;
          color: #b3b3b3;
        }
      }
    }
  }
}

.right {
  width: 450px;
  //   height: 100px;
  position: absolute;
  right: 25px;
  top: 73px;
  z-index: 2;
}

.com-panel {
  height: 100%;

  .panel-body {
    height: calc(100% - 32px);
  }
}

.top-mid-panel {
  flex: 1 1 auto;
  height: 100%;
}

.model-item {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.infos {
  display: flex;
  flex-direction: column;
  width: 50%;
  height: 100%;
  width: 370px;
  padding: 10px;
  .titles {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    height: 50%;

    .amount {
      display: flex;
      flex-direction: row;
      align-items: center;

      .amount-image {
        margin-left: -42px;
      }

      .amount-nums {
        font-size: 12px;
        color: #7d838c;
        margin-left: 10px;
        display: flex;
        flex-direction: row;
        align-items: baseline;

        .num-item {
          font-size: 20px;
          color: #ffffff;
          margin-right: 5px;
        }
      }
    }

    .info-nums {
      display: flex;
      align-items: baseline;
      font-size: 14px;
      color: #7d838c;

      .nums {
        font-size: 20px;
        color: #ffffff;
        margin: 0 5px;
      }
    }
  }

  .types {
    display: flex;
    flex-direction: row;
    align-items: center;
    height: 50%;
    width: 100%;

    .type-model {
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      align-items: center;
      width: 14%;
      height: 75%;
      font-size: 16px;

      .type-name {
        font-size: 14px;
      }
    }
  }
}

.fengji-icon {
  border-radius: 50%;
  width: 49px;
  height: 49px;
  box-shadow: inset 1.5px -1px 1px 0px @green;
  animation: fadenum 5s linear infinite;

  @keyframes fadenum {
    100% {
      transform: rotate(360deg);
    }
  }

  svg {
    width: 25px;
    height: 22px;
  }
}

.jnjp-icon {
  svg {
    width: 25px;
    height: 25px;
  }
}

.jnjp-icon1 {
  margin-top: -10px;

  svg {
    width: 40px;
    height: 40px;
  }
}
.power-charts {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  width: 100%;
  margin-top: 10px;
  .power-name-old {
    width: 80px;
    margin-bottom: 10px;
    color: #7a8385;
  }
  .power-name {
    width: 80px;
    margin-bottom: 20px;
    color: #000;
  }
  .power-item {
    display: flex;
    flex-direction: column;
    width: 360px;
    .power-value-old {
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: space-between;
      margin-bottom: -12px;
      padding: 0 15px;
      .green-value {
        color: #05bb4c;
      }
      .purple-value {
        color: #4b55ae;
      }
    }
    .power-value {
      font-size: 12px;
      margin-bottom: -31px;
      font-family: Bicubik;
      margin-left: 255px;
      span:nth-child(1) {
        width: 5px;
        height: 5px;
        border-radius: 5px;
        display: inline-block;
        background-color: #fff;
        margin-right: 5px;
      }
      .green-value {
        color: #05bb4c;
      }
      .purple-value {
        color: #4b55ae;
      }
    }
  }
}
// .power-charts {
//   display: flex;
//   flex-direction: row;
//   align-items: flex-end;
//   width: 100%;
//   margin-top: 10px;

//   .power-name {
//     width: 80px;
//     margin-bottom: 20px;
//     color: #7a8385;
//   }

//   .power-item {
//     display: flex;
//     flex-direction: column;
//     width: 300px;
//     .power-value-old {
//       display: flex;
//       flex-direction: row;
//       align-items: center;
//       justify-content: space-between;
//       margin-bottom: -12px;
//       padding: 0 15px;
//       .green-value {
//         color: #05BB4C;
//       }
//       .purple-value {
//         color: #4B55AE;
//       }
//     }
//     .power-value {
//       font-size: 12px;
//       margin-bottom: -31px;
//       font-family: Bicubik;
//       margin-left: 255px;
//       span:nth-child(1) {
//         width: 5px;
//         height: 5px;
//         border-radius: 5px;
//         display: inline-block;
//         background-color: #fff;
//         margin-right: 5px;
//       }
//       .green-value {
//         color: #05BB4C;
//       }
//       .purple-value {
//         color: #4B55AE;
//       }
//     }
//   }
// }
</style>
