<!--
 * @Author: daidai
 * @Date: 2022-03-04 09:23:59
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2022-05-07 11:05:02
 * @FilePath: \web-pc\src\pages\big-screen\view\indexs\index.vue
-->
<template>
  <div class="contents">
    <div class="contetn_left">
      <div class="pagetab">
        <div class="item" @click="toPage">﹤实时销售看板</div>
      </div>
      <ItemWrap class="contetn_left-top contetn_lr-aitem" title="加盟商分布" mode="left">
		<LeftBottom />
      </ItemWrap>
    </div>
    <div class="contetn_center">
	  <ItemWrap class="contetn_center-bottom contetn_lr-item" title="加盟商总数量">
		<CenterTop id="n1" />
	    <LeftTop style="height: 380px;" />
	  </ItemWrap>
      <ItemWrap class="contetn_center-bottom contetn_lr-bitem" title="产品总数量">
		<CenterTop id="n2"/>
        <CenterBottom style="height: 370px;"/>
      </ItemWrap>
    </div>
    <div class="contetn_right">
      <ItemWrap
        class="contetn_right-top contetn_lr-item"
        title="采购金额TOP100加盟商(2022年)"
		mode="left"
      >
	  <div class="table-head">
	    <div class="col-1">排名</div>
	    <div class="col-2">加盟商</div>
	    <div class="col-3">级别</div>
	    <div class="col-4">采购金额(元)</div>
	  </div>
	  <RightTop />
      </ItemWrap>
      <ItemWrap
        class="contetn_right-bottom contetn_lr-bitem"
        title="销售数量/金额TOP100产品(2022年)"
		mode="left"
      >
	  <div class="tab-panel">
		  <span :class="curTab==1?'active':''" @click="curTab=1">按数量</span>
		  <span :class="curTab==2?'active':''" @click="curTab=2">按金额</span>
	  </div>
	  <div class="table-head">
	    <div class="col-1">排名</div>
	    <div class="col-2">产品编码</div>
	    <div class="col-3">产品分类</div>
	    <div class="col-4">{{curTab==1?'销售数量':'销售金额(元)'}}</div>
	  </div>
	  <RightBottom :curTab="curTab"/>
      </ItemWrap>
    </div>
  </div>
</template>

<script>
import LeftTop from "./left-top.vue";
import LeftBottom from "./left-bottom.vue";
import CenterTop from "./center-top.vue"
import CenterBottom from "./center-bottom.vue";
import RightTop from "./right-top.vue";
import RightBottom from "./right-bottom.vue";

export default {
  components: {
    LeftTop,
    LeftBottom,
	CenterTop,
    RightTop,
    RightBottom,
    CenterBottom,
  },
  data() {
    return {
		curTab:1
    };
  },
  filters: {
    numsFilter(msg) {
      return msg || 0;
    },
  },
  created() {
  },

  mounted() {},
  methods: {
	toPage(){
		this.$router.push({name:'index'})
	}
  },
};
</script>
<style lang="scss" scoped>
// 内容
.contents {
  .contetn_left,
  .contetn_right {
    width: 540px;
    box-sizing: border-box;
    // padding: 16px 0;
  }

  .contetn_center {
    width: 760px;
  }
  
  //左右两侧 三个块
  .contetn_left-top, .contetn_right-top{
	  margin-top: 15px;
  }
  .contetn_lr-item {
    height: 480px;
  }
  .contetn_lr-bitem {
    height: 480px;
  }
  .contetn_lr-aitem {
    height: 980px;
  }

  .contetn_center_top {
    width: 100%;
  }

  // 中间
  .contetn_center {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
  }
  .contetn_center-top{
	margin-top: 10px;
  }
   
  //左边 右边 结构一样
  .contetn_left,
  .contetn_right {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
  }
  .tab-panel{
	  display: flex;
	  align-items: center;
	  position: absolute;
	  right: 0;
	  top: -25px;
	  z-index: 1000;
	  > span{
		  display: block;
		  cursor: pointer;
		  padding: 0 10px;
		  border-right: 1px solid #999;
		  &:last-child{
			  border: 0;
		  }
		  color: rgba(255, 255, 255, 0.4);
	  }
	  .active{
		  color: rgba(255, 255, 255, 0.8);
	  }
  }
  .table-head{
	  display: flex;
	  align-items: center;
	  .col-1{
		  width: 10%;
	  }
	  .col-2{
	  		  width: 30%;
	  }
	  .col-3{
	  		  width: 30%;
	  }
	  .col-4{
	  		  width: 30%;
	  }
	  > div{
		  text-align: center;
		  padding: 5px 0;
		  color: rgba(0, 170, 255, 0.8);
	  }
  }
}


@keyframes rotating {
    0% {
        -webkit-transform: rotate(0) scale(1);
        transform: rotate(0) scale(1);
    }
    50% {
        -webkit-transform: rotate(180deg) scale(1.1);
        transform: rotate(180deg) scale(1.1);
    }
    100% {
        -webkit-transform: rotate(360deg) scale(1);
        transform: rotate(360deg) scale(1);
    }
}
</style>
