This commit is contained in:
qumeng039@126.com 2025-08-26 16:45:54 +08:00
commit e70c83736c
19 changed files with 572 additions and 469 deletions

BIN
dist.zip

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

@ -418,11 +418,11 @@ export const useKeyNodeStore1 = defineStore("keyNode1", () => {
id: 3,
timestamp: "2022-07-31 02:24:23",
author: "bidishalolo",
influence: 6636,
influence: 7630,
highlighted: false,
like: 5013,
comment: 247,
transmit: 1376,
like: 5010,
comment: 244,
transmit: 2376,
content:
"BREAKING: #Pelosi seen flying over #Taiwan. Stunning footage... https://t.co/8AOJ6yMPvl"
},
@ -465,11 +465,11 @@ export const useKeyNodeStore1 = defineStore("keyNode1", () => {
id: 7,
timestamp: "2022-7-31 16:11:53",
author: "Mick Wallace",
influence: 2473,
influence: 1754,
highlighted: false,
like: 1923,
comment: 124,
transmit: 426,
like: 999,
comment: 101,
transmit: 654,
content:
"As if the Warmongering #Pelosi hasn't done enough damage, it seems she's arrived in Taiwan already on her latest War promotion..."
},
@ -477,10 +477,10 @@ export const useKeyNodeStore1 = defineStore("keyNode1", () => {
id: 8,
timestamp: "2022-07-31 16:12:49",
author: "Jiushiniya",
influence: 2473,
influence: 1226,
highlighted: false,
like: 1923,
comment: 124,
like: 630,
comment: 170,
transmit: 426,
content:
"@Dr_Mo2019 蓬佩奥在媒体上说拜登政府要有战略战术说白了川普政府如果有战略战术就不会有hk沦陷乌克兰战争台海危机三战川普也可能不会滚下台蓬佩奥今天还用的着蹭佩洛西访台蓬佩奥就直接自己率团去台湾了。川普支持蓬佩奥的话今天就不会有佩洛西什么事如果拜登软弱的话今天更不会有佩洛西什么事。 https://t.co/g8VQLWoKRA"

View File

@ -233,7 +233,7 @@ export const useKeyNodeStore2 = defineStore("keyNode2", () => {
posts: "2.9万",
followerCount: "531", // 关注数量
interactionCount: "4", // 互动次数
firstActiveTime: "2023-10-15 00:58:58", // 首次活跃时间
firstActiveTime: "2023-10-15 00:00:00", // 首次活跃时间
avatar: new URL("@/assets/images/Jackson.png", import.meta.url).toString(),
default_avatar: new URL(
"@/assets/images/avatar/2/blue_Jackson_Hinkle_🇺🇸.png",
@ -352,7 +352,7 @@ export const useKeyNodeStore2 = defineStore("keyNode2", () => {
},
{
id: 10,
timestamp: "2023-10-15 00:58:58",
timestamp: "2023-10-15 00:00:00",
author: "Jackson Hinkle 🇺🇸",
influence: 22546,
highlighted: false,

View File

@ -366,6 +366,7 @@ const initChart = async () => {
coolingFactor: 0.1
},
roam: true,
draggable: true, //
label: {
show: false
},
@ -379,18 +380,19 @@ const initChart = async () => {
name: "普通节点",
itemStyle: {
//
// 使ECharts
color: new echarts.graphic.RadialGradient(0.98, 0.38, 0.9, [
{ offset: 1, color: "#476996" }, //
{ offset: 0.5, color: "#38546b" }, //
{ offset: 0, color: "#5fb3b3" } //
{ offset: 1, color: "#235D94" }, //
{ offset: 0.5, color: "#266B8F" }, //
{ offset: 0, color: "#56ABB2" } //
]),
// 使ECharts线
borderColor: new echarts.graphic.LinearGradient(0, 0, 1, 1, [
{ offset: 0, color: "rgba(42,185,254,1)" },
{ offset: 1, color: "rgba(82,255,243,1)" }
]),
opacity: 0.8,
//
borderColor: "#2AB9FE",
borderWidth: 1,
borderType: "dashed",
borderImageSource: "linear-gradient(90deg, #2AB9FE 12.25%, #52FFF3 100.6%)",
borderImageSlice: 1
borderType: "solid"
}
}
],

View File

@ -9,28 +9,19 @@
<div class="userChart">
<EventHeatmap
@show-details="handleShowDetails"
:panelTrendData="[32655, 29182, 55732, 1051]"
:panelXAxisLabels="['2022.7.31', '2022.8.1', '2022.8.2', '2022.8.3']"
:granularTrendData="[
8959, 7460, 8334, 7902, 5753, 3070, 3481, 16878, 17819, 15296, 18883, 3734, 938, 101,
12
]"
:panelTrendData="[28545, 16651, 274, 315]"
:panelXAxisLabels="['2023.10.09', '2023.10.15', '2023.10.21', '2023.10.25']"
:granularTrendData="[28545, 13922, 13719, 16651, 18240, 2205, 274, 157, 318]"
:granularXAxisLabels="[
'7.31 00h',
'7.31 06h',
'7.31 12h',
'7.31 18h',
'8.1 00h',
'8.1 06h',
'8.1 12h',
'8.1 18h',
'8.2 00h',
'8.2 06h',
'8.2 12h',
'8.2 18h',
'8.3 00h',
'8.3 06h',
'8.3 12h'
'10.09 13h',
'10.11 14h',
'10.13 16h',
'10.15 17h',
'10.17 18h',
'10.19 20h',
'10.21 21h',
'10.23 22h',
'10.25 23h'
]"
/>
</div>
@ -78,7 +69,6 @@ const graphPanelRef = ref(null)
// activeChartTab ---
const activeChartTab = ref("trend") // 'trend'
const handleLeaderSelect = (leader) => {
console.log("选中的领袖ID:", leader)
if (graphPanelRef.value && leader.id) {
graphPanelRef.value.highlightNode(leader.id)
}
@ -102,18 +92,32 @@ const stopAutomaticPlay = () => {
}
let timer = null
//
const intervalTimes = [500, 500, 1000, 1000, 1000, 1000, 1000, 1000, 4000, 2000]
const automaticPlay = () => {
let index = 1
if (timer) clearInterval(timer)
timer = setInterval(() => {
//
const playNext = () => {
store.setActiveTimePoint(index)
if (index >= store.allLeaderData.length) {
clearInterval(timer)
timer = null
return
}
// index使
const interval = intervalTimes[index] || 1000
timer = setTimeout(playNext, interval)
index++
}, 1500)
}
// 使
const initialInterval = intervalTimes[0] || 1000
timer = setTimeout(playNext, initialInterval)
}
// store.initializeTimePoints()

View File

@ -92,17 +92,22 @@ const calculatePositions = (timestamp) => {
})
//
const pointPositions = {}
sortedPoints.forEach((point) => {
const pointTime = new Date(point.timestamp).getTime()
const position = ((pointTime - startTime) / timeRange) * 100
pointPositions[point.id] = Math.max(0, Math.min(100, position))
sortedPoints.forEach((point, index) => {
// 100%
if (index === sortedPoints.length - 1) {
pointPositions[point.id] = 100
} else {
const pointTime = new Date(point.timestamp).getTime()
const position = ((pointTime - startTime) / timeRange) * 100
pointPositions[point.id] = Math.max(0, Math.min(100, position))
}
})
// (20px)
const pointWidthPercentage = 5 //
const minSpacing = pointWidthPercentage //
//
for (let i = 1; i < sortedPoints.length; i++) {
// 100%
for (let i = 1; i < sortedPoints.length - 1; i++) {
const prevPoint = sortedPoints[i - 1]
const currPoint = sortedPoints[i]

View File

@ -82,7 +82,7 @@ const chartData = ref([
unit: "数量",
max: 10,
rows: [
{ label: "领袖", value: 6.4, type: "leader" },
{ label: "意见领袖", value: 6.4, type: "leader" },
{ label: "所有用户", value: 0.46, type: "user" }
]
},
@ -92,7 +92,7 @@ const chartData = ref([
unit: "天",
max: 10,
rows: [
{ label: "领袖", value: 2.73, type: "leader" },
{ label: "意见领袖", value: 2.73, type: "leader" },
{ label: "所有用户", value: 2.32, type: "user" }
]
},
@ -102,7 +102,7 @@ const chartData = ref([
unit: "万",
max: 300,
rows: [
{ label: "领袖", value: 290.4, type: "leader", highlight: false },
{ label: "意见领袖", value: 290.4, type: "leader", highlight: false },
{ label: "所有用户", value: 1.31, type: "user" }
]
}

View File

@ -93,18 +93,31 @@ const handleOpenPostDialog = (post) => {
}
let timer = null
//
const intervalTimes = [1000, 500, 1000, 4000, 2000, 1000, 1000, 1000, 1000, 3000]
const automaticPlay = () => {
let index = 1
if (timer) clearInterval(timer)
timer = setInterval(() => {
//
const playNext = () => {
store.setActiveTimePoint(index)
if (index >= store.allLeaderData.length) {
clearInterval(timer)
timer = null
return
}
// index使
const interval = intervalTimes[index] || 1000
timer = setTimeout(playNext, interval)
index++
}, 1500)
}
// 使
const initialInterval = intervalTimes[0] || 1000
timer = setTimeout(playNext, initialInterval)
}
//

View File

@ -122,7 +122,7 @@ import AnlysisPanle from "../components/anlysisPanle.vue"
import Graph from "../components/graph.vue"
import WordsCloud from "../components/cloudWords.vue"
import { useCharacterHiddenStore } from "@/store/linkPrediction/index"
import userPanelTitleImg from "@/assets/images/linkPrediction/title/user-title.png"
import userPanelTitleImg from "@/assets/images/linkPrediction/title/characters-hidden-interaction-user-title.png"
import graphTitleImg from "@/assets/images/linkPrediction/title/graph1-title.png"
import analysisTitleImg from "@/assets/images/linkPrediction/title/analysis-title.png"
import { storeToRefs } from "pinia"

View File

@ -62,7 +62,6 @@ const handleUserItem = (index, group = {}) => {
width: 100%;
height: 100%;
.title {
margin-top: vh(-8);
margin-left: vw(-2);
}
.user-list {

View File

@ -70,7 +70,6 @@ const handleUserItem = (index, group = {}) => {
width: 100%;
height: 100%;
.title {
margin-top: vh(-7);
margin-left: vw(-2);
}
.user-list {

View File

@ -144,10 +144,10 @@ import Graph from "./components/graph.vue"
import WordsCloud from "./components/cloudWords.vue"
import { Icon } from "@iconify/vue"
import { useSocialGroupsStore } from "@/store/linkPrediction/index"
import userPanelTitleImg from "@/assets/images/linkPrediction/title/user-title.png"
import userPanelTitleImg from "@/assets/images/linkPrediction/title/social-group-user-title.png"
import userChartTitleImg from "@/assets/images/linkPrediction/title/interaction-strenth-title.png"
import graphTitleImg from "@/assets/images/linkPrediction/title/graph1-title.png"
import analysisTitleImg from "@/assets/images/linkPrediction/title/analysis-title.png"
import analysisTitleImg from "@/assets/images/linkPrediction/title/social-group-analysis-title.png"
import { getAvatarUrl } from "@/utils/transform"
import { storeToRefs } from "pinia"
const socialGroupsStore = useSocialGroupsStore()