mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-31 18:10:50 +01:00
完成批量删除Task任务列表
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import request from '../../api/request'
|
||||
|
||||
const state = {
|
||||
scheduleList: [],
|
||||
scheduleForm: {}
|
||||
@@ -33,18 +32,10 @@ const actions = {
|
||||
request.delete(`/schedules/${id}`)
|
||||
},
|
||||
stopSchedule ({ state, dispatch }, id) {
|
||||
request.post(`/schedules/${id}/stop`).then((resp) => {
|
||||
if (resp.data.status === 'ok') {
|
||||
dispatch(`getScheduleList`)
|
||||
}
|
||||
})
|
||||
return request.post(`/schedules/${id}/stop`)
|
||||
},
|
||||
runSchedule ({ state, dispatch }, id) {
|
||||
return request.post(`/schedules/${id}/run`).then((resp) => {
|
||||
if (resp.data.status === 'ok') {
|
||||
dispatch(`getScheduleList`)
|
||||
}
|
||||
})
|
||||
return request.post(`/schedules/${id}/run`)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -102,6 +102,11 @@ const actions = {
|
||||
dispatch('getTaskList')
|
||||
})
|
||||
},
|
||||
deleteTaskMultiple ({ state }, ids) {
|
||||
return request.delete(`/tasks_multiple`, {
|
||||
ids: ids
|
||||
})
|
||||
},
|
||||
getTaskLog ({ state, commit }, id) {
|
||||
commit('SET_TASK_LOG', '')
|
||||
return request.get(`/tasks/${id}/log`)
|
||||
|
||||
Reference in New Issue
Block a user