Browse Source

活动权限

lihuilin/feature-20251104102812-现金二期
lihuilin 3 days ago
parent
commit
1f777f76a4
  1. 16
      src/views/activityManage/activity.vue

16
src/views/activityManage/activity.vue

@ -193,6 +193,10 @@ const editForm = ref({
}) })
const marketOptions = ref([]) const marketOptions = ref([])
const getActivity = async function () { const getActivity = async function () {
if (!hasMenuPermission(permissionMapping.view_activity)) {
ElMessage.error('无此权限')
return
}
const rechargeActivity = { const rechargeActivity = {
activityName: searchForm.value.activityName, activityName: searchForm.value.activityName,
businessBelong: searchForm.value.businessBelong, businessBelong: searchForm.value.businessBelong,
@ -219,6 +223,10 @@ const getActivity = async function () {
} }
} }
const handleAdd = async function () { const handleAdd = async function () {
if (!hasMenuPermission(permissionMapping.add_activity)) {
ElMessage.error('无此权限')
return
}
const activityName = addForm.value.activityName const activityName = addForm.value.activityName
if (!validateActivityName(activityName)) return if (!validateActivityName(activityName)) return
@ -274,6 +282,10 @@ const handleAdd = async function () {
// //
const throttleGetActivity = _.throttle(handleAdd, 5000, { trailing: false }); const throttleGetActivity = _.throttle(handleAdd, 5000, { trailing: false });
const handleEdit = async function () { const handleEdit = async function () {
if (!hasMenuPermission(permissionMapping.edit_activity)) {
ElMessage.error('无此权限')
return
}
const activityName = editForm.value.activityName const activityName = editForm.value.activityName
if (!validateActivityName(activityName)) return if (!validateActivityName(activityName)) return
@ -323,6 +335,10 @@ const handleEdit = async function () {
} }
} }
const handleDel = async function (row) { const handleDel = async function (row) {
if (!hasMenuPermission(permissionMapping.delete_activity)) {
ElMessage.error('无此权限')
return
}
if (!currentDelRow.value) { if (!currentDelRow.value) {
ElMessage.error('当前选择无数据') ElMessage.error('当前选择无数据')
return return

Loading…
Cancel
Save