import request from '@/axios'; export const getList = (current, size, params) => { return request({ url: '/blade-system/dept/list', method: 'get', params: { ...params, current, size, }, }); }; export const getLazyList = (parentId, params) => { return request({ url: '/blade-system/dept/lazy-list', method: 'get', params: { ...params, parentId, }, }); }; export const remove = ids => { return request({ url: '/blade-system/dept/remove', method: 'post', params: { ids, }, }); }; export const add = row => { return request({ url: '/blade-system/dept/submit', method: 'post', data: row, }); }; export const syncIamOrganizations = () => { return request({ url: '/blade-system/dept/sync-iam-organizations', method: 'post', }); }; export const clearNonTopDept = signal => { return request({ url: '/blade-system/dept/clear-non-top', method: 'post', timeout: 60000, signal, }); }; export const syncOaCompany = (current = 1, size = 20, signal, incremental = false, modifiedSince) => { return request({ url: '/blade-system/dept/sync-oa-company', method: 'post', params: { current, size, incremental: !!incremental, modifiedSince: modifiedSince || undefined, }, timeout: 60000, signal, }); }; export const syncOaDepartment = ( current = 1, size = 20, signal, incremental = false, modifiedSince, companyOaId ) => { return request({ url: '/blade-system/dept/sync-oa-department', method: 'post', params: { current, size, incremental: !!incremental, modifiedSince: modifiedSince || undefined, companyOaId: companyOaId || undefined, }, timeout: 60000, signal, }); }; export const update = row => { return request({ url: '/blade-system/dept/submit', method: 'post', data: row, }); }; export const getDept = id => { return request({ url: '/blade-system/dept/detail', method: 'get', params: { id, }, }); }; export const getDeptTree = tenantId => { return request({ url: '/blade-system/dept/tree', method: 'get', params: { tenantId, }, }); }; export const getDeptLazyTree = parentId => { return request({ url: '/blade-system/dept/lazy-tree', method: 'get', params: { parentId, }, }); }; export const getPlatformCompanySelect = () => { return request({ url: '/blade-system/dept/platform-company-select', method: 'get', }); }; export const getBusinessDeptSelect = () => { return request({ url: '/blade-system/dept/business-dept-select', method: 'get', }); };