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',
    width:150,
    resizable:true
   },
   {
    title: '项目ID',
    align:"center",
    dataIndex: 'itemid',
    width:100,
    resizable:true
   },
   {
    title: '根路径',
    align:"left",
    dataIndex: 'rootPath',
    width:250,
    resizable:true
   },
   {
    title: '类别',
    align:"left",
    dataIndex: 'tp',
    width:100,
    resizable:true
   },
   {
    title: '总记录数',
    align:"center",
    dataIndex: 'total',
    width:100,
    resizable:true
   },
   {
    title: '总页数',
    align:"center",
    dataIndex: 'pages',
    width:100,
    resizable:true
   },
   {
    title: '每页记录数',
    align:"center",
    dataIndex: 'psize',
    width:100,
    resizable:true
   },
   {
    title: '当前页',
    align:"center",
    dataIndex: 'pind',
    width:100,
    resizable:true
   },
   {
    title: '最后记录ID',
    align:"center",
    dataIndex: 'endDocid',
    width:100,
    resizable:true
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
  {
    label: '配置名称',
    field: 'name',
    component: 'Input',
  },
  {
    label: '类别',
    field: 'tp',
    component: 'Input',
  },
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '配置名称',
    field: 'name',
    component: 'Input',
  },
  {
    label: '项目ID',
    field: 'itemid',
    component: 'Input',
   },
  {
    label: '根路径',
    field: 'rootPath',
    component: 'Input',
  },
  {
    label: '类别',
    field: 'tp',
    component: 'Input',
  },
  {
    label: '总记录数',
    field: 'total',
    component: 'Input',
  },
  {
    label: '总页数',
    field: 'pages',
    component: 'Input',
  },
  {
    label: '每页记录数',
    field: 'psize',
    component: 'Input',
  },
  {
    label: '当前页',
    field: 'pind',
    component: 'Input',
  },
  {
    label: '最后记录ID',
    field: 'endDocid',
    component: 'InputNumber',
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];



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