/**
 * 员工角色管理
 */

import axios from '../../libs/api.request'

// 获取全部权限
export const getCompanyMenuList = (data) => {
  return axios.request({
    url: '/api/ac/sc/menuService/getCompanyMenuList',
    data: data,
    type: 'post'
  })
}
// 查询角色权限
export const getMenuForRoleList = (data) => {
  return axios.request({
    url: '/api/as/sc/menu/getMenuForRoleList',
    data: data,
    type: 'post'
  })
}
// 角色初始化
export const getCompanyRoleList = (data) => {
  return axios.request({
    url: '/api/as/sc/role/getCompanyRoleList',
    data: data,
    type: 'post'
  })
}
// 删除角色
export const deleteRole = (data) => {
  return axios.request({
    url: '/api/ac/sc/roleService/deleteRole',
    data: data,
    type: 'post'
  })
}
// 保存角色
export const saveRole = (data) => {
  return axios.request({
    url: '/api/ac/sc/roleService/saveRole',
    data: data,
    type: 'post'
  })
}
// 保存绑定数据
export const setRoleForMenu = (data) => {
  return axios.request({
    url: '/api/ac/sc/roleService/setRoleForMenu',
    data: data,
    type: 'post'
  })
}
