添加员工权限功能

This commit is contained in:
yangjun 2026-03-12 14:11:59 +08:00
parent 3a8d8de4e0
commit 120f001a03
1 changed files with 10 additions and 18 deletions

View File

@ -19,31 +19,20 @@
<a-tag color="purple" v-if="itemNu.areaFlag==4">{{itemNu.areaFlag_dictText}}</a-tag>
</template>
<a-card title="基础功能" bodyStyle="padding: 14px;" headStyle="min-height: 40px;">
<template v-for="(item,index) in treeData" :key="index">
<template v-if="item.code === 'hldy' && itemNu.areaFlag == 1">
<template v-for="itemOne in item.children">
<a-checkbox :checked="true" disabled style="margin-top:10px;">{{ itemOne.slotTitle }}</a-checkbox>
</template>
</template>
<template v-else-if="item.code === 'kf' && itemNu.areaFlag == 3">
<template v-for="itemOne in item.children">
<a-checkbox :checked="true" disabled style="margin-top:10px;">{{ itemOne.slotTitle }}</a-checkbox>
</template>
<template v-for="(item,index) in nuData" :key="index">
<template v-if="item.key === itemNu.nuId">
<a-checkbox :checked="true" disabled style="margin-top:10px;">{{ item.slotTitle }}</a-checkbox>
</template>
</template>
</a-card>
<a-card title="扩展功能" style="margin-top: 10px;" headStyle="min-height: 40px;" bodyStyle="padding: 14px;">
<template v-for="(item,index) in treeData" :key="index">
<template v-if="item.code === 'kzgn'">
<a-checkbox-group v-model:value="itemNu.permissionIds" style="margin-top: -10px;">
<template v-for="itemOne in item.children">
<a-checkbox :value="itemOne.key" style="margin-top:10px;">{{ itemOne.slotTitle }}</a-checkbox>
<a-checkbox-group v-model:value="itemNu.permissionIds" style="margin-top: -10px;">
<template v-for="(item,index) in treeData" :key="index">
<a-checkbox :value="item.key" style="margin-top:10px;">{{ item.slotTitle }}</a-checkbox>
</template>
</a-checkbox-group>
</template>
</template>
</a-card>
</a-card>
</a-card>
@ -67,6 +56,7 @@
const emit = defineEmits(['register']);
//
const treeData = ref<TreeItem[]>([]);
const nuData = ref<TreeItem[]>([]);
//
const allTreeKeys = ref([]);
//
@ -102,6 +92,7 @@ const formData = reactive<Record<string, any>>({
const roleResult = await queryTreeListForRole();
// update-begin--author:liaozhiyang---date:20240228---forQQYUN-8355
treeData.value = translateTitle(roleResult.treeList);
nuData.value = translateTitle(roleResult.nuList);
// update-end--author:liaozhiyang---date:20240228---forQQYUN-8355
allTreeKeys.value = roleResult.ids;
// update-begin--author:liaozhiyang---date:20240531---forTV360X-590
@ -157,6 +148,7 @@ const formData = reactive<Record<string, any>>({
*/
function reset() {
treeData.value = [];
nuData.value = [];
allTreeKeys.value = [];
checkedKeys.value = [];
defaultCheckedKeys.value = [];