v2.0 代码提交

This commit is contained in:
zhuoda
2022-10-27 22:14:48 +08:00
parent 207b949484
commit f7e5f6d539
1851 changed files with 108157 additions and 2231 deletions

View File

@@ -1,29 +0,0 @@
/*
* 权限
*
* @Author: 1024创新实验室-主任:卓大
* @Date: 2022-09-06 20:00:40
* @Wechat: zhuda1024
* @Email: lab1024@163.com
* @Copyright 1024创新实验室 https://1024lab.net Since 2012
*/
import { useUserStore } from '/@/store/modules/system/user';
import lodash from 'lodash';
export function privilegeDirective(el, binding) {
// 超级管理员
if (useUserStore().administratorFlag) {
return true;
}
// 获取功能点权限
let userPointsList = useUserStore().getPointList;
if (!userPointsList) {
return false;
}
// 如果有权限,删除节点
if (!lodash.some(userPointsList,['webPerms',binding.value])) {
el.parentNode.removeChild(el);
}
return true;
}