diff --git a/src/views/activityManage/activity.vue b/src/views/activityManage/activity.vue index bc74406..13c5c28 100644 --- a/src/views/activityManage/activity.vue +++ b/src/views/activityManage/activity.vue @@ -193,6 +193,10 @@ const editForm = ref({ }) const marketOptions = ref([]) const getActivity = async function () { + if (!hasMenuPermission(permissionMapping.view_activity)) { + ElMessage.error('无此权限') + return + } const rechargeActivity = { activityName: searchForm.value.activityName, businessBelong: searchForm.value.businessBelong, @@ -219,6 +223,10 @@ const getActivity = async function () { } } const handleAdd = async function () { + if (!hasMenuPermission(permissionMapping.add_activity)) { + ElMessage.error('无此权限') + return + } const activityName = addForm.value.activityName if (!validateActivityName(activityName)) return @@ -274,6 +282,10 @@ const handleAdd = async function () { // 新增节流 const throttleGetActivity = _.throttle(handleAdd, 5000, { trailing: false }); const handleEdit = async function () { + if (!hasMenuPermission(permissionMapping.edit_activity)) { + ElMessage.error('无此权限') + return + } const activityName = editForm.value.activityName if (!validateActivityName(activityName)) return @@ -323,6 +335,10 @@ const handleEdit = async function () { } } const handleDel = async function (row) { + if (!hasMenuPermission(permissionMapping.delete_activity)) { + ElMessage.error('无此权限') + return + } if (!currentDelRow.value) { ElMessage.error('当前选择无数据') return