通讯录的接口修改
This commit is contained in:
parent
505bb9b9f8
commit
b4b614b545
@ -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) => {
|
||||
|
@ -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 节点
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user