/** * @description 开关自定义报警 */ import { getUrl } from 'src/utils/getUrl'; import Request from 'src/utils/requests'; import * as defs from '../../baseClass'; export class Params { /** id */ id: number; /** alertSwitch */ alertSwitch: boolean; /** projectId */ projectId: number; } export const init = undefined; export async function request(params = {}) { return Request({ url: '/qsmd/api/customAlert/{id}/switch', params, method: 'put', }); } export function createFetchAction(types, stateKey) { return (params = {}, meta?: any) => { return { types, meta, stateKey, method: 'PUT', url: getUrl('/qsmd/api/customAlert/{id}/switch', params, 'PUT'), params, init, }; }; }