| | |
| | | }, |
| | | ); |
| | | |
| | | /** |
| | | * @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); |
| | |
| | | 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( |