From 8a262eb3bb8890364def38e2812a2f8155983052 Mon Sep 17 00:00:00 2001 From: gerson <1405270578@qq.com> Date: 星期日, 07 七月 2024 17:00:48 +0800 Subject: [PATCH] Merge branch 'master' of http://47.103.154.90:83/r/WI/Web.V1.0 --- src/views/project/ch/home/component/waterRight/top.vue | 15 ++++++++++++--- 1 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/views/project/ch/home/component/waterRight/top.vue b/src/views/project/ch/home/component/waterRight/top.vue index 3d34ff4..b771ebd 100644 --- a/src/views/project/ch/home/component/waterRight/top.vue +++ b/src/views/project/ch/home/component/waterRight/top.vue @@ -31,16 +31,25 @@ import { GetLLMList, SetLLM } from '/@/api/ai/chat'; import PlayBar from '/@/components/chat/components/playBar/PlayBar.vue'; import router from '/@/router'; -import { activeChatRoom, activeLLMId } from '/@/stores/chatRoom'; +import { activeChatRoom, activeLLMId, activeSectionAId } from '/@/stores/chatRoom'; import emitter from '/@/utils/mitt'; +import { ElMessage } from 'element-plus'; const emits = defineEmits(['sendClick']); const inputValue = ref(''); const sendClick = () => { if (!inputValue.value) return; + if (!activeSectionAId.value) { + ElMessage.warning('璇烽�夋嫨搴旂敤鍦烘櫙'); + return; + } activeChatRoom.value.title = inputValue.value; + activeChatRoom.value.isInitial = false; router.push({ name: 'AskAnswer', + query: { + id: activeChatRoom.value.id, + }, }); }; let state = reactive({ @@ -106,8 +115,8 @@ onMounted(() => { getLLMList(); emitter.on('updateChatInput', (value) => { - inputValue.value = value; - }); + inputValue.value = value; + }); }); </script> <style scoped lang="scss"> -- Gitblit v1.9.3