/*
 *    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 tableOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  addBtn: false,
  editBtn: false,
  delBtn: false,
  dialogHeight:600,
  searchShow:false,
  column: [
    {
      label: '标题',
      prop: 'title',
      search:true,
      span:24,
      row:true,
      minWidth: 400,
      rules: [{
        required: true,
        message: "请输入标题",
      }]
    },
    {
      label: '关键词',
      prop: 'keyWord',
      search:true,
      minWidth:50 ,
      span:24,
      row:true
    },
    {
      label: '发布日期',
      prop: 'pubDate',
      type: 'date',
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd HH:mm:ss',
      minWidth:80,
      rules: [{
        required: true,
        message: "请输入发布日期",
      }]
    },
    {
      label: '阅读次数',
      prop: 'readNums',
      addDisplay:false,
      editDisplay:false,
      minWidth:40,
    },
    {
      label: 'PDF',
      prop: 'pdfList',
      hide:true,
      type: 'upload',
      loadText: '附件上传中，请稍等',
      span: 24,
      limit:1,
      action: '/oa/file/uploadPdf',
      propsHttp: {
        res: 'data',
        name:'fileName',
      },
    },
    {
      label: '其他附件',
      prop: 'fileGroupList',
      hide:true,
      type: 'upload',
      loadText: '附件上传中，请稍等',
      span: 24,
      limit:1,
      action: '/oa/file/upload',
      propsHttp: {
        res: 'data',
        name:'fileName',
      },

    },
    {
      label: '发布部门',
      prop: 'deptName',
      addDisplay:false,
      editDisabled:true,
      minWidth:120,
    },
    {
      label: '创建日期',
      prop: 'createTime',
      type: 'date',
      format: 'yyyy-MM-dd',
      hide:true,
      valueFormat: 'yyyy-MM-dd HH:mm:ss',
      addDisplay:false,
      editDisabled:true
    },
    {
      label: '是否有效',
      prop: 'status',
      dicUrl: '/admin/dict/item/type/yes_no',
      type:'switch',
      formslot:true,
      minWidth:40,
      props:{
        label:'label',
        value:'value'
      },
      rules: [{
        required: true,
        message: "请选择是否有效",
      }]
    },
  ]
}
