|
@@ -90,6 +90,7 @@ const ruleForm = ref({
|
|
|
role_comment: "",
|
|
|
role_status: "",
|
|
|
});
|
|
|
+const msgId = ref<any>("");
|
|
|
const auth = ref("1");
|
|
|
const form = ref({
|
|
|
query_row_condition: "",
|
|
@@ -140,6 +141,7 @@ const roleDetails = async () => {
|
|
|
});
|
|
|
if (code == 0) {
|
|
|
ruleForm.value = returnData.listValues[0];
|
|
|
+ msgId.value = returnData.submitID;
|
|
|
} else {
|
|
|
ElMessage.error(message);
|
|
|
}
|
|
@@ -222,12 +224,12 @@ const roleAuths = async () => {
|
|
|
} catch (error) {}
|
|
|
};
|
|
|
|
|
|
-const handleNodeClick = data => {
|
|
|
- const cloneData = _.cloneDeep(data)
|
|
|
+const handleNodeClick = (data) => {
|
|
|
+ const cloneData = _.cloneDeep(data);
|
|
|
checkObj.value = cloneData;
|
|
|
- checkData.value = _.unionBy([...checkData.value, cloneData], 'auth_id');
|
|
|
+ checkData.value = _.unionBy([...checkData.value, cloneData], "auth_id");
|
|
|
const checkNode = boxData.value[boxData.value.length - 1].find(
|
|
|
- item => item.auth_id == data.auth_id
|
|
|
+ (item) => item.auth_id == data.auth_id
|
|
|
);
|
|
|
if (checkNode) {
|
|
|
form.value = { ...checkNode };
|
|
@@ -256,13 +258,13 @@ const currentChange = () => {
|
|
|
const data1 = boxData.value[boxData.value.length - 1]; //最后一条数据
|
|
|
const data2 = boxData.value[boxData.value.length - 2]; //倒数第二条数据
|
|
|
if (data1.length > data2.length) {
|
|
|
- checksBoxTs(data1, data2, "add");
|
|
|
+ checksBoxTs(data1, data2, "add", 1);
|
|
|
} else {
|
|
|
- checksBoxTs(data2, data1, "del");
|
|
|
+ checksBoxTs(data2, data1, "del", 3);
|
|
|
}
|
|
|
};
|
|
|
|
|
|
-const checksBoxTs = async (datas, arr, type) => {
|
|
|
+const checksBoxTs = async (datas, arr, type, eventType) => {
|
|
|
const res = [...datas, ...arr].filter(
|
|
|
(item) =>
|
|
|
!(
|
|
@@ -285,21 +287,28 @@ const checksBoxTs = async (datas, arr, type) => {
|
|
|
let authObj = cap.AuthList
|
|
|
? Object.assign(_.cloneDeep(obj), cap.AuthList)
|
|
|
: Object.assign(_.cloneDeep(obj), cap);
|
|
|
+ if (authObj.hasOwnProperty("IDKey")) {
|
|
|
+ delete authObj.IDKey;
|
|
|
+ }
|
|
|
+ if (authObj.hasOwnProperty("auth_name")) {
|
|
|
+ delete authObj.auth_name;
|
|
|
+ }
|
|
|
if (type == "add") {
|
|
|
- obj.event = 1;
|
|
|
- authObj.event = 1;
|
|
|
+ // obj.event = 1;
|
|
|
+ // authObj.event = 1;
|
|
|
msg1.push(obj);
|
|
|
msg2.push(authObj);
|
|
|
} else {
|
|
|
- obj.event = 3;
|
|
|
- authObj.event = 3;
|
|
|
+ // obj.event = 3;
|
|
|
+ // authObj.event = 3;
|
|
|
msg1.push(obj);
|
|
|
- msg2.push(authObj);
|
|
|
+ msg2.push(obj);
|
|
|
}
|
|
|
}
|
|
|
GeneralDataReception({
|
|
|
serviceId: SERVICE_ID.roleMsgTreeId,
|
|
|
dataContent: JSON.stringify(msg1),
|
|
|
+ event: eventType,
|
|
|
}).then((result) => {
|
|
|
if (result.code == 0) {
|
|
|
if (type == "add") {
|
|
@@ -321,6 +330,7 @@ const checksBoxTs = async (datas, arr, type) => {
|
|
|
GeneralDataReception({
|
|
|
serviceId: SERVICE_ID.roleMsgAuthId,
|
|
|
dataContent: JSON.stringify(msg2),
|
|
|
+ event: eventType,
|
|
|
}).then((result) => {
|
|
|
if (result.code == 0) {
|
|
|
if (type == "add") {
|