feat: 修改任务执行成功提示信息,增加延迟刷新

This commit is contained in:
jxxghp
2025-02-28 19:03:00 +08:00
parent f4ec2029d9
commit 8cdd4b4af5
+4 -1
View File
@@ -114,9 +114,12 @@ async function handlePause(item: Workflow) {
async function handleRun(item: Workflow) { async function handleRun(item: Workflow) {
loading.value = true loading.value = true
try { try {
setTimeout(() => {
emit('refresh')
}, 500)
const result: { [key: string]: string } = await api.post(`workflow/${item.id}/run`) const result: { [key: string]: string } = await api.post(`workflow/${item.id}/run`)
if (result.success) { if (result.success) {
$toast.success('任务执行成') $toast.success('任务执行成!')
emit('refresh') emit('refresh')
} else { } else {
$toast.error(`任务执行失败:${result.message}`) $toast.error(`任务执行失败:${result.message}`)