import micro_request from '@/utils/micro_request'

const basePath = process.env.VUE_APP_AdminPath
export default {
  // 获取列表
  getList(query) {
    return micro_request.postRequest(basePath, 'Role', 'GetList', query)
  },
  getEntityById(query) {
    return micro_request.postRequest(basePath, 'Role', 'GetEntityById', query)
  },
  getRoleDeptTreeselect(query) {
    return micro_request.postRequest(
      basePath,
      'Role',
      'GetRoleDeptTreeselect',
      query
    )
  },
  doAdd(query) {
    return micro_request.postRequest(basePath, 'Role', 'Create', query)
  },
  doEdit(query) {
    return micro_request.postRequest(basePath, 'Role', 'UpdateById', query)
  },
  updateRoleDataScope(query) {
    return micro_request.postRequest(
      basePath,
      'Role',
      'UpdateRoleDataScope',
      query
    )
  },
  doDelete(query) {
    return micro_request.postRequest(basePath, 'Role', 'DeleteByIds', query)
  },
}
