Compare commits

..

No commits in common. "d13ae033551bc857725287e1d9cba72d6259d61d" and "32e8428f46e1553a8f5e61ed719f3657f2fe033c" have entirely different histories.

3 changed files with 659 additions and 545 deletions

View File

@ -917,7 +917,7 @@ const init = async () => {
depTreeMyList.value = []
crumbs.value = []
await getDepsTreeMy2(state.chooseMode)
await getDepsTreeMy2()
if (depTreeMyList.value.length) {
if (state.chooseMode === 1) {
// all

File diff suppressed because it is too large Load Diff

View File

@ -37,36 +37,34 @@ export const useGroupTypeStore = createGlobalState(() => {
depTreeMyList.value = res.data.nodes
}
}
// userInfo?.value?.ID
const getDepsTreeMy2 = async (chooseMode) => {
let params = { nowUserId: 0 }
if (chooseMode === 1) {
const isHasRes = await userHasPermission({
erpUserId: userInfo?.value?.ID,
ruleUrl: [
'auth_chat_app_create_all_dept',
'auth_chat_app_create_limit_dept',
],
})
if (isHasRes.code === 200) {
if (isHasRes.data.auth_chat_app_create_all_dept) {
params = {
nowUserId: 0,
// userInfo?.value?.ID
const getDepsTreeMy2 = async () => {
const isHasRes = await userHasPermission({
erpUserId: userInfo?.value?.ID,
ruleUrl: [
"auth_chat_app_create_all_dept",
"auth_chat_app_create_limit_dept"
]
})
let pramas = { nowUserId : 0 }
if (isHasRes.code === 200) {
if (isHasRes.data.auth_chat_app_create_all_dept) {
pramas = {
nowUserId : 0
}
} else{
if (isHasRes.data.auth_chat_app_create_limit_dept) {
pramas = {
nowUserId : userInfo?.value?.ID
}
} else {
if (isHasRes.data.auth_chat_app_create_limit_dept) {
params = {
nowUserId: userInfo?.value?.ID,
}
} else {
params = {
nowUserId: 0,
}
pramas = {
nowUserId : 0
}
}
}
}
const res = await departmentV2TreeAll2(params)
const res = await departmentV2TreeAll2(pramas)
if (res.status === 0) {
depTreeMyList.value = res.data.nodes
}