diff --git a/src/api/deps/index.js b/src/api/deps/index.js index 3e80cca..f7659f4 100644 --- a/src/api/deps/index.js +++ b/src/api/deps/index.js @@ -26,6 +26,14 @@ export const departmentV2TreeAll = (data) => { data, }) } +// 通讯录过滤测试部门 +export const departmentV2TreeAll2 = (data) => { + return request({ + url: '/api/v1/contact/department/v2/tree/all', + method: 'POST', + data, + }) +} //获取指定部门下的所有岗位 export const v2TreePositionByDepartment = (data) => { diff --git a/src/pages/chooseByDeps/index.vue b/src/pages/chooseByDeps/index.vue index e99187f..7e18f0e 100644 --- a/src/pages/chooseByDeps/index.vue +++ b/src/pages/chooseByDeps/index.vue @@ -470,7 +470,7 @@ const { t } = useI18n() const { groupActiveIndex, - getDepsTreeMy, + getDepsTreeMy2, depTreeMyList, crumbs, crumbsIndex, @@ -917,7 +917,7 @@ const init = async () => { depTreeMyList.value = [] crumbs.value = [] - await getDepsTreeMy() + await getDepsTreeMy2() if (depTreeMyList.value.length) { if (state.chooseMode === 1) { // 部门选择模式才创建 all 节点 diff --git a/src/store/groupType/index.js b/src/store/groupType/index.js index bbb9944..7ea9e78 100644 --- a/src/store/groupType/index.js +++ b/src/store/groupType/index.js @@ -10,6 +10,7 @@ import { departmentV2AllPosition, groupCreateDept, departmentV2TreeAll, + departmentV2TreeAll2, userV2List, v2TreePositionByDepartment, } from '@/api/deps/index.js' @@ -35,6 +36,13 @@ export const useGroupTypeStore = createGlobalState(() => { } } + const getDepsTreeMy2 = async () => { + const res = await departmentV2TreeAll2() + if (res.status === 0) { + depTreeMyList.value = res.data.nodes + } + } + //获取指定部门下的所有岗位 const getPositionByDepartment = async (params) => { const res = await v2TreePositionByDepartment(params) @@ -124,6 +132,7 @@ export const useGroupTypeStore = createGlobalState(() => { postTreeList, departmentAllPositions, getDepsTreeMy, + getDepsTreeMy2, getPositionByDepartment, getPositionsTree, crumbs,