/*
 *    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.
 *
 */
export const wxstat=[
  {
    label:'正常',
    value:'0'
  },
  {
    label:'维修',
    value:'1'
  },
  {
    label:'维护',
    value:'2'
  },
  {
    label:'维修申请中',
    value:'3'
  }
]
export const tableOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  editBtn: false,
  delBtn: false,
  addBtn: false,
  dic: [],
  column: [
	  {
      label: '学院',
      prop: 'deptCode',

      search: true,
      type:"select",
      dicUrl: '/basic/basicdept/getDeptList?secondFlag=1',
      props: {
        label: 'deptName',
        value: 'deptCode'
      },
      rules: [{
        required: true,
        message: '学院不能为空',
        trigger: 'blur'
      }]
    },
    {
      label: '所属区域',
      prop: 'buildingId',
      search: true,
      type:"select",
      dicUrl: '/asset/checkbuilding/list',
      props: {
        label: 'areaName',
        value: 'id'
      },
      rules: [{
        required: true,
        message: '所属区域不能为空',
        trigger: 'blur'
      }]
    },
	  // {
    //   label: '状态',
    //   prop: 'assetState',
    //   type:'select',
    //   dicData:wxstat,
    //   props:{
    //     label:'label',
    //     value:'value'
    //   },
    //   search:true,
    //   addDisplay:false,
    //   editDisplay:false,
    //
    // },
	  {
      label: '班级',
      prop: 'classCode',
      type:"select",
      filterable:true,
      dicUrl:'/basic/basicclass/list',
      props:{
        label: 'classNo',
        value: 'classCode',
      },
    },
	  {
      label: '任课教师',
      prop: 'teacherNo',
      type:'select',
      filterable:true,
      dicUrl:'/professional/teacherbase/TeacherBaseList',
      props:{
        label:'realName',
        value:'teacherNo'
      },
    },
    {
      label: '设备名称',
      prop: 'goodsName',
      rules: [{
        required: true,
        message: '设备名称不能为空',
        trigger: 'blur'
      }]
    },
    {
      label: '规格/型号',
      prop: 'spec',
      labelWidth:100,

      rules: [{
        required: true,
        message: '规格/型号不能为空',
        trigger: 'blur'
      }]
    },
    {
      label: '面积(㎡)',
      prop: 'area'
    },
    {
      label: '单位',
      prop: 'unit',
      rules: [{
        required: true,
        message: '单位不能为空',
        trigger: 'blur'
      }]
    },
    {
      label: '数量',
      prop: 'num',
      type:'number',
      rules: [{
        required: true,
        message: '数量不能为空',
        trigger: 'blur'
      }]
    },
    // {
    //   label: '单价',
    //   prop: 'price',
    //   type:'number',
    //   precision: 2,
    //   min:0,
    //   rules:[
    //     { validator: function (rule, value, callback) {
    //         if(value!=''){
    //           var reg =/^(\d|[1-9]\d+)(\.\d+)?$/
    //           if(!reg.test(value)){
    //             callback(new Error('请填写大于0的金额'));
    //           }else{
    //             callback()
    //           }
    //         }
    //       }, trigger: 'blur' },
    //     // {
    //     //   required: true,
    //     //   message: '单价不能为空',
    //     //   trigger: 'blur'
    //     // }
    //   ]
    // },
    {
      label: '备注',
      prop: 'remark',
      type:'textarea',
      row:true,
      span:24,
    },
  ]
}
