1.5.9前端

AI填报完善
master
xs 2 months ago
parent 10852ebfb9
commit 66ce707500

@ -23,13 +23,31 @@
<Minus />
</el-icon>
<el-icon class="ai-float-close" @click="close">
<Close/>
</el-icon>
<el-icon class="ai-float-close" @click="close">
<Close/>
</el-icon>
</div>
</div>
<div class="ai-float-form-list ai-float-scroll">
<div class="ai-float-welcome">👋 欢迎使用AI智能填报助手</div>
<div class="form-list-top">
<div class="ai-float-welcome">👋 欢迎使用AI智能填报助手</div>
<div class="ai-model-selector">
<el-select
v-model="selectedModelId"
placeholder="选择AI模型"
size="small"
style="width: 120px"
:disabled="aiThinking"
>
<el-option
v-for="model in aiModelList"
:key="model.modelId"
:label="model.modelName"
:value="model.modelId"
/>
</el-select>
</div>
</div>
<div class="form-list-title">请选择需要填报的表单</div>
<!-- 加载状态 -->
<div v-if="formsLoading" class="loading-container">
@ -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;
}

Loading…
Cancel
Save