/*
 *    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,
  searchBtn:false,
  refreshBtn:false,
  columnBtn:false,
  dic: [],
  column: [
    {
      label: '年级',
      prop: 'grade',
    },
    {
      label: '班号',
      prop: 'classNo',
      search:true
    },
	  {
      label: '学号',
      prop: 'stuNo',
      search:true
    },
    {
      label: '姓名',
      prop: 'realName',
      search:true
    }
  ]
}


export const detailOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  editBtn: false,
  delBtn: false,
  addBtn: false,
  searchBtn:false,
  refreshBtn:false,
  columnBtn:false,
  dic: [],
  column: [
    {
      label: '学年',
      prop: 'schoolYear',
      search:true,
      type:'select',
      dicUrl:'/basic/basicyear/queryAllSchoolYear',
      props:{
        label:'year',
        value:'year'
      },
    },
    {
      label: '学期',
      prop: 'schoolTerm',
      search:true,
      type:'select',
      dicData:global.LEARN_TERM,
      props:{
        label:'label',
        value:'value'
      },
    },
    {
      label: '班号',
      prop: 'classNo',
      addDisplay:false,
      addDisabled:true,
      search:true
    },
    {
      label: '课程代码',
      prop: 'courseCode',
    },
    {
      label: '课程名称',
      prop: 'courseName',
    },
    {
      label: '课程性质',
      prop: 'courseProperties',
      search:true,
      type:'select',
      dicUrl: '/ems/courseproperties/list',
      props:{
        label:'propertiesName',
        value:'id'
      },
    },
    {
      label: '平时成绩(20%)',
      prop: 'normalScore',
      width:150,
      slot:true,
      addDisplay:false,
      addDisabled:true,
    },
    {
      label: '期中成绩(30%)',
      prop: 'midtermScore',
      width:150,
      slot:true,
      addDisplay:false,
      addDisabled:true,
    },
    {
      label: '期末成绩(50%)',
      prop: 'finalScore',
      width:150,
      slot:true,
      addDisplay:false,
      addDisabled:true,
    },
    {
      label: '学分',
      prop: 'point',
    },
    {
      label: '成绩类型',
      prop: 'pointSystemValue',
      type:'select',
      dicData:global.POINT_TYPE,
      props:{
        label:'label',
        value:'value'
      },
      addDisplay:true,
      addDisabled:false,
    },
    {
      label: '成绩等级',
      prop: 'pointValue',
      type:'select',
      dicData:global.SCORE_LEVEL,
      props:{
        label:'label',
        value:'value'
      },
      hide:true,
      addDisplay:true,
      addDisabled:false,
    },
    {
      label: '总评成绩',
      prop: 'totalMark',
      slot:true
    },
    {
      label: '补考成绩',
      prop: 'makeUpScore',
      width:150,
      slot:true,
      addDisplay:false,
      addDisabled:true,
    },
    {
      label: '重修成绩',
      prop: 'rebuildScore',
      width:150,
      slot:true,
      addDisplay:false,
      addDisabled:true,
    },
  ]
}
