import Mock from "mockjs";

Mock.mock(/\/api\/admin\/exam\/save/, "post", {
  updateTime: 1,
});
Mock.mock(/\/api\/admin\/exam\/config\/info/, "post", {
  examId: 1,
  //卷型条码内容
  paperTypeBarcodeContent: [],
  //图片抽查比例
  imageCheckRatio: 5,
  //图片抽查顺序
  imageCheckOrder: "DESC", // DESC,ASC
  //是否开启实时审核
  enableSyncVerify: true,
  //人工绑定锁屏数量
  scannerAssignedMaxCount: 5,
  //人工绑定解锁密码
  scannerAssignedVerifyPassword: "",
});
Mock.mock(/\/api\/admin\/exam\/config\/save/, "post", {
  updateTime: 1,
});

Mock.mock(/\/api\/admin\/user\/page/, "post", {
  result: [
    {
      id: 1,
      loginName: "aaa",
      role: "SCHOOL_ADMIN",
      roleName: "管理员a",
      enable: true, //启用禁用
    },
    {
      id: 2,
      loginName: "bbb",
      role: "SCHOOL_ADMIN",
      roleName: "管理员b",
      enable: false, //启用禁用
    },
    {
      id: 3,
      loginName: "ccc",
      role: "AUDITOR",
      roleName: "审核员",
      enable: false, //启用禁用
    },
  ],
  totalCount: 3,
  pageCount: 1,
});
Mock.mock(/\/api\/admin\/user\/toggle/, "post", {
  updateTime: 1,
});
Mock.mock(/\/api\/admin\/user\/save/, "post", {
  updateTime: 1,
});
Mock.mock(/\/api\/admin\/user\/password\/reset/, "post", {
  updateTime: 1,
});
Mock.mock(/\/api\/admin\/card\/page/, "post", {
  result: [
    {
      examId: 1,
      number: 666,
      subjectCode: 1,
      subjectName: "某科目名称",
      parameter: "{a:123}",
      paperCount: 2,
      remark: "这是一串备注",
      updateTime: 1726724528841,
      url: "https://www.baidu.com",
    },
  ],
  totalCount: 3,
  pageCount: 1,
});
Mock.mock(/\/api\/admin\/card\/delete/, "post", {
  updateTime: 1,
});
Mock.mock(/\/api\/admin\/student\/count/, "post", [
  {
    subjectCode: 1,
    subjectName: "科目1",
    studentCount: 1,
  },
  {
    subjectCode: 2,
    subjectName: "科目2",
    studentCount: 10,
  },
  {
    subjectCode: 3,
    subjectName: "科目3",
    studentCount: 5,
  },
]);
Mock.mock(/\/api\/admin\/student\/import\/config/, "post", {
  //考试年度
  year: 2024,
  //考次
  yearHalf: 1,
});
Mock.mock(/\/api\/admin\/student\/import\/save/, "post", {
  updateTime: 1,
});
Mock.mock(/\/api\/admin\/student\/clear/, "post", {
  updateTime: 1,
});
Mock.mock(/\/api\/admin\/student\/import/, "post", {
  taskId: 1,
});
Mock.mock(/\/api\/admin\/subject\/list/, "post", [
  {
    code: "1",
    name: "科目一",
  },
]);
Mock.mock(/\/api\/admin\/subject\/scan\/progress/, "post", {
  total: {
    progress: "10%",
    studentCount: 22,
    unexistCount: 10,
    scannedCount: 12,
    estimation: 1000000,
  },
  subjects: [
    {
      subjectCode: 1,
      subjectName: "科目一",
      progress: "10%",
      studentCount: 22,
      scannedCount: 12,
      unexistCount: 10,
      estimation: 1000000,
    },
  ],
});
Mock.mock(/\/api\/admin\/scanner\/workload/, "post", [
  {
    device: "192.168.0.1",
    answerScanCount: 100,
  },
]);
Mock.mock(/\/api\/admin\/exam-site\/list/, "post", [
  {
    code: "1",
    name: "考点一",
  },
]);
Mock.mock(/\/api\/admin\/campus\/list/, "post", [
  {
    code: "1",
    name: "校区一",
  },
]);
Mock.mock(/\/api\/admin\/exam-room\/scanned\/page/, "post", {
  result: [
    {
      subjectCode: "1",
      subjectName: "科目一",
      examSite: 1,
      campusCode: 1,
      examRoom: 1,
      scanned: "已扫描",
    },
  ],
  totalCount: 10,
  pageCount: 5,
});

Mock.mock(/\/api\/admin\/student\/page/, "post", {
  result: [
    {
      id: 1,
      examNumber: "111",
      name: "刘洋",
      studentCode: "111",
      subjectCode: "1",
      subjectName: "科目一",
      packageCode: "222",
      campusCode: "1",
      campusName: "1",
      examSite: "1",
      examSiteName: "1",
      examRoom: "考场一",
      seatNumber: "座位号1",
      scanned: "已扫描",
      device: "设备一",
    },
  ],
  totalCount: 10,
  pageCount: 5,
});

Mock.mock(/\/api\/admin\/batch\/subject\/list/, "post", [
  {
    subjectCode: "1",
    subjectName: "科目一",
  },
  {
    subjectCode: "2",
    subjectName: "科目二",
  },
]);
Mock.mock(/\/api\/admin\/batch\/device\/list/, "post", [
  {
    device: "1",
    deviceName: "设备一",
  },
  {
    device: "2",
    deviceName: "设备二",
  },
]);
Mock.mock(/\/api\/admin\/batch\/list/, "post", [
  {
    batchId: "1",
    createTime: 1727081842375,
  },
  {
    batchId: "2",
    createTime: 1727081842375,
  },
]);
Mock.mock(/\/api\/admin\/batch\/student\/list/, "post", [
  {
    batchId: "1",
  },
]);
