mirror of
https://github.com/kuaifan/dootask.git
synced 2026-01-22 09:48:11 +00:00
feat(ai-assistant): 为各场景添加自定义标题并优化浮动按钮显示
- 为项目创建、任务创建、消息编写、汇报编辑、汇报分析场景的 AI 助手添加专属标题 - 在模态框显示时自动隐藏浮动按钮,避免 UI 重叠
This commit is contained in:
parent
b794ba7a6b
commit
32ffecb905
@ -2281,4 +2281,9 @@ URL不能为空
|
|||||||
前日
|
前日
|
||||||
次日
|
次日
|
||||||
|
|
||||||
AI 搜索
|
AI 搜索
|
||||||
|
AI 项目助手
|
||||||
|
AI 汇报分析
|
||||||
|
AI 整理汇报
|
||||||
|
AI 任务助手
|
||||||
|
AI 消息助手
|
||||||
@ -36,10 +36,11 @@ export default {
|
|||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
visible() {
|
visible() {
|
||||||
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 值
|
||||||
|
|||||||
@ -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,
|
||||||
|
|||||||
@ -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,
|
||||||
|
|||||||
@ -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,
|
||||||
|
|||||||
@ -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,
|
||||||
|
|||||||
@ -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,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user