|
|
@ -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() |
|
|
|