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

export const columns: BasicColumn[] = [
  {
    title: '序号',
    dataIndex: '',
    key: 'rowIndex',
    width: 60,
    align: 'center',
    customRender: function ({ text, record, index, column }) {
      return parseInt(index) + 1;
    },
  },
  {
    title: '站点名称',
    align: 'center',
    dataIndex: 'siteName',
  },
  {
    title: 'ip',
    align: 'center',
    dataIndex: 'ip',
  },
  {
    title: '询盘数量',
    align: 'center',
    dataIndex: 'wasteEnquiryNum',
  },
  {
    title: '黑白名单',
    align: 'center',
    dataIndex: 'blackOrWhite',
  },
  {
    title: '创建日期',
    align: 'center',
    dataIndex: 'createTime',
    customRender: function ({ text, record, index, column }) {
      return !text ? '' : text.length > 10 ? text.substr(0, 10) : text;
    },
  },
];
