import { http } from '@/utils/http/axios';

/**
 * @description: 参数列表
 */
export function getParamList(params?) {
  return http.request({
    url: '/param/page',
    method: 'GET',
    params,
  });
}
export function getParamAllList(params?) {
  return http.request({
    url: '/param/list',
    method: 'GET',
    params,
  });
}
/**
 * @description: 根据ID获取详情
 */
export function getParamDetail(paramId) {
  return http.request({
    url: '/param/detail/'+paramId,
    method: 'get',
  });
}
/**
 * @description: 添加参数
 */
export function paramAdd(data:any) {
  return http.request({
    url: '/param/add',
    method: 'POST',
    data,
  });
}
/**
 * @description: 更新参数
 */
export function paramUpdate(data:any) {
  return http.request({
    url: '/param/update',
    method: 'PUT',
    data
  });
}
/**
 * @description: 删除参数
 */
export function paramDelete(paramId) {
  return http.request({
    url: '/param/delete/'+paramId,
    method: 'DELETE',
  });
}
/**
 * @description: 批量删除参数
 */
export function paramBatchDelete(data:any) {
  return http.request({
    url: '/param/batchDelete',
    method: 'DELETE',
    data
  });
}