diff --git a/src/views/infra/assistant/index.vue b/src/views/infra/assistant/index.vue index 67f6306..871fc87 100644 --- a/src/views/infra/assistant/index.vue +++ b/src/views/infra/assistant/index.vue @@ -58,13 +58,16 @@ const getAllAiAssistantHandle = async () => { }; // 保存机器人信息 -const saveAssistantHandle = async (item: AiAssistantResult) => { +const saveAssistantHandle = async (item: any, isCreate?: boolean) => { // 设置为加载中 item.saveLoading = true; // 调用接口,保存数据 saveAiAssistant(item) .then(() => { message("保存成功", { type: "success" }); + if (isCreate) { + showCreateDialog.value = false; + } // 保存成功,重新加载数据 getAllAiAssistantHandle(); }) @@ -135,13 +138,17 @@ onMounted(() => { > {{ item.edit ? "取消" : "编辑" }} - 删除 + + { /> + + diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 3f5b743..82f327c 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -56,7 +56,7 @@ const onLogin = async (formEl: FormInstance | undefined) => { if (valid) { useUserStoreHook() .loginByUsername(ruleForm) - .then(res => { + .then(() => { // 获取后端路由 initRouter().then(() => { router.push(getTopMenu(true).path);