<template>
  <div id="smartDatav">
    <dv-full-screen-container class="bg">
      <dv-loading v-if="loading">Loading...</dv-loading>
      <div v-else class="host-body" style="width: 100%;height: 100%;">
        <headBtn></headBtn>
        <div class="d-flex jc-center">
          <dv-decoration-10 style="width:33.3%;height:.0625rem;" />
          <div class="d-flex jc-center">
            <dv-decoration-8 :color="['#568aea', '#000000']" style="width:2.5rem;height:.625rem;" />
            <div class="title">
              <span class="title-text">公安警务数据分析</span>
              <dv-decoration-6
                class="title-bototm"
                :reverse="true"
                :color="['#50e3c2', '#67a1e5']"
                style="width:3.125rem;height:.1rem;"
              />
            </div>
            <dv-decoration-8
              :reverse="true"
              :color="['#568aea', '#000000']"
              style="width:2.5rem;height:.625rem;"
            />
          </div>
          <dv-decoration-10 style="width:33.3%;height:.0625rem; transform: rotateY(180deg);" />
        </div>

        <!-- 第二行 -->
        <div class="d-flex jc-between px-2">
          <div class="d-flex" style="width: 40%">
            <div
              class="react-right ml-4"
              style="width: 6.25rem; text-align: left;background-color: #0f1325;"
            >
              <!-- <span class="react-before"></span>
              <span class="text">数据概况</span> -->
            </div>
            <div class="react-right ml-3" style="background-color: #0f1325;" >
              <!-- <span class="text colorBlue">数据分析11</span> -->
            </div>
          </div>
          <div style="width: 40%" class="d-flex">
            <div class="react-left mr-3" style="background-color: #0f1325;">
              <!-- <span class="text fw-b">小区数据</span> -->
            </div>
            <div
              class="react-left mr-4"
              style="width: 6.25rem; background-color: #0f1325; text-align: right;"
            >
              <span class="react-after"></span>
              <span class="text">{{dateYear}} {{dateWeek}} {{dateDay}}</span>
            </div>
          </div>
        </div>
        <div class="d-flex" style="width: 100%;">
          <div style="width: 40%;">
            <dv-border-box-7 :color="['rgba(0,0,0,0)','#07fcfd']" backgroundColor="rgba(29,89,159,.1)">
              <leftCmp1></leftCmp1>
              <leftCmp2></leftCmp2>
              <leftCmp3></leftCmp3>
              <leftCmp4></leftCmp4>
            </dv-border-box-7>
          </div>
          <div style="width: 60%;">
            <dv-border-box-7 :color="['rgba(0,0,0,0)','#07fcfd']" backgroundColor="rgba(29,89,159,.1)">
              <centerCmp1></centerCmp1>
                <centerCmp2></centerCmp2>
                <centerCmp3></centerCmp3>
                <centerCmp4></centerCmp4>
            </dv-border-box-7>
          </div>
          <div style="width: 40%;">
            <dv-border-box-7 :color="['rgba(0,0,0,0)','#07fcfd']" backgroundColor="rgba(29,89,159,.1)">
              <rightCmp1></rightCmp1>
              <rightCmp2></rightCmp2>
              <rightCmp3></rightCmp3>
            </dv-border-box-7>
          </div>
        </div>
      </div>
    </dv-full-screen-container>
  </div>
</template>

<script>
import { formatTime } from './utils/index.js'
import headBtn from "./components/headBtn.vue"
import leftCmp1 from "./components/policeDataCmp/leftCmp1.vue";
import leftCmp2 from "./components/policeDataCmp/leftCmp2.vue";
import leftCmp3 from "./components/policeDataCmp/leftCmp3.vue";
import leftCmp4 from "./components/policeDataCmp/leftCmp4.vue";
import centerCmp1 from "./components/policeDataCmp/centerCmp1.vue";
import centerCmp2 from "./components/policeDataCmp/centerCmp2.vue";
import centerCmp3 from "./components/policeDataCmp/centerCmp3.vue";
import centerCmp4 from "./components/policeDataCmp/centerCmp4.vue";
import rightCmp1 from "./components/policeDataCmp/rightCmp1.vue";
import rightCmp2 from "./components/policeDataCmp/rightCmp2.vue";
import rightCmp3 from "./components/policeDataCmp/rightCmp3.vue";
export default {
  data () {
    return {
      loading: true,
      dateDay: null,
      dateYear: null,
      dateWeek: null,
      weekday: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
    };
  },
  components: {
    headBtn,
    leftCmp1,
    leftCmp2,
    leftCmp3,
    leftCmp4,
    centerCmp1,
    centerCmp2,
    centerCmp3,
    centerCmp4,
    rightCmp1,
    rightCmp2,
    rightCmp3
  },
  mounted () {
    this.timeFn();
    this.cancelLoading();
  },
  methods: {
    jump(v){

    },
    timeFn () {
      setInterval(() => {
        this.dateDay = formatTime(new Date(), 'HH: mm: ss');
        this.dateYear = formatTime(new Date(), 'yyyy-MM-dd');
        this.dateWeek = this.weekday[new Date().getDay()];
      }, 1000)
    },
    cancelLoading () {
      setTimeout(() => {
        this.loading = false;
      }, 500);
    }
  }
};
</script>

<style lang="scss">
@import './assets/scss/index.scss';
  .bottom-ani-circle{
        width:  80%;
        height: 80%;
        position: absolute;
        left: 50%;
        bottom: 0;
        background: url(./assets/circle.png) no-repeat center;
        background-size: 100%;
        transform-style: preserve-3d;
        transform: translateX(-50%) rotateX(75deg) translateY(120%);
        animation: rotate3 20s linear infinite;
  }
  @keyframes rotate3{
    0% {
        transform: translateX(-50%) rotateX(75deg) translateY(120%) rotateZ(0) ;
    }
    100% {
        transform: translateX(-50%) rotateX(75deg) translateY(120%) rotateZ(360deg);
    }
  }

</style>
