import request from '@/router/axios';

export const getTypeMap = (params) => {
  return request({
    url: '/api/blade-manager/fb/getTypeMap',
    method: 'get',
    params: {
      ...params,
    }
  })
}

export const saveFormula = ({formula,remark,wbsId,elementId,scale,number,map}) => {
  return request({
    url: '/api/blade-manager/formula/save',
    method: 'post',
    data: {
      formula,
      remark,
      wbsId,
      elementId,
      scale,
      number,
      map
    }
  })
}

export const updateFormula = ({id,formula,remark,wbsId,elementId,scale,number,map}) => {
  return request({
    url: '/api/blade-manager/formula/update',
    method: 'post',
    data: {
      id,
      formula,
      remark,
      wbsId,
      elementId,
      scale,
      number,
      map
    }
  })
}

export const formulaDetail = (params) => {
  return request({
    url: '/api/blade-manager/formula/detail',
    method: 'get',
    params: {
      ...params,
    }
  })
}
