import request from '@/utils/request'


// 获取列表
export function getList(data) {
  return request({
    url: `/csc-szls-system-manage/sysDepartment/authority/getPage`,
    method: 'post',
    data: data
  })
}

// 新增
export function addFun(data) {
  return request({
    url: `/csc-szls-system-manage/sysDepartment/authority_button/add`,
    method: 'post',
    data: data
  })
}

// 删除
export function deleteFun(id) {
  return request({
    url: `/csc-szls-system-manage/sysDepartment/authority_button/deleteById?id=${id}`,
    method: 'delete',
  })
}

// 修改

export function updateFun(data) {
  return request({
    url: `/csc-szls-system-manage/sysDepartment/authority_button/update`,
    method: 'post',
    data: data
  })
}

// 查看
export function detailFun(id) {
  return request({
    url: `/csc-szls-system-manage/sysDepartment/authority/getById/${id}`,
    method: 'get'

  })
}

export function departNameExit(depName) {
  return request({
    url: `/csc-szls-system-manage/sysDepartment/authority/getByDepName/${depName}`,
    method: 'get',
  })
}

