import request from '@/utils/request'

// 查询参数列表
export function listLibrary(query) {
  return request({
    url: '/business/library/list',
    method: 'get',
    params: query
  })
}

// 查询参数列表
export function listLibraryForParabar(query) {
  return request({
    url: '/business/library/listForParabar',
    method: 'get',
    params: query
  })
}

// 查询参数详细
export function getLibrary(id) {
  return request({
    url: '/business/library/' + id,
    method: 'get'
  })
}

// 新增参数
export function addLibrary(data) {
  return request({
    url: '/business/library',
    method: 'post',
    data: data
  })
}

// 修改参数
export function updateLibrary(data) {
  return request({
    url: '/business/library',
    method: 'put',
    data: data
  })
}

// 删除参数
export function delLibrary(id) {
  return request({
    url: '/business/library/' + id,
    method: 'delete'
  })
}
// 删除参数
export function delLibraryCheck(data) {
  return request({
    url: '/business/library/delete',
    method: 'post',
    data: data
  })
}

// 更新状态
export  function changeParaStatus(id, status,updateTime){
  const data = {
    id,
    status,
    updateTime
  }
  return request({
    url: '/business/library/changeStatus',
    method: 'put',
    data: data
  })
}


export function listForConfig(query) {
  return request({
    url: '/business/library/listForConfig',
    method: 'get',
    params: query
  })
}
