Commit 798f3816 authored by cellee's avatar cellee

Signed-off-by: cellee <893264950@qq.com>

parent e695c59c
......@@ -32,12 +32,34 @@ const Account = (props: any) => {
const [form] = Form.useForm();
const formRef = useRef(null);
// 当前账户信息
// 当前账户权限
useEffect(() => {
if (user != null) {
// 发起请求
let data = {};
RA(56, data, module, dispatch);
let treeDatas = treeData;
let _a = user.currentUser.permission; // 当前账户权限
let _p = treeDatas[0].children; // 所有权限列表
let arr: any = []; // 一级栏目权限
let erArr: any = []; // 一级栏目权限
// 循环一级 判断当前账户有没有权限修改增加
for (let i of _a) {
for (let j in _p) {
if (_p[j].key == i) {
arr.push(_p[j].key);
_p[j].disabled = false;
}
// 二级权限
for (let k in _p[j].children) {
if (_p[j].children[k].key == i) {
erArr.push(_p[j].children[k].key);
_p[j].children[k].disableCheckbox = false;
}
}
}
}
// 赋值改变
treeDatas[0].children = _p;
setCheckedKeys(treeDatas as any); // 可勾选列表
}
}, [user]);
......
......@@ -22,7 +22,7 @@ const Guard = (props: any) => {
return (
<div className={styles.base}>
<TitleGet title={'Version 1.5.4'} />
<TitleGet title={'Version 1.5.5'} />
{/* <p>
token:{page.token}
name:{getCookie('name')}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment