From 66ce7075008076872314157613551ce4db49719c Mon Sep 17 00:00:00 2001 From: xs Date: Fri, 10 Oct 2025 14:32:14 +0800 Subject: [PATCH] =?UTF-8?q?1.5.9=E5=89=8D=E7=AB=AF=20AI=E5=A1=AB=E6=8A=A5?= =?UTF-8?q?=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/TopBar/aiAssistant.vue | 119 ++++++++++++++----- 1 file changed, 92 insertions(+), 27 deletions(-) diff --git a/src/layout/components/TopBar/aiAssistant.vue b/src/layout/components/TopBar/aiAssistant.vue index 1f6e807..23d4082 100644 --- a/src/layout/components/TopBar/aiAssistant.vue +++ b/src/layout/components/TopBar/aiAssistant.vue @@ -23,13 +23,31 @@ - - - + + +
-
👋 欢迎使用AI智能填报助手
+
+
👋 欢迎使用AI智能填报助手
+
+ + + +
+
请选择需要填报的表单:
@@ -330,7 +348,7 @@ const selectForm = async (aiFormSetting: AiFormSettingVO) => { } const resetAiAssistant = () =>{ - chatList.value = []; + chatList.value = []; } // function selectForm(aiFormSetting: AiFormSettingVO) { @@ -449,7 +467,7 @@ const handleSend = async (selectedText?: string) => { naturalLanguageQuery: userMsg, formSettingId: selectedFormSettingId.value, formSettingDetailList: aiFormSettingDetailListMap.value[selectedFormSettingId.value], - modelId: 1, + modelId: selectedModelId.value, platformId: 1 } @@ -950,6 +968,15 @@ const showMore = ref(false) const inputValue = ref('') const canSend = computed(() => selectedFormSettingId.value && inputValue.value.trim().length > 0) +// AI模型相关数据 +const aiModelList = ref([ + { modelId: 1, modelName: 'GPT-3.5' }, + { modelId: 2, modelName: 'GPT-4' }, + { modelId: 3, modelName: 'Claude-3' }, + { modelId: 4, modelName: 'Gemini-Pro' } +]) +const selectedModelId = ref(1) // 默认选择第一个模型 + // 新增:更多弹窗过滤输入 const moreFilterText = ref('') const filteredForms = computed(() => @@ -1289,28 +1316,46 @@ function toggleSize() { top: 0; position: fixed; z-index: 7005; - - // 修复动态样式 - &.size-custom { - right: v-bind('isCustomPosition ? "auto" : "0"'); - left: v-bind('isCustomPosition ? windowPosition.x + "px" : "auto"'); - top: v-bind('isCustomPosition ? windowPosition.y + "px" : "0"'); - width: v-bind('windowSize.width'); - height: v-bind('windowSize.height'); - } - - &.size-minimized { - right: auto !important; - left: v-bind('windowPosition.x + "px"') !important; - top: v-bind('windowPosition.y + "px"') !important; - width: v-bind('windowSize.width + "px"') !important; - height: v-bind('windowSize.height + "px"') !important; - border-radius: 20px; - padding: 0; - box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); - } } +/* 确保Element Plus下拉列表显示在浮窗之上 */ +::deep(.el-select-dropdown) { + z-index: 9000 !important; +} +::deep(.el-popper) { + z-index: 9000 !important; +} +::deep(.ai-select-popper) { + z-index: 9500 !important; +} +::deep(.el-overlay) { + z-index: 8000 !important; +} +::deep(.el-overlay .el-dialog) { + z-index: 8001 !important; +} + +// 修复动态样式 +&.size-custom { + right: v-bind('isCustomPosition ? "auto" : "0"'); + left: v-bind('isCustomPosition ? windowPosition.x + "px" : "auto"'); + top: v-bind('isCustomPosition ? windowPosition.y + "px" : "0"'); + width: v-bind('windowSize.width'); + height: v-bind('windowSize.height'); +} + +&.size-minimized { + right: auto !important; + left: v-bind('windowPosition.x + "px"') !important; + top: v-bind('windowPosition.y + "px"') !important; + width: v-bind('windowSize.width + "px"') !important; + height: v-bind('windowSize.height + "px"') !important; + border-radius: 20px; + padding: 0; + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); +} + + // 新增:最小化状态下隐藏内容 .size-minimized .ai-float-main, .size-minimized .ai-float-form-list, @@ -1464,10 +1509,25 @@ function toggleSize() { overflow-y: auto; } +.form-list-top { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 8px; +} + +.form-list-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 8px; +} + .form-list-title { font-size: 15px; - margin-bottom: 8px; color: #333; + margin: 0; + margin-bottom:10px; } .form-list { @@ -1541,6 +1601,11 @@ function toggleSize() { flex: 1 1 auto; } +.ai-model-selector { + flex-shrink: 0; + z-index:8000; +} + .ai-float-send-btn { margin-bottom: 4px; }