<template>
  <div class="page">
    <div class="container" ref="appRef">
      <dv-loading v-if="loading">Loading...</dv-loading>
      <div v-else style="height: 100%;" class="d-flex flex-column">
        <dv-decoration-3 style="width:250px;height:30px;position: absolute;bottom: 0;left: 0px;" />

        <HeaderComponent></HeaderComponent>

        <div class="body d-flex">
          <btns></btns>
          <div class="left d-flex flex-column">
            <dv-border-box-12 style="padding: 14px;">
              <MapComponent v-show="$store.state.bigdata.type === 1"></MapComponent>
              <Map1Component v-show="$store.state.bigdata.type === 2 || $store.state.bigdata.type === 3"></Map1Component>

            </dv-border-box-12>
            <leftBottom class="mt-2"></leftBottom>
          </div>
          <div class="right d-flex flex-column ml-2">
            <dv-border-box-12><right1></right1></dv-border-box-12>
            <dv-border-box-12><right2></right2></dv-border-box-12>
            <dv-border-box-12><right3></right3></dv-border-box-12>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import drawMixin from "@/mixin/drawMixin";
import MapComponent from "./map.vue";
import Map1Component from "./map1.vue";
import HeaderComponent from "./header.vue";
import right1 from "./right1.vue";
import right2 from "./right2.vue";
import right3 from "./right3.vue";
import btns from "./btns.vue";
import leftBottom from "./leftBottom.vue"
import { index } from '@/api/system/baseForm';
import { mapActions } from "vuex"
export default {
  components: {
    MapComponent,
    Map1Component,
    HeaderComponent,
    right1,
    right2,
    right3,
    btns,
    leftBottom
  },
  mixins: [drawMixin],
  data() {
    return {
      loading: true,
      assetsData: [[],[]],
      leases: []
    }
  },
  methods: {
    ...mapActions("bigdata",{
      getLeases: "getLeases",
      getAssets: "getAssets",
      getAdventLeases: "getAdventLeases",
      getSafety: "getSafety",
    })
  },
  computed: {
  },
  mounted() {
    setTimeout(() => {
      this.loading = false;
    },500)
  },
  created() {
    this.getAssets()
    this.getLeases()
    this.getAdventLeases()
    this.getSafety()
  }
}
</script>

<style scoped lang="scss">
@import "~@/styles/scss/style.scss";
  .page {
    background: url("~@/assets/pageBg.png") no-repeat;
    background-size: cover;
    width: 100vw;
    height: 100vh;
    overflow: hidden;

    position: relative;
  }
  .container {
    width: 1920px;
    height: 1080px;
    transform-origin: 0 0;

    position: relative;
    top: 50%;
    left: 50%;

    .body {
      padding-top: 20px;
      padding-left: 13%;
      .left {
        flex-basis: 74%;

      }
      .right {
        flex: 1;
        padding-right: 60px;

        div + div {
          margin-top: .5rem;
        }
      }
    }
  }
</style>
