Merge branch 'master' of http://172.16.20.1:3000/duanhao/SocialNetworks_duan
This commit is contained in:
commit
4ae6698aae
9
package-lock.json
generated
9
package-lock.json
generated
|
|
@ -14,6 +14,8 @@
|
||||||
"dayjs": "^1.11.13",
|
"dayjs": "^1.11.13",
|
||||||
"echarts": "^5.6.0",
|
"echarts": "^5.6.0",
|
||||||
"element-plus": "^2.10.1",
|
"element-plus": "^2.10.1",
|
||||||
|
"loadsh": "^0.0.4",
|
||||||
|
"lodash-es": "^4.17.21",
|
||||||
"pinia": "^3.0.3",
|
"pinia": "^3.0.3",
|
||||||
"pinia-plugin-persistedstate": "^4.3.0",
|
"pinia-plugin-persistedstate": "^4.3.0",
|
||||||
"vue": "^3.5.13",
|
"vue": "^3.5.13",
|
||||||
|
|
@ -3131,6 +3133,13 @@
|
||||||
"node": ">=6.11.5"
|
"node": ">=6.11.5"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/loadsh": {
|
||||||
|
"version": "0.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/loadsh/-/loadsh-0.0.4.tgz",
|
||||||
|
"integrity": "sha512-U+wLL8InpfRalWrr+0SuhWgGt10M4OyAk6G8xCYo2rwpiHtxZkWiFpjei0vO463ghW8LPCdhqQxXlMy2qicAEw==",
|
||||||
|
"deprecated": "This is a typosquat on the popular Lodash package. This is not maintained nor is the original Lodash package.",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/local-pkg": {
|
"node_modules/local-pkg": {
|
||||||
"version": "1.1.1",
|
"version": "1.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-1.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-1.1.1.tgz",
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,8 @@
|
||||||
"dayjs": "^1.11.13",
|
"dayjs": "^1.11.13",
|
||||||
"echarts": "^5.6.0",
|
"echarts": "^5.6.0",
|
||||||
"element-plus": "^2.10.1",
|
"element-plus": "^2.10.1",
|
||||||
|
"loadsh": "^0.0.4",
|
||||||
|
"lodash-es": "^4.17.21",
|
||||||
"pinia": "^3.0.3",
|
"pinia": "^3.0.3",
|
||||||
"pinia-plugin-persistedstate": "^4.3.0",
|
"pinia-plugin-persistedstate": "^4.3.0",
|
||||||
"vue": "^3.5.13",
|
"vue": "^3.5.13",
|
||||||
|
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="37.07" height="36" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 198"><path fill="#41B883" d="M204.8 0H256L128 220.8L0 0h97.92L128 51.2L157.44 0h47.36Z"></path><path fill="#41B883" d="m0 0l128 220.8L256 0h-51.2L128 132.48L50.56 0H0Z"></path><path fill="#35495E" d="M50.56 0L128 133.12L204.8 0h-47.36L128 51.2L97.92 0H50.56Z"></path></svg>
|
|
||||||
|
Before Width: | Height: | Size: 496 B |
|
|
@ -11,8 +11,8 @@ export function getInteractionCommunityNodes() {
|
||||||
}
|
}
|
||||||
|
|
||||||
//人物互动隐关系预测的社团内部节点
|
//人物互动隐关系预测的社团内部节点
|
||||||
export function getInteractionCommunityDetailNodes(ids) {
|
export function getInteractionCommunityDetailNodes(ids, time = "2024.05.16 16:56:04") {
|
||||||
return http.get(`linkPrediction/interaction/community_detail?groupIds=${ids}`)
|
return http.get(`linkPrediction/interaction/community_detail?groupIds=${ids}&dateTime=${time}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
//人物互动隐关系预测的社团统计
|
//人物互动隐关系预测的社团统计
|
||||||
|
|
|
||||||
|
|
@ -26,9 +26,10 @@ export const useCharacterInteractionStore = defineStore("characterInteraction",
|
||||||
userChartList: [], //组相关性
|
userChartList: [], //组相关性
|
||||||
posts: [],
|
posts: [],
|
||||||
communityNodeList: [],
|
communityNodeList: [],
|
||||||
|
curComponent: "CommunityNode",
|
||||||
|
curSelecedGroupIds: [],
|
||||||
communityDetailNodeList: [],
|
communityDetailNodeList: [],
|
||||||
|
curSelectedGroup: [],
|
||||||
anlysisList: [
|
anlysisList: [
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
|
|
@ -142,6 +143,11 @@ export const useCharacterInteractionStore = defineStore("characterInteraction",
|
||||||
{ id: 1, icon: nodePrefix, name: "节点数", key: "nodesCount" },
|
{ id: 1, icon: nodePrefix, name: "节点数", key: "nodesCount" },
|
||||||
{ id: 2, icon: communityPrefix, name: "社团数", key: "groupCount" },
|
{ id: 2, icon: communityPrefix, name: "社团数", key: "groupCount" },
|
||||||
{ id: 3, icon: hiddenPrefix, name: "隐关系数", key: "hiddenInteractionCount" }
|
{ id: 3, icon: hiddenPrefix, name: "隐关系数", key: "hiddenInteractionCount" }
|
||||||
|
],
|
||||||
|
statisticsDetailList: [
|
||||||
|
{ id: 1, icon: nodePrefix, name: "节点数", key: "nodesCount" },
|
||||||
|
{ id: 2, icon: communityPrefix, name: "社团数", key: "groupCount" },
|
||||||
|
{ id: 3, icon: hiddenPrefix, name: "隐关系数", key: "hiddenInteractionCount" }
|
||||||
]
|
]
|
||||||
}),
|
}),
|
||||||
actions: {
|
actions: {
|
||||||
|
|
@ -170,10 +176,15 @@ export const useCharacterInteractionStore = defineStore("characterInteraction",
|
||||||
if (res.code != 200) return
|
if (res.code != 200) return
|
||||||
this.communityNodeList = res.data
|
this.communityNodeList = res.data
|
||||||
},
|
},
|
||||||
async initGraphCommunityDetailNode(ids) {
|
async initGraphCommunityDetailNode(ids, time = "2024.05.16 16:56:04") {
|
||||||
const res = await getInteractionCommunityDetailNodes(ids)
|
this.curSelecedGroupIds = ids
|
||||||
|
const res = await getInteractionCommunityDetailNodes(ids, time)
|
||||||
if (res.code != 200) return
|
if (res.code != 200) return
|
||||||
return res.data
|
this.statisticsDetailList = this.statisticsDetailList.map((item) => ({
|
||||||
|
...item,
|
||||||
|
count: res.data.communityStatistics[item.key]
|
||||||
|
}))
|
||||||
|
this.communityDetailNodeList = res.data.userRelation
|
||||||
},
|
},
|
||||||
async initGraphStatistics() {
|
async initGraphStatistics() {
|
||||||
const res = await getInteractionCommunityStatistics()
|
const res = await getInteractionCommunityStatistics()
|
||||||
|
|
|
||||||
|
|
@ -83,6 +83,7 @@ const postDialog = ref(false)
|
||||||
const currentPostPost = ref(null)
|
const currentPostPost = ref(null)
|
||||||
|
|
||||||
const handleSelectedUserGroup = (group) => {
|
const handleSelectedUserGroup = (group) => {
|
||||||
|
interactionStore.curComponent = "detailNode"
|
||||||
console.log(group)
|
console.log(group)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,51 +3,146 @@
|
||||||
<img src="@/assets/images/icon/goback.png" alt="" class="goback" @click="handleGoback" />
|
<img src="@/assets/images/icon/goback.png" alt="" class="goback" @click="handleGoback" />
|
||||||
<div class="graph-container" id="container"></div>
|
<div class="graph-container" id="container"></div>
|
||||||
<div class="statistic-container">
|
<div class="statistic-container">
|
||||||
<div class="statistics-item" v-for="item in statisticsList" :key="item.id">
|
<div
|
||||||
|
class="statistics-item"
|
||||||
|
v-for="item in interactionStore.statisticsDetailList"
|
||||||
|
:key="item.id"
|
||||||
|
>
|
||||||
<img :src="item.icon" class="icon" />
|
<img :src="item.icon" class="icon" />
|
||||||
<div class="name">{{ item.name }}: </div>
|
<div class="name">{{ item.name }}: </div>
|
||||||
<div class="count">{{ item.count }}</div>
|
<div class="count">{{ item.count }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="time-axis"></div>
|
<div class="time-axis">
|
||||||
|
<div class="time">{{ TansTimestamp(startTime, "YYYY.MM.DD HH:mm:ss") }}</div>
|
||||||
|
<div class="axis" ref="axisRef" @pointerdown="handlePointerDown">
|
||||||
|
<div class="progress-bar" :style="trackStyle"></div>
|
||||||
|
<div class="active-sign" :style="{ left: `${currentPosition}px` }">
|
||||||
|
<div class="active-needle"></div>
|
||||||
|
<div class="timeLine-point" @pointerdown.stop="handlePointPointerDown"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="time">{{ TansTimestamp(endTime, "YYYY.MM.DD HH:mm:ss") }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="current-time-display">
|
||||||
|
<span>当前时间: {{ TansTimestamp(currentTime, "YYYY.MM.DD HH:mm:ss") }}</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import nodePrefix from "@/assets/images/linkPrediction/icon/node-count-prefix.png"
|
import { defineEmits, onMounted, ref, onUnmounted, computed, watch } from "vue"
|
||||||
import communityPrefix from "@/assets/images/linkPrediction/icon/community-count-prefix.png"
|
import { TansTimestamp } from "@/utils/transform"
|
||||||
import hiddenPrefix from "@/assets/images/linkPrediction/icon/hidden-count-prefix.png"
|
|
||||||
import { defineProps, defineEmits, onMounted, ref } from "vue"
|
|
||||||
import nodeHoverImg from "@/assets/images/nodeHover.png"
|
import nodeHoverImg from "@/assets/images/nodeHover.png"
|
||||||
import * as echarts from "echarts"
|
import * as echarts from "echarts"
|
||||||
const statisticsList = [
|
import { storeToRefs } from "pinia"
|
||||||
{ id: 1, icon: nodePrefix, name: "节点数", key: "nodesCount", count: 3000 },
|
import { useCharacterInteractionStore } from "@/store/llinkPrediction/index"
|
||||||
{ id: 2, icon: communityPrefix, name: "社团数", key: "groupCount", count: 1000 },
|
const interactionStore = useCharacterInteractionStore()
|
||||||
{ id: 3, icon: hiddenPrefix, name: "隐关系数", key: "hiddenInteractionCount", count: 1000 }
|
const { communityDetailNodeList } = storeToRefs(interactionStore)
|
||||||
]
|
|
||||||
const props = defineProps({
|
|
||||||
detailNode: {
|
|
||||||
type: Array,
|
|
||||||
default: () => []
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
const curDetailNode = ref(props.detailNode)
|
|
||||||
|
|
||||||
const emit = defineEmits(["click:goback"])
|
const emit = defineEmits(["click:goback"])
|
||||||
const handleGoback = () => {
|
const handleGoback = () => {
|
||||||
emit("click:goback", "CommunityNode")
|
emit("click:goback", "CommunityNode")
|
||||||
}
|
}
|
||||||
|
|
||||||
let chart = null
|
//当点击时间轴的时候,communityDetailNodeList改变,重新更新关系图
|
||||||
|
watch(
|
||||||
|
communityDetailNodeList,
|
||||||
|
(newValue) => {
|
||||||
|
initChart()
|
||||||
|
},
|
||||||
|
{ deep: true }
|
||||||
|
)
|
||||||
|
|
||||||
|
// 时间轴相关数据
|
||||||
|
const startTime = ref(new Date("2024-05-16 16:56:04"))
|
||||||
|
const endTime = ref(new Date("2024-05-23 10:16:56"))
|
||||||
|
const currentTime = ref(new Date("2024-05-16 16:56:04")) // 当前选中的时间
|
||||||
|
const currentPosition = ref(0) // 初始位置(轴长度的一半)
|
||||||
|
const axisRef = ref(null)
|
||||||
|
const isDragging = ref(false)
|
||||||
|
|
||||||
|
// 缓存时间计算相关的常量
|
||||||
|
const axisWidth = 426
|
||||||
|
const startTimeMs = startTime.value.getTime()
|
||||||
|
const endTimeMs = endTime.value.getTime()
|
||||||
|
const totalDuration = endTimeMs - startTimeMs
|
||||||
|
|
||||||
|
// 根据位置计算时间
|
||||||
|
const getTimeFromPosition = (position) => {
|
||||||
|
const ratio = Math.max(0, Math.min(1, position / axisWidth))
|
||||||
|
const timeOffset = totalDuration * ratio
|
||||||
|
return new Date(startTimeMs + timeOffset)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 指针按下事件
|
||||||
|
const handlePointerDown = (e) => {
|
||||||
|
if (e.target.classList.contains("timeLine-point")) return
|
||||||
|
const rect = axisRef.value.getBoundingClientRect()
|
||||||
|
const position = Math.max(0, Math.min(axisWidth, e.clientX - rect.left))
|
||||||
|
|
||||||
|
// 直接更新位置,不使用节流函数
|
||||||
|
currentPosition.value = position
|
||||||
|
currentTime.value = getTimeFromPosition(position)
|
||||||
|
|
||||||
|
// 点击后输出当前时间
|
||||||
|
const currentTimes = TansTimestamp(currentTime.value, "YYYY-MM-DD HH:mm:ss")
|
||||||
|
interactionStore.initGraphCommunityDetailNode(interactionStore.curSelecedGroupIds, currentTimes)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 时间点指针按下事件
|
||||||
|
const handlePointPointerDown = (e) => {
|
||||||
|
e.stopPropagation()
|
||||||
|
e.preventDefault()
|
||||||
|
isDragging.value = true
|
||||||
|
// 缓存轴的边界矩形,避免重复计算
|
||||||
|
const rect = axisRef.value.getBoundingClientRect()
|
||||||
|
const axisLeft = rect.left
|
||||||
|
|
||||||
|
const handlePointerMove = (e) => {
|
||||||
|
if (!isDragging.value) return
|
||||||
|
const position = Math.max(0, Math.min(axisWidth, e.clientX - axisLeft))
|
||||||
|
|
||||||
|
// 直接更新位置,不检查阈值,确保实时响应
|
||||||
|
currentPosition.value = position
|
||||||
|
currentTime.value = getTimeFromPosition(position)
|
||||||
|
}
|
||||||
|
|
||||||
|
const handlePointerUp = () => {
|
||||||
|
isDragging.value = false
|
||||||
|
// 拖动结束时输出当前时间
|
||||||
|
const currentTimes = TansTimestamp(currentTime.value, "YYYY.MM.DD HH:mm:ss")
|
||||||
|
console.log("拖动结束,当前时间:", currentTimes)
|
||||||
|
|
||||||
|
document.removeEventListener("pointermove", handlePointerMove)
|
||||||
|
document.removeEventListener("pointerup", handlePointerUp)
|
||||||
|
}
|
||||||
|
|
||||||
|
document.addEventListener("pointermove", handlePointerMove, { passive: true })
|
||||||
|
document.addEventListener("pointerup", handlePointerUp)
|
||||||
|
}
|
||||||
|
|
||||||
|
const trackStyle = computed(() => {
|
||||||
|
const progressPercent = Math.min(100, (currentPosition.value / 426) * 100)
|
||||||
|
return {
|
||||||
|
background: `linear-gradient(90deg, #00F3FF 0%, #00F3FF ${progressPercent}%, #3B7699 ${progressPercent}%, #3B7699 100%)`,
|
||||||
|
width: "100%"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// 组件卸载时清理事件监听器
|
||||||
|
onUnmounted(() => {
|
||||||
|
document.removeEventListener("pointermove", () => {})
|
||||||
|
document.removeEventListener("pointerup", () => {})
|
||||||
|
})
|
||||||
|
|
||||||
|
let chart = null
|
||||||
const initChart = async () => {
|
const initChart = async () => {
|
||||||
chart = echarts.init(document.getElementById("container"))
|
chart = echarts.init(document.getElementById("container"))
|
||||||
|
|
||||||
const links = []
|
const links = []
|
||||||
const nodes = []
|
const nodes = []
|
||||||
if (!Object.keys(curDetailNode.value).length) return
|
if (!Object.keys(interactionStore.communityDetailNodeList).length) return
|
||||||
Object.entries(curDetailNode.value).forEach(([parentId, children]) => {
|
Object.entries(interactionStore.communityDetailNodeList).forEach(([parentId, children]) => {
|
||||||
nodes.push({
|
nodes.push({
|
||||||
id: `parent_${parentId}`,
|
id: `parent_${parentId}`,
|
||||||
name: parentId
|
name: parentId
|
||||||
|
|
@ -177,11 +272,10 @@ const initChart = async () => {
|
||||||
roam: true,
|
roam: true,
|
||||||
zoom: 0.3,
|
zoom: 0.3,
|
||||||
categories: categories,
|
categories: categories,
|
||||||
|
|
||||||
force: {
|
force: {
|
||||||
edgeLength: 2500,
|
edgeLength: 2500,
|
||||||
repulsion: 4000,
|
repulsion: 4000,
|
||||||
gravity: 0.4,
|
gravity: 0.1,
|
||||||
friction: 0.02,
|
friction: 0.02,
|
||||||
coolingFactor: 0.1
|
coolingFactor: 0.1
|
||||||
},
|
},
|
||||||
|
|
@ -299,6 +393,95 @@ onMounted(() => {
|
||||||
bottom: 50px;
|
bottom: 50px;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 0px 10px;
|
||||||
|
color: #fff;
|
||||||
|
touch-action: none; // 防止触摸设备上的默认行为
|
||||||
|
.time {
|
||||||
|
font-family: "PingFang SC";
|
||||||
|
font-size: 16px;
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
|
line-height: normal;
|
||||||
|
}
|
||||||
|
.axis {
|
||||||
|
width: 426px;
|
||||||
|
height: 6px;
|
||||||
|
border-radius: 20px;
|
||||||
|
background-color: #3b7699;
|
||||||
|
cursor: pointer;
|
||||||
|
transform: translateZ(0); // 启用硬件加速
|
||||||
|
position: relative;
|
||||||
|
.progress-bar {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
height: 6px;
|
||||||
|
background-color: #00ecf9;
|
||||||
|
border-radius: 20px;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
.active-sign {
|
||||||
|
position: relative;
|
||||||
|
z-index: 2;
|
||||||
|
.active-needle {
|
||||||
|
width: 30px;
|
||||||
|
height: 34px;
|
||||||
|
background-image: url("@/assets/images/point.png");
|
||||||
|
background-size: cover;
|
||||||
|
bottom: 1px;
|
||||||
|
left: -6px;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
.timeLine-point {
|
||||||
|
width: 18px;
|
||||||
|
height: 18px;
|
||||||
|
background-color: transparent;
|
||||||
|
border-radius: 50%;
|
||||||
|
border: 1.6px solid #ffe5a4;
|
||||||
|
position: absolute;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
top: -6px;
|
||||||
|
cursor: pointer;
|
||||||
|
user-select: none;
|
||||||
|
will-change: left;
|
||||||
|
transform: translate3d(0, 0, 0); // 强制启用硬件加速
|
||||||
|
&:hover {
|
||||||
|
transform: translate3d(0, 0, 0) scale(1.1);
|
||||||
|
}
|
||||||
|
&:active {
|
||||||
|
transform: translate3d(0, 0, 0) scale(0.95);
|
||||||
|
}
|
||||||
|
&::after {
|
||||||
|
content: "";
|
||||||
|
width: 10px;
|
||||||
|
height: 10px;
|
||||||
|
background-color: #f9bd25;
|
||||||
|
border-radius: 50%;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.current-time-display {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 20px;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
background: rgba(0, 67, 125, 0.8);
|
||||||
|
border: 1px solid #3aa1f8;
|
||||||
|
border-radius: 4px;
|
||||||
|
padding: 8px 16px;
|
||||||
|
color: #fff;
|
||||||
|
font-family: "PingFang SC";
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 400;
|
||||||
|
backdrop-filter: blur(3px);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -3,26 +3,20 @@
|
||||||
<img :src="title" alt="" class="title" />
|
<img :src="title" alt="" class="title" />
|
||||||
|
|
||||||
<CommunityNode
|
<CommunityNode
|
||||||
v-if="curComponent == 'CommunityNode'"
|
v-if="interactionStore.curComponent == 'CommunityNode'"
|
||||||
@click:node="handleClickNode"
|
@click:node="handleClickNode"
|
||||||
@click:edge="handleClickEdge"
|
@click:edge="handleClickEdge"
|
||||||
></CommunityNode>
|
></CommunityNode>
|
||||||
<DetailNode
|
<DetailNode v-else @click:goback="handleClickGoBack"></DetailNode>
|
||||||
v-else
|
|
||||||
@click:goback="handleClickGoBack"
|
|
||||||
:detailNode="curSelectedGroup"
|
|
||||||
></DetailNode>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { defineProps, ref } from "vue"
|
import { defineProps } from "vue"
|
||||||
import CommunityNode from "./communityNode.vue"
|
import CommunityNode from "./communityNode.vue"
|
||||||
import DetailNode from "./detailNode.vue"
|
import DetailNode from "./detailNode.vue"
|
||||||
import { useCharacterInteractionStore } from "@/store/llinkPrediction/index"
|
import { useCharacterInteractionStore } from "@/store/llinkPrediction/index"
|
||||||
const interactionStore = useCharacterInteractionStore()
|
const interactionStore = useCharacterInteractionStore()
|
||||||
const curComponent = ref("CommunityNode")
|
|
||||||
const curSelectedGroup = ref(null)
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
title: {
|
title: {
|
||||||
type: String,
|
type: String,
|
||||||
|
|
@ -31,23 +25,17 @@ const props = defineProps({
|
||||||
})
|
})
|
||||||
|
|
||||||
const handleClickNode = async (nodeInfo) => {
|
const handleClickNode = async (nodeInfo) => {
|
||||||
const data = await interactionStore.initGraphCommunityDetailNode([nodeInfo.id])
|
interactionStore.initGraphCommunityDetailNode([nodeInfo.id])
|
||||||
curSelectedGroup.value = data
|
interactionStore.curComponent = "detailNode"
|
||||||
curComponent.value = "detailNode"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleClickEdge = async (edgeInfo) => {
|
const handleClickEdge = (edgeInfo) => {
|
||||||
curComponent.value = "detailNode"
|
interactionStore.curComponent = "detailNode"
|
||||||
const data = await interactionStore.initGraphCommunityDetailNode([
|
interactionStore.initGraphCommunityDetailNode([edgeInfo.source, edgeInfo.target])
|
||||||
edgeInfo.source,
|
|
||||||
edgeInfo.target
|
|
||||||
])
|
|
||||||
curSelectedGroup.value = data
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleClickGoBack = (currentComponentName) => {
|
const handleClickGoBack = (currentComponentName) => {
|
||||||
curComponent.value = currentComponentName
|
interactionStore.curComponent = currentComponentName
|
||||||
console.log(currentComponentName)
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user