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: '附件地址',
    dataIndex: 'id'
   },
    {
    title: '地块编码',
    dataIndex: 'wrdkbm'
   },
   {
    title: '所处阶段编码',
    dataIndex: 'scjdbm'
   },
   {
    title: '时间',
    dataIndex: 'tsamp'
   },
   {
    title: '推送结果',
    dataIndex: 'rest'
   },
   {
     title: '状态 -1 未操作 0 失败 1成功',
    dataIndex: 'status'
   },
];

export const searchFormSchema: FormSchema[] = [
 {
    label: '地块编码',
    field: 'wrdkbm',
    component: 'Input'
  },
];

export const formSchema: FormSchema[] = [
  // TODO 主键隐藏字段，目前写死为ID
  {label: '附件地址', field: 'id', component: 'Input'},
  {
    label: '地块编码',
    field: 'wrdkbm',
    component: 'Input',
  },
  {
    label: '所处阶段编码',
    field: 'scjdbm',
    component: 'Input',
  },
  {
    label: '时间',
    field: 'tsamp',
    component: 'DatePicker',
    componentProps: {
      showTime: true,
      valueFormat: 'YYYY-MM-DD hh:mm:ss',
    },
  },
  {
    label: '推送结果',
    field: 'rest',
    component: 'Input',
  },
  {
    label: '状态',
    field: 'status',
    component: 'InputNumber',
  },
];
