import { TdBaseTableProps } from 'tdesign-vue';

interface DashboardPanel {
  title: string;
  number: string | number;
  leftType: string;
  upTrend?: string;
  downTrend?: string;
}

interface TendItem {
  growUp?: number;
  productName: string;
  count: number;
  date: string;
}

export const PANE_LIST: Array<DashboardPanel> = [
  {
    title: '总浏览量',
    number: '28,425.00',
    upTrend: '20.5%',
    leftType: 'echarts-line',
  },
  {
    title: '本周浏览量',
    number: '768.00',
    downTrend: '20.5%',
    leftType: 'echarts-bar',
  },
  {
    title: '活跃用户（个）',
    number: '1126',
    downTrend: '20.5%',
    leftType: 'icon-usergroup',
  },
  {
    title: '上传文章（个）',
    number: 527,
    downTrend: '20.5%',
    leftType: 'icon-file-paste',
  },
];

export const SALE_TEND_LIST: Array<TendItem> = [
  {
    growUp: 1,
    productName: '协会新闻',
    count: 7059,
    date: '2024-05-12',
  },
  {
    growUp: -1,
    productName: '商学院',
    count: 6437,
    date: '2024-05-10',
  },
  {
    growUp: 4,
    productName: '协会动态',
    count: 4221,
    date: '2024-05-03',
  },
  {
    growUp: 3,
    productName: '党群工作',
    count: 3317,
    date: '2024-04-28',
  },
  {
    growUp: -3,
    productName: '通知公告',
    count: 3015,
    date: '2024-04-23',
  },
  {
    growUp: -3,
    productName: '联系我们',
    count: 2015,
    date: '2024-03-12',
  },
];

export const BUY_TEND_LIST: Array<TendItem> = [
  {
    growUp: 1,
    productName: '线下活动',
    count: 3015,
    date: '2024-05-12',
  },
  {
    growUp: -1,
    productName: '调查问卷',
    count: 2015,
    date: '2024-05-10',
  },
  {
    growUp: 6,
    productName: '公益捐赠',
    count: 1815,
    date: '2024-05-03',
  },
  {
    growUp: -3,
    productName: '学习培训',
    count: 1015,
    date: '2024-04-28',
  },
  {
    growUp: -4,
    productName: '协会活动',
    count: 445,
    date: '2024-04-23',
  },
  {
    growUp: -3,
    productName: '其它内容',
    count: 2015,
    date: '2023-03-12',
  },
];

export const SALE_COLUMNS: TdBaseTableProps['columns'] = [
  {
    align: 'center',
    colKey: 'index',
    title: '排名',
    width: 80,
    fixed: 'left',
  },
  {
    align: 'left',
    ellipsis: true,
    colKey: 'productName',
    title: '类别',
    minWidth: 200,
  },
  {
    align: 'center',
    colKey: 'growUp',
    width: 100,
    title: '较上周',
  },
  {
    align: 'center',
    colKey: 'count',
    title: '阅读量',
    width: 100,
  },
  {
    align: 'center',
    colKey: 'date',
    width: 140,
    title: '日期',
  },
  {
    align: 'center',
    colKey: 'operation',
    title: '操作',
    width: 80,
    fixed: 'right',
  },
];

export const BUY_COLUMNS: TdBaseTableProps['columns'] = [
  {
    align: 'center',
    colKey: 'index',
    title: '排名',
    width: 80,
    fixed: 'left',
  },
  {
    align: 'left',
    ellipsis: true,
    colKey: 'productName',
    title: '分类',
    minWidth: 200,
  },
  {
    align: 'center',
    colKey: 'growUp',
    width: 100,
    title: '较上周',
  },
  {
    align: 'center',
    colKey: 'count',
    title: '阅读量',
    width: 100,
  },
  {
    align: 'center',
    colKey: 'date',
    width: 140,
    title: '日期',
  },
  {
    align: 'center',
    colKey: 'operation',
    title: '操作',
    width: 80,
    fixed: 'right',
  },
];
