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: 'categoriesType',
    customRender:({text}) => {
      return  render.renderCategoryTree(text,'categories_type')
    },
  },
   {
    title: '一级学科名称',
    align:"center",
    dataIndex: 'disciplinesName'
   },
   {
    title: '一级学科编号',
    align:"center",
    dataIndex: 'disciplinesCode'
   },
  {
    title: '学历层次',
    align:"center",
    dataIndex: 'educationalLevel'
  },

];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '门科',
    field: 'categoriesType',
    component: 'JDictSelectTag',
    componentProps:{
      dictCode: 'categories_type',
      //pcode:"", //TODO back和事件未添加，暂时有问题
    },
  },
  {
    label: '一级学科名称',
    field: 'disciplinesName',
    component: 'Input',
  },
  {
    label: '一级学科编号',
    field: 'disciplinesCode',
    component: 'Input',
  },
  {
    label: '学历层次',
    field: 'educationalLevel',
    component:"Input"
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];



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