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: 'createTime'
   },
   {
    title: '描述内容',
    align:"center",
    dataIndex: 'title'
   },
   {
    title: '问题截图',
    align:"center",
    dataIndex: 'image',
    customRender:render.renderAvatar,
   },
   {
    title: '姓名',
    align:"center",
    dataIndex: 'name'
   },
   {
    title: '联系方式',
    align:"center",
    dataIndex: 'phone'
   },
   {
    title: '提交用户',
    align:"center",
    dataIndex: 'userId_dictText'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '描述内容',
    field: 'title',
    component: 'InputTextArea',//TODO 注意string转换问题
  },
  {
    label: '问题截图',
    field: 'image',
     component: 'JImageUpload',
     componentProps:{
      },
  },
  {
    label: '姓名',
    field: 'name',
    component: 'Input',
  },
  {
    label: '联系方式',
    field: 'phone',
    component: 'Input',
  },
  {
    label: '提交用户',
    field: 'userId',
    component: 'JSearchSelect',
    componentProps:{
       dict:"han_hai_member,nick_name,id"
    },
  },
];
