<template>
  <div class="form-wrap">
    <el-form
      class="search-box"
      ref="form"
      :model="form"
      :inline="true"
      label-width="140px">
      <div class="block-title">
        查询条件
      </div>
      <!-- <el-form-item
        label="通道名称"
        prop="keyWords1">
        <el-input v-model="form.keyWords1"></el-input>
      </el-form-item>
      <el-form-item
        label="起始时间"
        prop="startDate">
        <el-date-picker
          v-model="form.startDate"
          type="datetime"
          placeholder="选择日期时间">
        </el-date-picker>
      </el-form-item>
      <el-form-item
        label="截止时间"
        prop="endDate">
        <el-date-picker
          default-time="23:59:59"
          v-model="form.endDate"
          type="datetime"
          placeholder="选择日期时间">
        </el-date-picker>
      </el-form-item> -->
      <div class="btn-wrap">
        <!-- <el-button
          @click="reset">
          重置
        </el-button> -->
        <el-button
          type="primary"
          @click="getList">
          搜索
        </el-button>
      </div>
    </el-form>

    <div class="table-box">
      <!-- <div class="block-title">
        统计信息
      </div> -->
      <el-table
        border
        stripe
        :data="tableData">
        <el-table-column
          prop="name"
          label="讲解员">
        </el-table-column>
        <el-table-column
          prop="times"
          label="讲解次数">
        </el-table-column>
        <el-table-column
          prop="minutes"
          label="讲解时长">
        </el-table-column>
        <el-table-column
          prop="wordDays"
          label="上班天数">
        </el-table-column>
        <el-table-column
          prop="dutyDays"
          label="值日天数">
        </el-table-column>
        <el-table-column
          prop="restDays"
          label="休息天数">
        </el-table-column>
      </el-table>
    </div>
  </div>
</template>

<script>
import { managerStatistics } from '@/api/lf'
// import moment from 'moment'
export default {
  data () {
    return {
      channelGroupList: [],
      form: {
        // 'startDate': new Date(moment().startOf('day').format('YYYY-MM-DD HH:mm:ss')),
        // 'endDate': new Date(moment().endOf('day').format('YYYY-MM-DD HH:mm:ss')),
        // 'keyWords1': '', // 通道名称
        // 'keyWords2': '' // 通道组名称
      },
      tableData: [],
      total: 0
    }
  },
  created () {
    this.getList()
  },
  methods: {
    // 获取数据
    getList () {
      managerStatistics(this.form).then(res => {
        this.total = res.total
        this.tableData = res?.data
      })
    }
  }
}
</script>

  <style scoped>

  </style>
