import { BasicColumn, FormSchema } from '@/components/Table';

export const indexColumns: BasicColumn[] = [
    {
        title: 'id',
        dataIndex: 'id',
        ifShow: false,
    },
    {
        title: '服务名称',
        dataIndex: 'serverName',
        width: 140,
    },
    {
        title: '服务地址',
        dataIndex: 'serverUrl',
        ifShow: false,
        width: 150,
    },
    {
        title: '空间参考',
        dataIndex: 'spatialRef',
        width: 100,
    },
    {
        title: '数据源类型',
        dataIndex: 'dataSourceType',
        ifShow: false,
        width: 100,
    },
    {
        title: '数据类型',
        dataIndex: 'dataType',
        width: 100,
    },
    {
        title: '数据表名',
        dataIndex: 'dataTable',
        width: 150,
    },
    {
        title: 'shp或者xls地址',
        dataIndex: 'shpPath',
        ifShow: false,
        width: 120,
    },
    {
        title: '图层样式地址',
        dataIndex: 'appendPath',
        ifShow: false,
        width: 120,
    },
    {
        title: '创建时间',
        dataIndex: 'createTime',
        width: 150,
    },
    {
        title: '修改时间',
        dataIndex: 'updateTime',
        width: 150,
    },
];

export const indexSearchFormSchema: FormSchema[] = [
    {
        field: 'SererName',
        label: '服务名称',
        component: 'Input',
        colProps: { span: 12 },
    },
];


export const headersColumns: BasicColumn[] = [
    {
        title: '原始字段名称',
        dataIndex: 'name',
        width: 120,
    },
    {
        title: '数据类型',
        dataIndex: 'type',
        width: 200,
    },
    {
        title: '数据长度',
        dataIndex: 'length',
        width: 120,
    },
    {
        title: '字段名',
        dataIndex: 'refName',
        width: 200,
    },
    {
        title: '字段描述',
        dataIndex: 'initName',
        width: 120,
    },
    {
        title: '',
        dataIndex: 'propType',
        ifShow: false,
    },
    {
        title: '操作',
        dataIndex: 'action',
        width: 80,
    },
];

export const headersSearchFormSchema: FormSchema[] = [
    {
        field: 'name',
        label: '原始字段名称',
        component: 'Input',
        colProps: { span: 12 },
    },
];

export const items_shp = [
    {
      title: '文件上传',
      description: '选择ShpFile格式模板文件并配置服务基础信息',
    },
    {
      title: '信息配置',
      description: '根据中文字段名称配置英文注释用于服务发布',
    },
    {
      title: '创建完成',
      description: '服务创建完成在服务列表中查看服务',
    },
  ];

export const items_excel = [
    {
      title: '文件上传',
      description: '选择ShpFile格式模板文件并配置服务基础信息',
    },
    {
      title: '创建完成',
      description: '服务创建完成在服务列表中查看服务',
    },
  ];

  export const servicesColumns: BasicColumn[] = [
    {
        title: '地址',
        dataIndex: 'serverUrl',
        width: 220,
    },
    {
        title: '操作',
        dataIndex: 'action',
        width: 40,
    },
];

export const MAPBOX_TOKEN = "pk.eyJ1Ijoic2hpY2hhbzEyMyIsImEiOiJja3FobnI1aDEwNGF6Mm9vOXVhNnBzZmFhIn0.2fZKiMqCQHxVY74QShMEGQ";

export const TINADITU_TOKEN = "b6585bc41ee16251dbe6b1af64f375d9";
