/*
 *    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,
  showSummary: true,
  sumColumnList: [
    {
      name: 'allAlreadyNum',
      type: 'sum'
    },
    {
      name: 'nowNum',
      type: 'sum'
    },
    {
      name: 'surplusNum',
      type: 'sum'
    },
    {
      name: 'roomEmptyNum',
      type: 'sum'
    },
    {
      name: 'roomEmptyNum5',
      type: 'sum'
    },
    {
      name: 'roomEmptyNum4',
      type: 'sum'
    },
    {
      name: 'roomEmptyNum3',
      type: 'sum'
    },
    {
      name: 'roomEmptyNum2',
      type: 'sum'
    },
    {
      name: 'roomEmptyNum1',
      type: 'sum'
    },
  ],
  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: 'buildingNo',
      editDisabled: true,
      // readonly:true,
      rules: [{
        required: true,
        message: '请填写楼号',
        trigger: 'blur'
      }]
    },
    {
      label: '层数',
      prop: 'layers',
      type: 'number',
      minRows: 1,
      maxRows: 6,
      rules: [{
        required: true,
        message: '请填写层数',
        trigger: 'blur'
      }]
    },
    {
      label: '已住人数',
      prop: 'allAlreadyNum',
      addDisplay: false,
      editDisplay: false,
    },
    {
      label: ' 现住人数',
      prop: 'nowNum',
      addDisplay: false,
      editDisplay: false,
    },
    {
      label: '剩余可住人数',
      prop: 'surplusNum',
      addDisplay: false,
      editDisplay: false,
    },
    {
      label: '空宿舍数',
      prop: 'roomEmptyNum',
      slot: true,
      addDisplay: false,
      editDisplay: false,
    },
    {
      label: '空5人宿舍数',
      prop: 'roomEmptyNum5',
      slot: true,
      addDisplay: false,
      editDisplay: false,
    },
    {
      label: '空4人宿舍数',
      prop: 'roomEmptyNum4',
      slot: true,
      addDisplay: false,
      editDisplay: false,
    },
    {
      label: '空3人宿舍数',
      prop: 'roomEmptyNum3',
      slot: true,
      addDisplay: false,
      editDisplay: false,
    },
    {
      label: '空2人宿舍数',
      prop: 'roomEmptyNum2',
      slot: true,
      addDisplay: false,
      editDisplay: false,
    },
    {
      label: '空1人宿舍数',
      prop: 'roomEmptyNum1',
      slot: true,
      addDisplay: false,
      editDisplay: false,
    },
    // {
    //   label: '房间数(间)',
    //   prop: 'roomNum',
    //   labelWidth:120,
    //   addDisplay:false,
    //   editDisplay:false,
    // },


    // {
    //   label: '管理员工号',
    //   prop: 'dormBuildingManger',
    //   filterable:true,
    //   overHidden: true,
    //   labelWidth:120,
    //   type: "select",
    //   slot:true,
    //   multiple:true,
    //   dicUrl:'/admin/user/findUserByUserType',
    //   props:{
    //     label:'realName',
    //     value:'username'
    //   },
    //   rules: [{
    //     required: true,
    //     message: '请选择管理员工号',
    //     trigger: 'blur'
    //   }]
    // },
    {
      label: '电话',
      prop: 'phone',
      labelWidth: 120,
      rules: [{
        required: true,
        message: '请填写电话',
        trigger: 'blur'
      }]
    },
    // {
    //   label: '备注',
    //   prop: 'remarks',
    //   type:'textarea',
    //   span:24
    // },
  ]
}
