/*
 *    Copyright (c) 2018-2025, cyweb 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.
 *
 */
import global from "@/components/tools/commondict"


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: 'schoolYear',
      type:'select',
      // search:true,
      dicUrl:'/basic/basicyear/queryAllSchoolYear',
      props:{
        label:'year',
        value:'year'
      },
      rules: [
        {
          required: true,
          trigger: 'blur',
          message:"选择学年"
        }
      ]
    },
    {
      label: '学期',
      prop: 'schoolTerm',
      type:'select',
      // search:true,
      dicData:global.LEARN_TERM,
      props:{
        label:'label',
        value:'value'
      },
      rules: [
        {
          required: true,
          trigger: 'blur',
          message:"选择学期"
        }
      ]
    },
    {
      label: '开课部门',
      prop: 'openDeptName',
      display:false,
    },
    // {
    //   label: '所属学院',
    //   prop: 'deptName',
    //   display:false,
    // },
    // {
    //   label: '任课教师',
    //   prop: 'teacherName',
    //   display:false
    // },
    {
      label: '班级',
      prop: 'deptNameAndClassNo',
      display:false,
    },
    {
      label: '班级',
      prop: 'classNo',
      display:false,
      hide:true
    },
    {
      label: '学号',
      prop: 'stuNo'
    },
    {
      label: '姓名',
      prop: 'realName'
    },
    {
      label: '课程名称',
      prop: 'courseName',
    },
    {
      label: '任课教师',
      prop: 'teacherRealName',
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      visdiplay:false
    },
    {
      label: '课程性质',
      prop: 'propertiesName'
    },
    {
      label: '平时成绩',
      prop: 'normalScoreLabel',
      hide:true,
    },
    {
      label: '期中成绩',
      prop: 'midScoreLabel',
      hide:true,
    },
    {
      label: '期末成绩',
      prop: 'finalScoreLabel',
      hide:true,
    },
    {
      label: '总评',
      prop: 'totalMark',
      slot:true
    },
    {
      label: '补考',
      prop: 'makeUpScore',
      slot:true
    },
    {
      label: '重修',
      prop: 'rebuildScore',
      slot:true
    }
  ]
}


export const authTableOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  editBtn: false,
  delBtn: false,
  addBtn: false,
  menu:false,
  selection: true,
  reserveSelection:false,
  column: [
    {
      label: '学年',
      prop: 'schoolYear',
      type:'select',
      search:true,
      dicUrl:'/basic/basicyear/queryAllSchoolYear',
      props:{
        label:'year',
        value:'year'
      },
      rules: [
        {
          required: true,
          trigger: 'blur',
          message:"选择学年"
        }
      ]
    },
    {
      label: '学期',
      prop: 'schoolTerm',
      type:'select',
      search:true,
      dicData:global.LEARN_TERM,
      props:{
        label:'label',
        value:'value'
      },
      rules: [
        {
          required: true,
          trigger: 'blur',
          message:"选择学期"
        }
      ]
    },
    {
      label: '开课部门',
      prop: 'openDeptName',
      display:false,
    },
    {
      label: '班级',
      prop: 'classNo',
      display:false,
    },
    {
      label: '学号',
      prop: 'stuNo'
    },
    {
      label: '姓名',
      prop: 'realName'
    },
    {
      label: '课程名称',
      prop: 'courseName',
    },
    {
      label: '课程性质',
      prop: 'propertiesName'
    },
    {
      label: '任课教师',
      prop: 'courseTeacherRealName'
    },
    {
      label: '平时成绩',
      prop: 'normalScore',
      hide:true,
    },
    {
      label: '期中成绩',
      prop: 'midtermScore',
      hide:true,
    },
    {
      label: '期末成绩',
      prop: 'finalScore',
      hide:true,
    },
    {
      label: '总评',
      prop: 'totalMark',
    },
    {
      label: '补考',
      prop: 'makeUpScore',
      slot:true
    },
    {
      label: '重修',
      prop: 'rebuildScore',
      slot:true
   },
    {
      label: '录入人',
      prop: 'teacherRealName'
    },
  ]
}
