Browse Source

对应权限

zhangyong/milestone-20250913-现金管理二期
ZhangYong 3 weeks ago
parent
commit
9a6ee3b66e
  1. 8
      src/views/moneyManage/refundDetail/refundCharge.vue
  2. 8
      src/views/moneyManage/refundDetail/refundDetail.vue
  3. 8
      src/views/moneyManage/refundDetail/refundFinance.vue
  4. 8
      src/views/moneyManage/refundDetail/refundHeader.vue
  5. 6
      src/views/moneyManage/refundDetail/refundService.vue
  6. 4
      src/views/permissions/permissions.vue
  7. 22
      src/views/permissions/rolePermission.vue
  8. 22
      src/views/permissions/userPermission.vue

8
src/views/moneyManage/refundDetail/refundCharge.vue

@ -416,7 +416,7 @@ const channelOptions = ref([{
const statusList = ref(['待审核','审核通过','已驳回','退款成功']) const statusList = ref(['待审核','审核通过','已驳回','退款成功'])
// //
const getRefund = async function () { const getRefund = async function () {
if (!hasMenuPermission(menuTree.value, permissionMapping.refundChargeShow)) {
if (!hasMenuPermission(menuTree.value, permissionMapping.view_area_manager_refund)) {
ElMessage.error('无此权限') ElMessage.error('无此权限')
return return
} }
@ -467,7 +467,7 @@ const getRefund = async function () {
} }
// //
const handlePass = async function () { const handlePass = async function () {
if (!hasMenuPermission(menuTree.value, permissionMapping.refundChargeAudit)) {
if (!hasMenuPermission(menuTree.value, permissionMapping.audit_area_manager_refund)) {
ElMessage.error('无此权限') ElMessage.error('无此权限')
return return
} }
@ -494,7 +494,7 @@ const handlePass = async function () {
} }
// //
const handleReject = async function () { const handleReject = async function () {
if (!hasMenuPermission(menuTree.value, permissionMapping.refundChargeAudit)) {
if (!hasMenuPermission(menuTree.value, permissionMapping.audit_area_manager_refund)) {
ElMessage.error('无此权限') ElMessage.error('无此权限')
return return
} }
@ -523,7 +523,7 @@ const handleReject = async function () {
} }
} }
const showStep = function (row) { const showStep = function (row) {
if (!hasMenuPermission(menuTree.value, permissionMapping.refundChargeProgShow)) {
if (!hasMenuPermission(menuTree.value, permissionMapping.track_area_manager_refund_progress)) {
ElMessage.error('无此权限') ElMessage.error('无此权限')
return return
} }

8
src/views/moneyManage/refundDetail/refundDetail.vue

@ -27,10 +27,10 @@ const navigateTo = (name) => {
const initPermissions = () => { const initPermissions = () => {
if (!menuTree.value || !menuTree.value.length) return 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) console.log('====================================', isService.value, isFinance.value,isCharge.value,isHeader.value)
} }

8
src/views/moneyManage/refundDetail/refundFinance.vue

@ -409,7 +409,7 @@ const statusStepMap = {
const statusList = ref(['待审核','审核通过','已驳回','退款成功']) const statusList = ref(['待审核','审核通过','已驳回','退款成功'])
// //
const getRefund = async function () { const getRefund = async function () {
if (!hasMenuPermission(menuTree.value, permissionMapping.refundFinanceShow)) {
if (!hasMenuPermission(menuTree.value, permissionMapping.view_area_finance_refund)) {
ElMessage.error('无此权限') ElMessage.error('无此权限')
return return
} }
@ -460,7 +460,7 @@ const getRefund = async function () {
} }
// //
const handlePass = async function () { const handlePass = async function () {
if (!hasMenuPermission(menuTree.value, permissionMapping.refundFinanceAudit)) {
if (!hasMenuPermission(menuTree.value, permissionMapping.audit_area_finance_refund)) {
ElMessage.error('无此权限') ElMessage.error('无此权限')
return return
} }
@ -486,7 +486,7 @@ const handlePass = async function () {
} }
// //
const handleReject = async function () { const handleReject = async function () {
if (!hasMenuPermission(menuTree.value, permissionMapping.refundFinanceAudit)) {
if (!hasMenuPermission(menuTree.value, permissionMapping.audit_area_finance_refund)) {
ElMessage.error('无此权限') ElMessage.error('无此权限')
return return
} }
@ -744,7 +744,7 @@ const getMarket = async function () {
} }
} }
const showStep = function (row) { const showStep = function (row) {
if (!hasMenuPermission(menuTree.value, permissionMapping.refundFinanceProgShow)) {
if (!hasMenuPermission(menuTree.value, permissionMapping.track_area_finance_refund_progress)) {
ElMessage.error('无此权限') ElMessage.error('无此权限')
return return
} }

8
src/views/moneyManage/refundDetail/refundHeader.vue

@ -461,7 +461,7 @@ const executorList = ref([
]) ])
// //
const getRefund = async function () { const getRefund = async function () {
if (!hasMenuPermission(menuTree.value, permissionMapping.refundHeaderShow)) {
if (!hasMenuPermission(menuTree.value, permissionMapping.view_headquarters_refund)) {
ElMessage.error('无此权限') ElMessage.error('无此权限')
return return
} }
@ -510,7 +510,7 @@ const getRefund = async function () {
} }
// //
const handlePass = async function () { const handlePass = async function () {
if (!hasMenuPermission(menuTree.value, permissionMapping.refundHeaderAudit)) {
if (!hasMenuPermission(menuTree.value, permissionMapping.audit_headquarters_refund)) {
ElMessage.error('无此权限') ElMessage.error('无此权限')
return return
} }
@ -543,7 +543,7 @@ const handlePass = async function () {
} }
// //
const handleReject = async function () { const handleReject = async function () {
if (!hasMenuPermission(menuTree.value, permissionMapping.refundHeaderAudit)) {
if (!hasMenuPermission(menuTree.value, permissionMapping.audit_headquarters_refund)) {
ElMessage.error('无此权限') ElMessage.error('无此权限')
return return
} }
@ -614,7 +614,7 @@ const reset = function () {
getRefund() getRefund()
} }
const showStep = function (row) { const showStep = function (row) {
if (!hasMenuPermission(menuTree.value, permissionMapping.refundHeaderProgShow)) {
if (!hasMenuPermission(menuTree.value, permissionMapping.track_headquarters_refund_progress)) {
ElMessage.error('无此权限') ElMessage.error('无此权限')
return return
} }

6
src/views/moneyManage/refundDetail/refundService.vue

@ -251,7 +251,7 @@ const isKF = adminData.value.adminName.includes('客服')
const statusList = ref(['已提交', '已撤回', '进行中','已退款','已驳回']) const statusList = ref(['已提交', '已撤回', '进行中','已退款','已驳回'])
// //
const getRefund = async function () { const getRefund = async function () {
if (!hasMenuPermission(menuTree.value, permissionMapping.refundServiceShow)) {
if (!hasMenuPermission(menuTree.value, permissionMapping.view_customer_service_refund_pending)) {
ElMessage.error('无此权限') ElMessage.error('无此权限')
return return
} }
@ -302,7 +302,7 @@ const getRefund = async function () {
} }
// //
const recall = async function () { const recall = async function () {
if (!hasMenuPermission(menuTree.value, permissionMapping.refundServiceBack)) {
if (!hasMenuPermission(menuTree.value, permissionMapping.withdraw_customer_service_refund)) {
ElMessage.error('无此权限') ElMessage.error('无此权限')
return return
} }
@ -330,7 +330,7 @@ const recall = async function () {
} }
// //
const submitEdit = async function () { const submitEdit = async function () {
if (!hasMenuPermission(menuTree.value, permissionMapping.refundServiceEdit)) {
if (!hasMenuPermission(menuTree.value, permissionMapping.edit_customer_service_refund)) {
ElMessage.error('无此权限') ElMessage.error('无此权限')
return return
} }

4
src/views/permissions/permissions.vue

@ -27,8 +27,8 @@ const navigateTo = (name) => {
const initPermissions = () => { const initPermissions = () => {
if (!menuTree.value || !menuTree.value.length) return; 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) console.log('====================================', hasUser.value, hasRole.value)
}; };

22
src/views/permissions/rolePermission.vue

@ -37,7 +37,7 @@ const addRole = ref({
const addRoleMarket = ref([]) const addRoleMarket = ref([])
const getRoleList = async function (val) { const getRoleList = async function (val) {
if (!findMenuById(menuTree.value, permissionMapping.roleManageShow)) {
if (!findMenuById(menuTree.value, permissionMapping.view_role_information)) {
ElMessage.error('无此权限') ElMessage.error('无此权限')
return return
} }
@ -168,7 +168,7 @@ function processTreeData(data) {
} }
const handleAddRole = async function () { const handleAddRole = async function () {
if (!findMenuById(menuTree.value, permissionMapping.addRoleInfo)) {
if (!findMenuById(menuTree.value, permissionMapping.add_role_information)) {
ElMessage.error('无此权限') ElMessage.error('无此权限')
return return
} }
@ -273,10 +273,10 @@ const getLists = async function () {
// //
const goldenBeanMenuIds = new Set([ 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,// // 15,43,44,45,46,47,//
// 18,52,53,54,// // 18,52,53,54,//
@ -299,7 +299,7 @@ const filterGoldenBeanMenus = (tree) => {
// (????????) // (????????)
const filterPermission = (tree) => { const filterPermission = (tree) => {
return tree.filter(item => { return tree.filter(item => {
if (item.id === permissionMapping.permissionManage) {
if (item.id === permissionMapping.permission_management) {
return false return false
} }
else if (item.children && item.children.length > 0) { else if (item.children && item.children.length > 0) {
@ -464,7 +464,7 @@ const permissionEditRoleInit = async function (row) {
// //
const permissionEditRole = async function () { const permissionEditRole = async function () {
if (!findMenuById(menuTree.value, permissionMapping.editRoleInfo)) {
if (!findMenuById(menuTree.value, permissionMapping.edit_role_information)) {
ElMessage.error('无此权限') ElMessage.error('无此权限')
return return
} }
@ -570,9 +570,9 @@ const Rolerules = reactive({
const throttledHandleAddRole = _.throttle(handleAddRole, 5000, { const throttledHandleAddRole = _.throttle(handleAddRole, 5000, {
trailing: false 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 () { onMounted(async function () {
await getRoleList() await getRoleList()

22
src/views/permissions/userPermission.vue

@ -270,7 +270,7 @@ const userAddInit = function () {
// //
const permissionAdd = async function () { const permissionAdd = async function () {
if (!findMenuById(menuTree.value, permissionMapping.addUserInfo)) {
if (!canLook) {
ElMessage.error('无此权限') ElMessage.error('无此权限')
return return
} }
@ -500,7 +500,7 @@ const editAdminRules = {
}; };
// //
const permissionEdit = async function () { const permissionEdit = async function () {
if (!findMenuById(menuTree.value, permissionMapping.editUserInfo)) {
if (!canEdit) {
ElMessage.error('无此权限') ElMessage.error('无此权限')
return return
} }
@ -576,7 +576,7 @@ const del = function (row) {
} }
// //
const delConfirm = async function () { const delConfirm = async function () {
if (!findMenuById(menuTree.value, permissionMapping.deleteUserInfo)) {
if (!canDel) {
ElMessage.error('无此权限') ElMessage.error('无此权限')
return return
} }
@ -598,7 +598,7 @@ const delConfirm = async function () {
} }
// //
const editStatus = async function (row) { const editStatus = async function (row) {
if (!findMenuById(menuTree.value, permissionMapping.changeStatus)) {
if (!change) {
ElMessage.error('无此权限') ElMessage.error('无此权限')
return return
} }
@ -791,7 +791,7 @@ const resetPassword = function (row) {
// //
const confirmResetPassword = async function () { const confirmResetPassword = async function () {
if (!findMenuById(menuTree.value, permissionMapping.updateUserInfo)) {
if (!canEdit) {
ElMessage.error('无此权限') ElMessage.error('无此权限')
return return
} }
@ -895,12 +895,12 @@ const throttledPermissionEdit = _.throttle(permissionEdit, 5000, {
const throttledPermissionAdd = _.throttle(permissionAdd, 5000, { const throttledPermissionAdd = _.throttle(permissionAdd, 5000, {
trailing: false 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 () { onMounted(async function () {
await getPermission() await getPermission()

Loading…
Cancel
Save