Commit 91debcea authored by daniel's avatar daniel

fix(gunRule): 发枪预约完善

parent c7f83cba
...@@ -415,6 +415,7 @@ ...@@ -415,6 +415,7 @@
const RULE_LIST = ECC_BASE_URL + "/api-pick/v1/wave-reserve-list?" const RULE_LIST = ECC_BASE_URL + "/api-pick/v1/wave-reserve-list?"
const ENROLL_PAGE = ECC_BASE_URL + "/api-pick/v1/enroll-page?" const ENROLL_PAGE = ECC_BASE_URL + "/api-pick/v1/enroll-page?"
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 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 DOWNLOAD_IMPORT_LIST = "https://geexekimgoss-sxk.oss-cn-hangzhou.aliyuncs.com/gk/common/markNoSelect/%E9%80%89%E5%8F%B7%E5%90%8D%E5%8D%95%E8%A1%A8%E6%A8%A1%E7%89%88v1.xlsx" const DOWNLOAD_IMPORT_LIST = "https://geexekimgoss-sxk.oss-cn-hangzhou.aliyuncs.com/gk/common/markNoSelect/%E9%80%89%E5%8F%B7%E5%90%8D%E5%8D%95%E8%A1%A8%E6%A8%A1%E7%89%88v1.xlsx"
...@@ -856,14 +857,36 @@ ...@@ -856,14 +857,36 @@
return h(NButton, { return h(NButton, {
type: 'error', type: 'error',
size: 'small', size: 'small',
onClick: () => { onClick: async () => {
if (row.reserveId) {
// 删除规则
loading.value = true
const messageReactive = message.loading('删除中...', {
duration: 0
})
// 发起请求
const [err, data] = await to(fetch(DELETE_WAVE_RULE + 'reserveId=' + row.reserveId, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
}).then(res => res.json()))
loading.value = false
messageReactive.destroy()
if (data.code === 200) {
message.success('操作成功')
gunRuleValue.value.details.splice(index, 1) gunRuleValue.value.details.splice(index, 1)
} else {
message.error(data.message)
}
} else {
gunRuleValue.value.details.splice(index, 1)
}
} }
}, '删除') }, '删除')
} }
} }
] ]
// 新增枪次 // 新增枪次
const addWave = () => { const addWave = () => {
let index = gunRuleValue.value.details.length let index = gunRuleValue.value.details.length
......
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