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: 'userName'
   },
   {
    title: '用户手机号',
    align:"center",
    dataIndex: 'userPhone'
   },
   {
    title: '问题描述',
    align:"center",
    dataIndex: 'content'
   },
   {
    title: '问题截图',
    align:"center",
    dataIndex: 'proofImg',
    customRender:render.renderAvatar,
   },
   {
    title: '提交时间',
    align:"center",
    dataIndex: 'submitTime',
    customRender:({text}) =>{
      return !text?"":(text.length>10?text.substr(0,10):text)
    },
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
	{
      label: "用户名",
      field: "userName",
      component: 'Input',
      colProps: {span: 6},
 	},
	{
      label: "用户手机号",
      field: "userPhone",
      component: 'Input',
      colProps: {span: 6},
 	},
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '用户名',
    field: 'userName',
    component: 'Input',
  },
  {
    label: '用户手机号',
    field: 'userPhone',
    component: 'Input',
  },
  {
    label: '问题描述',
    field: 'content',
    component: 'Input',
  },
  {
    label: '问题截图',
    field: 'proofImg',
     component: 'JImageUpload',
     componentProps:{
      },
  },
  {
    label: '提交时间',
    field: 'submitTime',
    component: 'DatePicker',
  },
];
