Commit 90547f5f authored by daniel's avatar daniel

fix(gunRule): 删除名单

parent 6689e89a
...@@ -486,6 +486,7 @@ ...@@ -486,6 +486,7 @@
const DELETE_RULE = ECC_BASE_URL + "/api-pick/v1/delete-rule?" const DELETE_RULE = ECC_BASE_URL + "/api-pick/v1/delete-rule?"
const DELETE_WAVE_RULE = ECC_BASE_URL + "/api-pick/v1/delete-wave-reserve?" const DELETE_WAVE_RULE = ECC_BASE_URL + "/api-pick/v1/delete-wave-reserve?"
const IMPORT_MARK_ENROLL = ECC_BASE_URL + "/api-pick/v1/import-mark-enroll" const IMPORT_MARK_ENROLL = ECC_BASE_URL + "/api-pick/v1/import-mark-enroll"
const DELETE_ENROLL = ECC_BASE_URL + "/api-pick/v1/delete-enroll"
// 导出名单 // 导出名单
const EXPORT_ENROLL = ECC_BASE_URL + "/api-pick/v1/export-markno-enroll" const EXPORT_ENROLL = ECC_BASE_URL + "/api-pick/v1/export-markno-enroll"
// 下载导入名单 // 下载导入名单
...@@ -660,7 +661,7 @@ ...@@ -660,7 +661,7 @@
{ {
title: '操作', title: '操作',
key: 'action', key: 'action',
width: 90, width: 150,
align: 'center', align: 'center',
render: (row) => { render: (row) => {
// 两个按钮,一个 编辑 一个 删除 // 两个按钮,一个 编辑 一个 删除
...@@ -675,7 +676,37 @@ ...@@ -675,7 +676,37 @@
showPlayerModal.value = true showPlayerModal.value = true
} }
}, '编辑'), }, '编辑'),
h(NButton, {
type: 'error',
size: 'small',
onClick: async () => {
const confirm = window.confirm('确定删除吗?')
if (!confirm) {
return
}
if (!confirm) return
loading.value = true
const [err, data] = await to(fetch(DELETE_ENROLL + '?id=' + row.id, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
}).then(res => res.json()))
loading.value = false
if (err) {
message.error(err.message)
return
}
if (data.code === 200) {
message.success('删除成功')
getPlayers()
} else {
message.error(data.msg)
}
}
}, '删除'),
]) ])
} }
}, },
] ]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment