更新密码找回uniapp
This commit is contained in:
1 parent
7f9a66da0f
commit
3fdda89833
1304 files changed
+3503
-26132
No files matched your search
@@ -1,13 +1,5 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
/**
|
||||
* 组织架构接口(组织 / 员工 / 职位)
|
||||
*
|
||||
* 组织架构是租户端通用基础数据:进销存(erp)与办公自动化(oa)两个模块各自有独立界面,
|
||||
* 但读写的是同一份数据,后端按登录租户自动隔离。两端接口路径只有模块前缀不同,
|
||||
* 因此这里用工厂函数按模块生成一套接口。
|
||||
*/
|
||||
|
||||
const MODULES = ['erp', 'oa'];
|
||||
|
||||
function normalizeModule(module) {
|
||||
@@ -21,8 +13,6 @@ export function createOrganizationApi(module) {
|
||||
return {
|
||||
module: normalizeModule(module),
|
||||
|
||||
/* ------------------------------- 组织机构 ------------------------------- */
|
||||
|
||||
getOrganizationList(params) {
|
||||
return request({ url: `${base}/getOrganization`, method: 'get', params });
|
||||
},
|
||||
@@ -71,7 +61,6 @@ export function createOrganizationApi(module) {
|
||||
return request({ url: `${base}/getOrganizationStats`, method: 'get' });
|
||||
},
|
||||
|
||||
/** 移动组织节点到新的上级(拖拽调整层级) */
|
||||
moveOrganization(orgId, parentId, sort) {
|
||||
const data = { org_id: orgId, parent_id: parentId || 0 };
|
||||
if (sort !== undefined && sort !== null) {
|
||||
@@ -80,7 +69,6 @@ export function createOrganizationApi(module) {
|
||||
return request({ url: `${base}/moveOrganization`, method: 'post', data });
|
||||
},
|
||||
|
||||
/** 批量操作组织,action 取 enable / disable / delete */
|
||||
batchOrganizeOrganizations(ids, action) {
|
||||
return request({
|
||||
url: `${base}/batchOrganizeOrganizations`,
|
||||
@@ -97,8 +85,6 @@ export function createOrganizationApi(module) {
|
||||
});
|
||||
},
|
||||
|
||||
/* --------------------------------- 员工 --------------------------------- */
|
||||
|
||||
getEmployeeList(params) {
|
||||
return request({ url: `${base}/getEmployee`, method: 'get', params });
|
||||
},
|
||||
@@ -123,7 +109,6 @@ export function createOrganizationApi(module) {
|
||||
return request({ url: `${base}/getOrganizationEmployees/${orgId}`, method: 'get' });
|
||||
},
|
||||
|
||||
/** 员工调岗:支持单个或批量 */
|
||||
moveEmployeeToOrg(employeeIds, orgId, position) {
|
||||
const ids = Array.isArray(employeeIds) ? employeeIds : [employeeIds];
|
||||
const data = { employee_ids: ids, org_id: orgId };
|
||||
@@ -141,8 +126,6 @@ export function createOrganizationApi(module) {
|
||||
});
|
||||
},
|
||||
|
||||
/* --------------------------------- 职位 --------------------------------- */
|
||||
|
||||
getPositionList(params) {
|
||||
return request({ url: `${base}/getPosition`, method: 'get', params });
|
||||
},
|
||||
@@ -171,8 +154,6 @@ export function createOrganizationApi(module) {
|
||||
});
|
||||
},
|
||||
|
||||
/* ----------------------------- 设置与导入导出 ----------------------------- */
|
||||
|
||||
getOrgSettings() {
|
||||
return request({ url: `${base}/getOrgSettings`, method: 'get' });
|
||||
},
|
||||
@@ -206,10 +187,8 @@ export function createOrganizationApi(module) {
|
||||
};
|
||||
}
|
||||
|
||||
/** 进销存模块的组织架构接口 */
|
||||
export const erpOrganizationApi = createOrganizationApi('erp');
|
||||
|
||||
/** 办公自动化模块的组织架构接口 */
|
||||
export const oaOrganizationApi = createOrganizationApi('oa');
|
||||
|
||||
export default erpOrganizationApi;
|
||||
Reference in new issue
Block a user