Commit 66282721 authored by 皮倩雯's avatar 皮倩雯

修改角色管理默认分组名称

parent 5cb40867
Pipeline #44240 skipped with stages
......@@ -75,22 +75,28 @@ const EditForm = props => {
});
});
let data = new Set();
let datalist = [];
info.map(item => {
if (item.isChecked == true) {
data.add(item.groupName);
}
});
list.map((k, i) => {
k.list.map(p => {
datalist.push(p.related);
});
});
if (data.size == info.length) {
setChoo(true);
setIndeterminateAll(false);
} else {
setChoo(false);
if (listData.indexOf(true) != -1) {
setIndeterminateAll(true);
}
}
if (data.size == 0) {
if (datalist.indexOf(true) == -1) {
setIndeterminateAll(false);
} else if (datalist.indexOf(false) == -1) {
setIndeterminateAll(false);
} else {
setIndeterminateAll(true);
}
setIndeterminate(chooseData);
}
......@@ -161,7 +167,9 @@ const EditForm = props => {
}
});
list.map((k, i) => {
data.push(list[i].isChecked);
k.list.map(p => {
data.push(p.related);
});
});
if (data.indexOf(true) == -1) {
setIndeterminateAll(false);
......
......@@ -131,22 +131,16 @@ const SiteManage = () => {
res.data.roleList.map((i, j) => {
console.log(i);
if (i.child.length == 0) {
let childData = { visibleTitle: '默认分组', roleList: [] };
let childData = { visibleTitle: '系统分组', roleList: [] };
childData.visibleValue = i.visibleValue;
i.child.push(childData);
} else {
let arr = [];
i.child.map(k => {
arr.push(k.visibleTitle);
// if (k.visibleTitle != '默认分组') {
// console.log(11);
// let childData = { visibleTitle: '默认分组', roleList: [] };
// childData.visibleValue = i.visibleValue;
// i.child.push(childData);
// }
});
if (arr.indexOf('默认分组') == -1) {
let childData = { visibleTitle: '默认分组', roleList: [] };
if (arr.indexOf('系统分组') == -1) {
let childData = { visibleTitle: '系统分组', roleList: [] };
childData.visibleValue = i.visibleValue;
i.child.push(childData);
}
......@@ -311,7 +305,7 @@ const SiteManage = () => {
/>
</Tooltip>
)}
{i.groupflag && i.groupflag != '默认分组' && (
{i.groupflag && i.groupflag != '系统分组' && (
<Tooltip title="编辑分组" className={styles.fs}>
<EditOutlined
style={{ fontSize: '16px', color: '#1890FF' }}
......@@ -376,7 +370,7 @@ const SiteManage = () => {
/>
</Tooltip>
)}
{itemRole.groupflag && itemRole.groupflag != '默认分组' && (
{itemRole.groupflag && itemRole.groupflag != '系统分组' && (
<Tooltip title="编辑分组" className={styles.fs}>
<EditOutlined
style={{ fontSize: '16px', color: '#1890FF' }}
......@@ -425,7 +419,7 @@ const SiteManage = () => {
/>
</Tooltip>
)}
{item.groupflag && item.groupflag != '默认分组' && (
{item.groupflag && item.groupflag != '系统分组' && (
<Tooltip title="编辑分组" className={styles.fs}>
<EditOutlined
style={{ fontSize: '16px', color: '#1890FF' }}
......@@ -461,19 +455,16 @@ const SiteManage = () => {
};
// 编辑分组
const editorGroup = (e, record) => {
console.log(record, '1212');
e.stopPropagation();
setItemObj(record);
setGroupVisible(true);
};
// 新增角色
const addsUser = (e, record) => {
console.log(e);
console.log(record);
if (record.visibleTitle == '默认分组') {
if (record.visibleTitle == '系统分组') {
message.warn({
duration: 5,
content: '默认分组下的角色不能被关联',
content: '系统分组下的角色不能被关联',
});
}
e.stopPropagation();
......
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