<template>
  <el-dialog
    class="statistics-detail-dialog"
    :visible.sync="modalIsShow"
    title="详情信息"
    top="10vh"
    width="620px"
    :close-on-click-modal="false"
    :close-on-press-escape="false"
    append-to-body
    destroy-on-close
  >
    <el-table ref="TableList" :data="contents">
      <el-table-column prop="clazzName" label="班级"></el-table-column>
      <el-table-column prop="examPrintPlanName" label="印刷计划">
        <span slot-scope="scope">{{ scope.row.examPrintPlanName }}</span>
      </el-table-column>
      <el-table-column prop="paperNumber" label="试卷编号">
        <span slot-scope="scope">{{ scope.row.paperNumber }}</span>
      </el-table-column>
      <el-table-column prop="status" label="状态">
        <span slot-scope="scope">
          {{ STATUS_TYPE[scope.row.status] }}
        </span>
      </el-table-column>
    </el-table>
    <div slot="footer">
      <el-button @click="cancel">关闭</el-button>
    </div>
  </el-dialog>
</template>

<script>
export default {
  name: "statistics-detail-dialog",
  props: {
    contents: {
      type: Array,
      default() {
        return [];
      }
    }
  },
  data() {
    return {
      modalIsShow: false,
      STATUS_TYPE: {
        FINISH: "该班级命题任务已完成印刷",
        UN_FINISH: "该班级命题任务未完成印刷",
        EXCEPTION: "异常:包含该班级的命题任务印刷了多次"
      }
    };
  },
  methods: {
    cancel() {
      this.modalIsShow = false;
    },
    open() {
      this.modalIsShow = true;
    }
  }
};
</script>
