|
@@ -140,7 +140,7 @@ function A4Auth({ mId, authColseFu, authEditFu }: Props) {
|
|
|
|
|
|
const { flag2, txt2 } = r3Ref.current.sonRes();
|
|
|
console.log(flag2);
|
|
|
-
|
|
|
+
|
|
|
// if (!flag2) return MessageFu.warning("至少勾选一个 内控文件权限 模块!");
|
|
|
|
|
|
// 处理功能权限
|
|
@@ -164,11 +164,6 @@ function A4Auth({ mId, authColseFu, authEditFu }: Props) {
|
|
|
}
|
|
|
});
|
|
|
|
|
|
- const obj1 = {
|
|
|
- resources: tempArr,
|
|
|
- roleId: mId,
|
|
|
- };
|
|
|
-
|
|
|
if (tempArr) {
|
|
|
// 勾选了 项目管理 页面权限
|
|
|
if (tempArr.includes("1000")) {
|
|
@@ -179,24 +174,29 @@ function A4Auth({ mId, authColseFu, authEditFu }: Props) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- const res1 = await A4_APIsave1(obj1);
|
|
|
+ const obj1 = {
|
|
|
+ id: mId,
|
|
|
+ dataScope: value,
|
|
|
+ scopeDept: txt,
|
|
|
+ };
|
|
|
+
|
|
|
+ const res1 = await A4_APIsave2(obj1);
|
|
|
|
|
|
if (res1.code === 0) {
|
|
|
const obj2 = {
|
|
|
- id: mId,
|
|
|
- dataScope: value,
|
|
|
- scopeDept: txt,
|
|
|
+ roleId: mId,
|
|
|
+ attrId: txt2,
|
|
|
};
|
|
|
|
|
|
- const res2 = await A4_APIsave2(obj2);
|
|
|
-
|
|
|
+ const res2 = await A4_APIsave3(obj2);
|
|
|
if (res2.code === 0) {
|
|
|
const obj3 = {
|
|
|
+ resources: tempArr,
|
|
|
roleId: mId,
|
|
|
- attrId: txt2,
|
|
|
};
|
|
|
|
|
|
- const res3 = await A4_APIsave3(obj3);
|
|
|
+ const res3 = await A4_APIsave1(obj3);
|
|
|
+
|
|
|
if (res3.code === 0) {
|
|
|
MessageFu.success("授权成功!");
|
|
|
authEditFu();
|