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: 'code',
    ifShow: false,
  },
  {
    title: '检查内容',
    align: 'center',
    dataIndex: 'content',
  },
  {
    title: '备注',
    align: 'center',
    dataIndex: 'des',
  },
  {
    title: '创建人',
    align: 'center',
    dataIndex: 'createUser',
    ifShow: false,
  },
  {
    title: '来源文件',
    align: 'center',
    dataIndex: 'fileId',
    ifShow: false,
  },
];
//查询数据
export const searchFormSchema: FormSchema[] = [];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '检查内容',
    field: 'content',
    component: 'InputTextArea',
    componentProps: {
      rows: 3,
      showCount: true,
      maxlength: 1024,
    },
    required: true,
  },
  {
    label: '控制项',
    field: 'actIds',
    component: 'JCaSelect',
  },
  {
    label: '备 注',
    field: 'des',
    component: 'InputTextArea',
    componentProps: {
      rows: 4,
      showCount: true,
      maxlength: 1024,
    },
  },
  {
    label: '创建人',
    field: 'createUser',
    component: 'Input',
    show: false,
  },
  {
    label: '来源文件',
    field: 'fileId',
    component: 'InputNumber',
    show: false,
  },
  {
    label: '',
    field: 'id',
    component: 'Input',
    show: false,
  },
];

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