/** * @description 添加原子指标 */ import { getUrl } from 'src/utils/getUrl'; import Request from 'src/utils/requests'; import * as defs from '../../baseClass'; export class Params { /** projectId */ projectId?: number; } export const init = undefined; export async function request(params = {}, bodyParams = {}) { return Request({ url: '/api/index/atomic', params: bodyParams, method: 'post', }); } export function createFetchAction(types, stateKey) { return (params = {}, bodyParams, meta?: any) => { return { types, meta, stateKey, method: 'POST', url: getUrl('/api/index/atomic', params, 'POST'), params: bodyParams, init, }; }; }