<template>
  <div class="report-download-wrap">
    <bread-crumb
      :curmbFirst="curmbFirst"
      :curmbSecond="curmbSecond"
    ></bread-crumb>

    <div
      class="component-content screenSet"
      id="screenSet"
      style="min-height: 300px"
    >
      <div class="header-title">汇总与明细表下载</div>

      <el-form class="demo-form-inline">
        <el-form-item>
          <el-button size="small" type="primary" @click="download"
            >汇总与明细表下载</el-button
          >
        </el-form-item>
      </el-form>

      <!-- 删除 弹窗 -->
      <!-- <el-dialog
            title="确认要删除该项目模版吗？"
            :show-close=false
            :visible.sync="deleteVisible"
            :close-on-click-modal="false"
            width="600px"
            center>
            <p style="text-align: center;">删除后该模版将不在列表显示</p>
            <span slot="footer" class="dialog-footer">
              <el-button @click="deleteVisible=false">取 消</el-button>
              <el-button type="primary" @click="confirmDelete">删 除</el-button>
            </span>
          </el-dialog> -->
    </div>
  </div>
</template>

<script>
import BreadCrumb from '../../components/breadcrumb.vue'
import dialog from '../../components/education/template/dialog'
import { openLoading, closeLoading } from '../../utils/utils'
import * as commonUtil from '../../utils/utils'
let vm = null
export default {
  data() {
    return {
      curmbFirst: '教培项目',
      curmbSecond: '汇总与明细表下载',
    }
  },
  components: {
    BreadCrumb,
    dialogCompont: dialog,
  },
  created() {
    vm = this
  },
  mounte() {
    // commonUtil.resizeHeight();
  },
  methods: {
    // 查询列表
    download() {
      let req = {}
      // req = vm.formInline;
      openLoading(vm)
      vm.POST('stats/export/whole', req).then((res) => {
        closeLoading(vm)
        if (res.code == '000000') {
          if (res.data == 1) {
            vm.$message.success(
              '下载成功，请移至“下载报告”页面的“导出列表”中查看'
            )
          } else {
            vm.$message.error(
              '下载失败，请联系管理员或拨打咨询电话：400-006-5252'
            )
          }
        }
      })
    },
  },
}
</script>

<style lang="scss" scoped>
.report-download-wrap {
  .component-content {
    background: #fff;
    padding: 10px;
    .header-title {
      padding: 10px 12px 10px 0;
      font-size: 12px;
      color: #449284;
      border-bottom: 1px solid #efefef;
    }
    .demo-form-inline {
      margin-top: 20px;
    }
  }
}
</style>
