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: 'industriesTypeName'
  },
  {
    title: '项目行业分类编码',
    align: "center",
    dataIndex: 'industriesTypeCode'
  },
];

//查询数据
export const searchFormSchema: FormSchema[] = [
  {
    label: "项目行业分类名称",
    field: 'industriesTypeName',
    component: 'Input',
    //colProps: {span: 6},
  },
  {
    label: "项目行业分类编码",
    field: 'industriesTypeCode',
    component: 'Input',
    //colProps: {span: 6},
  },
];

//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '项目行业分类名称',
    field: 'industriesTypeName',
    component: 'Input',
    dynamicRules: ({model,schema}) => {
      return [
              { required: true, message: '请输入项目行业分类名称!'},
             ];
    },
  },
  {
    label: '项目行业分类编码',
    field: 'industriesTypeCode',
    component: 'Input',
    dynamicRules: ({model,schema}) => {
      return [
              { required: true, message: '请输入项目行业分类编码!'},
             ];
    },
  },
	// TODO 主键隐藏字段，目前写死为ID
  {
    label: '',
    field: 'id',
    component: 'Input',
    show: false,
  },
];

// 高级查询数据
export const superQuerySchema = {
  industriesTypeName: {title: '项目行业分类名称',order: 0,view: 'text', type: 'string',},
  industriesTypeCode: {title: '项目行业分类编码',order: 1,view: 'text', type: 'string',},
};
