/*
 *    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.
 *
 */
const DIC = {
  state: [{
    label: '待审核',
    value: '0'
  },
    {
      label: '通过',
      value: '1'
    }, {
      label: '驳回',
      value: '2'
    }
  ],
  isAward: [{
    label: '否',
    value: '0'
  },
    {
      label: '是',
      value: '1'
    }
  ],
  competingType: [{
    label: '单人',
    value: '0'
  },
    {
      label: '多人',
      value: '1'
    }
  ],
}
export const tableOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  editBtn: false,
  delBtn: false,
  addBtn: false,
  dialogHeight:700,
  dic: [],
  column: [
	  {
      label: '所在部门',
      prop: 'deptCode',
      type:'select',
      search:true,
      dicUrl: '/basic/basicdept/getDeptListByLevelTwo',
      props: {
        label: 'deptName',
        value: 'deptCode'
      },
      rules: [{
        required: true,
        message: "请选择所在部门",
        trigger: "blur"
      }]
    },
    {
      label: '比赛项目',
      prop: 'competingName',
      editDisplay: false,
      addDisplay: false
    },
    {
      label: '比赛项目',
      prop: 'competingIdVal',
      type:'select',
      dicUrl: '/ems/competingprojects/list',
      props: {
        label: 'name',
        value: 'id'
      },
      hide: true,
      search: true,
      editDisplay: false,
      addDisplay: false
    },
	  {
      label: '比赛项目',
      prop: 'competingId',
      hide: true,
      formslot:true,
      rules: [{
        required: true,
        message: "请选择竞赛项目",
        trigger: "blur"
      }]
    },
    {
      label: '竞赛类型',
      prop: 'competingType',
      type: 'select',
      dicData: DIC.competingType,
      search: true,
      rules: [{
        required: true,
        message: "请选择竞赛类型",
        trigger: "blur"
      }]

    },
    {
      label: '完成度',
      prop: 'progress',
      formslot:true,
      slot:true,
      addDisplay: false,
      editDisplay: false,
    },
    {
      label: '组别',
      prop: 'groupName',
      editDisplay: false,
      addDisplay: false
    },
	  {
      label: '组别',
      prop: 'groupId',
      formslot:true,
      hide: true,
      rules: [{
        required: true,
        message: "请选择组别",
        trigger: "blur"
      }]
    },
    {
      label: '级别',
      prop: 'levelName',
      editDisplay: false,
      addDisplay: false
    },
	  {
      label: '级别',
      prop: 'levelId',
      formslot:true,
      hide:true,
      rules: [{
        required: true,
        message: "请选择级别",
        trigger: "blur"
      }]
    },
    {
      label: '奖项',
      prop: 'prizeName',
      editDisplay: false,
      addDisplay: false
    },



    {
      label: '指导教师',
      prop: 'teacherName',
      editDisplay: false,
      addDisplay: false
    },
    {
      label: '指导教师',
      prop: 'teacherNos',
      type:'select',
      filterable:true,
      multiple:true,
      props:{
        label:'realName',
        value:'teacherNo'
      },
      dicUrl:'/professional/teacherbase/queryTeacherBase',
      hide:true,
      rules: [{
        required: true,
        message: "请填写指导教师",
        trigger: "blur"
      }]
    },
    {
      label: '参赛学生',
      prop: 'competeStuNo',
      span:24,
      formslot:true,
      hide:true,
    },


    {
      label: '奖项',
      prop: 'prizeId',
      formslot:true,
      hide: true,
    },

    {
      label: '是否获奖',
      prop: 'isAward',
      type: 'select',
      dicData: DIC.isAward,
      search: true

    },
    {
      label: '获奖学生',
      prop: 'realName',
      editDisplay: false,
      addDisplay: false
    },
    {
      label: '获奖学生',
      prop: 'stuNo',
      formslot:true,
      hide:true
    },


    {
      label: '获奖时间',
      prop: 'certificateTime',
      type: 'date',
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd HH:mm:ss'
    },
	  {
      label: '获奖证书',
      prop: 'certificateUrl',
      hide:true,
      formslot:true
    },
	  {
      label: '状态',
      prop: 'state',
      type: 'select',
      dicData: DIC.state,
      search: true,
      addDisplay:false,
      editDisplay:false,
    },
	  {
      label: '审核备注',
      prop: 'examRemark',
      addDisplay:false,
      editDisplay:false,
    },

    {
      label: '备注',
      type:'textarea',
      row:true,
      span:24,
      prop: 'remarks'
    },
  ]
}
