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:"left",
    dataIndex: 'name',
    resizable:true,
    sorter: true
   },
   {
    title: '场景',
    align:"left",
    dataIndex: 'sceneId_dictText',
    resizable:true,
    sorter: true,

   },
   {
    title: '顺序号',
    align:"left",
    dataIndex: 'ind',
    resizable:true,
    sorter: true
   },
   {
    title: '备注',
    align:"center",
    dataIndex: 'des',
    resizable:true
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
  {
    label: '节点名称',
    field: 'name',
    component: 'Input',
  },
  {
    label: '顺序号',
    field: 'ind',
    component: 'InputNumber',
  },
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '节点名称',
    field: 'name',
    component: 'Input',
  },
  // {
  //   label: '开始时间',
  //   field: 'stTime',
  //   component: 'DatePicker',
  // },
  {
    label: '场景',
    field: 'sceneId',
    component: 'Input',
    slot:"sceneId"
  },
  {
    label: '顺兴号',
    field: 'ind',
    component: 'InputNumber',
  },
  {
    label: '备 注',
    field: 'des',
    component: 'InputTextArea',
    componentProps: {
      rows: 10,
      showCount: true,
      maxlength: 512,
    },
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];



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