diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 0e68aa24..b6d0d057 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -1,6 +1,5 @@ @@ -9,14 +8,10 @@ import { mapState } from 'vuex' - import DialogView from './components/Common/DialogView' import { getToken } from '@/utils/auth' export default { name: 'App', - components: { - DialogView - }, data() { return { msgPopup: undefined diff --git a/frontend/src/api/request.js b/frontend/src/api/request.js index 0f0c478c..fa80fe89 100644 --- a/frontend/src/api/request.js +++ b/frontend/src/api/request.js @@ -16,7 +16,7 @@ const put = (path, data) => { const del = (path, data) => { return service.delete(path, { - params: data + data }) } const request = service.request diff --git a/frontend/src/components/Common/DialogView.vue b/frontend/src/components/Common/DialogView.vue deleted file mode 100644 index b7cba642..00000000 --- a/frontend/src/components/Common/DialogView.vue +++ /dev/null @@ -1,164 +0,0 @@ - - - - - diff --git a/frontend/src/store/modules/spider.js b/frontend/src/store/modules/spider.js index dc629216..7ec71fe0 100644 --- a/frontend/src/store/modules/spider.js +++ b/frontend/src/store/modules/spider.js @@ -4,6 +4,7 @@ import request from '../../api/request' const state = { // list of spiders spiderList: [], + allSpiderList: [], spiderTotal: 0, @@ -71,6 +72,9 @@ const mutations = { SET_SPIDER_LIST(state, value) { state.spiderList = value }, + SET_ALL_SPIDER_LIST(state, value) { + state.allSpiderList = value + }, SET_ACTIVE_NODE(state, value) { state.activeNode = value }, @@ -135,6 +139,14 @@ const actions = { commit('SET_SPIDER_TOTAL', response.data.data.total) }) }, + getAllSpiderList({ state, commit }, params = {}) { + params.page_num = 1 + params.page_size = 99999999 + return request.get('/spiders', params) + .then(response => { + commit('SET_ALL_SPIDER_LIST', response.data.data.list) + }) + }, editSpider({ state, dispatch }) { return request.post(`/spiders/${state.spiderForm._id}`, state.spiderForm) }, diff --git a/frontend/src/views/deploy/DeployDetail.vue b/frontend/src/views/deploy/DeployDetail.vue deleted file mode 100644 index 75ec0f5d..00000000 --- a/frontend/src/views/deploy/DeployDetail.vue +++ /dev/null @@ -1,15 +0,0 @@ - - - - - diff --git a/frontend/src/views/deploy/DeployList.vue b/frontend/src/views/deploy/DeployList.vue deleted file mode 100644 index 3667d32b..00000000 --- a/frontend/src/views/deploy/DeployList.vue +++ /dev/null @@ -1,197 +0,0 @@ - - - - - diff --git a/frontend/src/views/schedule/ScheduleList.vue b/frontend/src/views/schedule/ScheduleList.vue index 97119a68..d00c95cc 100644 --- a/frontend/src/views/schedule/ScheduleList.vue +++ b/frontend/src/views/schedule/ScheduleList.vue @@ -68,7 +68,7 @@ @change="onSpiderChange" > { - this.spiderList = response.data.data.list || [] - }) + this.$store.dispatch('spider/getAllSpiderList') }, mounted() { if (!this.isDisabledSpiderSchedule) { diff --git a/frontend/src/views/spider/SpiderDetail.vue b/frontend/src/views/spider/SpiderDetail.vue index 972025aa..d9f5a425 100644 --- a/frontend/src/views/spider/SpiderDetail.vue +++ b/frontend/src/views/spider/SpiderDetail.vue @@ -13,7 +13,7 @@
- +
@@ -167,10 +167,10 @@ redirectType: '' } }, - computed: { ...mapState('spider', [ 'spiderList', + 'allSpiderList', 'spiderForm', 'configListTs' ]), @@ -209,7 +209,7 @@ await this.$store.dispatch('spider/getTaskList', this.$route.params.id) // get spider list - await this.$store.dispatch('spider/getSpiderList', { owner_type: 'all' }) + await this.$store.dispatch('spider/getAllSpiderList', { owner_type: 'all' }) }, mounted() { if (!this.$utils.tour.isFinishedTour('spider-detail')) { diff --git a/frontend/src/views/spider/SpiderSchedules.vue b/frontend/src/views/spider/SpiderSchedules.vue index 8b1f96e4..3f98eca9 100644 --- a/frontend/src/views/spider/SpiderSchedules.vue +++ b/frontend/src/views/spider/SpiderSchedules.vue @@ -1,10 +1,16 @@