import { BasicColumn, FormSchema } from '/@/components/Table';
//列表数据
export const columns: BasicColumn[] = [
   {
    title: '活动集合名称',
    align:"left",
    dataIndex: 'collectionName',
    width:150,
   },
   {
    title: '集合说明',
    align:"left",
    dataIndex: 'collectionDesc',
    width:250,
   },
   {
    title: '控制活动数量',
    align:"left",
    dataIndex: 'caCount',
    width:100,
   },
   {
    title: '更新日期',
    align:"left",
    dataIndex: 'updatedTime',
    width:140,
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
	{
      label: "集合名称",
      field: 'collectionName',
      component: 'JInput',
      colProps: {span: 6},
 	},
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '集合编号',
    field: 'collectionNo',
    component: 'Input',
    dynamicDisabled: true,
    colProps: {lg: 12},
    itemProps:{labelCol:{xs: {span: 24},sm: {span: 6},},wrapperCol:{xs: {span: 24},sm: {span: 18},}},
  },
  {
    label: '集合名称',
    field: 'collectionName',
    component: 'Input',
    colProps: {lg: 12},
    itemProps:{labelCol:{xs: {span: 24},sm: {span: 6},},wrapperCol:{xs: {span: 24},sm: {span: 18},}},
    dynamicRules: ({model,schema}) => {
      return [
             { required: true, message: '请输入集合名称!'},
      ];
    },
  },
  {
    label: '集合说明',
    field: 'collectionDesc',
    component: 'InputTextArea',
    itemProps:{labelCol:{xs: {span: 24},sm: {span: 3},},wrapperCol:{xs: {span: 24},sm: {span: 21},}},
    componentProps: {
      rows: 5
    }
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];

export const columnsProject: BasicColumn[] = [
  {
   title: '活动集合名称',
   align:"left",
   dataIndex: 'collectionName',
   width:150,
  },
  {
   title: '集合说明',
   align:"left",
   dataIndex: 'collectionDesc',
   width:250,
  },
  {
   title: '控制活动数量',
   align:"left",
   dataIndex: 'caCount',
   width:100,
  }
];




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