|
@@ -850,6 +850,40 @@
|
|
|
|
|
|
<div class="right-menu-content">
|
|
|
<!-- 添加 Tab 切换 -->
|
|
|
+ <!-- <div class="right-menu-tabs">
|
|
|
+ <div
|
|
|
+ class="tab-item"
|
|
|
+ :class="{ active: activeTab === 'search' }"
|
|
|
+ @click="activeTab = 'search'"
|
|
|
+ >
|
|
|
+ <SearchOutlined />
|
|
|
+ <span>搜索结果</span>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="tab-item"
|
|
|
+ :class="{ active: activeTab === 'preview' }"
|
|
|
+ @click="activeTab = 'preview'"
|
|
|
+ >
|
|
|
+ <FileOutlined />
|
|
|
+ <span>文档预览</span>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="tab-item"
|
|
|
+ :class="{ active: activeTab === 'knowledge' }"
|
|
|
+ @click="activeTab = 'knowledge'"
|
|
|
+ >
|
|
|
+ <DatabaseOutlined />
|
|
|
+ <span>知识库</span>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="tab-item"
|
|
|
+ :class="{ active: activeTab === 'map' }"
|
|
|
+ @click="activeTab = 'map'"
|
|
|
+ >
|
|
|
+ <GlobalOutlined />
|
|
|
+ <span>地图</span>
|
|
|
+ </div>
|
|
|
+ </div> -->
|
|
|
|
|
|
<!-- 搜索面板 -->
|
|
|
<div v-show="activeTab === 'search'" class="panel-container">
|
|
@@ -996,6 +1030,14 @@
|
|
|
:message="currentSearchQuery"
|
|
|
/>
|
|
|
</div>
|
|
|
+ <div v-show="activeTab === 'map'" class="panel-container">
|
|
|
+ <!-- 地图显示区域 -->
|
|
|
+ <AmapDisplay
|
|
|
+ v-if="mapDisplay"
|
|
|
+ :mapDisplay="mapDisplay"
|
|
|
+ :center="mapCenter"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
|
|
|
|
|
@@ -1030,7 +1072,8 @@ import {
|
|
|
DownloadOutlined,
|
|
|
CreditCardOutlined,
|
|
|
AuditOutlined,
|
|
|
- ProfileOutlined
|
|
|
+ ProfileOutlined,
|
|
|
+ SearchOutlined
|
|
|
} from "@ant-design/icons-vue";
|
|
|
import leftIcon from "../assets/svg/left.svg";
|
|
|
import rightIcon from "../assets/svg/right.svg";
|
|
@@ -1057,6 +1100,7 @@ import dayjs from 'dayjs';
|
|
|
import DocumentPreview from "../components/DocumentPreview/index.vue";
|
|
|
import KnowledgeResults from "../components/KnowledgeResults/index.vue";
|
|
|
import ChangePasswordDialog from '../components/ChangePasswordDialog.vue'
|
|
|
+import AmapDisplay from '../components/AmapDisplay/index.vue';
|
|
|
import { useRouter } from 'vue-router'
|
|
|
import { message } from 'ant-design-vue';
|
|
|
import VueOfficeDocx from '@vue-office/docx';
|
|
@@ -1203,6 +1247,10 @@ const formatted_data = ref('');
|
|
|
const showSteps = ref(false);
|
|
|
const steps = ref([]);
|
|
|
|
|
|
+// 地图相关状态
|
|
|
+const mapDisplay = ref(false);
|
|
|
+const mapCenter = ref({ });
|
|
|
+
|
|
|
// 进度条弹窗相关状态
|
|
|
const showProgressModal = ref(false);
|
|
|
const progressList = ref([]);
|
|
@@ -1248,7 +1296,13 @@ const handleSSEMessage = (event, data) => {
|
|
|
updateStepElement(data.step_id, data.status, data.details, data.progress);
|
|
|
break;
|
|
|
case 'final_summary':
|
|
|
-
|
|
|
+ /* // 处理地图数据
|
|
|
+ if (data.map_display) {
|
|
|
+ mapDisplay.value = true;
|
|
|
+ if (data.center) {
|
|
|
+ mapCenter.value = data.center;
|
|
|
+ }
|
|
|
+ } */
|
|
|
break;
|
|
|
case 'stream_end':
|
|
|
showSteps.value = false;
|
|
@@ -2238,7 +2292,19 @@ const summaryHtml=ref('')
|
|
|
const messageContent = enableWebSearch.value ? responseData.answer : responseData.choices[0].message.content;
|
|
|
const audioInfo = enableWebSearch.value ? responseData.audio_info?.audio : responseData.audio_info?.audio;
|
|
|
const sessionId = enableWebSearch.value ? responseData.session_id : responseData.session_id;
|
|
|
-
|
|
|
+ // 处理地图数据
|
|
|
+ if (responseData.map_display) {
|
|
|
+ rightMenuWidth.value = 800;
|
|
|
+ isRightMenuCollapsed.value = false;
|
|
|
+ if (document.querySelector('.chat')) {
|
|
|
+ document.querySelector('.chat').style.right = `${rightMenuWidth.value}px`;
|
|
|
+ }
|
|
|
+ mapDisplay.value = true;
|
|
|
+ activeTab.value='map'
|
|
|
+ if (responseData.map_display.center) {
|
|
|
+ mapCenter.value = responseData.map_display.center;
|
|
|
+ }
|
|
|
+ }
|
|
|
// 更新 session_id
|
|
|
if (sessionId) {
|
|
|
session_id.value = sessionId;
|