* 'main' of https://gitea-inner.fontree.cn/scout666/chat-app:
  完成输入框组件中@样式和相对应的功能
  修改部门创建权限规则
This commit is contained in:
wwt 2025-03-21 13:35:28 +08:00
commit efc9ffea12
3 changed files with 545 additions and 659 deletions

View File

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

File diff suppressed because it is too large Load Diff

View File

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