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: '地点所属景区',
    align:"center",
    dataIndex: 'areaId_dictText'
   },
   {
    title: '地点类型',
    align:"center",
    dataIndex: 'categoryId_dictText'
   },
];
//查询数据
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: '地点所属景区',
    field: 'areaId',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"travel_area,area_name,id"
     },
  },
  {
    label: '地点类型',
    field: 'categoryId',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"travel_category,category_name,id"
     },
  },
];
