|
@ -365,6 +365,8 @@ const aiEmotionHeightObserver = ref(null); |
|
|
const isAiEmotionAutoScrollEnabled = ref(false); |
|
|
const isAiEmotionAutoScrollEnabled = ref(false); |
|
|
const isAiEmotionUserScrolling = ref(false); // 用户是否正在手动滚动 |
|
|
const isAiEmotionUserScrolling = ref(false); // 用户是否正在手动滚动 |
|
|
const aiEmotionScrollTimer = ref(null); // 滚动检测定时器 |
|
|
const aiEmotionScrollTimer = ref(null); // 滚动检测定时器 |
|
|
|
|
|
const isChartInteracting = ref(false); // 图表是否正在交互 |
|
|
|
|
|
const chartInteractionTimer = ref(null); // 图表交互检测定时器 |
|
|
|
|
|
|
|
|
// 获取当前活动页面的滚动容器 |
|
|
// 获取当前活动页面的滚动容器 |
|
|
const getCurrentScrollContainer = () => { |
|
|
const getCurrentScrollContainer = () => { |
|
@ -404,7 +406,8 @@ const debouncedAiEmotionScrollToBottom = _.debounce(() => { |
|
|
if ( |
|
|
if ( |
|
|
activeTab.value === "AiEmotion" && |
|
|
activeTab.value === "AiEmotion" && |
|
|
isAiEmotionAutoScrollEnabled.value && |
|
|
isAiEmotionAutoScrollEnabled.value && |
|
|
!isAiEmotionUserScrolling.value |
|
|
|
|
|
|
|
|
!isAiEmotionUserScrolling.value && |
|
|
|
|
|
!isChartInteracting.value |
|
|
) { |
|
|
) { |
|
|
const container = tabContentAiEmotion.value; |
|
|
const container = tabContentAiEmotion.value; |
|
|
if (container) { |
|
|
if (container) { |
|
@ -422,7 +425,11 @@ const startAiEmotionHeightObserver = () => { |
|
|
|
|
|
|
|
|
// 创建ResizeObserver监听页面内容变化 |
|
|
// 创建ResizeObserver监听页面内容变化 |
|
|
aiEmotionHeightObserver.value = new ResizeObserver((entries) => { |
|
|
aiEmotionHeightObserver.value = new ResizeObserver((entries) => { |
|
|
if (isAiEmotionAutoScrollEnabled.value && activeTab.value === "AiEmotion") { |
|
|
|
|
|
|
|
|
if ( |
|
|
|
|
|
isAiEmotionAutoScrollEnabled.value && |
|
|
|
|
|
activeTab.value === "AiEmotion" && |
|
|
|
|
|
!isChartInteracting.value |
|
|
|
|
|
) { |
|
|
debouncedAiEmotionScrollToBottom(); |
|
|
debouncedAiEmotionScrollToBottom(); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
@ -456,7 +463,8 @@ const startAiEmotionHeightObserver = () => { |
|
|
if ( |
|
|
if ( |
|
|
shouldScroll && |
|
|
shouldScroll && |
|
|
isAiEmotionAutoScrollEnabled.value && |
|
|
isAiEmotionAutoScrollEnabled.value && |
|
|
activeTab.value === "AiEmotion" |
|
|
|
|
|
|
|
|
activeTab.value === "AiEmotion" && |
|
|
|
|
|
!isChartInteracting.value |
|
|
) { |
|
|
) { |
|
|
debouncedAiEmotionScrollToBottom(); |
|
|
debouncedAiEmotionScrollToBottom(); |
|
|
} |
|
|
} |
|
@ -505,6 +513,34 @@ const handleAiEmotionUserScroll = () => { |
|
|
// }, 2000); |
|
|
// }, 2000); |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
// 图表交互状态管理 |
|
|
|
|
|
const handleChartInteractionStart = () => { |
|
|
|
|
|
console.log("图表交互开始,临时禁用自动滚动"); |
|
|
|
|
|
isChartInteracting.value = true; |
|
|
|
|
|
|
|
|
|
|
|
// 清除之前的定时器 |
|
|
|
|
|
if (chartInteractionTimer.value) { |
|
|
|
|
|
clearTimeout(chartInteractionTimer.value); |
|
|
|
|
|
} |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const handleChartInteractionEnd = () => { |
|
|
|
|
|
// 清除之前的定时器 |
|
|
|
|
|
if (chartInteractionTimer.value) { |
|
|
|
|
|
clearTimeout(chartInteractionTimer.value); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 设置定时器,1秒后恢复自动滚动 |
|
|
|
|
|
chartInteractionTimer.value = setTimeout(() => { |
|
|
|
|
|
isChartInteracting.value = false; |
|
|
|
|
|
console.log("图表交互结束,恢复自动滚动"); |
|
|
|
|
|
}, 1000); |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
// 暴露图表交互管理函数给全局使用 |
|
|
|
|
|
window.handleChartInteractionStart = handleChartInteractionStart; |
|
|
|
|
|
window.handleChartInteractionEnd = handleChartInteractionEnd; |
|
|
|
|
|
|
|
|
// 处理AiEmotion页面的滚动请求 |
|
|
// 处理AiEmotion页面的滚动请求 |
|
|
const handleAiEmotionScrollToBottom = () => { |
|
|
const handleAiEmotionScrollToBottom = () => { |
|
|
if (activeTab.value === "AiEmotion") { |
|
|
if (activeTab.value === "AiEmotion") { |
|
@ -887,12 +923,14 @@ const backToHome = () => { |
|
|
if (env == "development" || env == "test") { |
|
|
if (env == "development" || env == "test") { |
|
|
window.parent.location.href = |
|
|
window.parent.location.href = |
|
|
"http://121.89.234.155:8807/hljw/homepage?menu=999999991"; |
|
|
"http://121.89.234.155:8807/hljw/homepage?menu=999999991"; |
|
|
} else if (env == "product") { |
|
|
|
|
|
window.parent.location.href = |
|
|
|
|
|
"https://web.homilychart.com/product/hljw/homepage?menu=999999991"; |
|
|
|
|
|
} else if (env == "production") { |
|
|
|
|
|
window.parent.location.href = |
|
|
|
|
|
"https://web.homilychart.com/hljw/homepage?menu=999999991"; |
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
window.parent.postMessage( |
|
|
|
|
|
{ |
|
|
|
|
|
type: "NAVIGATE_TO_HOMEPAGE", |
|
|
|
|
|
menu: "999999991", |
|
|
|
|
|
}, |
|
|
|
|
|
"*" |
|
|
|
|
|
); |
|
|
} |
|
|
} |
|
|
// window.parent.location.href = window.parent.document.referrer |
|
|
// window.parent.location.href = window.parent.document.referrer |
|
|
} |
|
|
} |
|
@ -1087,6 +1125,17 @@ onUnmounted(() => { |
|
|
} |
|
|
} |
|
|
// 清理AiEmotion页面的高度监听器 |
|
|
// 清理AiEmotion页面的高度监听器 |
|
|
stopAiEmotionHeightObserver(); |
|
|
stopAiEmotionHeightObserver(); |
|
|
|
|
|
|
|
|
|
|
|
// 清理图表交互相关的定时器和全局函数 |
|
|
|
|
|
if (chartInteractionTimer.value) { |
|
|
|
|
|
clearTimeout(chartInteractionTimer.value); |
|
|
|
|
|
} |
|
|
|
|
|
if (window.handleChartInteractionStart) { |
|
|
|
|
|
delete window.handleChartInteractionStart; |
|
|
|
|
|
} |
|
|
|
|
|
if (window.handleChartInteractionEnd) { |
|
|
|
|
|
delete window.handleChartInteractionEnd; |
|
|
|
|
|
} |
|
|
}); |
|
|
}); |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
@ -1141,7 +1190,7 @@ onUnmounted(() => { |
|
|
</div> |
|
|
</div> |
|
|
<div class="backToHomeBtn" @click="backToHome()"> |
|
|
<div class="backToHomeBtn" @click="backToHome()"> |
|
|
<img |
|
|
<img |
|
|
src="https://d31zlh4on95l9h.cloudfront.net/images/d8b388e461423f79087ddbe016002217.png" |
|
|
|
|
|
|
|
|
src="https://d31zlh4on95l9h.cloudfront.net/images/9cbc5b2eb2327bd04d015c19d8c3f1f9.png" |
|
|
alt="返回首页" |
|
|
alt="返回首页" |
|
|
class="backImg" |
|
|
class="backImg" |
|
|
/> |
|
|
/> |
|
@ -1190,7 +1239,7 @@ onUnmounted(() => { |
|
|
</div> |
|
|
</div> |
|
|
<div class="pc-backToHomeBtn" @click="backToHome()"> |
|
|
<div class="pc-backToHomeBtn" @click="backToHome()"> |
|
|
<img |
|
|
<img |
|
|
src="https://d31zlh4on95l9h.cloudfront.net/images/d8b388e461423f79087ddbe016002217.png" |
|
|
|
|
|
|
|
|
src="https://d31zlh4on95l9h.cloudfront.net/images/9cbc5b2eb2327bd04d015c19d8c3f1f9.png" |
|
|
alt="返回首页" |
|
|
alt="返回首页" |
|
|
class="pc-backImg" |
|
|
class="pc-backImg" |
|
|
/> |
|
|
/> |
|
@ -1750,7 +1799,7 @@ body { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.backImg { |
|
|
.backImg { |
|
|
width: 100%; |
|
|
|
|
|
|
|
|
width: 60%; |
|
|
height: auto; |
|
|
height: auto; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|