/*
 *    Copyright (c) 2018-2025, lengleng All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: lengleng (493840844@qq.com)
 */

export const tablecateOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  editBtn: false,
  delBtn: false,
  addBtn: false,
  column: [
    {
      label: '题库',
      prop: 'cateName',
    },
    {
      label: '最高分',
      prop: 'highScore'
    },
    {
      label: '最低分',
      prop: 'lowScore'
    },
  ]
}


export const tableOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  editBtn: false,
  delBtn: false,
  addBtn: false,
  menu:false,
  column: [
    {
      label: '题库',
      prop: 'cateName',
    },
	  {
      label: '工号',
      prop: 'username',
      search:true
    },
    {
      label: '最高分',
      prop: 'highScore'
    },
    {
      label: '最低分',
      prop: 'lowScore'
    },
  ]
}


export const staticsOptions = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  editBtn: false,
  delBtn: false,
  addBtn: false,
  column: [
    {
      label: '部门/班级/单位',
      prop: 'deptName',
    },
    {
      label: '总人数',
      prop: 'totalNum',
    },
    {
      label: '已答',
      prop: 'hasAnswer'
    },
    {
      label: '未答',
      prop: 'noAnswer'
    },
    {
      label: '平均分',
      prop: 'avgScore'
    },
    {
      label: '满分率(%)',
      prop: 'fullPercent'
    }
  ]
}


export const detailTableOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  editBtn: false,
  delBtn: false,
  addBtn: false,
  column: [
    {
      label: '工号/学号',
      prop: 'username',
    },
    {
      label: '姓名',
      prop: 'realName',
    },
    {
      label: '首次得分',
      prop: 'firScore',
    },
    {
      label: '最高得分',
      prop: 'highScore',
    },
    {
      label: '本次得分',
      prop: 'totalScore'
    },
    {
      label: '完成时间',
      prop: 'createTime'
    },
  ]
}

export const detailNoAnswerTableOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  editBtn: false,
  delBtn: false,
  addBtn: false,
  column: [
    {
      label: '工号/学号',
      prop: 'teacherNo',
      slot:true
    },
    {
      label: '姓名',
      prop: 'realName',
    }
  ]
}
