import { reqPath } from '@/api/reqPath';
import $http from '@/utils/http-service';
export function getAimData(str: string) {
return new Promise((resolve, reject) => {
$http
.get(reqPath.monitor[str])
.then((res: any) => {
resolve(res.data);
})
.catch((err: any) => {
reject(err);
});
});
}
export function changeThresholdPercent(url: string, params: any): Promise<{ data: any }> {
return new Promise((resolve, reject) => {
$http
.patch(url, params)
.then((res: any) => {
resolve(res.data);
})
.catch((err: any) => {
reject(err);
});
});
}
export function clearHistory(params: { BWUWaveTitle: string }) {
return new Promise((resolve, reject) => {
$http
.post(reqPath.monitor.clearHistory, params)
.then((res: any) => {
resolve(res.data);
})
.catch((err: any) => {
reject(err);
});
});
}