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',
    width:100,
    resizable:true
   },
   {
    title: '调查内容',
    align:"center",
    dataIndex: 'ctp',
    width:150,
    resizable:true
   },
   {
    title: '指标名称',
    align:"center",
    dataIndex: 'name',
    width:150,
    resizable:true
   },
  
   {
    title: '问题',
    align:"center",
    dataIndex: 'problems',
    width:200,
    resizable:true
   },
   {
    title: '现状',
    align:"center",
    dataIndex: 'curtp',
    width:100,
    resizable:true
   },
   {
    title: '描述',
    align:"center",
    dataIndex: 'des',
    width:200,
    resizable:true
   },
   {
    title: '相关资料',
    align:"center",
    dataIndex: 'relatedData',
    width:150,
    resizable:true
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
  {
    label: '编号',
    field: 'code',
    component: 'Input',
  },
  {
    label: '调查内容',
    field: 'ctp',
    component: 'Input',
  },
  {
    label: '指标名称',
    field: 'name',
    component: 'Input',
  },
  
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '编号',
    field: 'code',
    component: 'Input',
  },
  {
    label: '调查内容',
    field: 'ctp',
    component: 'Input',
  },
  {
    label: '指标名称',
    field: 'name',
    component: 'Input',
  },
  {
    label: '问题',
    field: 'problems',
    component: 'Input',
  },
  {
    label: '现状',
    field: 'curtp',
    component: 'Input',
  },
  {
    label: '描述',
    field: 'des',
    component: 'Input',
  },
  {
    label: '相关资料',
    field: 'relatedData',
    component: 'Input',
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];



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