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




/**
 * 查询条件
*/
export const searchFormSchemaMR: FormSchema[] = [
  {
    field: 'keyStr',
    label: '关键字',
    component: 'Input',
    colProps: { span: 7 },
    componentProps: {
      maxLength: 255,
    },
  }
];

/**
 * 查询条件
*/
export const searchFormSchemaER: FormSchema[] = [
  {
    field: 'keyStr',
    label: '关键字',
    component: 'Input',
    colProps: { span: 7 },
    componentProps: {
      maxLength: 255,
    },
  }
];

/**
 * 查询条件
*/
export const searchFormSchemaDR: FormSchema[] = [
  {
    field: 'keyStr',
    label: '关键字',
    component: 'Input',
    colProps: { span: 7 },
    componentProps: {
      maxLength: 255,
    },
  }
];

/**
 * 查询条件
*/
export const searchFormSchemaSR: FormSchema[] = [
  {
    field: 'keyStr',
    label: '关键字',
    component: 'Input',
    colProps: { span: 7 },
    componentProps: {
      maxLength: 255,
    },
  },
];


/**
 * 列表显示信息
*/
export const columns: BasicColumn[] = [
  {
    title: '资源类型',
    dataIndex: 'SERVICEID',
    width: 90,
    // slots: { customRender: 'SERVICEID' },
    sorter: true,
    customRender: ({ record }) => {
      var s = record.SERVICEID
      return s.indexOf('MR') > -1 ? '地图' : s.indexOf('ER') > -1 ? '场景' : s.indexOf('DR') > -1 ? '文件' : '组件';
    },
  },
  {
    title: '资源名称',
    dataIndex: 'SERVICENAME',
    width: 160,
  },
  {
    title: '代理地址',
    dataIndex: 'PUBLICCURL',
    width: 160,
  },
  {
    title: '真实地址',
    dataIndex: 'MAPINGURL',
    width: 160,
  },

  {
    title: '限制指定IP',
    dataIndex: 'IPS',
    width: 120,
  },
];

