You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
General-AI-Platform-Web-Client/mock/pools/alarmData.ts

59 lines
1.8 KiB
TypeScript

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

/*
* @Author: donghao donghao@supervision.ltd
* @Date: 2024-02-22 13:38:04
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2024-03-06 10:06:11
* @FilePath: \General-AI-Platform-Web-Client\mock\pools\alarmData.ts
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import { generateRandomDateTimeByYear } from "../utils/mockMoment";
function fetchList(): Record<string, any>[] {
const currList: Record<string, any>[] = [];
const nameArr = [
"摄像模组表面缺陷检测",
"镜片表面缺陷检测",
"中板表面缺陷检测",
"Logo表面缺陷检测",
"手机电池表面缺陷检测",
"部件表面缺陷检测",
"边距缺陷检测",
"成品组装缺陷检测",
"金属工件表面缺陷检测",
"管材表面缺陷检测"
];
const codeArr = ["MSRF", "RL0F", "TLOC", "E1AIS"];
const deviceGroupArr = ["核心检测组", "无尘总装组", "送料监测线"];
for (let i = 0; i < 35; i++) {
currList.push({
id: 1,
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,
level: Math.floor(Math.random() * 6) + 1,
deviceGroup:
deviceGroupArr[Math.floor(Math.random() * 3)] +
(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 alarmListData = {
data: {
list: currentData,
total: currentData.length,
page: 1,
pageSize: 10
}
};