import { defHttp } from '/@/utils/http/axios';

enum Api {
  // 获取执法处、地区、矿信息数据
  getSjmbStructData = '/sys/user/getSjmbStructData',
  getUserMinePermissionData = '/sys/user/getUserMinePermissionData',
}

export function getSjmbStructData(params) {
  return defHttp.post({ url: Api.getSjmbStructData, params }).then((r) =>
    r.map((e) => ({
      ...e,
      isLeaf: false,
    }))
  );
}

export function getUserMinePermissionData(params) {
  return defHttp.post({ url: Api.getUserMinePermissionData, params });
}
