Ben Lin
2024-06-18 ebbd788fbb2c0b45d4473798efc57eec8ba74a25
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(