|
@@ -123,9 +123,12 @@ const getDict = (data, model) => {
|
|
|
// 取消报名
|
|
|
const toDel = async (item) => {
|
|
|
if (item.status != '2') {
|
|
|
- ElMessageBox.alert('确定取消该比赛的报名?', '取消报名', {
|
|
|
- confirmButtonText: 'OK',
|
|
|
- callback: async () => {
|
|
|
+ ElMessageBox.confirm('是否确认取消报名?', '取消报名', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ .then(async () => {
|
|
|
const res = await store.del(item._id)
|
|
|
if (res.errcode == '0') {
|
|
|
await search({ skip, limit })
|
|
@@ -134,8 +137,8 @@ const toDel = async (item) => {
|
|
|
message: `比赛: ${item.match_name}已取消`
|
|
|
})
|
|
|
}
|
|
|
- }
|
|
|
- })
|
|
|
+ })
|
|
|
+ .catch(() => {})
|
|
|
} else {
|
|
|
ElMessage({
|
|
|
message: '该比赛报名已结束无法取消报名!',
|