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: 'title'
   },
   {
    title: '描述',
    align:"center",
    dataIndex: 'descrip'
   },
   {
    title: '类型',
    align:"center",
    dataIndex: 'type_dictText'
   },
   {
    title: '对应材料名称',
    align:"center",
    dataIndex: 'keyName'
   },
   {
    title: '材料底图',
    align:"center",
    dataIndex: 'image',
    customRender:render.renderAvatar,
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
	{
      label: "标题",
      field: "title",
      component: 'Input',
      colProps: {span: 6},
 	},
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '标题',
    field: 'title',
    component: 'Input',
  },
  {
    label: '描述',
    field: 'descrip',
    component: 'Input',
  },
  {
    label: '类型',
    field: 'type',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"material_type"
     },
  },
  {
    label: '对应材料名称',
    field: 'keyName',
    component: 'Input',
  },
  {
    label: '材料底图',
    field: 'image',
     component: 'JImageUpload',
     componentProps:{
      },
  },
];
