From e1f2e91648402df3a8efc77a9e2b212421ee1c44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=98=B1=E8=BE=BE?= Date: Mon, 29 Sep 2025 09:33:12 +0800 Subject: [PATCH] =?UTF-8?q?feat(portal):=E4=BC=98=E5=8C=96AI=E5=AF=B9?= =?UTF-8?q?=E8=AF=9D=E7=AA=97=E5=8F=A3=E7=8A=B6=E6=80=81=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除硬编码的HTTP地址注释 - 修改最小化窗口点击事件处理逻辑- 移除窗口状态自动恢复的旧逻辑 - 新增restore事件机制处理窗口状态- 调整按钮图标颜色值- 完善AI Call组件的状态控制逻辑 - 保留 --- src/App.vue | 9 +++++++- src/views/portal/case/AICall.vue | 23 ++++++++++++------- .../portal/case/components/sendMessage.vue | 1 - 3 files changed, 23 insertions(+), 10 deletions(-) diff --git a/src/App.vue b/src/App.vue index 1bcc6bc6..4bb222cc 100644 --- a/src/App.vue +++ b/src/App.vue @@ -7,7 +7,8 @@ @@ -31,6 +32,11 @@ this.$store.dispatch('app/setShowAICall', false); }, + onRestoreAICall() { + // 通过Vuex显示AI Call组件 + this.$store.dispatch('app/setShowAICall', true); + }, + // 检查当前路由是否应该显示AI弹窗 checkRouteForAICall() { const currentRoute = this.$route.name; @@ -38,6 +44,7 @@ if (currentRoute === 'case' || currentRoute === 'caseDetail') { // 设置最小化窗口显示状态为true this.$store.dispatch('app/setShowAICallMinimized', true); + // 注意:这里不再强制设置showAICall为true,保留用户之前的操作状态 } else { // 其他路由关闭弹窗 this.$store.dispatch('app/setShowAICall', false); diff --git a/src/views/portal/case/AICall.vue b/src/views/portal/case/AICall.vue index 4c816ae3..8c35e37a 100644 --- a/src/views/portal/case/AICall.vue +++ b/src/views/portal/case/AICall.vue @@ -71,14 +71,14 @@
案例专家 @@ -141,10 +141,7 @@ export default { watch: { dialogVisible(newVal) { console.log(newVal); - if (newVal) { - // 每次打开时默认最大化 - this.windowState = 'maximized'; - } + // 移除之前的逻辑,因为现在通过事件机制处理状态恢复 }, messageList: { handler() { @@ -235,6 +232,16 @@ export default { if (this.isAutoScroll && this.$refs.messageContainer) { this.$refs.messageContainer.scrollTop = this.$refs.messageContainer.scrollHeight; } + }, + + // 最小化窗口的点击事件处理方法 + onMinimizedWindowClick() { + // 当点击最小化窗口时,如果dialogVisible为false,则通过事件通知父组件显示对话框 + if (!this.dialogVisible) { + this.$emit('restore'); + } + // 然后将窗口状态设置为最大化 + this.windowState = 'maximized'; } } } @@ -277,7 +284,7 @@ export default { .window-control-btn { font-size: 18px; padding: 5px 10px; - color: #000000; /* 黑色图标 */ + color: #333; /* 黑色图标 */ } } @@ -436,4 +443,4 @@ export default { align-items: center; } } - \ No newline at end of file + diff --git a/src/views/portal/case/components/sendMessage.vue b/src/views/portal/case/components/sendMessage.vue index f570727e..ddab1692 100644 --- a/src/views/portal/case/components/sendMessage.vue +++ b/src/views/portal/case/components/sendMessage.vue @@ -91,7 +91,6 @@ export default { conversationId: this.conversationId, query: question }; - // http://192.168.3.178:9091 // 创建POST请求 fetch('/systemapi/xboe/m/boe/case/ai/chat',{ method: 'POST',