import request from '@/utils/request' export function findDicAll() { return request({ url: `/base/dic/find-all`, method: 'get' }) } /** * 数据字典 */ export function findDictionaryType(type) { return request({ url: `${window.getVersionTypeApiUrl('dicURL')}/dic-items/get-dictype?dicType=${type}`, method: 'get' }) } /** * 数据字典无token请求 */ export function findDictionaryTypeNotoken(type) { return request({ url: `${window.getVersionTypeApiUrl('dicURL')}/dic-items/get-dictype-notoken?dicType=${type}`, method: 'get' }) } /** * 租户树 */ export function findTenantTree(data) { return request({ url: `${window.getVersionTypeApiUrl('baseURL')}/base-tenant/find-tenant-tree`, method: 'post', data }) } /** * 租户树(带分页) */ export function findTenantTreeByPage(data) { return request({ url: `${window.getVersionTypeApiUrl('baseURL')}/base-tenant/find-pagination`, method: 'post', data }) } /** * 获取所有租户及二级租户树 */ export function getAllTenantTree(data) { return request({ url: `${window.getVersionTypeApiUrl('baseURL')}/base-tenant/find-tenants-tree`, method: 'post', data }) } /** * 根据租户id 和 部门id 查找下级部门 */ export function getDeptById(params) { return request({ url: `${window.getVersionTypeApiUrl('baseURL')}/dept/find-ldept`, method: 'get', params }) } /** * 获取部门树 */ export function findDeptTree(params) { return request({ url: `${window.getVersionTypeApiUrl('baseURL')}/dept/get-tree`, method: 'get', params }) } /** * 部门列表 */ export function findDeptList(depDuty, tenantId) { return request({ url: `${window.getVersionTypeApiUrl('baseURL')}/dept/get-tree-all`, method: 'get', params: { ownerFlag: 'Y', depDuty, tenantId } }) } /** * 获取当前租户及其下级租户 get */ export function getBaseOwnLowTenant() { return request({ url: `${window.getVersionTypeApiUrl('baseURL')}/base-tenant/get-own-low-tenant`, method: 'get' }) } /** * 根据租户获取所有部门树 */ export function findDeptListByTenantId(id) { return request({ url: `${window.getVersionTypeApiUrl('baseURL')}/dept/get-tree?ownerFlag=y&tenantId=${id}`, method: 'get' }) } /** * 根据部门获取所有人员 */ export function findBaseUserByDept(id) { return request({ url: `${window.getVersionTypeApiUrl('baseURL')}/base-user/find-by-dep?depId=${id}`, method: 'post' }) } /** * 获取租户下指定部门的用户 */ export function findPsnUsersByTenant(data) { return request({ url: `${window.getVersionTypeApiUrl('baseURL')}/base-person/find-psn-users`, method: 'post', data }) } /** * 获取所有人员 */ export function findAllBaseUser(data) { return request({ url: `${window.getVersionTypeApiUrl('baseURL')}/base-user/find-pagination`, method: 'post', data }) } /** * 根据当前登录租户查询人员 */ export function findUserByTenant() { return request({ url: `${window.getVersionTypeApiUrl('baseURL')}/base-user/find-by-tenant`, method: 'get' }) } /** * 根据租户ID查询人员 */ export function findUserByTenantId(params) { return request({ url: `${window.getVersionTypeApiUrl('baseURL')}/base-user/find-users-by-tenant`, method: 'get', params }) } /** * 当获取前租户所在集团的所有租户及子租户的部门 */ export function findDeptByTenant(data) { return request({ url: `${window.getVersionTypeApiUrl('baseURL')}/dept/find-dept-tenant`, method: 'post', data }) } /** * 分页查询当前用户的部门数据权限 */ export function findDeptByUserPermiss(data) { return request({ url: `/equipledger/user-data-permissions/find-pagination-dept`, method: 'post', data }) } /** * 获取部门所有数据 */ export function findPermissionDept() { return request({ url: `/equipledger/user-data-permissions/get-dept-tree`, method: 'get' }) } /** * 首页用户访问总数 */ export function getLoginTotal(data) { return request({ url: `${window.getVersionTypeApiUrl('logURL')}/login-log/user-7day-login-count`, method: 'get', params: data }) } /** * 首页用户浏览总数 */ export function getBehaviorTotal() { return request({ url: `${window.getVersionTypeApiUrl('logURL')}/base-behavior/behavior-total7`, method: 'get', }) } /** * 设置默认菜单页面 */ export function defaultMenuSave(data) { return request({ url: `${window.getVersionTypeApiUrl('baseURL')}/base-default-menu/save`, method: 'post', data }) } /** * 修改用户账号密码 */ export function updateUserPsw(data) { return request({ url: `${window.getVersionTypeApiUrl('baseURL')}/base-user/update-pwd`, method: 'post', data }) } /** * sso登录 */ export function getBaseUserLoginSso(config = {}) { return request({ url: `${window.getVersionTypeApiUrl('baseURL')}/base-user/get-login-user`, method: 'get', ...config, }) } /** * sso根据portalCode 获取token */ export function getTokenByPortalCode(params) { return request({ url: `${window.getVersionTypeApiUrl('baseURL')}/sso/token`, method: 'get', params, }) } /** * 获取租户密码策略提示信息 */ export function checkPwdLogin() { return request({ url: `${window.getVersionTypeApiUrl('baseURL')}/base-user/check-pwd-login`, method: 'get' }) } /** * 获取租户密码策略提示信息 */ export function findPwdMsg() { return request({ url: `${window.getVersionTypeApiUrl('baseURL')}/tenant-pwd-strategy/find-pwd-msg`, method: 'get' }) } /** * 获取灰度信息 */ export function grayscale() { return request({ url: '/api/grayscale/rule/myid', method: 'get' }) }