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',