From 9d426f878e19108d0b6654393881ca8ddd86906c Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Sun, 2 Jul 2023 10:50:47 +0800 Subject: [PATCH] fix: unable to load nodes in spider detail page --- src/utils/task.ts | 2 +- src/views/spider/detail/useSpiderDetail.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/utils/task.ts b/src/utils/task.ts index b7a4e8cc96bdc..13dbea6cbbc54 100644 --- a/src/utils/task.ts +++ b/src/utils/task.ts @@ -39,7 +39,7 @@ export const getModeOptions = (): SelectOption[] => { {value: TASK_MODE_RANDOM, label: t('components.task.mode.label.randomNode')}, {value: TASK_MODE_ALL_NODES, label: t('components.task.mode.label.allNodes')}, {value: TASK_MODE_SELECTED_NODES, label: t('components.task.mode.label.selectedNodes')}, - {value: TASK_MODE_SELECTED_NODE_TAGS, label: t('components.task.mode.label.selectedTags')}, + // {value: TASK_MODE_SELECTED_NODE_TAGS, label: t('components.task.mode.label.selectedTags')}, ]; }; diff --git a/src/views/spider/detail/useSpiderDetail.ts b/src/views/spider/detail/useSpiderDetail.ts index 79ddd958d6577..a807efd496a79 100644 --- a/src/views/spider/detail/useSpiderDetail.ts +++ b/src/views/spider/detail/useSpiderDetail.ts @@ -1,4 +1,4 @@ -import {watch, computed, ref} from 'vue'; +import {watch, computed, ref, onBeforeMount, onMounted} from 'vue'; import {useStore} from 'vuex'; import useSpiderService from '@/services/spider/spiderService'; import {useRoute, useRouter} from 'vue-router'; @@ -155,6 +155,8 @@ const useSpiderDetail = () => { } }); + onBeforeMount(() => store.dispatch(`node/getAllList`)); + return { ...useDetail('spider'), saveFile,