<!--
 * @Description: 话务综合统计
 * @Author: 王晓颖
 * @Date: 2020-04-24
 -->
<template>
  <app-container>
    <call-search :size="size" @search="search"/>
    <!--呼入呼出统计-->
    <div class="monitor-title">话务综合统计</div>
    <call-statics ref="callstatics" :query="listQuery"/>
    <el-row :gutter="10">
      <el-col :span="12">
        <border-frame title="满意度统计">
          <satisfied-pie ref="satisfiedpie" :query="listQuery"/>
        </border-frame>
      </el-col>
      <el-col :span="12">
        <border-frame title="接通率统计">
          <call-rate-pie ref="callratepie" :query="listQuery"/>
        </border-frame>
      </el-col>
    </el-row>
  </app-container>
</template>

<script>
import CallStatics from '../../monitor/realtimeMonitor/components/callStatics'
import AppContainer from '../../../components/layout/AppContainer'
import SatisfiedPie from './components/satisfiedPie'
import BorderFrame from '../../../components/frame/borderFrame'
import CallRatePie from './components/callRatePie'
import CallSearch from './components/callSearch'
export default {
  name: 'AllStatistic',
  components: { CallSearch, CallRatePie, BorderFrame, SatisfiedPie, AppContainer, CallStatics },
  data() {
    return {
      listQuery: {
        startTime: '',
        endTime: ''
      }
    }
  },
  methods: {
    search(listQuery) {
      this.listQuery = listQuery
      const vm = this
      setTimeout(function() {
        vm.$refs.callstatics.search()
        vm.$refs.satisfiedpie.search()
        vm.$refs.callratepie.search()
      }, 100)
    }
  }
}
</script>

<style rel="stylesheet/scss" lang="scss" scoped>
  .monitor-title{
    line-height: 2;
    font-size: 18px;
    font-weight: 700;
    padding: 5px;
    text-align: center;
  //background-color: #9accf3;
    background-color: #F5F7FA;
  }
</style>
