import request from '@/utils/request'

// 查询动作关联管理列表
export function listActionBinding(query) {
  return request({
    url: '/hnyz/actionBinding/list',
    method: 'get',
    params: query
  })
}

// 查询动作关联管理详细
export function getActionBinding(id) {
  return request({
    url: '/hnyz/actionBinding/' + id,
    method: 'get'
  })
}

// 新增动作关联管理
export function addActionBinding(data) {
  return request({
    url: '/hnyz/actionBinding',
    method: 'post',
    data: data
  })
}

// 修改动作关联管理
export function updateActionBinding(data) {
  return request({
    url: '/hnyz/actionBinding',
    method: 'put',
    data: data
  })
}

// 删除动作关联管理
export function delActionBinding(id) {
  return request({
    url: '/hnyz/actionBinding/' + id,
    method: 'delete'
  })
}

//修改启用状态
export function changeStatus(id, status) {
  const data = {
    id,
    status
  }
  return request({
    url: '/hnyz/actionBinding/changeStatus',
    method: 'put',
    data: data
  })
}
