调整发起群聊,部门创建的权限
Some checks are pending
Check / lint (push) Waiting to run
Check / typecheck (push) Waiting to run
Check / build (build, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build, 18.x, windows-latest) (push) Waiting to run
Check / build (build:app, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build:app, 18.x, windows-latest) (push) Waiting to run
Check / build (build:mp-weixin, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build:mp-weixin, 18.x, windows-latest) (push) Waiting to run
Some checks are pending
Check / lint (push) Waiting to run
Check / typecheck (push) Waiting to run
Check / build (build, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build, 18.x, windows-latest) (push) Waiting to run
Check / build (build:app, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build:app, 18.x, windows-latest) (push) Waiting to run
Check / build (build:mp-weixin, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build:mp-weixin, 18.x, windows-latest) (push) Waiting to run
This commit is contained in:
parent
8eb0f0b4f2
commit
1f64ffd8aa
@ -34,6 +34,14 @@ export const departmentV2TreeAll2 = (data) => {
|
||||
data,
|
||||
})
|
||||
}
|
||||
// 查询是否有权限
|
||||
export const userHasPermission = (data) => {
|
||||
return request({
|
||||
url: '/api/v1/contact/check/erp/rule',
|
||||
method: 'POST',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
//获取指定部门下的所有岗位
|
||||
export const v2TreePositionByDepartment = (data) => {
|
||||
|
@ -33,6 +33,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
v-if="isHasPermission"
|
||||
@click="groupActiveIndex = 1"
|
||||
class="groupCard secondPanel"
|
||||
:class="groupActiveIndex === 1 ? 'activePanel' : ''"
|
||||
@ -136,11 +137,30 @@ import { useChatList } from '@/store/chatList/index.js'
|
||||
import { useAuth } from '@/store/auth'
|
||||
import { useTalkStore, useUserStore } from '@/store'
|
||||
import { useGroupTypeStore } from '@/store/groupType'
|
||||
|
||||
import { userHasPermission } from '@/api/deps/index.js'
|
||||
const { groupActiveIndex, depCheckedKeys } = useGroupTypeStore()
|
||||
const { userInfo } = useAuth()
|
||||
onUnload(()=> {
|
||||
|
||||
|
||||
})
|
||||
const isHasPermission = ref(false)
|
||||
onShow( async() =>{
|
||||
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 || isHasRes.data.auth_chat_app_create_limit_dept) {
|
||||
isHasPermission.value = true
|
||||
} else{
|
||||
isHasPermission.value = false
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
const confirmBtnStatus = computed(() => {
|
||||
let disabledT = false
|
||||
switch (groupActiveIndex.value) {
|
||||
@ -210,10 +230,10 @@ const handleConfirm = () => {
|
||||
border-radius: 12rpx;
|
||||
&.firstPanel {
|
||||
background-image: url('@/static/image/chatList/zu6033@2x.png');
|
||||
margin-bottom: 28rpx;
|
||||
}
|
||||
&.secondPanel {
|
||||
background-image: url('@/static/image/chatList/zu6031@2x.png');
|
||||
margin-top: 28rpx;
|
||||
margin-bottom: 28rpx;
|
||||
}
|
||||
&.thirdPanel {
|
||||
|
@ -11,10 +11,12 @@ import {
|
||||
groupCreateDept,
|
||||
departmentV2TreeAll,
|
||||
departmentV2TreeAll2,
|
||||
userHasPermission,
|
||||
userV2List,
|
||||
v2TreePositionByDepartment,
|
||||
} from '@/api/deps/index.js'
|
||||
|
||||
import { useAuth } from '@/store/auth'
|
||||
const { userInfo } = useAuth()
|
||||
export const useGroupTypeStore = createGlobalState(() => {
|
||||
const groupName = ref('')
|
||||
const groupActiveIndex = ref(-1) // 当前激活的分组索引
|
||||
@ -35,9 +37,34 @@ export const useGroupTypeStore = createGlobalState(() => {
|
||||
depTreeMyList.value = res.data.nodes
|
||||
}
|
||||
}
|
||||
|
||||
// userInfo?.value?.ID
|
||||
const getDepsTreeMy2 = async () => {
|
||||
const res = await departmentV2TreeAll2()
|
||||
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 {
|
||||
pramas = {
|
||||
nowUserId : 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
const res = await departmentV2TreeAll2(pramas)
|
||||
if (res.status === 0) {
|
||||
depTreeMyList.value = res.data.nodes
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user