/*
 *    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 {number} from "echarts/src/export";

export const tableOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  editBtn: false,
  delBtn: false,
  addBtn: false,
  dic: [],
  showSummary: true,
  sumColumnList: [
    {
      label:'人数总计:',
      name: 'stuNum',
      type: 'sum',
      // decimals:1
    },

  ],
  column: [
    {
      label:'学院',
      prop: 'deptName',
      labelWidth: 120,
      addDisplay:false,
      editDisplay:false,
      span: 12,
      search:true,
      type:'select',
      dicUrl: '/basic/basicdept/getDeptList?secondFlag=1',
      props: {
        label: 'deptName',
        value: 'deptName'
      },
    },
    {
      label: '班号',
      prop: 'classCode',
      labelWidth: 120,
      searchFilterable:true,
      filterable:true,
      type:'select',
      dicUrl:'/basic/basicclass/list',
      props:{
        label: 'classNo',
        value: 'classCode',
      },
      rules: [{
          required: true,
          trigger: 'blur',
          message:"请选择班级"
        }]
    },
    {
      label: '教室位置',
      prop: 'position',
      labelWidth: 120,
      addDisplay:false,
      editDisplay:false
    },
    {
      label: '人数',
      prop: 'stuNum',
      labelWidth: 120,
      addDisplay:false,
      editDisplay:false
    },
    {
      label: '班主任',
      prop: 'teacherRealName',
      addDisplay:false,
      editDisplay:false
    },
	  {
      label: '讲台类型',
      prop: 'platformType',
      labelWidth: 120,
      search:true,
      type:"select",
      dicUrl:'/admin/dict/item/type/platform_type',
      props:{
        label:'label',
        value:'value'
      },
      rules: [{
        required: true,
        trigger: 'blur',
        message:"请选择讲台类型"
      }]
    },
	  {
      label: '投影类型',
      prop: 'tyType',
      search:true,
      labelWidth: 120,
      type:"select",
      dicUrl:'/admin/dict/item/type/ty_type',
      props:{
        label:'label',
        value:'value'
      },
      rules: [{
        required: true,
        trigger: 'blur',
        message:"请选择投影类型"
      }]
    },
	  {
      label: '电视机',
      prop: 'tvType',
      search:true,
      labelWidth: 120,
      type:"select",
      dicUrl:'/admin/dict/item/type/tv_type',
      props:{
        label:'label',
        value:'value'
      },
      rules: [{
        required: true,
        trigger: 'blur',
        message:"请选择电视机"
      }]
    },
	  // {
    //   label: '吊扇正常数量',
    //   prop: 'ceilingFanOkCnt',
    //   labelWidth: 120,
    //   type:'number',
    //   rules: [{
    //     required: true,
    //     trigger: 'blur',
    //     message:"请填写吊扇正常数量"
    //   }]
    // },
	  // {
    //   label: '吊扇损坏数量',
    //   prop: 'ceilingFanErrorCnt',
    //   labelWidth: 120,
    //   type:'number',
    //   rules: [{
    //     required: true,
    //     trigger: 'blur',
    //     message:"请填写吊扇损坏数量"
    //   }]
    // },
	  {
      label: '方凳数量',
      prop: 'chairCnt',
      labelWidth: 120,
      type:'number',
      rules: [{
        required: true,
        trigger: 'blur',
        message:"请填写方凳数量"
      }]
    },
    {
      label: '方凳缺少数量',
      prop: 'chairCntLack',
    },
	  {
      label: '课桌数量',
      prop: 'tableCnt',
      labelWidth: 120,
      type:'number',
      rules: [{
        required: true,
        trigger: 'blur',
        message:"请填写课桌数量"
      }]
    },
    {
      label: '方凳缺少数量',
      prop: 'tableCntLack',
    },
  ]
}
