diff --git a/src/views/moneyManage/refundDetail/refundCharge.vue b/src/views/moneyManage/refundDetail/refundCharge.vue index d29a355..34989d2 100644 --- a/src/views/moneyManage/refundDetail/refundCharge.vue +++ b/src/views/moneyManage/refundDetail/refundCharge.vue @@ -416,7 +416,7 @@ const channelOptions = ref([{ const statusList = ref(['待审核','审核通过','已驳回','退款成功']) // 查全部 const getRefund = async function () { - if (!hasMenuPermission(menuTree.value, permissionMapping.refundChargeShow)) { + if (!hasMenuPermission(menuTree.value, permissionMapping.view_area_manager_refund)) { ElMessage.error('无此权限') return } @@ -467,7 +467,7 @@ const getRefund = async function () { } // 审核通过 const handlePass = async function () { - if (!hasMenuPermission(menuTree.value, permissionMapping.refundChargeAudit)) { + if (!hasMenuPermission(menuTree.value, permissionMapping.audit_area_manager_refund)) { ElMessage.error('无此权限') return } @@ -494,7 +494,7 @@ const handlePass = async function () { } // 审核驳回 const handleReject = async function () { - if (!hasMenuPermission(menuTree.value, permissionMapping.refundChargeAudit)) { + if (!hasMenuPermission(menuTree.value, permissionMapping.audit_area_manager_refund)) { ElMessage.error('无此权限') return } @@ -523,7 +523,7 @@ const handleReject = async function () { } } const showStep = function (row) { - if (!hasMenuPermission(menuTree.value, permissionMapping.refundChargeProgShow)) { + if (!hasMenuPermission(menuTree.value, permissionMapping.track_area_manager_refund_progress)) { ElMessage.error('无此权限') return } diff --git a/src/views/moneyManage/refundDetail/refundDetail.vue b/src/views/moneyManage/refundDetail/refundDetail.vue index 965c629..86e778c 100644 --- a/src/views/moneyManage/refundDetail/refundDetail.vue +++ b/src/views/moneyManage/refundDetail/refundDetail.vue @@ -27,10 +27,10 @@ const navigateTo = (name) => { const initPermissions = () => { if (!menuTree.value || !menuTree.value.length) return - isService.value = hasMenuPermission(menuTree.value, permissionMapping.refundService) - isFinance.value = hasMenuPermission(menuTree.value, permissionMapping.refundFinance) - isCharge.value = hasMenuPermission(menuTree.value, permissionMapping.refundCharge) - isHeader.value = hasMenuPermission(menuTree.value, permissionMapping.refundHeader) + isService.value = hasMenuPermission(menuTree.value, permissionMapping.refund_area_customer_service) + isFinance.value = hasMenuPermission(menuTree.value, permissionMapping.refund_area_finance) + isCharge.value = hasMenuPermission(menuTree.value, permissionMapping.refund_area_manager) + isHeader.value = hasMenuPermission(menuTree.value, permissionMapping.refund_headquarters_finance) console.log('====================================', isService.value, isFinance.value,isCharge.value,isHeader.value) } diff --git a/src/views/moneyManage/refundDetail/refundFinance.vue b/src/views/moneyManage/refundDetail/refundFinance.vue index 0acd441..24e46b4 100644 --- a/src/views/moneyManage/refundDetail/refundFinance.vue +++ b/src/views/moneyManage/refundDetail/refundFinance.vue @@ -409,7 +409,7 @@ const statusStepMap = { const statusList = ref(['待审核','审核通过','已驳回','退款成功']) // 查全部 const getRefund = async function () { - if (!hasMenuPermission(menuTree.value, permissionMapping.refundFinanceShow)) { + if (!hasMenuPermission(menuTree.value, permissionMapping.view_area_finance_refund)) { ElMessage.error('无此权限') return } @@ -460,7 +460,7 @@ const getRefund = async function () { } // 审核通过 const handlePass = async function () { - if (!hasMenuPermission(menuTree.value, permissionMapping.refundFinanceAudit)) { + if (!hasMenuPermission(menuTree.value, permissionMapping.audit_area_finance_refund)) { ElMessage.error('无此权限') return } @@ -486,7 +486,7 @@ const handlePass = async function () { } // 审核驳回 const handleReject = async function () { - if (!hasMenuPermission(menuTree.value, permissionMapping.refundFinanceAudit)) { + if (!hasMenuPermission(menuTree.value, permissionMapping.audit_area_finance_refund)) { ElMessage.error('无此权限') return } @@ -744,7 +744,7 @@ const getMarket = async function () { } } const showStep = function (row) { - if (!hasMenuPermission(menuTree.value, permissionMapping.refundFinanceProgShow)) { + if (!hasMenuPermission(menuTree.value, permissionMapping.track_area_finance_refund_progress)) { ElMessage.error('无此权限') return } diff --git a/src/views/moneyManage/refundDetail/refundHeader.vue b/src/views/moneyManage/refundDetail/refundHeader.vue index 191a9e0..37140ed 100644 --- a/src/views/moneyManage/refundDetail/refundHeader.vue +++ b/src/views/moneyManage/refundDetail/refundHeader.vue @@ -461,7 +461,7 @@ const executorList = ref([ ]) // 查全部 const getRefund = async function () { - if (!hasMenuPermission(menuTree.value, permissionMapping.refundHeaderShow)) { + if (!hasMenuPermission(menuTree.value, permissionMapping.view_headquarters_refund)) { ElMessage.error('无此权限') return } @@ -510,7 +510,7 @@ const getRefund = async function () { } // 审核通过 const handlePass = async function () { - if (!hasMenuPermission(menuTree.value, permissionMapping.refundHeaderAudit)) { + if (!hasMenuPermission(menuTree.value, permissionMapping.audit_headquarters_refund)) { ElMessage.error('无此权限') return } @@ -543,7 +543,7 @@ const handlePass = async function () { } // 审核驳回 const handleReject = async function () { - if (!hasMenuPermission(menuTree.value, permissionMapping.refundHeaderAudit)) { + if (!hasMenuPermission(menuTree.value, permissionMapping.audit_headquarters_refund)) { ElMessage.error('无此权限') return } @@ -614,7 +614,7 @@ const reset = function () { getRefund() } const showStep = function (row) { - if (!hasMenuPermission(menuTree.value, permissionMapping.refundHeaderProgShow)) { + if (!hasMenuPermission(menuTree.value, permissionMapping.track_headquarters_refund_progress)) { ElMessage.error('无此权限') return } diff --git a/src/views/moneyManage/refundDetail/refundService.vue b/src/views/moneyManage/refundDetail/refundService.vue index 9ccb169..9c2ca93 100644 --- a/src/views/moneyManage/refundDetail/refundService.vue +++ b/src/views/moneyManage/refundDetail/refundService.vue @@ -251,7 +251,7 @@ const isKF = adminData.value.adminName.includes('客服') const statusList = ref(['已提交', '已撤回', '进行中','已退款','已驳回']) // 查全部 const getRefund = async function () { - if (!hasMenuPermission(menuTree.value, permissionMapping.refundServiceShow)) { + if (!hasMenuPermission(menuTree.value, permissionMapping.view_customer_service_refund_pending)) { ElMessage.error('无此权限') return } @@ -302,7 +302,7 @@ const getRefund = async function () { } // 撤回 const recall = async function () { - if (!hasMenuPermission(menuTree.value, permissionMapping.refundServiceBack)) { + if (!hasMenuPermission(menuTree.value, permissionMapping.withdraw_customer_service_refund)) { ElMessage.error('无此权限') return } @@ -330,7 +330,7 @@ const recall = async function () { } // 编辑 const submitEdit = async function () { - if (!hasMenuPermission(menuTree.value, permissionMapping.refundServiceEdit)) { + if (!hasMenuPermission(menuTree.value, permissionMapping.edit_customer_service_refund)) { ElMessage.error('无此权限') return } diff --git a/src/views/permissions/permissions.vue b/src/views/permissions/permissions.vue index 779e5c8..dda6a63 100644 --- a/src/views/permissions/permissions.vue +++ b/src/views/permissions/permissions.vue @@ -27,8 +27,8 @@ const navigateTo = (name) => { const initPermissions = () => { if (!menuTree.value || !menuTree.value.length) return; - hasUser.value = hasMenuPermission(menuTree.value, permissionMapping.userManage); - hasRole.value = hasMenuPermission(menuTree.value, permissionMapping.roleManage); + hasUser.value = hasMenuPermission(menuTree.value, permissionMapping.user_management); + hasRole.value = hasMenuPermission(menuTree.value, permissionMapping.role_management); console.log('====================================', hasUser.value, hasRole.value) }; diff --git a/src/views/permissions/rolePermission.vue b/src/views/permissions/rolePermission.vue index 18d7da1..8ba8384 100644 --- a/src/views/permissions/rolePermission.vue +++ b/src/views/permissions/rolePermission.vue @@ -37,7 +37,7 @@ const addRole = ref({ const addRoleMarket = ref([]) const getRoleList = async function (val) { - if (!findMenuById(menuTree.value, permissionMapping.roleManageShow)) { + if (!findMenuById(menuTree.value, permissionMapping.view_role_information)) { ElMessage.error('无此权限') return } @@ -168,7 +168,7 @@ function processTreeData(data) { } const handleAddRole = async function () { - if (!findMenuById(menuTree.value, permissionMapping.addRoleInfo)) { + if (!findMenuById(menuTree.value, permissionMapping.add_role_information)) { ElMessage.error('无此权限') return } @@ -273,10 +273,10 @@ const getLists = async function () { //金豆过滤 const goldenBeanMenuIds = new Set([ - permissionMapping.beanAudit, - permissionMapping.beanRecharge, - permissionMapping.beanConsume, - permissionMapping.beanDetail + permissionMapping.gold_bean_audit, + permissionMapping.gold_bean_recharge, + permissionMapping.gold_bean_consumption, + permissionMapping.gold_bean_customer_details ]) // 15,43,44,45,46,47,// 金豆审核 // 18,52,53,54,// 金豆充值 @@ -299,7 +299,7 @@ const filterGoldenBeanMenus = (tree) => { // 过滤权限模块(????????)俺不会 const filterPermission = (tree) => { return tree.filter(item => { - if (item.id === permissionMapping.permissionManage) { + if (item.id === permissionMapping.permission_management) { return false } else if (item.children && item.children.length > 0) { @@ -464,7 +464,7 @@ const permissionEditRoleInit = async function (row) { // 编辑角色提交 const permissionEditRole = async function () { - if (!findMenuById(menuTree.value, permissionMapping.editRoleInfo)) { + if (!findMenuById(menuTree.value, permissionMapping.edit_role_information)) { ElMessage.error('无此权限') return } @@ -570,9 +570,9 @@ const Rolerules = reactive({ const throttledHandleAddRole = _.throttle(handleAddRole, 5000, { trailing: false }) -const canLook = findMenuById(menuTree.value, permissionMapping.roleManageShow) -const canAdd = findMenuById(menuTree.value, permissionMapping.addRoleInfo) -const canEdit = findMenuById(menuTree.value, permissionMapping.editRoleInfo) +const canLook = findMenuById(menuTree.value, permissionMapping.view_role_information) +const canAdd = findMenuById(menuTree.value, permissionMapping.add_role_information) +const canEdit = findMenuById(menuTree.value, permissionMapping.edit_role_information) // 挂载 onMounted(async function () { await getRoleList() diff --git a/src/views/permissions/userPermission.vue b/src/views/permissions/userPermission.vue index 552d3d5..d087f1f 100644 --- a/src/views/permissions/userPermission.vue +++ b/src/views/permissions/userPermission.vue @@ -270,7 +270,7 @@ const userAddInit = function () { //新增用户 const permissionAdd = async function () { - if (!findMenuById(menuTree.value, permissionMapping.addUserInfo)) { + if (!canLook) { ElMessage.error('无此权限') return } @@ -500,7 +500,7 @@ const editAdminRules = { }; // 编辑用户权限提交 const permissionEdit = async function () { - if (!findMenuById(menuTree.value, permissionMapping.editUserInfo)) { + if (!canEdit) { ElMessage.error('无此权限') return } @@ -576,7 +576,7 @@ const del = function (row) { } // 删除权限 const delConfirm = async function () { - if (!findMenuById(menuTree.value, permissionMapping.deleteUserInfo)) { + if (!canDel) { ElMessage.error('无此权限') return } @@ -598,7 +598,7 @@ const delConfirm = async function () { } // 禁用启用用户权限 const editStatus = async function (row) { - if (!findMenuById(menuTree.value, permissionMapping.changeStatus)) { + if (!change) { ElMessage.error('无此权限') return } @@ -791,7 +791,7 @@ const resetPassword = function (row) { // 确认重置密码 const confirmResetPassword = async function () { - if (!findMenuById(menuTree.value, permissionMapping.updateUserInfo)) { + if (!canEdit) { ElMessage.error('无此权限') return } @@ -895,12 +895,12 @@ const throttledPermissionEdit = _.throttle(permissionEdit, 5000, { const throttledPermissionAdd = _.throttle(permissionAdd, 5000, { trailing: false }) -const canLook = findMenuById(menuTree.value, permissionMapping.userManageShow)// 我真是服啦,查询也做嘛 -const canAdd = findMenuById(menuTree.value, permissionMapping.addUserInfo) -const canEdit = findMenuById(menuTree.value, permissionMapping.editUserInfo) -const canReset = findMenuById(menuTree.value, permissionMapping.updateUserInfo) -const canDel = findMenuById(menuTree.value, permissionMapping.deleteUserInfo) -const change = findMenuById(menuTree.value, permissionMapping.changeStatus) +const canLook = findMenuById(menuTree.value, permissionMapping.display_user_management)// 我真是服啦,查询也做嘛 +const canAdd = findMenuById(menuTree.value, permissionMapping.add_user_information) +const canEdit = findMenuById(menuTree.value, permissionMapping.edit_user_information) +const canReset = findMenuById(menuTree.value, permissionMapping.reset_user_password) +const canDel = findMenuById(menuTree.value, permissionMapping.delete_user_information) +const change = findMenuById(menuTree.value, permissionMapping.enable_disable_user) // 挂载 onMounted(async function () { await getPermission()