import { floor, isArray, random, slice } from 'lodash-es'; import { defHttp } from '/@/utils/http/axios'; import { get } from '../../billboard/utils'; import { useGlobSetting } from '/@/hooks/setting'; import { reactive } from 'vue'; import _ from 'lodash'; enum Api { getSystem = '/modelreq/monitor/system', getDevice = '/modelreq/monitor/device', } export const getSystem = (params) => defHttp.post({ url: Api.getSystem, params }); export const getDevice = (params) => defHttp.post({ url: Api.getDevice, params }); // 搞这个缓存是由于:目前代码上的设计是多个模块发出多次请求,每个模块自己负责消费前者的响应。 // 这会导致相同的请求被同时发送多次。 const cache = new Map>();