import request from '@/utils/request'

// 岗位树查询
export function GetGroupTree (params) {
  return request({
    url: '/api/fs4a/GetGroupTree/v1',
    method: 'post',
    data: params,
    proxy: true
  })
}

//岗位新增
export function SaveGroup (params) {
  return request({
    url: '/api/fs4a/SaveGroup/v1',
    method: 'post',
    data: params,
    proxy: true
  })
}

//岗位删除
export function DeleteGroup (params) {
  return request({
    url: '/api/fs4a/DeleteGroup/v1',
    method: 'post',
    data: params,
    proxy: true
  })
}

//岗位详情
export function GetGroupDetails (params) {
  return request({
    url: '/api/fs4a/GetGroupDetails/v1',
    method: 'post',
    data: params,
    proxy: true
  })
}

//岗位修改状态
export function ChangeGroupStatus (params) {
  return request({
    url: '/api/fs4a/ChangeGroupStatus/v1',
    method: 'post',
    data: params,
    proxy: true
  })
}

// 根据岗位获取权限树
export function GetAuthTreeByGroup (params) {
  return request({
    url: '/api/fs4a/GetAuthTreeByGroup/v1',
    method: 'post',
    data: params,
    proxy: true
  })
}

// 修改保存岗位
export function EditGroup (params) {
  return request({
    url: '/api/fs4a/EditGroup/v1',
    method: 'post',
    data: params,
    proxy: true
  })
}

//根据岗位获取角色
export function GetRoleByGroup (params) {
  return request({
    url: '/api/fs4a/GetRoleByGroup/v1',
    method: 'post',
    data: params,
    proxy: true
  })
}
