<template>
  <div id="data-statis">
    <div id="amap-container"></div>
    <!-- v-loading="mapLoading"
      element-loading-background="rgba(0, 0, 0, 0.2)"
      element-loading-text="地图加载中..." -->
    <div class="left-area">
      <Section class="sections" title="政府监管">
        <STable :headers="header1" :table-data="data1"> </STable>
      </Section>
      <Section class="sections" title="工程质量">
        <STable :headers="header2" :table-data="data2"> </STable>
      </Section>
      <Section class="sections" title="创新创优">
        <STable :headers="header3" :table-data="data3">
          <template slot-scope="scope">
            <template v-if="scope.header.slot == 'count'">
              <span
                >{{ scope.row.count }}/<span style="color: green">{{
                  scope.row.general
                }}</span></span
              >
            </template>
          </template>
        </STable>
      </Section>
    </div>
    <div class="right-area">
      <!-- v-if="currentCityName" -->
      <Section class="sections long" type="long" :title="currentCityName">
        <div class="get-points">
          <div class="points">
            <div class="grade" style="color: #f86262">
              {{ zfjgPoints }}
            </div>
            <div class="label">政府监管</div>
          </div>
          <div class="points">
            <div class="grade" style="color: #5aefd1">
              {{ zfjgPoints }}
            </div>
            <div class="label">质量检测</div>
          </div>
          <div class="points">
            <div class="grade" style="color: #f86262">
              {{ zfjgPoints }}
            </div>
            <div class="label">总得分</div>
          </div>
        </div>
        <!-- <div class="switch-buttons">
          <div :class="[activeTab == 1 ? 'active' : '']" @click="switchList(1)">
            政府监管
          </div>
          <div :class="[activeTab == 2 ? 'active' : '']" @click="switchList(2)">
            质量评定
          </div>
          <div :class="[activeTab == 3 ? 'active' : '']" @click="switchList(3)">
            质量检测
          </div>
        </div> -->
        <STable2
          :style="{ marginTop: '.1rem', height: 'calc(100% - 1rem)' }"
          :headers="header4_1"
          :table-data="data4"
        ></STable2>
        <!-- activeTab == 1 ? header4_1 : activeTab == 2 ? header4_2 : header4_3 -->

        <!-- <div class="no-data" v-if="activeTab == 3">
          <div class="inner">
            <img src="@/assets/images/index/no-data.png" alt="" />
            <div>暂无数据</div>
          </div>
        </div> -->
      </Section>
    </div>
    <!-- <div class="bottom-area">
      <Section2 title="工程风险监视" class="bottom-section">
        <STable2 :headers="header5" :table-data="data5">
          <template slot-scope="scope">
            <template v-if="scope.header.slot == 'count'">
              <span
                >{{ scope.row.question_count }}/<span style="color: green">{{
                  scope.row.question_general
                }}</span></span
              >
            </template>
          </template>
        </STable2>
      </Section2>
    </div> -->
    <!-- <img src="@/assets/images/index/lt.png" class="lt" alt="" />
    <img src="@/assets/images/index/rt.png" class="rt" alt="" />
    <img src="@/assets/images/index/btm.png" class="btm" alt="" /> -->
  </div>
</template>
<script>
import * as echarts from "echarts";
import { zhejiangJson } from "@/assets/data/zhejiang.js";
import {
  getMapData,
  getYearQuestion,
  getLevelQuestion,
  getStatusQuestion,
  getProjectQuestion,
  getAreaQuestionByAreaId,
} from "@/api/dataStatis";

import AMapLoader from "@amap/amap-jsapi-loader";
import { mapState } from "vuex";
import zhejiangMapData from "@/assets/data/mapData.json";
import Section2 from "@/components/common/Section2.vue";
import STable2 from "@/components/common/STable2.vue";
export default {
  name: "DataStatis",
  components: {
    Section2,
    STable2,
  },
  data() {
    return {
      mapLoading: true,
      header1: [
        {
          name: "工程名称",
          props: "project_name",
          width: "70%",
          headerStyle: {
            padding: "0 .2rem",
            textAlign: "left",
          },
          style: {
            padding: "0 .2rem",
          },
          align: "left",
        },
        { name: "政府监管得分", props: "score", width: "30%" },
      ],
      header2: [
        {
          name: "工程名称",
          props: "project_name",
          width: "70%",
          headerStyle: {
            padding: "0 .2rem",
            textAlign: "left",
          },
          style: {
            padding: "0 .2rem",
          },
          align: "left",
        },
        { name: "工程质量得分", props: "score", width: "30%" },
      ],
      header3: [
        {
          name: "工程名称",
          props: "project_name",
          width: "70%",
          headerStyle: {
            padding: "0 .2rem",
            textAlign: "left",
          },
          style: {
            padding: "0 .2rem",
          },
          align: "left",
        },
        { name: "创新创优得分", props: "score", width: "30%" },
      ],
      // header1: [
      //   {
      //     name: "市区",
      //     props: "city_name",
      //     width: "calc(100% / 5 - .1rem)",
      //   },
      //   {
      //     name: "政府监管",
      //     props: "zfjg",
      //     width: "calc(100% / 5)",
      //   },
      //   {
      //     name: "质量管理制度",
      //     props: "zlglzd",
      //     width: "calc(100% / 5 + .1rem)",
      //   },
      //   {
      //     name: "资质资格",
      //     props: "zzzg",
      //     width: "calc(100% / 5)",
      //   },
      //   {
      //     name: "实体质量",
      //     props: "stzl",
      //     width: "calc(100% / 5)",
      //   },
      // ],
      data1: [],
      // header2: [
      //   {
      //     name: "市区",
      //     props: "city_name",
      //     width: "calc(100% / 4)",
      //   },
      //   {
      //     name: "严重问题",
      //     props: "serious",
      //     width: "calc(100% / 4)",
      //   },

      //   {
      //     name: "一般问题",
      //     props: "general",
      //     width: "calc(100% / 4)",
      //   },
      //   {
      //     name: "问题总数",
      //     props: "count",
      //     width: "calc(100% / 4)",
      //   },
      // ],
      data2: [],

      // header3: [
      //   {
      //     name: "市区",
      //     props: "city_name",
      //     width: "20%",
      //   },
      //   {
      //     name: "涉及工程",
      //     props: "project_count",
      //     width: "20%",
      //   },
      //   {
      //     name: "涉及单位",
      //     props: "units_count",
      //     width: "20%",
      //   },
      //   {
      //     name: "问题总数/已处理数",
      //     props: "count",
      //     slot: "count",
      //     width: "40%",
      //   },
      // ],
      data3: [],

      header4_1: [
        {
          name: "工程名称",
          props: "name",
          width: "40%",
          headerStyle: {
            padding: "0 .2rem",
            textAlign: "left",
          },
          style: {
            padding: "0 .2rem",
          },
          align: "left",
        },
        {
          name: "工程质量",
          props: "value1",
          width: "20%",
        },
        {
          name: "质量检测",
          props: "value2",
          width: "20%",
        },
        {
          name: "总得分",
          props: "value2",
          width: "20%",
        },
      ],
      header4_2: [
        {
          name: "工程名称",
          props: "name",
          width: "calc(100% / 3)",
          headerStyle: {
            padding: "0 .2rem",
            textAlign: "left",
          },
          style: {
            padding: "0 .2rem",
          },
          align: "left",
        },
        {
          name: "单位工程",
          props: "value1",
          width: "calc(100% / 3)",
          headerStyle: {
            padding: "0 .2rem",
            textAlign: "left",
          },
          style: {
            padding: "0 .2rem",
          },
          align: "left",
          // headerStyle: {
          //   fontSize: "0.13rem",
          // },
        },
        {
          name: "得分情况",
          props: "value2",
          width: "calc(100% / 3)",
        },
      ],
      header4_3: [
        {
          name: "工程名称",
          props: "name",

          width: "70%",

          headerStyle: {
            padding: "0 .2rem",
            textAlign: "left",
          },
          style: {
            padding: "0 .2rem",
          },
          align: "left",
        },
        {
          name: "不合格率",
          props: "value1",
          width: "30%",
        },
      ],
      header4_4: [
        {
          name: "人员资格",
          props: "name",
          width: "calc(100% / 4)",
        },
        {
          name: "工程外观",
          props: "category_count_11",
          width: "calc(100% / 4)",
        },
        {
          name: "开挖与基础处理质量",
          props: "category_count_12",
          width: "calc(100% / 3)",
        },
        {
          name: "工程结构质量",
          props: "category_count_13",
          width: "calc(100% / 4)",
        },
      ],
      data4: [],

      header5: [
        {
          name: "工程名称",
          props: "project_name",
          width: "20%",
          headerStyle: {
            padding: "0 .2rem",
          },
          style: {
            padding: "0 .2rem",
          },
          align: "left",
        },
        {
          name: "标段名称",
          props: "prname",
          width: "15%",
          headerStyle: {
            padding: "0 .2rem",
          },
          style: {
            padding: "0 .2rem",
          },
          align: "left",
        },
        {
          name: "政府监管",
          props: "zfjg",
          width: "10%",
        },
        {
          name: "质量管理制度",
          props: "zlglzd",
          width: "10%",
        },
        {
          name: "资质资格",
          props: "zzzg",
          width: "10%",
        },
        {
          name: "实体质量",
          props: "stzl",
          width: "10%",
        },
        {
          name: "问题总数/已处理数",
          props: "label4",
          slot: "count",
          width: "15%",
        },
      ],
      data5: [],
      activeTab: 1,

      mapCenter: [],
      AMap: null,
      map: null,
      mapActive: 1,
      loca: null,
      renderColor: {
        A: "#208995",
        B: "#2a5dc6",
        C: "#23366f",
        D: "#a9a715",
        E: "#b74f4f",
      },
      districtArr: [],
      polygons: [],
      currentCityName: "",
      currentCityId: "",
      zfjgPoints: 0,
    };
  },
  methods: {
    initMap() {
      getMapData().then((res) => {
        var newZhejiangMapData = [];
        res.data.map((item) => {
          newZhejiangMapData.push({
            name: item.name,
            value: [
              zhejiangMapData.filter((cx) => {
                return cx.name == item.name;
              })[0].value[0],
              zhejiangMapData.filter((cx) => {
                return cx.name == item.name;
              })[0].value[1],
              item.score,
            ],
            id: item.id,
          });
          if (item.name == "杭州市") {
            this.currentCityId = item.id;
            this.currentCityName = item.name;
          }
          this.switchList(1);
        });

        this.initMapData("amap-container", zhejiangJson, newZhejiangMapData, 1);
      });
    },
    getData() {
      getYearQuestion().then((res) => {
        this.data1 = res.data;
      });
      getLevelQuestion().then((res) => {
        this.data2 = res.data;
      });
      getStatusQuestion().then((res) => {
        this.data3 = res.data;
      });
      // getProjectQuestion().then((res) => {
      //   this.data5 = res.data;
      // });
    },

    async load() {
      console.log("load");
    },

    switchList(type) {
      this.activeTab = type;
      this.data4 = [];
      if (type == 1) {
        this.data4 = [
          {
            name: "苍南县江南垟平原骨干排涝工程（龙港段）龙金运河和新兰闸站工程",
            value1: 17,
          },
          {
            name: "慈溪市水资源开发利用二期（梅湖水库扩容工程）",
            value1: 23,
          },
          {
            name: "东苕溪防洪后续西险大塘达标加固工程（杭州市段）",
            value1: 18,
          },
          {
            name: "奉化区柏坑水库扩容工程",
            value1: 19,
          },
          {
            name: "海宁市百里钱塘综合整治提升工程一期（盐仓段）",
            value1: 32,
          },
          {
            name: "杭州市本级海塘安澜工程 （三堡至乔司段海塘）一期",
            value1: 45,
          },
          {
            name: "杭州市本级海塘安澜工程（三堡船闸段海塘）",
            value1: 16,
          },
          {
            name: "杭州市本级海塘安澜工程（珊瑚沙海塘）",
            value1: 9,
          },
          {
            name: "杭州市本级海塘安澜工程（上泗南北大塘）二期",
            value1: 10,
          },
          {
            name: "杭州市萧山区西江塘义桥段古海塘抢险加固工程",
            value1: 58,
          },
          {
            name: "杭州市萧围西线（一工段至四工段）提标加固工程",
            value1: 21,
          },
          {
            name: "湖州市苕溪清水入湖河道整治后续工程（德清县段）",
            value1: 12,
          },
          {
            name: "环湖大堤（浙江段）后续工程（长兴段）",
            value1: 32,
          },
          {
            name: "嘉兴市区城市防洪扩展工程三期（封闭工程）",
            value1: 3,
          },
          {
            name: "金华市安地灌区续建配套与节水改造项目（2021-2022年）调增项目",
            value1: 4,
          },
          {
            name: "杭州市本级海塘安澜工程（珊瑚沙海塘）",
            value1: 9,
          },
        ];
        // getAreaQuestionByAreaId(this.currentCityId).then((res) => {
        //   this.data4 = res.data;
        // });
      } else if (type == 2) {
        this.data4 = [
          {
            name: "环湖大堤施工2标",
            value1: "堤防工程",
            value2: "92.8%",
          },
          {
            name: "环湖大堤施工2标",
            value1: "蔡浦港闸站工程",
            value2: "93.4%",
          },
          {
            name: "环湖大堤施工2标",
            value1: "其他口门建筑物单位工程",
            value2: "89.5%",
          },
          {
            name: "环湖大堤施工2标",
            value1: "夹浦港-秋龙港-吴城港河道堤防工程",
            value2: "93.4%",
          },
          {
            name: "环湖大堤施工2标",
            value1: "夹浦港-秋龙港-吴城港闸站第一单位工程",
            value2: "91.9%",
          },
          {
            name: "环湖大堤施工2标",
            value1: "夹浦港-秋龙港-吴城港闸站第二单位工程",
            value2: "91.1%",
          },
          {
            name: "衢州市柯城区寺桥水库工程",
            value1: "混凝土面板堆石坝",
            value2: "/",
          },
          {
            name: "衢州市柯城区寺桥水库工程",
            value1: "导流泄放洞",
            value2: "/",
          },
          {
            name: "衢州市柯城区寺桥水库工程",
            value1: "溢洪道",
            value2: "/",
          },
          {
            name: "金华市安地灌区续建配套与节水改造项目（2021-2022年）调增项目施工标【金华市安地灌区续建配套与节水改造项目（2021-2022年）IV标】",
            value1: "渠道及信息化项目",
            value2: "/",
          },
        ];
      } else if (type == 3) {
        this.data4 = [
          {
            name: "苍南县江南垟平原骨干排涝工程（龙港段）龙金运河和新兰闸站工程",
            value1: "98%",
          },
          {
            name: "慈溪市水资源开发利用二期（梅湖水库扩容工程）",
            value1: "87%",
          },
          {
            name: "东苕溪防洪后续西险大塘达标加固工程（杭州市段）",
            value1: "76.4%",
          },
          {
            name: "奉化区柏坑水库扩容工程",
            value1: "87.1%",
          },
          {
            name: "海宁市百里钱塘综合整治提升工程一期（盐仓段）",
            value1: "95.1%",
          },
          {
            name: "杭州市本级海塘安澜工程 （三堡至乔司段海塘）一期",
            value1: "98%",
          },
          {
            name: "杭州市本级海塘安澜工程（三堡船闸段海塘）",
            value1: "87%",
          },
          {
            name: "杭州市本级海塘安澜工程（珊瑚沙海塘）",
            value1: "76.4%",
          },
          {
            name: "杭州市本级海塘安澜工程（上泗南北大塘）二期",
            value1: "87.1%",
          },
          {
            name: "杭州市萧山区西江塘义桥段古海塘抢险加固工程",
            value1: "95.1%",
          },
          {
            name: "杭州市萧围西线（一工段至四工段）提标加固工程",
            value1: "98%",
          },
          {
            name: "湖州市苕溪清水入湖河道整治后续工程（德清县段）",
            value1: "87%",
          },
          {
            name: "环湖大堤（浙江段）后续工程（长兴段）",
            value1: "76.4%",
          },
          {
            name: "嘉兴市区城市防洪扩展工程三期（封闭工程）",
            value1: "87.1%",
          },
          {
            name: "金华市安地灌区续建配套与节水改造项目（2021-2022年）调增项目",
            value1: "95.1%",
          },
          {
            name: "杭州市本级海塘安澜工程（珊瑚沙海塘）",
            value1: "76.2%",
          },
        ];
      }
    },
    initMapData(mapid, baseAreaJson, mapData, maplevel) {
      var myChart = echarts.init(document.getElementById(mapid));
      echarts.registerMap(mapid, baseAreaJson);
      var outdata = []; //地图区域挂载数据
      mapData.forEach(function (item, index) {
        console.log(item);
        outdata.push({
          name: item.name,
          id: item.id,
          value: item.value[2],
          index: index,
        });
      });
      var _layoutSize = "100%";

      var option = {
        tooltip: {
          show: true,
          formatter: function (params) {
            if (
              params.seriesType == "scatter" ||
              params.seriesType == "effectScatter"
            ) {
              return false;
            }

            return params.name + "<br>" + params.value;
          },
        },
        grid: {
          left: "0%",
          right: "0%",
          top: "0%",
          bottom: "0%",
          show: true,
          borderWidth: 0,
          backgroundColor: "transparent",
        },
        // 地图的阴影底图
        geo: {
          map: mapid,
          left: 0,
          right: 0,
          bottom: 0,
          top: 0,
          aspectScale: 0.9,
          layoutCenter: ["50%", "50%"], //地图位置
          layoutSize: _layoutSize,
          itemStyle: {
            normal: {},
          },
          z: 1,
          animationDurationUpdate: 0,
          roam: false,

          data: outdata,
        },
        visualMap: {
          type: "piecewise",
          splitNumber: 2,
          min: 0,
          max: 100,
          align: "left",
          right: 20,
          bottom: 20,
          itemWidth: 60,
          itemHeight: 20,
          itemGap: 5,
          // itemSymbol: 'circle',
          orient: "vertical",
          //区域颜色
          color: ["#2f4ca3", "#8c2d2d"],
          //区域颜色范范围
          pieces: [
            { min: 0, max: 80 },
            { min: 80, max: 100 },
          ],
          textStyle: {
            color: "#eee",
            fontSize: 14,
          },
        },
        series: [
          {
            type: "map",
            map: mapid,
            aspectScale: 0.9,
            layoutCenter: ["50%", "50%"], //地图位置
            layoutSize: _layoutSize,

            label: {
              normal: {
                show: false,
                fontFamily: "SourceHanSansCN",
                fontSize: "14",
                color: "#FEFEFE",
                position: "bottom",
              },
              emphasis: {
                show: false,
                fontFamily: "SourceHanSansCN",
                fontSize: "14",
                color: "#FEFEFE",
              },
            },
            select: {
              label: {
                color: "#fff",
                show: false,
              },
              itemStyle: {
                areaColor: "#2a5dc6",
                borderColor: "#14ddf5",
              },
            },
            itemStyle: {
              normal: {
                borderColor: "#2656bb",
                borderWidth: 1,
                color: "#032359",
                areaColor: "#23366f",
              },
              emphasis: {
                shadowColor: "rgba(0, 0, 0, 1)",
                shadowBlur: 10,
                shadowOffsetX: 5,
                shadowOffsetY: 5,
                areaColor: {
                  type: "linear-gradient",
                  x: 0,
                  y: 0,
                  x2: 0,
                  y2: 1,
                  colorStops: [
                    {
                      offset: 0,
                      color: "#15b5f5", // 0% 处的颜色
                    },
                    {
                      offset: 1,
                      color: "#106fd5",
                    },
                  ],
                },
              },
            },

            z: 1,
            data: outdata.map((item) => {
              return {
                ...item,
                selected: item.name == "杭州市",
              };
            }),
            roam: false,
          },

          {
            name: "点",
            type: "scatter",
            coordinateSystem: "geo",
            symbol: (value, params) => {
              return (
                "image://" +
                require("@/assets/images/index/icon_dingwie@2x.png")
              );
            },

            colorBy: "data",
            symbolSize: 50,
            symbolOffset: [20, -20],
            label: {
              position: "inside",
              formatter: function (params) {
                console.log(params);
                return `${params.data.name}\n${params.data.value[2]}分`;
              },
              show: true,
              color: "#fff",
              fontSize: 14,
              offset: [10, -6],
            },
            z: 3,
            data: mapData,
          },
        ],
      };
      myChart.clear();
      myChart.setOption(option);
      window.addEventListener("resize", function () {
        myChart.resize();
      });
      myChart.off().on("click", (params) => {
        if (maplevel == 1 && params.componentType === "series") {
          var streetName = null;
          var areaGUID = null;

          if (params.seriesType == "map") {
            // 地图
            streetName = params.data.name;
            areaGUID = params.data.id;
          } else {
            // 散点图
            streetName = params.name.split("|")[0];
            areaGUID = params.name.split("|")[1];
          }
          console.log(params);
          this.currentCityId = params.data.id;
          this.currentCityName = params.data.name;
          this.switchList(1);
        }
      });

      this.$nextTick(() => {
        myChart.resize();
      });
      return myChart;
    },
  },

  mounted() {
    this.getData();
    this.initMap();
    window.clickDetail = this.clickDetail;
  },
  watch: {},
  destroyed() {
    this.map && this.map.destroy();
  },
  computed: {
    ...mapState(["userInfo"]),
  },
};
</script>
<style lang="less" scoped>
#data-statis {
  position: relative;
  width: 100%;
  height: 100%;
}
#amap-container {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  width: calc(100% - 900px);
  height: calc(100% - 90px);
  background: transparent !important;
  z-index: 5;
}
.left-area {
  width: 440px;
  left: 10px;
  top: 80px;
  position: fixed;
  height: calc(100% - 90px);
  z-index: 999;
}
.right-area {
  position: fixed;
  right: 10px;
  top: 80px;
  width: 440px;
  height: calc(100% - 90px);
  z-index: 999;
}
.bottom-area {
  position: fixed;
  width: calc(100% - 480px);
  left: 470px;
  bottom: 10px;
  right: 10px;
  height: calc(calc(100% - 90px) / 3 - calc(28px / 3)) !important;
  z-index: 999;
}
.sections {
  height: calc(100% / 3 - calc(28px / 3)) !important;
  margin-bottom: 14px;
  &:last-child {
    margin-bottom: 0;
  }
}
.sections.long {
  height: calc(100% - calc(28px / 3)) !important;
}
.bottom-section {
  width: 100%;
  height: 100% !important;
}
::v-deep .span-status {
  &.green {
    color: #47ae5f;
  }
  &.orange {
    color: #df7a1f;
  }
  &.red {
    color: #df441f;
  }
  &.blue {
    color: #b83be7;
  }
}
.lt {
  position: fixed;
  left: 0;
  width: 500px;
  top: 80px;
  height: 100%;
  z-index: 10;
}
.rt {
  position: fixed;
  right: 0;
  width: 500px;
  top: 80px;
  height: 100%;
  z-index: 10;
}
.btm {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: calc(calc(100% - 90px) / 3 - calc(28px / 3) + 50px) !important;
  z-index: 10;
}
.switch-buttons {
  margin-top: 10px;
  line-height: 40px;
  display: flex;
  justify-content: space-between;
  div {
    background: url("@/assets/images/index/icon_yier@2x.png");
    background-repeat: no-repeat;
    background-size: 100% 100%;
    margin-right: 4px;
    width: calc(100% / 3 - calc(8px / 3));
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    cursor: pointer;
    &:last-child {
      margin-right: 0;
    }
    &:hover,
    &.active {
      color: rgba(255, 255, 255, 1);
      background: url("@/assets/images/index/icon_yiyi@2x.png");
      background-repeat: no-repeat;
      background-size: 100% 100%;
    }
  }
}
.get-points {
  display: flex;
  justify-content: space-around;
  margin-top: 10px;
  .points {
    width: calc(100% / 3 - calc(8px / 3));
    background: url("@/assets/images/index/grade-bg.png");
    background-repeat: no-repeat;
    background-size: 100% 100%;
    margin-right: 4px;
    height: 80px;
    &:last-child {
      margin-right: 0;
    }
    .label {
      width: 70%;
      margin: 0 auto;
      text-align: center;
      line-height: 36px;
      color: #bdcae4;
      border-top: 1px solid rgba(255, 255, 255, 0.7);

      font-size: 14px;
    }
    .grade {
      line-height: 44px;
      text-align: center;
      font-size: 24px;
    }
  }
}
::v-deep .amap-marker-label {
  border: none;
  background-color: transparent;
  font-size: 14px !important;
  line-height: 14px !important;
  top: 2% !important;
  left: 10% !important;
}
.no-data {
  text-align: center;
  color: #fff;

  height: 100%;
  font-size: 20px;
  position: relative;
  img {
    width: 100px;
    vertical-align: top;
    opacity: 0.7;
  }
  .inner {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
  }
}
</style>