2025-07-25 15:07:08 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<div class="detailNode-component">
|
2025-07-25 17:24:14 +08:00
|
|
|
|
<img src="@/assets/images/icon/goback.png" alt="" class="goback" @click="handleGoback" />
|
2025-07-25 15:07:08 +08:00
|
|
|
|
<div class="graph-container" id="container"></div>
|
2025-07-28 15:59:40 +08:00
|
|
|
|
<div class="statistic-container">
|
2025-07-29 12:13:19 +08:00
|
|
|
|
<div
|
|
|
|
|
|
class="statistics-item"
|
|
|
|
|
|
v-for="item in interactionStore.statisticsDetailList"
|
|
|
|
|
|
:key="item.id"
|
|
|
|
|
|
>
|
2025-07-28 15:59:40 +08:00
|
|
|
|
<img :src="item.icon" class="icon" />
|
|
|
|
|
|
<div class="name">{{ item.name }}: </div>
|
|
|
|
|
|
<div class="count">{{ item.count }}</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2025-07-29 12:13:19 +08:00
|
|
|
|
<div class="time-axis">
|
2025-08-04 13:28:34 +08:00
|
|
|
|
<TimeAxis
|
|
|
|
|
|
ref="timeAxisRef"
|
|
|
|
|
|
:cursor="new Date(timeList[timeList.length - 1])"
|
|
|
|
|
|
:start-time="new Date('2024-05-16 16:56:04')"
|
|
|
|
|
|
:end-time="new Date('2024-05-23 10:16:56')"
|
|
|
|
|
|
:init-position="0"
|
|
|
|
|
|
:is-auto-play="true"
|
|
|
|
|
|
:time-list="timeList"
|
|
|
|
|
|
@click:pointerDown="sendTimeChangeRequest"
|
|
|
|
|
|
@slide:pointerUp="sendTimeChangeRequest"
|
|
|
|
|
|
></TimeAxis>
|
2025-07-29 12:13:19 +08:00
|
|
|
|
</div>
|
2025-07-25 15:07:08 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script setup>
|
2025-08-12 14:12:01 +08:00
|
|
|
|
import { onMounted, ref, watch, nextTick } from "vue"
|
2025-08-01 14:48:51 +08:00
|
|
|
|
import { TansTimestamp, getAvatarUrl } from "@/utils/transform"
|
2025-07-28 15:59:40 +08:00
|
|
|
|
import nodeHoverImg from "@/assets/images/nodeHover.png"
|
|
|
|
|
|
import * as echarts from "echarts"
|
2025-07-29 12:13:19 +08:00
|
|
|
|
import { storeToRefs } from "pinia"
|
2025-08-04 13:28:34 +08:00
|
|
|
|
import TimeAxis from "@/components/timeAxis.vue"
|
2025-07-31 16:13:39 +08:00
|
|
|
|
const props = defineProps({
|
|
|
|
|
|
interactionStore: {
|
|
|
|
|
|
type: Object,
|
|
|
|
|
|
required: true
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
2025-08-04 13:28:34 +08:00
|
|
|
|
const timeAxisRef = ref(null)
|
2025-08-01 11:09:49 +08:00
|
|
|
|
const { communityDetailNodeRelation, timeList, predictionUserIds, curSelecedGroupIds } =
|
|
|
|
|
|
storeToRefs(props.interactionStore)
|
|
|
|
|
|
|
2025-08-01 15:43:24 +08:00
|
|
|
|
const emit = defineEmits(["click:goback", "click:openDialog"])
|
2025-07-30 11:23:19 +08:00
|
|
|
|
const chartsData = ref({})
|
2025-07-25 17:24:14 +08:00
|
|
|
|
const handleGoback = () => {
|
2025-08-04 13:28:34 +08:00
|
|
|
|
timeAxisRef.value?.reset()
|
2025-07-25 17:24:14 +08:00
|
|
|
|
emit("click:goback", "CommunityNode")
|
|
|
|
|
|
}
|
2025-07-28 15:59:40 +08:00
|
|
|
|
|
2025-08-01 15:43:24 +08:00
|
|
|
|
const handleClickNode = () => {
|
|
|
|
|
|
chart.on("click", function (params) {
|
|
|
|
|
|
if (params.dataType == "node" && predictionUserIds.value.includes(params.data.id)) {
|
|
|
|
|
|
emit("click:openDialog", params.data)
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-08-01 11:09:49 +08:00
|
|
|
|
// 添加对curSelecedGroupIds的watch,确保切换列表项时重置时间轴
|
|
|
|
|
|
watch(
|
|
|
|
|
|
curSelecedGroupIds,
|
|
|
|
|
|
(newIds) => {
|
|
|
|
|
|
if (newIds && newIds.length > 0) {
|
2025-08-04 13:28:34 +08:00
|
|
|
|
timeAxisRef.value?.reset()
|
2025-08-01 11:09:49 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
{ deep: true }
|
|
|
|
|
|
)
|
2025-07-29 12:13:19 +08:00
|
|
|
|
//当点击时间轴的时候,communityDetailNodeList改变,重新更新关系图
|
|
|
|
|
|
watch(
|
2025-07-30 16:33:29 +08:00
|
|
|
|
communityDetailNodeRelation,
|
2025-07-29 20:08:13 +08:00
|
|
|
|
() => {
|
2025-07-29 12:13:19 +08:00
|
|
|
|
initChart()
|
|
|
|
|
|
},
|
|
|
|
|
|
{ deep: true }
|
|
|
|
|
|
)
|
|
|
|
|
|
|
2025-07-30 16:33:29 +08:00
|
|
|
|
//监听predictionUserIds的变化从而筛选需要高亮的预测节点
|
2025-07-30 11:23:19 +08:00
|
|
|
|
watch(
|
2025-07-30 16:33:29 +08:00
|
|
|
|
predictionUserIds,
|
2025-07-30 11:23:19 +08:00
|
|
|
|
(newIds) => {
|
|
|
|
|
|
if (newIds.length != 0) {
|
|
|
|
|
|
nextTick(() => {
|
|
|
|
|
|
highLightUserNodes(newIds)
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-07-30 16:33:29 +08:00
|
|
|
|
{ deep: true, immediate: true }
|
2025-07-30 11:23:19 +08:00
|
|
|
|
)
|
2025-07-30 16:33:29 +08:00
|
|
|
|
|
2025-08-04 13:28:34 +08:00
|
|
|
|
// 时间轴变化发送请求
|
|
|
|
|
|
const sendTimeChangeRequest = (currentTime) => {
|
|
|
|
|
|
const currentTimes = TansTimestamp(currentTime, "YYYY-MM-DD HH:mm:ss")
|
2025-07-31 16:13:39 +08:00
|
|
|
|
if (props.interactionStore.curRelationId == "") {
|
|
|
|
|
|
props.interactionStore.initGraphCommunityDetailNode(
|
|
|
|
|
|
props.interactionStore.curSelecedGroupIds,
|
|
|
|
|
|
currentTimes
|
|
|
|
|
|
)
|
2025-07-31 11:16:57 +08:00
|
|
|
|
} else {
|
2025-07-31 16:13:39 +08:00
|
|
|
|
props.interactionStore.initGraphCommunityDetailNode(
|
|
|
|
|
|
props.interactionStore.curSelecedGroupIds,
|
2025-07-31 11:16:57 +08:00
|
|
|
|
currentTimes,
|
2025-07-31 16:13:39 +08:00
|
|
|
|
props.interactionStore.curRelationId
|
2025-07-31 11:16:57 +08:00
|
|
|
|
)
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-07-29 12:13:19 +08:00
|
|
|
|
|
|
|
|
|
|
let chart = null
|
2025-07-28 15:59:40 +08:00
|
|
|
|
const initChart = async () => {
|
2025-08-01 17:02:46 +08:00
|
|
|
|
if (chart == null) {
|
|
|
|
|
|
chart = echarts.init(document.getElementById("container"))
|
|
|
|
|
|
}
|
2025-07-28 15:59:40 +08:00
|
|
|
|
const links = []
|
2025-07-30 16:33:29 +08:00
|
|
|
|
let nodes = []
|
2025-07-29 16:23:19 +08:00
|
|
|
|
const edgeWidth = (interactionTime) => {
|
2025-08-01 16:48:12 +08:00
|
|
|
|
if (interactionTime <= 3) return 3
|
|
|
|
|
|
else if (interactionTime <= 10) return 4
|
|
|
|
|
|
else if (interactionTime <= 20) return 6
|
|
|
|
|
|
else if (interactionTime <= 30) return 8
|
2025-07-29 16:23:19 +08:00
|
|
|
|
else return 1
|
|
|
|
|
|
}
|
2025-07-31 16:13:39 +08:00
|
|
|
|
if (!Object.keys(props.interactionStore.communityDetailNodeRelation).length) return
|
2025-07-30 16:33:29 +08:00
|
|
|
|
|
|
|
|
|
|
//先处理节点
|
2025-07-31 16:13:39 +08:00
|
|
|
|
nodes = props.interactionStore.communityDetailNodeList.map((item) => ({
|
2025-07-30 16:33:29 +08:00
|
|
|
|
id: item.userId,
|
|
|
|
|
|
name: item.userName,
|
2025-08-01 15:43:24 +08:00
|
|
|
|
// 头像
|
|
|
|
|
|
avatarData: item.avatarData,
|
2025-08-01 16:12:39 +08:00
|
|
|
|
//默认圆形头像
|
2025-08-01 14:48:51 +08:00
|
|
|
|
defaultAvatar: getAvatarUrl(item.defaultAvatar),
|
2025-08-01 16:12:39 +08:00
|
|
|
|
//激活状态的头像
|
2025-08-01 14:48:51 +08:00
|
|
|
|
activeAvatar: getAvatarUrl(item.activeAvatar),
|
2025-07-30 16:33:29 +08:00
|
|
|
|
symbolSize: 40,
|
|
|
|
|
|
postNum: item.postNum,
|
2025-08-01 15:43:24 +08:00
|
|
|
|
fans: item.fans,
|
|
|
|
|
|
// 发帖频率
|
|
|
|
|
|
postFreqPerDay: item.postFreqPerDay,
|
|
|
|
|
|
// 参与互动次数
|
|
|
|
|
|
interactionNum: item.interactionNum,
|
|
|
|
|
|
// 参与互动频率
|
|
|
|
|
|
interactionFreqPerDay: item.interactionFreqPerDay,
|
|
|
|
|
|
// 帖文被互动次数
|
|
|
|
|
|
interactedNum: item.interactedNum,
|
|
|
|
|
|
// 最近活跃时间
|
|
|
|
|
|
recentActiveTime: item.recentActiveTime
|
2025-07-30 16:33:29 +08:00
|
|
|
|
}))
|
|
|
|
|
|
|
2025-07-31 16:13:39 +08:00
|
|
|
|
Object.entries(props.interactionStore.communityDetailNodeRelation).forEach(
|
|
|
|
|
|
([parentId, children]) => {
|
|
|
|
|
|
children.forEach((child) => {
|
|
|
|
|
|
links.push({
|
|
|
|
|
|
source: parentId,
|
|
|
|
|
|
target: child.id,
|
|
|
|
|
|
edge: child.isHidden ? 1 : 0,
|
|
|
|
|
|
interactionTimes: child.interactionTime,
|
|
|
|
|
|
lineStyle: {
|
2025-07-31 17:06:43 +08:00
|
|
|
|
width: child.isHidden ? 7 : edgeWidth(child.interactionTime),
|
2025-07-31 16:13:39 +08:00
|
|
|
|
color: child.isHidden ? props.interactionStore.predictionLineColor : "#37ACD7", // 无互动=灰色,有互动=黄色
|
2025-07-31 17:06:43 +08:00
|
|
|
|
opacity: child.isHidden ? 1 : 0.5, // 可选:调整透明度增强模糊感
|
2025-07-31 16:13:39 +08:00
|
|
|
|
type: child.isHidden ? "dashed" : "solid" // 无互动=实线,有互动=虚线
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
2025-07-28 15:59:40 +08:00
|
|
|
|
})
|
2025-07-31 16:13:39 +08:00
|
|
|
|
}
|
|
|
|
|
|
)
|
2025-07-30 11:23:19 +08:00
|
|
|
|
chartsData.value = { links, nodes }
|
2025-07-28 15:59:40 +08:00
|
|
|
|
|
|
|
|
|
|
const categories = [
|
2025-07-29 16:23:19 +08:00
|
|
|
|
{ name: "事件活跃者", category: 0, icon: "circle" },
|
|
|
|
|
|
{
|
|
|
|
|
|
name: "互动关系",
|
|
|
|
|
|
category: 1,
|
|
|
|
|
|
icon: `image://${new URL("@/assets/images/linkPrediction/icon/interaction-icon2.png", import.meta.url)}`
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
2025-07-31 16:13:39 +08:00
|
|
|
|
name: props.interactionStore.predictionLegendContent,
|
2025-07-29 16:23:19 +08:00
|
|
|
|
category: 2,
|
2025-07-31 16:13:39 +08:00
|
|
|
|
icon: props.interactionStore.predictionLegendIcon
|
2025-07-29 16:23:19 +08:00
|
|
|
|
}
|
2025-07-28 15:59:40 +08:00
|
|
|
|
]
|
|
|
|
|
|
const option = {
|
|
|
|
|
|
//图例配置
|
|
|
|
|
|
legend: [
|
|
|
|
|
|
{
|
|
|
|
|
|
data: categories.map((c) => ({
|
|
|
|
|
|
name: c.name,
|
|
|
|
|
|
itemStyle: {
|
|
|
|
|
|
color:
|
|
|
|
|
|
c.category === 0
|
|
|
|
|
|
? new echarts.graphic.LinearGradient(1, 0, 0, 0, [
|
|
|
|
|
|
{ offset: 1, color: "#1a3860" }, // 深蓝渐变
|
|
|
|
|
|
{ offset: 0.5, color: "#38546b" },
|
|
|
|
|
|
{ offset: 0, color: "#5fb3b3" }
|
|
|
|
|
|
])
|
|
|
|
|
|
: c.category === 1
|
|
|
|
|
|
? new echarts.graphic.LinearGradient(1, 0, 0, 0, [
|
|
|
|
|
|
{ offset: 0, color: "#9eec9c" }, // 绿色渐变
|
|
|
|
|
|
{ offset: 0.37, color: "#aef295" },
|
|
|
|
|
|
{ offset: 1, color: "#c2f989" }
|
|
|
|
|
|
])
|
|
|
|
|
|
: new echarts.graphic.LinearGradient(1, 0, 0, 0, [
|
|
|
|
|
|
{ offset: 0, color: "#ff9a9e" }, // 红色渐变(用于 category === 2)
|
|
|
|
|
|
{ offset: 0.5, color: "#fad0c4" },
|
|
|
|
|
|
{ offset: 1, color: "#fbc2eb" }
|
|
|
|
|
|
])
|
2025-07-29 16:23:19 +08:00
|
|
|
|
},
|
|
|
|
|
|
icon: c.icon
|
2025-07-28 15:59:40 +08:00
|
|
|
|
})),
|
|
|
|
|
|
right: 21,
|
2025-07-29 16:23:19 +08:00
|
|
|
|
symbolKeepAspect: false,
|
2025-07-28 15:59:40 +08:00
|
|
|
|
bottom: 70,
|
|
|
|
|
|
orient: "vertical",
|
|
|
|
|
|
itemWidth: 16,
|
|
|
|
|
|
itemHeight: 16,
|
|
|
|
|
|
itemGap: 12,
|
|
|
|
|
|
backgroundColor: "rgba(0,67,125,0.56)", // 半透明深蓝
|
|
|
|
|
|
borderRadius: 8, // 圆角
|
|
|
|
|
|
borderColor: "#c2f2ff", // 淡蓝色边框
|
|
|
|
|
|
borderWidth: 0.3,
|
|
|
|
|
|
padding: [12, 20, 12, 20], // 上右下左
|
|
|
|
|
|
textStyle: {
|
|
|
|
|
|
color: "#fff",
|
|
|
|
|
|
fontSize: 16,
|
|
|
|
|
|
fontWeight: "normal"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
//hover上去的窗口
|
|
|
|
|
|
tooltip: {
|
|
|
|
|
|
trigger: "item",
|
|
|
|
|
|
backgroundColor: "rgba(0,0,0,0)", // 透明背景
|
|
|
|
|
|
borderColor: "rgba(0,0,0,0)", // 透明边框
|
|
|
|
|
|
borderWidth: 0,
|
|
|
|
|
|
extraCssText: "box-shadow:none;padding:0;",
|
|
|
|
|
|
formatter: function (params) {
|
|
|
|
|
|
if (params.dataType === "node") {
|
|
|
|
|
|
return `<div
|
|
|
|
|
|
style="
|
|
|
|
|
|
padding:10px 15px;
|
|
|
|
|
|
height: 68px;
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
background: url('${nodeHoverImg}');
|
|
|
|
|
|
background-size: cover;
|
|
|
|
|
|
background-position: center;
|
|
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
">
|
|
|
|
|
|
<div style="color:#fff;letter-spacing: 0.14px;">
|
2025-08-01 09:11:24 +08:00
|
|
|
|
<div >用户ID:${params.data.id}</div>
|
|
|
|
|
|
<div >用户名:${params.data.name}</div>
|
2025-07-28 15:59:40 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>`
|
|
|
|
|
|
}
|
|
|
|
|
|
return ""
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
edgeLabel: {
|
|
|
|
|
|
show: false,
|
|
|
|
|
|
position: "middle",
|
|
|
|
|
|
formatter: function (params) {
|
2025-07-29 20:08:13 +08:00
|
|
|
|
return `${params.data.interactionTimes}次互动`
|
2025-07-28 15:59:40 +08:00
|
|
|
|
},
|
|
|
|
|
|
fontSize: 14
|
|
|
|
|
|
},
|
|
|
|
|
|
emphasis: {
|
|
|
|
|
|
edgeLabel: {
|
|
|
|
|
|
show: true,
|
|
|
|
|
|
color: "#fff",
|
|
|
|
|
|
fontSize: 18,
|
|
|
|
|
|
textShadowColor: "#fff",
|
|
|
|
|
|
textShadowBlur: 0,
|
|
|
|
|
|
textShadowOffsetX: 0,
|
|
|
|
|
|
textShadowOffsetY: 0
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
series: [
|
|
|
|
|
|
{
|
|
|
|
|
|
type: "graph",
|
|
|
|
|
|
layout: "force",
|
|
|
|
|
|
animation: false,
|
|
|
|
|
|
draggable: true,
|
|
|
|
|
|
roam: true,
|
2025-08-04 09:37:33 +08:00
|
|
|
|
zoom: 0.08,
|
2025-07-28 15:59:40 +08:00
|
|
|
|
categories: categories,
|
|
|
|
|
|
force: {
|
2025-07-31 17:06:43 +08:00
|
|
|
|
edgeLength: 4000,
|
2025-07-28 15:59:40 +08:00
|
|
|
|
repulsion: 4000,
|
2025-07-29 12:13:19 +08:00
|
|
|
|
gravity: 0.1,
|
2025-07-28 15:59:40 +08:00
|
|
|
|
friction: 0.02,
|
|
|
|
|
|
coolingFactor: 0.1
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
animationDurationUpdate: 3500, // 节点移动更平滑
|
2025-07-30 11:23:19 +08:00
|
|
|
|
data: chartsData.value.nodes.map((node) => ({
|
2025-07-28 15:59:40 +08:00
|
|
|
|
...node,
|
2025-08-01 14:48:51 +08:00
|
|
|
|
symbol: node.defaultAvatar ? `image://${node.defaultAvatar}` : "circle",
|
|
|
|
|
|
symbolSize: node.defaultAvatar ? 140 : 40,
|
2025-07-28 15:59:40 +08:00
|
|
|
|
itemStyle: {
|
|
|
|
|
|
color: new echarts.graphic.RadialGradient(0.98, 0.38, 0.9, [
|
|
|
|
|
|
{ offset: 1, color: "#1a3860" }, // 最左侧
|
|
|
|
|
|
{ offset: 0.5, color: "#38546b" }, // 中间
|
|
|
|
|
|
{ offset: 0, color: "#5fb3b3" } // 最右侧
|
|
|
|
|
|
]),
|
|
|
|
|
|
|
|
|
|
|
|
opacity: 1,
|
|
|
|
|
|
borderColor: "#46C6AD",
|
|
|
|
|
|
borderWidth: 1,
|
|
|
|
|
|
shadowBlur: 4,
|
|
|
|
|
|
borderType: "dashed",
|
|
|
|
|
|
shadowColor: "rgba(19, 27, 114, 0.25)"
|
|
|
|
|
|
},
|
|
|
|
|
|
emphasis: {
|
|
|
|
|
|
itemStyle: {
|
|
|
|
|
|
shadowBlur: 20,
|
|
|
|
|
|
shadowColor: "#c4a651",
|
|
|
|
|
|
borderColor: "#fcd267",
|
2025-07-30 11:23:19 +08:00
|
|
|
|
borderWidth: 5,
|
2025-07-28 15:59:40 +08:00
|
|
|
|
borderType: "solid"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
})),
|
2025-07-30 11:23:19 +08:00
|
|
|
|
links: chartsData.value.links,
|
2025-07-28 15:59:40 +08:00
|
|
|
|
lineStyle: {
|
|
|
|
|
|
color: "#37ACD7",
|
|
|
|
|
|
width: 1
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
chart.setOption(option)
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-07-30 11:23:19 +08:00
|
|
|
|
const highLightUserNodes = (userIds) => {
|
|
|
|
|
|
if (!userIds) return
|
2025-08-01 14:48:51 +08:00
|
|
|
|
// 只让高亮节点显示 activeAvatar,其他节点恢复默认头像或圆形
|
|
|
|
|
|
chartsData.value.nodes.forEach((node) => {
|
|
|
|
|
|
if (userIds.includes(node.id) && node.activeAvatar) {
|
|
|
|
|
|
node.symbol = `image://${node.activeAvatar}`
|
|
|
|
|
|
node.symbolSize = 140
|
|
|
|
|
|
} else {
|
|
|
|
|
|
node.symbol = "circle"
|
|
|
|
|
|
node.symbolSize = 40
|
|
|
|
|
|
node.itemStyle = {
|
|
|
|
|
|
color: new echarts.graphic.RadialGradient(0.98, 0.38, 0.9, [
|
|
|
|
|
|
{ offset: 1, color: "#1a3860" }, // 最左侧
|
|
|
|
|
|
{ offset: 0.5, color: "#38546b" }, // 中间
|
|
|
|
|
|
{ offset: 0, color: "#5fb3b3" } // 最右侧
|
|
|
|
|
|
]),
|
|
|
|
|
|
|
|
|
|
|
|
opacity: 1,
|
|
|
|
|
|
borderColor: "#46C6AD",
|
|
|
|
|
|
borderWidth: 1,
|
|
|
|
|
|
shadowBlur: 4,
|
|
|
|
|
|
borderType: "dashed",
|
|
|
|
|
|
shadowColor: "rgba(19, 27, 114, 0.25)"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-07-30 11:23:19 +08:00
|
|
|
|
})
|
2025-08-01 15:43:24 +08:00
|
|
|
|
|
|
|
|
|
|
chart.setOption(
|
|
|
|
|
|
{
|
|
|
|
|
|
series: [
|
|
|
|
|
|
{
|
|
|
|
|
|
data: chartsData.value.nodes
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
|
|
|
|
|
false
|
|
|
|
|
|
)
|
2025-07-30 11:23:19 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-07-28 15:59:40 +08:00
|
|
|
|
onMounted(() => {
|
|
|
|
|
|
initChart()
|
2025-07-30 11:23:19 +08:00
|
|
|
|
highLightUserNodes()
|
2025-08-01 15:43:24 +08:00
|
|
|
|
handleClickNode()
|
2025-07-28 15:59:40 +08:00
|
|
|
|
})
|
2025-07-25 15:07:08 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped lang="less">
|
|
|
|
|
|
.detailNode-component {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
position: relative;
|
2025-07-25 17:24:14 +08:00
|
|
|
|
.goback {
|
|
|
|
|
|
position: absolute;
|
2025-07-28 15:59:40 +08:00
|
|
|
|
top: -25px;
|
2025-07-25 17:24:14 +08:00
|
|
|
|
left: 20px;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
}
|
2025-07-25 15:07:08 +08:00
|
|
|
|
.graph-container {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 93%;
|
|
|
|
|
|
}
|
2025-07-28 15:59:40 +08:00
|
|
|
|
.statistic-container {
|
|
|
|
|
|
width: 378px;
|
|
|
|
|
|
height: 42px;
|
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
border: 1px solid #3aa1f8;
|
|
|
|
|
|
background: linear-gradient(270deg, rgba(0, 82, 125, 0.48) 0%, rgba(0, 200, 255, 0.23) 100%);
|
|
|
|
|
|
backdrop-filter: blur(3px);
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
bottom: 105px;
|
|
|
|
|
|
left: 21px;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
.statistics-item {
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
.icon {
|
|
|
|
|
|
width: 14px;
|
|
|
|
|
|
height: 14px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.name {
|
|
|
|
|
|
color: rgba(255, 255, 255, 0.76);
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
font-family: OPPOSans;
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
font-style: normal;
|
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
|
line-height: normal;
|
|
|
|
|
|
margin-left: 3px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.count {
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
font-family: D-DIN;
|
|
|
|
|
|
font-size: 15px;
|
|
|
|
|
|
font-style: normal;
|
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
|
line-height: normal;
|
|
|
|
|
|
margin-bottom: 2px;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
.time-axis {
|
|
|
|
|
|
width: 95%;
|
|
|
|
|
|
height: 42px;
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
left: 20px;
|
|
|
|
|
|
bottom: 50px;
|
|
|
|
|
|
z-index: 1;
|
|
|
|
|
|
}
|
2025-07-25 15:07:08 +08:00
|
|
|
|
}
|
|
|
|
|
|
</style>
|