diff --git a/src/views/api/index.vue b/src/views/api/index.vue index de0cec8daf5a08ce0b0e5f6506ea1ba4ccb56aae..cb55f6b57029f0505ffde555b5bf5fef3365c330 100644 --- a/src/views/api/index.vue +++ b/src/views/api/index.vue @@ -447,11 +447,11 @@ const queryList = async (type: 'semantic_interface' | 'mcp') => { keyword: apiSearchValue.value || undefined, [apiType.value]: true, }; + if (timer) { + clearInterval(timer); + timer = null; + } if (type === 'semantic_interface') { - if (timer) { - clearInterval(timer); - timer = null; - } payload[apiType.value] = true; const [, res] = await api.queryApiList({ page: currentPage.value, diff --git a/src/views/api/style.scss b/src/views/api/style.scss index 0befa7fd267fe57a74b537e0039e13ed3e31122b..5e5cb8d2b0387317ad76bd865adbca3ae8464502 100644 --- a/src/views/api/style.scss +++ b/src/views/api/style.scss @@ -62,6 +62,7 @@ overflow-y: auto; width: fit-content; display: flex; + align-content: flex-start; flex-wrap: wrap; box-sizing: border-box; gap: 16px; diff --git a/src/views/createapp/components/workFlow.vue b/src/views/createapp/components/workFlow.vue index da70f354378e5ed467443c86b664eacaf0cb2ca7..609018ddbc7234d49aefef04c1d692dd3880b288 100644 --- a/src/views/createapp/components/workFlow.vue +++ b/src/views/createapp/components/workFlow.vue @@ -376,8 +376,9 @@ const queryFlow = (deal: string) => { choiceFlowId(workFlowList.value[0]); } } + const flowDataList = res?.[1]?.result?.workflows || []; // 更新当前publish状态 - emits('updateFlowsDebug'); + emits('updateFlowsDebug', '', flowDataList); updateFlowsDebugStatus.value = true; } loading.value = false; diff --git a/src/views/createapp/index.vue b/src/views/createapp/index.vue index a0f5f77ffa49ba267e9792b32a65b38ec52ef18c..deea456d70af67076991ab2edc5133d91f94a20a 100644 --- a/src/views/createapp/index.vue +++ b/src/views/createapp/index.vue @@ -73,24 +73,18 @@ const handleValidateContent = (valid: boolean) => { }; // 获取当前的应用中的各flowsDebug的情况 -const updateFlowsDebug = (status?) => { +const updateFlowsDebug = (status?: boolean, flow?: any) => { // 如果status为false,直接置为False不再调接口 + if (status === false) { publishValidate.value = false; //在修改工作流以及界面配置时,需要重新校验工作流,状态置为未发布 publishStatus.value = '未发布'; return; } - api - .querySingleAppData({ - id: route.query?.appId as string, - }) - .then((res) => { - if (res?.[1]?.result) { - const flowDataList = res?.[1]?.result?.workflows || []; - judgeAppFlowsDebug(flowDataList); - } - }); + if (flow) { + judgeAppFlowsDebug(flow); + } }; // 获取工作流列表 @@ -172,7 +166,7 @@ const saveApp = async (type: 'agent' | 'flow') => { const getPublishStatus = (status) => { if (status) { publishStatus.value = '已发布'; - }else { + } else { publishStatus.value = '未发布'; } }; @@ -213,7 +207,11 @@ function onDebugSuccess(status: boolean) { class="createAppContainerStatus" :class="{ debugSuccess: publishStatus === '已发布' }" > - {{publishStatus === '已发布' ? $t('app.app_published') : $t('app.unpublished') }} + {{ + publishStatus === '已发布' + ? $t('app.app_published') + : $t('app.unpublished') + }}