|
|
|
@ -24,9 +24,9 @@
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tree-item">
|
|
|
|
|
<div class="title">用户权限配置</div>
|
|
|
|
|
<BasicTree ref="treeRef" check-strictly :tree-data="treeData" @select="handleSelect">
|
|
|
|
|
<BasicTree ref="menuTreeRef" check-strictly :tree-data="menuTree" @select="handleSelectMenu">
|
|
|
|
|
<template #title="custom">
|
|
|
|
|
<span>{{ custom.node.title }}</span>
|
|
|
|
|
<span>{{ custom.node.name }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</BasicTree>
|
|
|
|
|
</div>
|
|
|
|
@ -38,10 +38,11 @@ import { defineComponent, onMounted, ref } from 'vue'
|
|
|
|
|
import { BasicTable, useTable, TableAction } from '/@/components/Table'
|
|
|
|
|
import { getDataRuleList } from '/@/api/system/datarule'
|
|
|
|
|
import { useModal } from '/@/components/Modal'
|
|
|
|
|
import { GetOrgUserTree, GetClientUserPermissions } from './api'
|
|
|
|
|
import { GetOrgUserTree, GetClientUserPermissions,GetCodeDataRuleList } from './api'
|
|
|
|
|
import { BasicTree } from '/@/components/Tree/index'
|
|
|
|
|
// import { columns, searchFormSchema } from './columns'
|
|
|
|
|
const treeData = ref([])
|
|
|
|
|
const menuTree = ref([])
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
GetOrgUserTree().then(res => {
|
|
|
|
|
treeData.value = res.data
|
|
|
|
@ -50,9 +51,23 @@ onMounted(() => {
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
const userId = ref('')
|
|
|
|
|
function handleSelect(selectedKeys: any, info: any) {
|
|
|
|
|
if (info.node.id) {
|
|
|
|
|
userId.value = info.node.value
|
|
|
|
|
GetClientUserPermissions({ id: info.node.value }).then(res => {
|
|
|
|
|
menuTree.value = res.data
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
function handleSelectMenu(selectedKeys: any, info: any){
|
|
|
|
|
console.log(info)
|
|
|
|
|
if(info.node.children==null || info.node.children.length==0){
|
|
|
|
|
const data = {
|
|
|
|
|
permissionId: info.node.id,
|
|
|
|
|
id:userId.value
|
|
|
|
|
}
|
|
|
|
|
GetCodeDataRuleList(data).then(res=>{
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|