|
|
|
/*
|
|
|
|
* @Author: donghao donghao@supervision.ltd
|
|
|
|
* @Date: 2024-01-17 13:54:43
|
|
|
|
* @LastEditors: donghao donghao@supervision.ltd
|
|
|
|
* @LastEditTime: 2024-01-18 15:37:29
|
|
|
|
* @FilePath: \General-AI-Platform-Web-Client\mock\alarm.ts
|
|
|
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
|
|
*/
|
|
|
|
import { MockMethod } from "vite-plugin-mock";
|
|
|
|
function fetchList(): Record<string, any>[] {
|
|
|
|
const currList: Record<string, any>[] = [];
|
|
|
|
// const nameArr = ["玩手机监测", "控制器", "视频监控"];
|
|
|
|
// const deviceGroupArr = [""]
|
|
|
|
for (let i = 0; i < 10; i++) {
|
|
|
|
currList.push({
|
|
|
|
id: 1,
|
|
|
|
createTime: "2023-10-21 11:17:11",
|
|
|
|
updateTime: "2023-10-17T02:35:41.14308Z",
|
|
|
|
name: "玩手机监测",
|
|
|
|
code: "DC0000" + (i + 1),
|
|
|
|
level: "1",
|
|
|
|
deviceGroup: "设备组" + (i + 1),
|
|
|
|
remark: ""
|
|
|
|
});
|
|
|
|
}
|
|
|
|
return currList;
|
|
|
|
}
|
|
|
|
export default [
|
|
|
|
{
|
|
|
|
url: "/getAlarmList",
|
|
|
|
method: "post",
|
|
|
|
response: () => {
|
|
|
|
return {
|
|
|
|
success: true,
|
|
|
|
data: {
|
|
|
|
list: fetchList()
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
] as MockMethod[];
|