/*
 * 组织权限配置配置接口
*/
import request from '@/utils/request'
import qs from 'qs'

// 设备类别
export function getDevice(params) {
  return request({
    url: 'device/type',
    method: 'get',
    params
  })
}
// 组织权限配置配置查询
export function deptList(params) {
  return request({
    url: 'deptPermission/list',
    method: 'get',
    params
  })
}

// 添加组织权限配置
export function addDept(params) {
  return request({
    url: 'deptPermission/add',
    method: 'post',
    params
  })
}
// 修改组织权限配置
export function updateDept(params) {
  return request({
    url: 'deptPermission/update',
    method: 'post',
    params
  })
}
// 删除组织权限配置
export function delDept(ids) {
  return request({
    url: 'deptPermission/delete',
    method: 'post',
    params: {
      ids: ids
    },
    paramsSerializer: params => {
      return qs.stringify(params, { indices: false })
    }
  })
}
