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: 'content'
   },
   {
    title: '图片',
    align:"center",
    dataIndex: 'image',
    customRender:render.renderAvatar,
   },
   {
    title: '行程分数',
    align:"center",
    dataIndex: 'processScore'
   },
   {
    title: '景点分数',
    align:"center",
    dataIndex: 'spotScore'
   },
   {
    title: '导师分数',
    align:"center",
    dataIndex: 'teacherScore'
   },
   {
    title: '关联订单id',
    align:"center",
    dataIndex: 'orderId_dictText'
   },
   {
    title: '关联用户id',
    align:"center",
    dataIndex: 'userId_dictText'
   },
   {
    title: '类型',
    align:"center",
    dataIndex: 'type_dictText'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '文字',
    field: 'content',
    component: 'InputTextArea',//TODO 注意string转换问题
  },
  {
    label: '图片',
    field: 'image',
     component: 'JImageUpload',
     componentProps:{
      },
  },
  {
    label: '行程分数',
    field: 'processScore',
    component: 'InputNumber',
  },
  {
    label: '景点分数',
    field: 'spotScore',
    component: 'InputNumber',
  },
  {
    label: '导师分数',
    field: 'teacherScore',
    component: 'InputNumber',
  },
  {
    label: '关联订单id',
    field: 'orderId',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"studytour_order,id,id"
     },
  },
  {
    label: '关联用户id',
    field: 'userId',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"han_hai_member,nick_name,id"
     },
  },
  {
    label: '类型',
    field: 'type',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"comment_type"
     },
  },
];
