|
|
|
@ -104,7 +104,7 @@ |
|
|
|
</div> |
|
|
|
<div style="display: flex; justify-content: center; margin-top: 5vh;"> |
|
|
|
<el-button type="primary" @click="hideAdd">取消</el-button> |
|
|
|
<el-button type="primary" @click="handleAdd">确定</el-button> |
|
|
|
<el-button type="primary" @click="throttleGetActivity">确定</el-button> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
@ -155,7 +155,7 @@ import { permissionMapping, hasMenuPermission } from "@/utils/menuTreePermission |
|
|
|
const adminStore = useAdminStore(); |
|
|
|
const { adminData, menuTree } = storeToRefs(adminStore) |
|
|
|
import ConfirmDialog from '@/components/dialogs/ConfirmDialog.vue' |
|
|
|
import { add } from 'lodash'; |
|
|
|
import _ from 'lodash' |
|
|
|
// 活动名称正则表达式 |
|
|
|
const activityNameReg = /^[-a-zA-Z0-9\u4e00-\u9fa5,。!?、;:“”‘’()《》【】——~,.!?:;'"()\[\]_&+=]{0,100}$/; |
|
|
|
|
|
|
|
@ -185,7 +185,6 @@ const editForm = ref({ |
|
|
|
id: '' |
|
|
|
}) |
|
|
|
const marketOptions = ref([]) |
|
|
|
|
|
|
|
const getActivity = async function () { |
|
|
|
const rechargeActivity = { |
|
|
|
activityName: searchForm.value.activityName, |
|
|
|
@ -265,7 +264,8 @@ const handleAdd = async function () { |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 新增节流 |
|
|
|
const throttleGetActivity = _.throttle(handleAdd, 5000, { trailing: false }); |
|
|
|
const handleEdit = async function () { |
|
|
|
const activityName = editForm.value.activityName |
|
|
|
if (!validateActivityName(activityName)) return |
|
|
|
|