/*
 *    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";
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,
  dic: [],
  column: [
    // {
    //   label: '主键',
    //   prop: 'id'
    // },
    // {
    //   label: '创建人',
    //   prop: 'createBy'
    // },
    // {
    //   label: '创建时间',
    //   prop: 'createTime'
    // },
    // {
    //   label: '更新人',
    //   prop: 'updateBy'
    // },
    // {
    //   label: '更新时间',
    //   prop: 'updateTime'
    // },
    // {
    //   label: '删除标记',
    //   prop: 'delFlag'
    // },
    // {
    //   label: '租户ID',
    //   prop: 'tenantId'
    // },
    // {
    //   label: '备注',
    //   prop: 'remarks'
    // },
    {
      label: '楼号',
      prop: 'buildingNo',
      labelWidth: 120,
      // search:true,
      editDisabled: true,
    },
    {
      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',
      sortable: true,
      editDisabled: true,
      labelWidth: 120,
      searchFilterable: true,
      filterable: true,
      search: true,
      type: 'select',
      // defaultSort: {
      //   prop: 'classNo',
      // },

      dicUrl: '/basic/basicclass/queryAllClass',
      props: {
        label: 'classNo',
        value: 'classCode',
      },
      rules: [{
        required: true,
        trigger: 'blur',
        message: "请选择班级"
      }]
    },
    {
      label: '班级状态',
      prop: 'classStatus',
      labelWidth: 120,
      addDisplay: false,
      editDisplay: false,
      type: "select",
      search: true,
      dicData: global.CLASS_STATUS,
      props: {
        label: "label",
        value: "value"
      }
    },
    {
      label: '教室位置',
      prop: 'position',
      sortable: true,
      labelWidth: 120,
      search: true,
      // searchFilterable: true,
      // editDisabled:true,
      // 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,
      type: "select",
      dicUrl: '/admin/dict/item/type/platform_type',
      props: {
        label: 'label',
        value: 'value'
      },
      rules: [{
        required: true,
        trigger: 'blur',
        message: "请选择讲台类型"
      }]
    },
    {
      label: '投影类型',
      prop: 'tyType',
      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',
      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',
      minRows: 0,
      rules: [{
        required: true,
        trigger: 'blur',
        message: "请填写方凳数量"
      }]
    },
    {
      label: '课桌数量',
      prop: 'tableCnt',
      labelWidth: 120,
      minRows: 0,
      type: 'number',
      rules: [{
        required: true,
        trigger: 'blur',
        message: "请填写课桌数量"
      }]
    },
    {
      label: '备注',
      prop: 'remarks',
      labelWidth: 120,
      type: "textarea",
      span: 24,
    },
    {
      label: '门锁密码',
      prop: 'password',
      addDisplay: false,
      editDisplay: false,
    },
  ]
}
