|
|
@@ -349,10 +349,21 @@ const style_conversation_chat_web_page = computed(() => {
|
|
|
});
|
|
|
const style_conversation_chat_mind_map = computed(() => {
|
|
|
if (show_mind_map.value) {
|
|
|
- return {
|
|
|
- height: 330 + 'px',
|
|
|
- transition: 'all 0.2s ease'
|
|
|
- };
|
|
|
+ if (!isFullScreen.value) {
|
|
|
+ return {
|
|
|
+ height: 330 + 'px',
|
|
|
+ transition: 'all 0.2s ease'
|
|
|
+ };
|
|
|
+ } else {
|
|
|
+ return {
|
|
|
+ height: window.innerHeight - 90 + 'px',
|
|
|
+ width: window.innerWidth - 10 + 'px',
|
|
|
+ position: 'absolute',
|
|
|
+ top: '0',
|
|
|
+ left: '0',
|
|
|
+ zIndex: '9995'
|
|
|
+ };
|
|
|
+ }
|
|
|
} else {
|
|
|
return {
|
|
|
display: 'none'
|
|
|
@@ -913,13 +924,16 @@ const toggleRight = () => {
|
|
|
search_list.value = last.client_custom_item_internet_list;
|
|
|
}
|
|
|
if (last.client_custom_item_mind_map) {
|
|
|
- show_mind_map.value = true;
|
|
|
- getMindMapData({ messageId: last.client_custom_chat_message_id.value, query: mindMap_txt.value }).then((res) => {
|
|
|
- if (res.code / 1 === 200) {
|
|
|
- mindMap_str.value = res.data.mindmap;
|
|
|
- mindMap_content.value = res.data.mindmap;
|
|
|
- }
|
|
|
- });
|
|
|
+ // show_mind_map.value = true;
|
|
|
+ toShowMindMap({ client_custom_chat_message_id: last.client_custom_chat_message_id });
|
|
|
+ // getMindMapData({ messageId: last.client_custom_chat_message_id.value, query: mindMap_txt.value }).then((res) => {
|
|
|
+ // if (res.code / 1 === 200) {
|
|
|
+ // setTimeout(() => {
|
|
|
+ // mindMap_str.value = res.data.mindmap;
|
|
|
+ // mindMap_content.value = res.data.mindmap;
|
|
|
+ // }, 200);
|
|
|
+ // }
|
|
|
+ // });
|
|
|
}
|
|
|
} else {
|
|
|
show_mind_map.value = false;
|
|
|
@@ -960,20 +974,24 @@ const toFullScreen = () => {
|
|
|
|
|
|
// 动态设置div高度为屏幕可见高度(排除浏览器头部)
|
|
|
if (fullScreen_mindMap.value) {
|
|
|
+ isFullScreen.value = true;
|
|
|
// 存储原始高度,进入全屏时恢复
|
|
|
original_obj.value.height = fullScreen_mindMap.value.style.height;
|
|
|
original_obj.value.width = fullScreen_mindMap.value.style.width;
|
|
|
original_obj.value.position = fullScreen_mindMap.value.style.position;
|
|
|
original_obj.value.zIndex = fullScreen_mindMap.value.style.zIndex;
|
|
|
+ console.log(original_obj.value);
|
|
|
// 设置div高度为视口高度,避免覆盖浏览器头部
|
|
|
+ // fullScreen_mindMap.value.style.removeProperty('height');
|
|
|
fullScreen_mindMap.value.style.height = window.innerHeight - 90 + 'px';
|
|
|
fullScreen_mindMap.value.style.width = window.innerWidth - 10 + 'px';
|
|
|
fullScreen_mindMap.value.style.position = 'absolute';
|
|
|
fullScreen_mindMap.value.style.top = '0';
|
|
|
fullScreen_mindMap.value.style.left = '0';
|
|
|
fullScreen_mindMap.value.style.zIndex = '9995';
|
|
|
- isFullScreen.value = true;
|
|
|
- zoomReset();
|
|
|
+
|
|
|
+ console.log(fullScreen_mindMap.value.style.height);
|
|
|
+ // zoomReset();
|
|
|
}
|
|
|
};
|
|
|
// 退出全屏模式的函数
|
|
|
@@ -1445,6 +1463,7 @@ const toGenerateMindMap = async () => {
|
|
|
mindMap_err.value = '';
|
|
|
// 判断如果生成思维导图显示右侧按钮
|
|
|
show_right_page_btn.value = true;
|
|
|
+ show_right_page_btn.value = true;
|
|
|
if (!res.data.mindmap) {
|
|
|
mindMap_err.value = '文本内容太少,不足以生成思维导图';
|
|
|
}
|
|
|
@@ -1605,7 +1624,8 @@ const stopResponse = () => {
|
|
|
const toShowRightBtn = () => {
|
|
|
if (chat_display_list.value.length) {
|
|
|
const last_item = chat_display_list.value.at(-1);
|
|
|
- if (last_item.mindmap) {
|
|
|
+ console.log(last_item);
|
|
|
+ if (last_item.client_custom_item_mind_map) {
|
|
|
show_right_page_btn.value = true;
|
|
|
}
|
|
|
if (last_item.client_custom_item_internet && last_item.client_custom_item_internet_list.length) {
|
|
|
@@ -1613,6 +1633,17 @@ const toShowRightBtn = () => {
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
+watch(
|
|
|
+ () => style_conversation_chat_mind_map.value,
|
|
|
+ () => {
|
|
|
+ if (mind_map.value) {
|
|
|
+ zoomReset();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ deep: true
|
|
|
+ }
|
|
|
+);
|
|
|
|
|
|
watch(
|
|
|
() => props.agent_id,
|
|
|
@@ -1664,6 +1695,8 @@ watch(
|
|
|
}
|
|
|
|
|
|
chat_log_list.value = list;
|
|
|
+ // 处理最后一项是否有思维导图或者网页,有的话展示右侧按钮
|
|
|
+ toShowRightBtn();
|
|
|
} else {
|
|
|
// 异常
|
|
|
// TODO:处理异常
|
|
|
@@ -1745,7 +1778,7 @@ onMounted(() => {
|
|
|
}
|
|
|
|
|
|
chat_log_list.value = list;
|
|
|
- // 处理最后一项是否有思维导图或者网页,有的话暂时右侧按钮
|
|
|
+ // 处理最后一项是否有思维导图或者网页,有的话展示右侧按钮
|
|
|
toShowRightBtn();
|
|
|
} else {
|
|
|
// 异常
|
|
|
@@ -1844,6 +1877,7 @@ defineExpose({
|
|
|
overflow: hidden;
|
|
|
height: 100%;
|
|
|
text-align: right;
|
|
|
+ margin-right: 10px;
|
|
|
}
|
|
|
.conversation-chat-expand {
|
|
|
text-align: right;
|
|
|
@@ -1906,7 +1940,7 @@ defineExpose({
|
|
|
height: calc(100% - 60px);
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
-
|
|
|
+ gap: 40px;
|
|
|
overflow: hidden;
|
|
|
|
|
|
padding-top: 8px;
|