import {$t} from '#/locales';

/**
 * 列
 */
const columns = [
  {
    title: '',
    dataIndex: 'header',
width: 35,
    fixed: 'left',
    disabled: true
  },
  {
    title: $t('system.menu.id'),
    dataIndex: 'id',
hide: true,
  },
  {
    title: $t('system.menu.uid'),
    dataIndex: 'uid',
hide: true,
  },
  {
    title: $t('system.menu.name'),
    dataIndex: 'name',
   
  },
  {
    title: $t('system.menu.notes'),
    dataIndex: 'notes',
   
  },
  {
    title: $t('system.menu.menu'),
    dataIndex: 'menu',
   
  },
  {
    title: $t('system.menu.permission'),
    dataIndex: 'permission',
   
  },
  {
    title: $t('system.menu.type'),
    dataIndex: 'type',
sorter: true,
  },
  {
    title: $t('system.menu.status'),
    dataIndex: 'status',
sorter: true,
  },
  {
    title: $t('system.menu.sort'),
    dataIndex: 'sort',
sorter: true,
  },
  {
    title: $t('system.menu.creatorName'),
    dataIndex: 'creatorName',
   
  },
  {
    title: $t('system.menu.createdTime'),
    dataIndex: 'createdTime',
sorter: true,
  },
  {
    title: $t('system.menu.action'),
    dataIndex: 'action',
    fixed: 'right',
    width: 130
  }
]
/**
 * 状态映射
 * 0 禁用 ；1 启用;
 */
const statusMap = {
  0: $t('system.menu.statusOptions.v0'),
  1: $t('system.menu.statusOptions.v1'),
}
const statusOptions = [
  {
    value: 0,
    label: $t('system.menu.statusOptions.v0'),
  },
  {
    value: 1,
    label: $t('system.menu.statusOptions.v1'),
  },
]
/**
 * 查询参数
 */
const query = {
  name: null,
  menu: null,
  permission: null,
  status: null,
};


export const d = {
  isShowQuery: true,
  loading: false,
  pagination: {
    total: 0,
    current: 1,
    pageSize: 10,
    showTotal: (total, range) => `共 ${total} 条`,
    showSizeChanger: true,
    pageSizeOptions: ['10', '20', '50', '100', '500', '1000'],
    showQuickJumper: true,
  },
  parents: [],
  datas: [],
  query,
  columns,
  statusMap,
  statusOptions,
}