From ebbd788fbb2c0b45d4473798efc57eec8ba74a25 Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期二, 18 六月 2024 14:51:16 +0800 Subject: [PATCH] 版本更新至2.11.5 --- src/api/tigerapi/dept.ts | 18 ++++++++++++++++-- 1 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/api/tigerapi/dept.ts b/src/api/tigerapi/dept.ts index 7e7a0e2..53c483d 100644 --- a/src/api/tigerapi/dept.ts +++ b/src/api/tigerapi/dept.ts @@ -20,6 +20,20 @@ }, ); +/** + * @description: 鑾峰彇宸ュ巶鍒楄〃甯︽潈闄愭帶鍒� + * @param {string} userId + * @return {*} + */ +export async function getProdTree(user: {}) { + let res = await Promise.all([getProdTreeList(), prodListApi(user['userId'])]); + let treeData = res[0]; + treeData = treeData.filter((x) => + res[1].Data.Items.some((item) => item.PROD_CODE == x.deptCode), + ); + return treeData; +} + export const getDeptListByPage = async (params: DeptPageParams) => { let sqlcmd = ''; console.log(1, params); @@ -132,11 +146,11 @@ return data; }; -export const prodListApi = async (params: Recordable) => { +export const prodListApi = async (userId: string) => { // const usParams = genAction('V_USER_ORG', `USER_ID='${userid}'`); const usParams = genAction('V_USER_PROD', { QueryAble_T: '', - where: "USER_ID = '" + params + "'", + where: "USER_ID = '" + userId + "'", order: '', }); const data = await defHttp.post( -- Gitblit v1.9.3