From 40baf7fdaaf6f790ef76188c18891411d809786c Mon Sep 17 00:00:00 2001 From: marvzhang Date: Tue, 21 Apr 2020 13:42:11 +0800 Subject: [PATCH] fixed https://github.com/crawlab-team/crawlab/issues/678 --- frontend/src/store/modules/spider.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/frontend/src/store/modules/spider.js b/frontend/src/store/modules/spider.js index 1f6e2b1e..b3b3a70d 100644 --- a/frontend/src/store/modules/spider.js +++ b/frontend/src/store/modules/spider.js @@ -285,7 +285,16 @@ const actions = { async getScheduleList ({ state, commit }, payload) { const { id } = payload const res = await request.get(`/spiders/${id}/schedules`) - commit('schedule/SET_SCHEDULE_LIST', res.data.data, { root: true }) + let data = res.data.data + if (data) { + data = data.map(d => { + const arr = d.cron.split(' ') + arr.splice(0, 1) + d.cron = arr.join(' ') + return d + }) + } + commit('schedule/SET_SCHEDULE_LIST', data, { root: true }) }, async getFileTree ({ state, commit }, payload) { const id = payload ? payload.id : state.spiderForm._id