feat(ai-assistant): 为各场景添加自定义标题并优化浮动按钮显示

- 为项目创建、任务创建、消息编写、汇报编辑、汇报分析场景的 AI 助手添加专属标题
  - 在模态框显示时自动隐藏浮动按钮,避免 UI 重叠
This commit is contained in:
kuaifan 2026-01-15 10:16:06 +00:00
parent b794ba7a6b
commit 32ffecb905
7 changed files with 16 additions and 5 deletions

View File

@ -2282,3 +2282,8 @@ URL不能为空
次日 次日
AI 搜索 AI 搜索
AI 项目助手
AI 汇报分析
AI 整理汇报
AI 任务助手
AI 消息助手

View File

@ -39,7 +39,8 @@ export default {
return this.userId > 0 && return this.userId > 0 &&
this.positionLoaded && this.positionLoaded &&
!this.windowPortrait && !this.windowPortrait &&
this.routeName !== 'login'; this.routeName !== 'login' &&
!this.$parent?.showModal;
}, },
// left // left

View File

@ -1094,6 +1094,7 @@ export default {
onProjectAI() { onProjectAI() {
emitter.emit('openAIAssistant', { emitter.emit('openAIAssistant', {
sessionKey: 'project-create', sessionKey: 'project-create',
title: this.$L('AI 项目助手'),
placeholder: this.$L('请简要描述项目目标、范围或关键里程碑AI 将生成名称和任务列表'), placeholder: this.$L('请简要描述项目目标、范围或关键里程碑AI 将生成名称和任务列表'),
onBeforeSend: this.handleProjectAIBeforeSend, onBeforeSend: this.handleProjectAIBeforeSend,
onRender: this.handleProjectAIRender, onRender: this.handleProjectAIRender,

View File

@ -1923,6 +1923,7 @@ export default {
} }
emitter.emit('openAIAssistant', { emitter.emit('openAIAssistant', {
sessionKey: 'chat-message', sessionKey: 'chat-message',
title: this.$L('AI 消息助手'),
placeholder: this.$L('请简要描述消息的主题、语气或要点AI 将生成完整消息'), placeholder: this.$L('请简要描述消息的主题、语气或要点AI 将生成完整消息'),
onBeforeSend: this.handleMessageAIBeforeSend, onBeforeSend: this.handleMessageAIBeforeSend,
onApply: this.handleMessageAIApply, onApply: this.handleMessageAIApply,

View File

@ -175,6 +175,7 @@ export default {
} }
emitter.emit('openAIAssistant', { emitter.emit('openAIAssistant', {
sessionKey: 'report-analysis', sessionKey: 'report-analysis',
title: this.$L('AI 汇报分析'),
placeholder: this.$L('补充你想聚焦的风险、成果或建议,留空直接生成分析'), placeholder: this.$L('补充你想聚焦的风险、成果或建议,留空直接生成分析'),
onBeforeSend: this.handleReportAnalysisBeforeSend, onBeforeSend: this.handleReportAnalysisBeforeSend,
onApply: this.handleReportAnalysisApply, onApply: this.handleReportAnalysisApply,

View File

@ -266,6 +266,7 @@ export default {
} }
emitter.emit('openAIAssistant', { emitter.emit('openAIAssistant', {
sessionKey: 'report-edit', sessionKey: 'report-edit',
title: this.$L('AI 整理汇报'),
placeholder: this.$L('补充你想强调的重点或特殊说明AI 将在此基础上整理汇报'), placeholder: this.$L('补充你想强调的重点或特殊说明AI 将在此基础上整理汇报'),
onBeforeSend: this.handleReportAIBeforeSend, onBeforeSend: this.handleReportAIBeforeSend,
onApply: this.handleReportAIApply, onApply: this.handleReportAIApply,

View File

@ -632,6 +632,7 @@ export default {
onAI() { onAI() {
emitter.emit('openAIAssistant', { emitter.emit('openAIAssistant', {
sessionKey: 'task-create', sessionKey: 'task-create',
title: this.$L('AI 任务助手'),
placeholder: this.$L('请简要描述任务目标、背景或预期交付AI 将生成标题、详细说明和子任务'), placeholder: this.$L('请简要描述任务目标、背景或预期交付AI 将生成标题、详细说明和子任务'),
onBeforeSend: this.handleTaskAIBeforeSend, onBeforeSend: this.handleTaskAIBeforeSend,
onRender: this.handleTaskAIRender, onRender: this.handleTaskAIRender,