From 3c0a28045611b93d6dad4b1a88a3b508362858d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=AF=BB=E6=AC=A2?= Date: Sun, 4 Feb 2024 14:03:09 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=BB=E8=BE=91=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/infra/assistant/index.vue | 30 +++++++++++++++++++++++------ src/views/login/index.vue | 2 +- 2 files changed, 25 insertions(+), 7 deletions(-) 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);