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: 'spotName'
   },
   {
    title: '地点图片',
    align:"center",
    dataIndex: 'spotImage',
    customRender:render.renderAvatar,
   },
   {
    title: '地点坐标_经度',
    align:"center",
    dataIndex: 'spotLongitude'
   },
   {
    title: '地点坐标_纬度',
    align:"center",
    dataIndex: 'spotLatitude'
   },
   {
    title: '地点所属景区(0-瓷都镇区 1-湖田片区 2-高岭片区 3-瑶里片区 4-蛟潭片区)',
    align:"center",
    dataIndex: 'areaId_dictText'
   },
   {
    title: '地点类型(0-景点 1-美食店铺 2-民宿 3-厕所)',
    align:"center",
    dataIndex: 'categoryId_dictText'
   },
   {
    title: '地点详情',
    align:"center",
    dataIndex: 'spotDetail',
    slots: { customRender: 'htmlSlot' },
   },
   {
    title: '语音讲解内容',
    align:"center",
    dataIndex: 'spotAudio'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '地点名字',
    field: 'spotName',
    component: 'Input',
  },
  {
    label: '地点图片',
    field: 'spotImage',
     component: 'JImageUpload',
     componentProps:{
      },
  },
  {
    label: '地点坐标_经度',
    field: 'spotLongitude',
    component: 'InputNumber',
  },
  {
    label: '地点坐标_纬度',
    field: 'spotLatitude',
    component: 'InputNumber',
  },
  {
    label: '地点所属景区(0-瓷都镇区 1-湖田片区 2-高岭片区 3-瑶里片区 4-蛟潭片区)',
    field: 'areaId',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"travel_area,area_name,id"
     },
  },
  {
    label: '地点类型(0-景点 1-美食店铺 2-民宿 3-厕所)',
    field: 'categoryId',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:""
     },
  },
  {
    label: '地点详情',
    field: 'spotDetail',
    component: 'JCodeEditor', //TODO String后缀暂未添加
  },
  {
    label: '语音讲解内容',
    field: 'spotAudio',
    component: 'Input',
  },
];
