<template>
  <div id="mainbox" style="position: relative">
    <maiheader
      style="position: absolute; z-index: 100; width: 100%"
    ></maiheader>
    <div style="display: flex; justify-content: space-between; flex: 1">
      <!--      <div-->
      <!--        class="mainboxLeftBg animate__zoomOutLeft"-->
      <!--        style="height: 100%; width: 10px"-->
      <!--      ></div>-->
      <div class="mainboxcontent">
        <div
          style="
            position: absolute;
            left: 40px;
            padding: 5px;
            top: 80px;
            border-radius: 10px;
            z-index: 100;
            background-color: rgba(245, 245, 245, 0.6);
          "
          class="boxleft animate__animated animate__slideInLeft animate__delay-0.5s animate__slower"
        >
          <listLeft></listLeft>
        </div>
        <div class="mapbox" style="background-color: rgba(245, 245, 245, 0.6)">
          <slot>
            <Mapinit @initMap="initMap" style="position: absolute"> </Mapinit
          ></slot>

          <div
            style="
              position: absolute;
              bottom: 20px;
              padding: 5px;
              box-sizing: border-box;
              border-radius: 10px;

              width: calc(100% - 750px);

              margin: 0 auto;
              left: 0;
              right: 0;
              transform: translate(-50%);

              background-color: rgba(245, 245, 245, 0.6);
            "
            class="mapboxBottom animate__animated animate__slideInUp animate__delay-0.5s animate__slower"
          >
            <div
              style="
                display: flex;
                flex-direction: column;
                flex: 1;
                margin-right: 5px;
              "
            >
              <titileLine name="运维资源"></titileLine>
              <boxmapboxitem>
                <div style="display: flex; flex: 1">
                  <div class="mapboxBottomitemBox">
                    <div class="mapboxBottomitemItem">
                      <img src="../assets/iconban.png" alt="" />
                    </div>
                    <div style="margin-top: 5px; font-size: 12px">班组</div>
                    <div style="margin-top: 5px; font-size: 14px">12</div>
                  </div>
                  <div class="mapboxBottomitemBox">
                    <div class="mapboxBottomitemItem">
                      <img src="../assets/iconcar.png" alt="" />
                    </div>
                    <div style="margin-top: 5px; font-size: 12px">车辆</div>
                    <div style="margin-top: 5px; font-size: 14px">19</div>
                  </div>
                  <div class="mapboxBottomitemBox">
                    <div class="mapboxBottomitemItem">
                      <img src="../assets/icondian.png" alt="" />
                    </div>
                    <div style="margin-top: 5px; font-size: 12px">移动终端</div>
                    <div style="margin-top: 5px; font-size: 14px">18</div>
                  </div>
                  <div class="mapboxBottomitemBox">
                    <div class="mapboxBottomitemItem">
                      <img src="../assets/iconmc.png" alt="" />
                    </div>
                    <div style="margin-top: 5px; font-size: 12px">机器人</div>
                    <div style="margin-top: 5px; font-size: 14px">8</div>
                  </div>
                </div>
                <div style="display: flex; flex: 1">
                  <div class="mapboxBottomitemBox">
                    <div class="mapboxBottomitemItem">
                      <img src="../assets/iconxue.png" alt="" />
                    </div>
                    <div style="margin-top: 5px; font-size: 12px">无人机</div>
                    <div style="margin-top: 5px; font-size: 14px">10</div>
                  </div>
                  <div class="mapboxBottomitemBox">
                    <div class="mapboxBottomitemItem">
                      <img src="../assets/iconyuanhuan.png" alt="" />
                    </div>
                    <div style="margin-top: 5px; font-size: 12px">摄像头</div>
                    <div style="margin-top: 5px; font-size: 14px">122</div>
                  </div>
                  <div class="mapboxBottomitemBox">
                    <div class="mapboxBottomitemItem">
                      <img src="../assets/iconhouse.png" alt="" />
                    </div>
                    <div style="margin-top: 5px; font-size: 12px">备件仓库</div>
                    <div style="margin-top: 5px; font-size: 14px">10</div>
                  </div>
                  <div class="mapboxBottomitemBox">
                    <div class="mapboxBottomitemItem">
                      <img src="../assets/icon2x.png" alt="" />
                    </div>
                    <div style="margin-top: 5px; font-size: 12px">
                      应急发电车
                    </div>
                    <div style="margin-top: 5px; font-size: 14px">18</div>
                  </div>
                </div>
              </boxmapboxitem>
            </div>
            <div
              style="
                display: flex;
                flex-direction: column;
                flex: 1;
                margin-left: 5px;
                margin-right: 5px;
              "
            >
              <titileLine name="气象环境信息" :center="false"></titileLine>
              <boxmapboxitem>
                <div style="height: 10px; width: 100%"></div>
                <weather></weather>
                <div style="height: 2px; width: 100%"></div>
              </boxmapboxitem>
            </div>
            <div
              style="
                display: flex;
                flex-direction: column;
                flex: 1;
                margin-left: 5px;
              "
            >
              <titileLine name="客户域负荷信息"></titileLine>
              <boxmapboxitem :styleLy="{ padding: 0 }">
                <div
                  style="
                    display: flex;
                    width: 100%;
                    flex: 1;

                    flex-direction: column;
                  "
                >
                  <div
                    style="
                      width: 100%;
                      display: flex;
                      justify-content: space-between;
                      align-items: center;
                    "
                  >
                    <div
                      style="
                        font-size: 14px;
                        color: #333333;
                        width: 100%;
                        display: flex;
                        margin-left: 5px;
                      "
                    >
                      负荷排名前5
                    </div>
                    <div>
                      <el-tabs v-model="active">
                        <el-tab-pane
                          class="device-pane-font"
                          label="今日"
                          name="fir"
                        >
                        </el-tab-pane>
                        <el-tab-pane
                          class="device-pane-font"
                          label="本月"
                          name="scend"
                        >
                        </el-tab-pane>
                      </el-tabs>
                    </div>
                  </div>
                  <div>
                    <div
                      style="
                        font-size: 12px;
                        display: flex;
                        justify-content: space-between;
                        padding: 5px;
                      "
                    >
                      <div>
                        <span>排名</span>&nbsp&nbsp&nbsp&nbsp<span
                          >客户名称</span
                        >
                      </div>
                      <div>负荷值</div>
                    </div>
                  </div>
                  <div>
                    <div
                      class="mapboxBottomitemPaiming"
                      v-for="(item, index) in mapboxBottomitemPaimingList"
                    >
                      <span>{{ index + 1 }}</span
                      >&nbsp&nbsp

                      <span>{{ item.content }}</span
                      >&nbsp&nbsp<span
                        style="
                          display: flex;
                          flex: 1;
                          justify-content: flex-end;
                        "
                        >{{ item.num }}</span
                      >
                    </div>
                  </div>
                </div>
              </boxmapboxitem>
            </div>
          </div>
        </div>
        <div
          style="
            position: absolute;
            right: 40px;
            padding: 5px;
            top: 80px;
            border-radius: 10px;
            z-index: 100;
            background-color: rgba(245, 245, 245, 0.6);
          "
          class="boxright animate__animated animate__slideInRight animate__delay-0.5s animate__slower"
        >
          <listRight></listRight>
        </div>
      </div>
      <!--      <div-->
      <!--        class="mainboxRightBg"-->
      <!--        style="height: 100%; width: 10px; margin-left: 10px"-->
      <!--      ></div>-->
    </div>
  </div>
</template>

<script>
import Mapinit from "./mapddm";
import listLeft from "@/components/listLeft";
import weather from "@/components/weather";
import listRight from "@/components/listRight";
import titileLine from "@/components/titileLine";
import boxmapboxitem from "@/components/boxmapboxitem";
import maiheader from "@/components/header";
import animate from "animate.css";

export default {
  name: "indexfull",
  data() {
    return {
      show: false,
      active: "fir",
      mapboxBottomitemPaimingList: [
        {
          content: "客户名称 智源开发建设有限公司",
          num: "22.32",
        },
        {
          content: "启慧建筑",
          num: "112.32",
        },
        {
          content: "智源开发建设有限公司",
          num: "122.32",
        },
        {
          content: "开发建设有限公司",
          num: "132.32",
        },
        {
          content: "源开发建设有限公司",
          num: "12.32",
        },
      ],
    };
  },
  components: {
    Mapinit,
    maiheader,
    listLeft,
    weather,
    boxmapboxitem,
    titileLine,
    listRight,
  },

  mounted() {},
  methods: {
    initMap() {
      console.log(3232323);
      this.show = true;
    },
  },
};
</script>

<style scoped lang="less">
#mainbox {
  display: flex;
  flex: 1;
  height: 100%;
  width: 100%;
  flex-direction: column;
  justify-content: space-between;
  background-color: rgba(245, 245, 245, 0.6);
  overflow: hidden;
}
.mapbox {
  width: 100%;
  height: calc(100% - 310px);
  padding-left: 5px;
  padding-right: 5px;
}

.mapboxBottomitemItem {
  width: 50px;
  height: 60px;
  background: url(../assets/btn-bg-zy.png) no-repeat;
  background-size: 100% 100%;
  margin: 5px;
}
.mainboxLeftBg {
  background: url("../assets/left-bg.png") no-repeat;
  background-size: 100% 100%;
}
.mainboxRightBg {
  background: url("../assets/right-bg.png") no-repeat;
  background-size: 100% 100%;
}
.mapboxBottomitemItem img {
  width: 30px;
  height: 30px;
  margin-top: 20px;
}
.bgitemline {
}
.mainboxcontent {
  display: flex;
  flex: 1;
}
.mapboxBottom {
  display: flex;
  height: 300px;
}

.mapboxBottomitemBox {
  display: flex;
  flex: 1;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}
.mapboxBottomitemPaiming {
  background: rgba(237, 243, 251, 0.33);
  border-radius: 5px 5px 5px 5px;
  opacity: 1;
  border: 1px solid #edf3fb;
  display: flex;

  align-items: center;
  padding: 6px;
  margin-top: 2px;
  font-size: 12px;
}
.boxleft {
  flex: 1;
}
.boxright {
  flex: 1;
}
</style>
