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: 'WorkID',
    align:"center",
    dataIndex: 'workid'
   },
   {
    title: '发起人',
    align:"center",
    dataIndex: 'starter'
   },
   {
    title: '发起人名称',
    align:"center",
    dataIndex: 'startername'
   },
   {
    title: '标题',
    align:"center",
    dataIndex: 'title'
   },
   {
    title: '部门名称',
    align:"center",
    dataIndex: 'deptname'
   },
   {
    title: '节点名称',
    align:"center",
    dataIndex: 'nodename'
   },
   {
    title: '记录日期',
    align:"center",
    dataIndex: 'rdt'
   },
   {
    title: '节点',
    align:"center",
    dataIndex: 'fkNode'
   },
   {
    title: 'fkFlow',
    align:"center",
    dataIndex: 'fkFlow'
   },
   {
    title: '流程ID',
    align:"center",
    dataIndex: 'fid'
   },
   {
    title: '流程名称',
    align:"center",
    dataIndex: 'flowname'
   },
   {
    title: '待办人员',
    align:"center",
    dataIndex: 'todoemps'
   },
   {
    title: '节点',
    align:"center",
    dataIndex: 'currnode'
   },
   {
    title: 'runtype',
    align:"center",
    dataIndex: 'runtype'
   },
   {
    title: '状态',
    align:"center",
    dataIndex: 'wfstate'
   },
   {
    title: 'whoexeit',
    align:"center",
    dataIndex: 'whoexeit'
   },
   {
    title: '父流程ID',
    align:"center",
    dataIndex: 'pworkid'
   },
   {
    title: '父流程编号',
    align:"center",
    dataIndex: 'pflowno'
   },
   {
    title: 'fkFlowsort',
    align:"center",
    dataIndex: 'fkFlowsort'
   },
   {
    title: '系统类别',
    align:"center",
    dataIndex: 'systype'
   },
   {
    title: '状态',
    align:"center",
    dataIndex: 'wfsta'
   },
   {
    title: '发送人',
    align:"center",
    dataIndex: 'sender'
   },
   {
    title: '挂起日期',
    align:"center",
    dataIndex: 'hunguptime'
   },
   {
    title: '流程活动时间',
    align:"center",
    dataIndex: 'senddt'
   },
   {
    title: '部门',
    align:"center",
    dataIndex: 'fkDept'
   },
   {
    title: '优先级',
    align:"center",
    dataIndex: 'pri'
   },
   {
    title: '节点应完成时间',
    align:"center",
    dataIndex: 'sdtofnode'
   },
   {
    title: '流程应完成时间',
    align:"center",
    dataIndex: 'sdtofflow'
   },
   {
    title: '流程预警时间',
    align:"center",
    dataIndex: 'sdtofflowwarning'
   },
   {
    title: '父流程调用的PFID',
    align:"center",
    dataIndex: 'pfid'
   },
   {
    title: '子流程的调用人',
    align:"center",
    dataIndex: 'pemp'
   },
   {
    title: '客户编号',
    align:"center",
    dataIndex: 'guestno'
   },
   {
    title: '客户名称',
    align:"center",
    dataIndex: 'guestname'
   },
   {
    title: '单据编号',
    align:"center",
    dataIndex: 'billno'
   },
   {
    title: '待办人员数量',
    align:"center",
    dataIndex: 'todoempsnum'
   },
   {
    title: '共享状态',
    align:"center",
    dataIndex: 'tasksta'
   },
   {
    title: '参数',
    align:"center",
    dataIndex: 'atpara'
   },
   {
    title: '参与人',
    align:"center",
    dataIndex: 'emps'
   },
   {
    title: 'GUID',
    align:"center",
    dataIndex: 'guid'
   },
   {
    title: 'fkNy',
    align:"center",
    dataIndex: 'fkNy'
   },
   {
    title: '周次',
    align:"center",
    dataIndex: 'weeknum'
   },
   {
    title: '时间间隔',
    align:"center",
    dataIndex: 'tspan'
   },
   {
    title: '待办状态',
    align:"center",
    dataIndex: 'todosta'
   },
   {
    title: '域/系统编号',
    align:"center",
    dataIndex: 'domain'
   },
   {
    title: 'PrjNo',
    align:"center",
    dataIndex: 'prjno'
   },
   {
    title: 'PrjNo',
    align:"center",
    dataIndex: 'prjname'
   },
   {
    title: 'orgno',
    align:"center",
    dataIndex: 'orgno'
   },
   {
    title: '流程备注',
    align:"center",
    dataIndex: 'flownote'
   },
   {
    title: '耗时',
    align:"center",
    dataIndex: 'losttimehh'
   },
   {
    title: '目录路径',
    align:"center",
    dataIndex: 'sortpath'
   },
   {
    title: '域/系统编号',
    align:"center",
    dataIndex: 'domainext'
   },
   {
    title: 'gwljson',
    align:"center",
    dataIndex: 'gwljson'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  /** 
  {
    label: 'WorkID',
    field: 'workid',
    component: 'InputNumber',
    dynamicRules: ({model,schema}) => {
          return [
                 { required: true, message: '请输入WorkID!'},
          ];
     },
  },
  {
    label: '发起人',
    field: 'starter',
    component: 'Input',
  },
  {
    label: '发起人名称',
    field: 'startername',
    component: 'Input',
  },
  {
    label: '标题',
    field: 'title',
    component: 'Input',
  },
  {
    label: '部门名称',
    field: 'deptname',
    component: 'Input',
  },
  {
    label: '节点名称',
    field: 'nodename',
    component: 'Input',
  },
  {
    label: '记录日期',
    field: 'rdt',
    component: 'Input',
  },
  {
    label: '节点',
    field: 'fkNode',
    component: 'InputNumber',
  },
  {
    label: 'fkFlow',
    field: 'fkFlow',
    component: 'Input',
  },
  {
    label: '流程ID',
    field: 'fid',
    component: 'InputNumber',
  },
  {
    label: '流程名称',
    field: 'flowname',
    component: 'Input',
  },
  {
    label: '待办人员',
    field: 'todoemps',
    component: 'InputTextArea',
  },
  {
    label: '节点',
    field: 'currnode',
    component: 'InputNumber',
  },
  {
    label: 'runtype',
    field: 'runtype',
    component: 'InputNumber',
  },
  {
    label: '状态',
    field: 'wfstate',
    component: 'InputNumber',
  },
  {
    label: 'whoexeit',
    field: 'whoexeit',
    component: 'InputNumber',
  },
  {
    label: '父流程ID',
    field: 'pworkid',
    component: 'InputNumber',
  },
  {
    label: '父流程编号',
    field: 'pflowno',
    component: 'Input',
  },
  {
    label: 'fkFlowsort',
    field: 'fkFlowsort',
    component: 'Input',
  },
  {
    label: '系统类别',
    field: 'systype',
    component: 'Input',
  },
  {
    label: '状态',
    field: 'wfsta',
    component: 'InputNumber',
  },
  {
    label: '发送人',
    field: 'sender',
    component: 'Input',
  },
  {
    label: '挂起日期',
    field: 'hunguptime',
    component: 'Input',
  },
  {
    label: '流程活动时间',
    field: 'senddt',
    component: 'Input',
  },
  {
    label: '部门',
    field: 'fkDept',
    component: 'Input',
  },
  {
    label: '优先级',
    field: 'pri',
    component: 'InputNumber',
  },
  {
    label: '节点应完成时间',
    field: 'sdtofnode',
    component: 'Input',
  },
  {
    label: '流程应完成时间',
    field: 'sdtofflow',
    component: 'Input',
  },
  {
    label: '流程预警时间',
    field: 'sdtofflowwarning',
    component: 'Input',
  },
  {
    label: '父流程调用的PFID',
    field: 'pfid',
    component: 'InputNumber',
  },
  {
    label: '子流程的调用人',
    field: 'pemp',
    component: 'Input',
  },
  {
    label: '客户编号',
    field: 'guestno',
    component: 'Input',
  },
  {
    label: '客户名称',
    field: 'guestname',
    component: 'Input',
  },
  {
    label: '单据编号',
    field: 'billno',
    component: 'Input',
  },
  {
    label: '待办人员数量',
    field: 'todoempsnum',
    component: 'InputNumber',
  },
  {
    label: '共享状态',
    field: 'tasksta',
    component: 'InputNumber',
  },
  {
    label: '参数',
    field: 'atpara',
    component: 'Input',
  },
  {
    label: '参与人',
    field: 'emps',
    component: 'InputTextArea',
  },
  {
    label: 'GUID',
    field: 'guid',
    component: 'Input',
  },
  {
    label: 'fkNy',
    field: 'fkNy',
    component: 'Input',
  },
  {
    label: '周次',
    field: 'weeknum',
    component: 'InputNumber',
  },
  {
    label: '时间间隔',
    field: 'tspan',
    component: 'InputNumber',
  },
  {
    label: '待办状态',
    field: 'todosta',
    component: 'InputNumber',
  },
  {
    label: '域/系统编号',
    field: 'domain',
    component: 'Input',
  },
  {
    label: 'PrjNo',
    field: 'prjno',
    component: 'Input',
  },
  {
    label: 'PrjNo',
    field: 'prjname',
    component: 'Input',
  },
  {
    label: 'orgno',
    field: 'orgno',
    component: 'Input',
  },
  {
    label: '流程备注',
    field: 'flownote',
    component: 'Input',
  },
  {
    label: '耗时',
    field: 'losttimehh',
    component: 'InputNumber',
  },
  {
    label: '目录路径',
    field: 'sortpath',
    component: 'Input',
  },
  {
    label: '域/系统编号',
    field: 'domainext',
    component: 'Input',
  },*/
  {
    label: '流程名称',
    field: 'flowname',
    component: 'Input',
    show: false
  },
  {
    label: '标题',
    field: 'title',
    component: 'Input',
    show: false
  },
  {
    label: '待办人员',
    field: 'todoemps',
    component: 'InputTextArea',
    show: false
  },
  {
    label: '节点名称',
    field: 'nodename',
    component: 'Input',
    show: false
  },
  {
    label: 'WorkID',
    field: 'workid',
    component: 'InputNumber',
    show: false
  },
  {
    label: '请输入催办理由',
    field: 'gwljson',
    component: 'InputTextArea',
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];



/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[]{
  // 默认和原始表单保持一致 如果流程中配置了权限数据，这里需要单独处理formSchema
  return formSchema;
}