This commit is contained in:
duanhao 2025-08-26 18:01:19 +08:00
commit f756ffc157
5 changed files with 54 additions and 20 deletions

BIN
dist.zip

Binary file not shown.

View File

@ -38,7 +38,12 @@ const props = defineProps({
}
})
const emit = defineEmits(["click:hotTopic", "auto:currentTopList", "over:hotTopic"])
const emit = defineEmits([
"click:hotTopic",
"auto:currentTopList",
"over:hotTopic",
"click:refresh"
])
const currentTopicList = ref([])
let myChart = null
let timer = null
@ -265,6 +270,8 @@ const handleRefresh = () => {
initTopicChart()
//
dynamicShowEventList()
emit("click:refresh", true)
}
}
const handleResize = () => {

View File

@ -38,11 +38,33 @@ const currentTopicList = inject("currentTopicList")
//hoveritem
const currentTopic = inject("currentTopic")
//topic
const isRefresh = inject("refresh")
const riskNodeColorMap = {
低风险: `image://${new URL(lowRiskNode, import.meta.url)}`,
中风险: `image://${new URL(middleRiskNode, import.meta.url)}`,
高风险: `image://${new URL(highRiskNode, import.meta.url)}`
}
const initNodeState = () => {
const option = chart.getOption()
const anchorCommunityList = option.series[0].data //
//
anchorCommunityList.forEach((node) => {
if (node.category === 1) {
node.symbol = `image://${new URL(predictionNodeImg, import.meta.url)}`
}
})
chart.setOption({
series: [
{
data: anchorCommunityList
}
]
})
return anchorCommunityList
}
//()
watch(currentTopicList, (newList) => {
const set = new Set() //
@ -83,21 +105,7 @@ watch(currentTopicList, (newList) => {
//(hover)
watch(currentTopic, (newValue) => {
const option = chart.getOption()
const anchorCommunityList = option.series[0].data //
//
anchorCommunityList.forEach((node) => {
if (node.category === 1) {
node.symbol = `image://${new URL(predictionNodeImg, import.meta.url)}`
}
})
chart.setOption({
series: [
{
data: anchorCommunityList
}
]
})
const anchorCommunityList = initNodeState()
//
const currentTopicEvent = {
@ -124,6 +132,15 @@ watch(currentTopic, (newValue) => {
]
})
})
//()
watch(isRefresh, (newFlag) => {
if (newFlag) {
initNodeState(newFlag)
isRefresh.value = false
}
})
//userPanel
watch(currentUser, (val) => {
if (val && chart) {
@ -158,11 +175,9 @@ const initChart = async () => {
//
chart.on("mouseover", function (params) {
if (!params.data) return
//
if (userSelectedNodeIndex.value !== null && params.dataIndex === userSelectedNodeIndex.value) {
if (userSelectedNodeIndex.value !== null && params.dataIndex === userSelectedNodeIndex.value)
return
}
if (params.dataType === "node") {
//

View File

@ -35,13 +35,17 @@ const props = defineProps({
}
})
const anchorMonitorList = ref(props.anchorMonitorList)
const sortAnchorMonitorListByTime = (anchorMonitorList) => {
return anchorMonitorList.sort((a, b) => {
//
return new Date(a.time.trim()) - new Date(b.time.trim())
})
}
props.anchorMonitorList = sortAnchorMonitorListByTime(props.anchorMonitorList)
anchorMonitorList.value = sortAnchorMonitorListByTime(anchorMonitorList.value)
const startAutoScroll = () => {
if (!monitorListRef.value) return
scrollTimer = setInterval(() => {

View File

@ -38,6 +38,7 @@
:topicList="KeyNodeOneStore.tooltipList"
@click:hotTopic="handleGotTopicDialog"
@over:hotTopic="handleMouseOver"
@click:refresh="handleRefreshTopic"
@auto:currentTopList="handleCurrentTopList"
></AttentionTopic>
</div>
@ -246,6 +247,9 @@ const currentSelectedAnchorItem = ref(null)
//
const currentTopicList = ref([])
//
const isRefresh = ref(false)
//tabs
const filterShowUserList = computed(() => {
if (KeyNodeOneStore.currentTabType == "全部") {
@ -325,8 +329,12 @@ const handleCurrentTopList = (list) => {
const handleMouseOver = (topic) => {
currentTopic.value = topic
}
const handleRefreshTopic = (flag) => {
isRefresh.value = flag
}
provide("currentTopicList", currentTopicList)
provide("currentTopic", currentTopic)
provide("refresh", isRefresh)
let hotChartInstance = null
const renderHotChart = () => {