diff --git a/src/router/index.js b/src/router/index.js index 4c20539..87df00a 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -319,7 +319,7 @@ const routes = [ { path: 'receiveManager', name: "receiveManager", - component: () => import("../views/moneyManage/receiveDetail/receiveManage.vue"), + component: () => import("../views/moneyManage/receiveDetail/receiveFinance.vue"), meta: { permissionId: [67, 79] } }, {//地区财务 diff --git a/src/views/moneyManage/receiveDetail/receiveFinance.vue b/src/views/moneyManage/receiveDetail/receiveFinance.vue index 68da10d..34cc35f 100644 --- a/src/views/moneyManage/receiveDetail/receiveFinance.vue +++ b/src/views/moneyManage/receiveDetail/receiveFinance.vue @@ -454,12 +454,11 @@ 产品数量 - {{ productUnit }} -
+
永久金币: -
diff --git a/src/views/moneyManage/receiveDetail/receiveManage.vue b/src/views/moneyManage/receiveDetail/receiveManage.vue deleted file mode 100644 index 539f8c8..0000000 --- a/src/views/moneyManage/receiveDetail/receiveManage.vue +++ /dev/null @@ -1,1174 +0,0 @@ - - - \ No newline at end of file diff --git a/src/views/permissions/rolePermission.vue b/src/views/permissions/rolePermission.vue index d38cdcc..341a6b0 100644 --- a/src/views/permissions/rolePermission.vue +++ b/src/views/permissions/rolePermission.vue @@ -198,7 +198,7 @@ const handleAddRole = async function () { "menuIds": finalCheckedKeys, "fatherId": addRole.value.parentId, "market": addRole.value.market, - channel:addRole.value.channel + channel: addRole.value.channel } }) if (res.code === 200) { @@ -319,7 +319,7 @@ const handleEditRolePermissionCheck = (checkedNodes, checkedInfo) => { // 判断是否有选中的节点 if (allCheckedNodes.length === 0) { permissionEditRoleObj.value.checkedKeys = [] - ifHasChannel.value = false + ifHasChannel.value = false return } @@ -329,7 +329,7 @@ const handleEditRolePermissionCheck = (checkedNodes, checkedInfo) => { console.log('编辑角色选中的权限ID:', checkedKeys) console.log('选中的节点数量:', allCheckedNodes.length) - if (checkedKeys.includes(124)||checkedKeys.includes(125)||checkedKeys.includes(126)||checkedKeys.includes(127)) { + if (checkedKeys.includes(124) || checkedKeys.includes(125) || checkedKeys.includes(126) || checkedKeys.includes(127)) { ifHasChannel.value = true } else { ifHasChannel.value = false @@ -431,18 +431,38 @@ const collectIds2 = (tree) => { return ids } +const collectIdsAll = (tree) => { + let ids = [] + tree.forEach((node) => { + ids.push(node.id) + // 如果当前节点没有 children 或 children 为空,说明是叶子节点 + if (node.children || node.children.length === 0) { + ids = ids.concat(collectIdsAll(node.children)) + } + }) + return ids +} + // 编辑角色初始化 const permissionEditRoleInit = async function (row) { console.log('row', row) console.log('row.tree', row.tree) + let EditIds = collectIdsAll(row.tree) + console.log(EditIds); + permissionEditRoleObj.value = {} permissionEditRoleObj.value.id = row.id permissionEditRoleObj.value.roleName = row.roleName permissionEditRoleObj.value.market = row.market permissionEditRoleObj.value.parentId = row.fatherId permissionEditRoleObj.value.parentName = row.fatherName - + permissionEditRoleObj.value.channel = row.channel + if (EditIds.includes(124)) { + ifHasChannel.value = true + } else { + ifHasChannel.value = false + } try { let roleId = permissionEditRoleObj.value.parentId; // 如果没有上级角色,设置为管理员的id