mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-22 17:31:03 +01:00
35 lines
556 B
JavaScript
35 lines
556 B
JavaScript
import request from '../../api/request'
|
|
|
|
const state = {
|
|
scheduleList: [],
|
|
scheduleForm: {}
|
|
}
|
|
|
|
const getters = {}
|
|
|
|
const mutations = {
|
|
SET_SCHEDULE_LIST (state, value) {
|
|
state.scheduleList = value
|
|
},
|
|
SET_SCHEDULE_FORM (state, value) {
|
|
state.scheduleForm = value
|
|
}
|
|
}
|
|
|
|
const actions = {
|
|
getScheduleList ({ state, commit }) {
|
|
request.get('/schedules')
|
|
.then(response => {
|
|
commit('SET_SCHEDULE_LIST', response.data.items)
|
|
})
|
|
}
|
|
}
|
|
|
|
export default {
|
|
namespaced: true,
|
|
state,
|
|
getters,
|
|
mutations,
|
|
actions
|
|
}
|