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",
    dataIndex: 'name'
  },

  {
    title: '涉及的重要业务',
    align: "center",
    dataIndex: 'linkBusiName'
  },
  {
    title: '涉及的重要信息系统',
    align: "center",
    dataIndex: 'linkSystemName'
  },
  {
    title: '牵头部门',
    align: "center",
    dataIndex: 'handleDepart'
  },
  {
    title: '压力测试日期',
    align: "center",
    sorter: true,
    dataIndex: 'sttime',
    customRender:({text}) =>{
      return !text?"":(text.length>10?text.substr(0,10):text);
    },
  },
  /**
  {
    title: '执行状态',
    align: "center",
    dataIndex: 'exeSta'
  },
  */
  {
    title: '说明',
    align: "center",
    dataIndex: 'des'
  },
];

//查询数据
export const searchFormSchema: FormSchema[] = [
  {
    label: "压力测试名称",
    field: 'name',
    component: 'Input',
    colProps: {span: 6},
  },
  {
    label: "牵头部门",
    field: 'handleDepart',
    component: 'Input',
    colProps: {span: 6},
  },
  {
    label: "压力测试日期",
    field: 'sttime',
    component: 'DatePicker',
    colProps: {span: 6},
  },
];

//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '压力测试名称',
    field: 'name',
    component: 'Input',
  },
  {
    label: '牵头部门',
    field: 'handleDepart',
    component: 'Input',
  },
  {
    label: '涉及的重要业务',
    field: 'linkBusiName',
    component: 'Input',
  },
  {
    label: '涉及的重要信息系统',
    field: 'linkSystemName',
    component: 'Input',
  },
  {
    label: '压力测试日期',
    field: 'sttime',
    component: 'DatePicker',
  },
  {
    label: '执行状态',
    field: 'exeSta',
    component: 'Input',
  },
  {
    label: '说明',
    field: 'des',
    component: 'Input',
  },
	// TODO 主键隐藏字段，目前写死为ID
  {
    label: '',
    field: 'id',
    component: 'Input',
    show: false,
  },
];
