|
|
|
@ -6,7 +6,9 @@ import BottomPage from '@/views/common/bottom/index.vue' |
|
|
|
import { matterInfo} from "@/api/doc/type" |
|
|
|
import { getMySpaces,doCreateSpace} from "@/api/doc/index" |
|
|
|
import SvgIcon from "@/components/svgIcon/index.vue"; |
|
|
|
import { doDelSpace,spaceMatterRename} from "@/api/doc/space" |
|
|
|
import { doDelSpace,spaceMatterRename,doAccessManage} from "@/api/doc/space" |
|
|
|
import sharePermission from './sharePermission.vue'; |
|
|
|
import spacePermission from './spacePermission.vue'; |
|
|
|
import { h } from 'vue' |
|
|
|
import { |
|
|
|
Delete, |
|
|
|
@ -24,7 +26,7 @@ const currentHoverRow=ref<matterInfo>({}) //table 行的按钮控制 |
|
|
|
const Departs = computed(() => { |
|
|
|
return `${'p0'+userStore.userInfoCont.userId},${userStore.userInfoCont.company},${userStore.userInfoCont.department},${userStore.userInfoCont.organization}` |
|
|
|
}) |
|
|
|
|
|
|
|
const dynamicVNode = ref<VNode | null>(null) //permission 组件的父组件 |
|
|
|
const CutLevelPermit=ref(0) |
|
|
|
|
|
|
|
function onSelectSpace(data:matterInfo,recycling?:boolean){ |
|
|
|
@ -96,30 +98,30 @@ function onSpaceMatterRename(row:matterInfo){ |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
// //空间成员管理 |
|
|
|
// function onAccessManage(){ |
|
|
|
// dynamicVNode.value = h(sharePermission, { |
|
|
|
// uid: uid, |
|
|
|
// uuid: "", |
|
|
|
// spaceid:SpaceID.value.uuid, // |
|
|
|
// confirmFunc: (_list: string[],_infos:string[]) => { |
|
|
|
// // 组织权限数据 |
|
|
|
// //_len=_list.length |
|
|
|
// let permited = btoa(_list.join("|")) |
|
|
|
// doAccessManage(uid,{ |
|
|
|
// "space":SpaceID.value.uuid, |
|
|
|
// "roles":permited, |
|
|
|
// "owner":SpaceID.value.userUuid, |
|
|
|
// "len":_list.length |
|
|
|
// }).then(()=>{ |
|
|
|
//空间成员管理 |
|
|
|
function onAccessManage(row:matterInfo){ |
|
|
|
dynamicVNode.value = h(sharePermission, { |
|
|
|
uid: uid, |
|
|
|
uuid: "", |
|
|
|
spaceid:row.uuid, // |
|
|
|
confirmFunc: (_list: string[],_infos:string[]) => { |
|
|
|
// 组织权限数据 |
|
|
|
//_len=_list.length |
|
|
|
let permited = btoa(_list.join("|")) |
|
|
|
doAccessManage(uid,{ |
|
|
|
"space":row.uuid, |
|
|
|
"roles":permited, |
|
|
|
"owner":row.userUuid, |
|
|
|
"len":_list.length |
|
|
|
}).then(()=>{ |
|
|
|
|
|
|
|
// }) |
|
|
|
// }, |
|
|
|
// closeFunc: () => { |
|
|
|
// dynamicVNode.value=null |
|
|
|
// } |
|
|
|
// }) |
|
|
|
// } |
|
|
|
}) |
|
|
|
}, |
|
|
|
closeFunc: () => { |
|
|
|
dynamicVNode.value=null |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
//删除空间 |
|
|
|
function onDeleteSpace(row:matterInfo){ |
|
|
|
@ -138,13 +140,13 @@ function onDeleteSpace(row:matterInfo){ |
|
|
|
|
|
|
|
//空间权限控制管理 |
|
|
|
function onSpacePManage(row:matterInfo){ |
|
|
|
// dynamicVNode.value=h(spacePermission,{ |
|
|
|
// uid:rawUid, //当前用户的uuid |
|
|
|
// uuid:row.uuid, //文档的uuid |
|
|
|
// suid:SpaceID.value.userUuid, |
|
|
|
// spaceid:SpaceID.value.uuid, //空间uuid |
|
|
|
// closeFunc:()=>dynamicVNode.value=null |
|
|
|
// }) |
|
|
|
dynamicVNode.value=h(spacePermission,{ |
|
|
|
uid:rawUid, //当前用户的uuid |
|
|
|
uuid:row.uuid, //文档的uuid |
|
|
|
suid:row.userUuid, |
|
|
|
spaceid:row.uuid, //空间uuid |
|
|
|
closeFunc:()=>dynamicVNode.value=null |
|
|
|
}) |
|
|
|
} |
|
|
|
//------------------------------------------------------ |
|
|
|
|
|
|
|
@ -222,6 +224,10 @@ onMounted(()=>{ |
|
|
|
<div style="margin: 20px 0; display: flex;align-items:center;" @click="onNewSpace"><Plus style="width: 18px; height: 18px;"></Plus> 创建共享空间</div> |
|
|
|
</div> |
|
|
|
<div v-if="showPopup" class="mask" @click="showPopup = false"></div> |
|
|
|
|
|
|
|
<div v-if="dynamicVNode"> |
|
|
|
<component :is="dynamicVNode" /> |
|
|
|
</div> |
|
|
|
<!-- 主体 --> |
|
|
|
<Transition name="popuper"> |
|
|
|
<div v-if="showPopup" class="bs-wrapper"> |
|
|
|
@ -232,7 +238,7 @@ onMounted(()=>{ |
|
|
|
</div> |
|
|
|
<hr> |
|
|
|
<div class="blocker-list" v-if="CutLevelPermit>=5"> |
|
|
|
<span class="blocker" @click="onSpaceMatterRename(currentHoverRow)"> |
|
|
|
<span class="blocker" @click="onAccessManage(currentHoverRow)"> |
|
|
|
<Edit style="width: 24px; height: 24px;"></Edit>成员管理</span> |
|
|
|
<span class="blocker" @click="onSpacePManage(currentHoverRow)"> |
|
|
|
<Setting style="width: 24px; height: 24px;"></Setting>权限设置</span> |
|
|
|
@ -243,6 +249,7 @@ onMounted(()=>{ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</Transition> |
|
|
|
|
|
|
|
<BottomPage /> |
|
|
|
</template> |
|
|
|
|
|
|
|
|