/*
 * @Author: donghao donghao@supervision.ltd
 * @Date: 2024-02-22 13:38:04
 * @LastEditors: donghao donghao@supervision.ltd
 * @LastEditTime: 2025-03-07 15:07:28
 * @FilePath: \General-AI-Platform-Web-Client\mock\pools\deviceStatusData.ts
 * @Description: 设备状态数据
 */
import { generateRandomDateTimeByYear } from "../utils/mockMoment";
function fetchList(): Record<string, any>[] {
  const currList: Record<string, any>[] = [];
  const nameArr = [
    "摄像模组表面缺陷检测设备",
    "镜片表面缺陷检测设备",
    "中板表面缺陷检测设备",
    "Logo表面缺陷检测设备",
    "手机电池表面缺陷检测设备",
    "部件表面缺陷检测设备",
    "边距缺陷检测设备",
    "成品组装缺陷检测设备",
    "金属工件表面缺陷检测设备",
    "管材表面缺陷检测设备"
  ];

  const codeArr = ["MSRF", "RL0F", "TLOC", "E1AIS", "CRM"];
  const deviceGroupArr = ["立杆", "东西货区", "送料区"];

  for (let i = 0; i < 35; i++) {
    currList.push({
      id: i,
      createTime: generateRandomDateTimeByYear(2023),
      updateTime: "2023-10-17T02:35:41.14308Z",
      name: nameArr[Math.floor(Math.random() * 3)],
      code: codeArr[Math.floor(Math.random() * 4)] + "-" + i,
      deviceGroup:
      deviceGroupArr[Math.floor(Math.random() * 3)] +
      (Math.floor(Math.random() * 3) + 1),
      status: Math.floor(Math.random() * 3) + 1,
      remark: ""
    });
  }
  return currList;
}

// 缺陷从EXL里选几个就好了
// 告警代码MSRF-0 RL0F HTFIF-02 TLOC-1 E1AIS-05
// 设备组:核心检测组001 无尘总装组005 送料监测线02

const currentData = fetchList();

export const deviceStatusListData = {
  data: {
    list: currentData,
    total: currentData.length,
    page: 1,
    pageSize: 10
  }
};