// 用于模拟数据，实际开发中应从后端获取数据

export const records = [
  {
    id: 1,
    productLineName: "微电子车间",
    productName: "产品A",
    productType: "类型1",
    productCode: "CODE1",
    timeStr: "2025-03-22",
    batchNo: "2001",
    goodRate: "95%",
    badRate: "5%",
  },
  {
    id: 2,
    productLineName: "微电子车间",
    productName: "产品A",
    productType: "类型2",
    productCode: "CODE2",
    timeStr: "2025-03-22",
    batchNo: "2002",
    goodRate: "90%",
    badRate: "10%",
  },
  {
    id: 3,
    productLineName: "微电子车间",
    productName: "产品A",
    productType: "类型1",
    productCode: "CODE3",
    timeStr: "2025-03-22",
    batchNo: "2003",
    goodRate: "85%",
    badRate: "15%",
  },
  {
    id: 4,
    productLineName: "微电子车间",
    productName: "产品A",
    productType: "类型2",
    productCode: "CODE4",
    timeStr: "2025-03-22",
    batchNo: "2004",
    goodRate: "80%",
    badRate: "20%",
  },
  {
    id: 5,
    productLineName: "微电子车间",
    productName: "产品A",
    productType: "类型1",
    productCode: "CODE5",
    timeStr: "2025-03-22",
    batchNo: "2005",
    goodRate: "75%",
    badRate: "25%",
  },
  {
    id: 6,
    productLineName: "微电子车间",
    productName: "产品B",
    productType: "类型2",
    productCode: "CODE6",
    timeStr: "2025-03-22",
    batchNo: "2006",
    goodRate: "70%",
    badRate: "30%",
  },
  {
    id: 7,
    productLineName: "微电子车间",
    productName: "产品B",
    productType: "类型1",
    productCode: "CODE7",
    timeStr: "2025-03-22",
    batchNo: "2007",
    goodRate: "65%",
    badRate: "35%",
  },
  {
    id: 8,
    productLineName: "微电子车间",
    productName: "产品B",
    productType: "类型2",
    productCode: "CODE8",
    timeStr: "2025-03-22",
    batchNo: "2008",
    goodRate: "60%",
    badRate: "40%",
  },
  {
    id: 9,
    productLineName: "微电子车间",
    productName: "产品B",
    productType: "类型1",
    productCode: "CODE9",
    timeStr: "2025-03-22",
    batchNo: "2009",
    goodRate: "55%",
    badRate: "45%",
  },
  {
    id: 10,
    productLineName: "微电子车间",
    productName: "产品B",
    productType: "类型2",
    productCode: "CODE10",
    timeStr: "2025-03-22",
    batchNo: "2010",
    goodRate: "50%",
    badRate: "50%",
  },
  {
    id: 11,
    productLineName: "微电子车间",
    productName: "产品C",
    productType: "类型1",
    productCode: "CODE11",
    timeStr: "2025-03-22",
    batchNo: "2011",
    goodRate: "45%",
    badRate: "55%",
  },
  {
    id: 12,
    productLineName: "微电子车间",
    productName: "产品C",
    productType: "类型2",
    productCode: "CODE12",
    timeStr: "2025-03-22",
    batchNo: "2012",
    goodRate: "40%",
    badRate: "60%",
  },
  {
    id: 13,
    productLineName: "微电子车间",
    productName: "产品C",
    productType: "类型1",
    productCode: "CODE13",
    timeStr: "2025-03-22",
    batchNo: "2013",
    goodRate: "35%",
    badRate: "65%",
  },
  {
    id: 14,
    productLineName: "微电子车间",
    productName: "产品C",
    productType: "类型2",
    productCode: "CODE14",
    timeStr: "2025-03-22",
    batchNo: "2014",
    goodRate: "30%",
    badRate: "70%",
  },
  {
    id: 15,
    productLineName: "微电子车间",
    productName: "产品C",
    productType: "类型1",
    productCode: "CODE15",
    timeStr: "2025-03-22",
    batchNo: "2015",
    goodRate: "25%",
    badRate: "75%",
  },
  {
    id: 16,
    productLineName: "微电子车间",
    productName: "产品D",
    productType: "类型2",
    productCode: "CODE16",
    timeStr: "2025-03-22",
    batchNo: "2016",
    goodRate: "20%",
    badRate: "80%",
  },
  {
    id: 17,
    productLineName: "微电子车间",
    productName: "产品D",
    productType: "类型1",
    productCode: "CODE17",
    timeStr: "2025-03-22",
    batchNo: "2017",
    goodRate: "15%",
    badRate: "85%",
  },
  {
    id: 18,
    productLineName: "微电子车间",
    productName: "产品D",
    productType: "类型2",
    productCode: "CODE18",
    timeStr: "2025-03-22",
    batchNo: "2018",
    goodRate: "10%",
    badRate: "90%",
  },
  {
    id: 19,
    productLineName: "微电子车间",
    productName: "产品D",
    productType: "类型1",
    productCode: "CODE19",
    timeStr: "2025-03-22",
    batchNo: "2019",
    goodRate: "5%",
    badRate: "95%",
  },
  {
    id: 20,
    productLineName: "微电子车间",
    productName: "产品D",
    productType: "类型2",
    productCode: "CODE20",
    timeStr: "2025-03-22",
    batchNo: "2020",
    goodRate: "50%",
    badRate: "50%",
  },
];
export const getMockData = async ({ page, limit }) => {
  const start = (page - 1) * limit;
  const end = page * limit;
  return {
    data: {
      records: records.slice(start, end),
      totalCount: records.length,
    },
  };
};
