import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '事件类型',
    align: "center",
    sorter: true,
    dataIndex: 'eventTp_dictText'
  },
  {
    title: '事件等级',
    align: "center",
    sorter: true,
    dataIndex: 'level_dictText'
  },
  /** 
  {
    title: '处理方法',
    align: "center",
    dataIndex: 'content'
  },
  */
  {
    title: '步骤描述',
    align: "center",
    dataIndex: 'handleDes'
  },
  {
    title: '处理顺序',
    align: "center",
    sorter: true,
    dataIndex: 'step'
  },
  {
    title: '执行机构',
    align: "center",
    dataIndex: 'exeOrg'
  },
  {
    title: '执行部门',
    align: "center",
    dataIndex: 'exeDepart'
  },
  {
    title: '执行角色',
    align: "center",
    dataIndex: 'exeRole'
  },
  {
    title: '联系方式',
    align: "center",
    dataIndex: 'tel'
  },
  {
    title: '所属策略',
    align: "center",
    dataIndex: 'des'
  },
];

//查询数据
export const searchFormSchema: FormSchema[] = [
  {
    label: "事件类型",
    field: 'eventTp',
    component: 'JDictSelectTag',
    componentProps:{
      dictCode: "event_tp"
    },
    colProps: {span: 6},
  },
  {
    label: "事件等级",
    field: 'level',
    component: 'JDictSelectTag',
    componentProps:{
      dictCode: "level"
    },
    colProps: {span: 6},
  },
];

//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '事件类型',
    field: 'eventTp',
    component: 'JDictSelectTag',
    componentProps:{
      dictCode: ""
    },
  },
  {
    label: '事件等级',
    field: 'level',
    component: 'JDictSelectTag',
    componentProps:{
      dictCode: ""
    },
  },
  {
    label: '处理方法',
    field: 'content',
    component: 'Input',
  },
  {
    label: '步骤描述',
    field: 'handleDes',
    component: 'Input',
  },
  {
    label: '处理顺序',
    field: 'step',
    component: 'InputNumber',
  },
  {
    label: '执行机构',
    field: 'exeOrg',
    component: 'Input',
  },
  {
    label: '执行部门',
    field: 'exeDepart',
    component: 'Input',
  },
  {
    label: '执行角色',
    field: 'exeRole',
    component: 'Input',
  },
  {
    label: '联系方式',
    field: 'tel',
    component: 'Input',
  },
  {
    label: '所属策略',
    field: 'des',
    component: 'Input',
  },
	// TODO 主键隐藏字段，目前写死为ID
  {
    label: '',
    field: 'id',
    component: 'Input',
    show: false,
  },
];
