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: 'nickName'
   },
   {
    title: '是否会员',
    align:"center",
    dataIndex: 'isPay_dictText'
   },
   {
    title: '用户头像',
    align:"center",
    dataIndex: 'headImage',
    customRender:render.renderAvatar,
   },
   {
    title: '手机号码',
    align:"center",
    dataIndex: 'phone'
   },
   {
    title: '角色',
    align:"center",
    dataIndex: 'role_dictText'
   },
   {
    title: '他的经纪人',
    align:"center",
    dataIndex: 'vid_dictText'
   },
   {
    title: '邀请人',
    align:"center",
    dataIndex: 'shareId_dictText'
   },
   {
    title: '邀请时间',
    align:"center",
    dataIndex: 'vtime'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
	{
      label: "昵称",
      field: "nickName",
      component: 'Input',
      colProps: {span: 6},
 	},
	{
      label: "是否会员",
      field: "isPay",
      component: 'JDictSelectTag',
      componentProps:{
          dictCode:"pay_role"
      },
      colProps: {span: 6},
 	},
	{
      label: "手机号码",
      field: "phone",
      component: 'Input',
      colProps: {span: 6},
 	},
	{
      label: "角色",
      field: "role",
      component: 'JDictSelectTag',
      componentProps:{
          dictCode:"member_role"
      },
      colProps: {span: 6},
 	},
	{
      label: "他的经纪人",
      field: "vid",
      component: 'JSearchSelect',
      componentProps:{
         dict:"han_hai_member,nick_name,id"
      },
      colProps: {span: 6},
 	},
	{
      label: "邀请人",
      field: "shareId",
      component: 'JSearchSelect',
      componentProps:{
         dict:"han_hai_member,nick_name,id"
      },
      colProps: {span: 6},
 	},
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '昵称',
    field: 'nickName',
    component: 'Input',
  },
  {
    label: '是否会员',
    field: 'isPay',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"pay_role"
     },
  },
  {
    label: '用户头像',
    field: 'headImage',
     component: 'JImageUpload',
     componentProps:{
      },
  },
  {
    label: '手机号码',
    field: 'phone',
    component: 'Input',
  },
  {
    label: '角色',
    field: 'role',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"member_role"
     },
  },
  {
    label: '他的经纪人',
    field: 'vid',
    component: 'JSearchSelect',
    componentProps:{
       dict:"han_hai_member,nick_name,id"
    },
  },
  {
    label: '邀请人',
    field: 'shareId',
    component: 'JSearchSelect',
    componentProps:{
       dict:"han_hai_member,nick_name,id"
    },
  },
  {
    label: '邀请时间',
    field: 'vtime',
    component: 'Input',
  },
];
