import request from '@/utils/request'


// 查询锁具机构-列表
export function listKeyAPI(query) {
  return request({
    url: '/iscs/key/getIsKeyPage',
    method: 'get',
    params: query
  })
}

// 获取锁具机构详细信息
export function getKeyInfoAPI(repairId) {
  return request({
    url: '/iscs/key/selectIsKeyById?keyId=' + repairId,
    method: 'get'
  })
}

//新增锁具机构
export function addKeyAPI(query) {
  return request({
    url: '/iscs/key/insertIsKey',
    method: 'post',
    data: query
  })
}

// 修改锁具机构信息
export function updateKeyAPI(data) {
  return request({
    url: '/iscs/key/updateIsKey',
    method: 'post',
    data: data
  })
}

// 删除锁具机构信息
export function delKeyAPI(repairId) {
  return request({
    url: '/iscs/key/deleteIsKeyByKeyIds?keyIds='+ repairId,
    method: 'post'

  })
}
