解决合并冲突
This commit is contained in:
commit
48a76d89c3
BIN
src/assets/images/linkPrediction/icon/top-icon.png
Normal file
BIN
src/assets/images/linkPrediction/icon/top-icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 439 B |
|
|
@ -11,7 +11,7 @@ export function getInteractionCommunityNodes() {
|
||||||
}
|
}
|
||||||
|
|
||||||
//人物互动隐关系预测的社团内部节点
|
//人物互动隐关系预测的社团内部节点
|
||||||
export function getInteractionCommunityDetailNodes(ids, time = "2024.05.16 16:56:04") {
|
export function getInteractionCommunityDetailNodes(ids, time = "2024-05-16 16:56:04") {
|
||||||
return http.get(`linkPrediction/interaction/community_detail?groupIds=${ids}&dateTime=${time}`)
|
return http.get(`linkPrediction/interaction/community_detail?groupIds=${ids}&dateTime=${time}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -44,7 +44,6 @@ export function getInteractionPostList(userGroupId) {
|
||||||
} */
|
} */
|
||||||
// 社交紧密团体的对应紧密关系的帖文--根据relationId来查找
|
// 社交紧密团体的对应紧密关系的帖文--根据relationId来查找
|
||||||
export function getSocialPostListByRelationId(relationId) {
|
export function getSocialPostListByRelationId(relationId) {
|
||||||
|
|
||||||
return http.get(`/linkPrediction/user_posts_list?relationId=${relationId}`)
|
return http.get(`/linkPrediction/user_posts_list?relationId=${relationId}`)
|
||||||
}
|
}
|
||||||
// 社交紧密团体识别的社团统计
|
// 社交紧密团体识别的社团统计
|
||||||
|
|
|
||||||
|
|
@ -19,18 +19,17 @@ import nodePrefix from "@/assets/images/linkPrediction/icon/node-count-prefix.pn
|
||||||
import communityPrefix from "@/assets/images/linkPrediction/icon/community-count-prefix.png"
|
import communityPrefix from "@/assets/images/linkPrediction/icon/community-count-prefix.png"
|
||||||
import hiddenPrefix from "@/assets/images/linkPrediction/icon/hidden-count-prefix.png"
|
import hiddenPrefix from "@/assets/images/linkPrediction/icon/hidden-count-prefix.png"
|
||||||
import tightCommunityPrefix from "@/assets/images/linkPrediction/icon/tightCommunityPrefix.png"
|
import tightCommunityPrefix from "@/assets/images/linkPrediction/icon/tightCommunityPrefix.png"
|
||||||
import { init } from "echarts"
|
|
||||||
|
|
||||||
export const useCharacterInteractionStore = defineStore("characterInteraction", {
|
export const useCharacterInteractionStore = defineStore("characterInteraction", {
|
||||||
state: () => ({
|
state: () => ({
|
||||||
userList: [], //用户组列表
|
userList: [], //用户组列表
|
||||||
userChartList: [], //组相关性
|
userChartList: [], //组相关性
|
||||||
posts: [],
|
posts: [], //贴文列表
|
||||||
communityNodeList: [],
|
communityNodeList: [], //所有社团数据
|
||||||
curComponent: "CommunityNode",
|
curComponent: "CommunityNode",
|
||||||
curSelecedGroupIds: [],
|
curSelecedGroupIds: [],
|
||||||
communityDetailNodeList: [],
|
communityDetailNodeList: [], //点击一级界面后,通过组id查询到的组
|
||||||
curSelectedGroup: [],
|
curSelectedGroup: [], //从用户组列表选择任意一个item
|
||||||
anlysisList: [
|
anlysisList: [
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
|
|
@ -173,7 +172,7 @@ 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, time = "2024.05.16 16:56:04") {
|
async initGraphCommunityDetailNode(ids, time = "2024-05-16 16:56:04") {
|
||||||
this.curSelecedGroupIds = ids
|
this.curSelecedGroupIds = ids
|
||||||
const res = await getInteractionCommunityDetailNodes(ids, time)
|
const res = await getInteractionCommunityDetailNodes(ids, time)
|
||||||
if (res.code != 200) return
|
if (res.code != 200) return
|
||||||
|
|
@ -445,9 +444,8 @@ export const useSocialGroupsStore = defineStore("socialGroups", {
|
||||||
}))
|
}))
|
||||||
console.log("打印社交团体详情:");
|
console.log("打印社交团体详情:");
|
||||||
console.log(res.data);
|
console.log(res.data);
|
||||||
this.timeList = res.data.timeList
|
this.timeList = res.data.timeList || [];
|
||||||
this.communityDetailNodeList = res.data.userRelation
|
this.communityDetailNodeList = res.data.userRelation
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
persist: true // 开启持久化
|
persist: true // 开启持久化
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,7 @@ const interactionStore = useCharacterInteractionStore()
|
||||||
//选择某个用户组,更新贴文列表 && 更新关系图二级界面
|
//选择某个用户组,更新贴文列表 && 更新关系图二级界面
|
||||||
const handleSelectedUserGroup = (group) => {
|
const handleSelectedUserGroup = (group) => {
|
||||||
interactionStore.curComponent = "detailNode"
|
interactionStore.curComponent = "detailNode"
|
||||||
|
interactionStore.curSelectedGroup = group //保存从用户列表选择的用户组,为了显示这两个用户交互的时间切片
|
||||||
interactionStore.initInteractionPostList(group.relationId)
|
interactionStore.initInteractionPostList(group.relationId)
|
||||||
interactionStore.initGraphCommunityDetailNode(group.list.map((item) => item.groupId))
|
interactionStore.initGraphCommunityDetailNode(group.list.map((item) => item.groupId))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,12 @@
|
||||||
<div class="time-axis">
|
<div class="time-axis">
|
||||||
<div class="time">{{ TansTimestamp(startTime, "YYYY.MM.DD HH:mm:ss") }}</div>
|
<div class="time">{{ TansTimestamp(startTime, "YYYY.MM.DD HH:mm:ss") }}</div>
|
||||||
<div class="axis" ref="axisRef" @pointerdown="handlePointerDown">
|
<div class="axis" ref="axisRef" @pointerdown="handlePointerDown">
|
||||||
|
<div
|
||||||
|
class="time-section"
|
||||||
|
v-for="time in curSelectedGroup.timeList"
|
||||||
|
:key="time"
|
||||||
|
:style="{ left: getTimeSectionLeft(time) + 'px' }"
|
||||||
|
></div>
|
||||||
<div class="progress-bar" :style="trackStyle"></div>
|
<div class="progress-bar" :style="trackStyle"></div>
|
||||||
<div class="active-sign" :style="{ left: `${currentPosition}px` }">
|
<div class="active-sign" :style="{ left: `${currentPosition}px` }">
|
||||||
<div class="active-needle"></div>
|
<div class="active-needle"></div>
|
||||||
|
|
@ -30,9 +36,6 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="time">{{ TansTimestamp(endTime, "YYYY.MM.DD HH:mm:ss") }}</div>
|
<div class="time">{{ TansTimestamp(endTime, "YYYY.MM.DD HH:mm:ss") }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="current-time-display">
|
|
||||||
<span>当前时间: {{ TansTimestamp(currentTime, "YYYY.MM.DD HH:mm:ss") }}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -44,7 +47,7 @@ import * as echarts from "echarts"
|
||||||
import { storeToRefs } from "pinia"
|
import { storeToRefs } from "pinia"
|
||||||
import { useCharacterInteractionStore } from "@/store/llinkPrediction/index"
|
import { useCharacterInteractionStore } from "@/store/llinkPrediction/index"
|
||||||
const interactionStore = useCharacterInteractionStore()
|
const interactionStore = useCharacterInteractionStore()
|
||||||
const { communityDetailNodeList } = storeToRefs(interactionStore)
|
const { communityDetailNodeList, curSelectedGroup } = storeToRefs(interactionStore)
|
||||||
const emit = defineEmits(["click:goback"])
|
const emit = defineEmits(["click:goback"])
|
||||||
const handleGoback = () => {
|
const handleGoback = () => {
|
||||||
emit("click:goback", "CommunityNode")
|
emit("click:goback", "CommunityNode")
|
||||||
|
|
@ -53,7 +56,7 @@ const handleGoback = () => {
|
||||||
//当点击时间轴的时候,communityDetailNodeList改变,重新更新关系图
|
//当点击时间轴的时候,communityDetailNodeList改变,重新更新关系图
|
||||||
watch(
|
watch(
|
||||||
communityDetailNodeList,
|
communityDetailNodeList,
|
||||||
(newValue) => {
|
() => {
|
||||||
initChart()
|
initChart()
|
||||||
},
|
},
|
||||||
{ deep: true }
|
{ deep: true }
|
||||||
|
|
@ -73,6 +76,14 @@ const startTimeMs = startTime.value.getTime()
|
||||||
const endTimeMs = endTime.value.getTime()
|
const endTimeMs = endTime.value.getTime()
|
||||||
const totalDuration = endTimeMs - startTimeMs
|
const totalDuration = endTimeMs - startTimeMs
|
||||||
|
|
||||||
|
//点击用户组列表后,显示这两个用户的交互时间切片,获得每一个时间距离时间轴初始位置的距离
|
||||||
|
const getTimeSectionLeft = computed(() => {
|
||||||
|
return (time) => {
|
||||||
|
const total = endTime.value.getTime() - startTime.value.getTime()
|
||||||
|
const offset = new Date(time).getTime() - startTime.value.getTime()
|
||||||
|
return Math.max(0, Math.min(426, (offset / total) * 426))
|
||||||
|
}
|
||||||
|
})
|
||||||
// 根据位置计算时间
|
// 根据位置计算时间
|
||||||
const getTimeFromPosition = (position) => {
|
const getTimeFromPosition = (position) => {
|
||||||
const ratio = Math.max(0, Math.min(1, position / axisWidth))
|
const ratio = Math.max(0, Math.min(1, position / axisWidth))
|
||||||
|
|
@ -275,7 +286,7 @@ const initChart = async () => {
|
||||||
show: false,
|
show: false,
|
||||||
position: "middle",
|
position: "middle",
|
||||||
formatter: function (params) {
|
formatter: function (params) {
|
||||||
return params.data.interactionTimes
|
return `${params.data.interactionTimes}次互动`
|
||||||
},
|
},
|
||||||
fontSize: 14
|
fontSize: 14
|
||||||
},
|
},
|
||||||
|
|
@ -447,6 +458,15 @@ onMounted(() => {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transform: translateZ(0); // 启用硬件加速
|
transform: translateZ(0); // 启用硬件加速
|
||||||
position: relative;
|
position: relative;
|
||||||
|
.time-section {
|
||||||
|
position: absolute;
|
||||||
|
top: -8px;
|
||||||
|
width: 4px;
|
||||||
|
height: 22px;
|
||||||
|
background: #ffe066;
|
||||||
|
border-radius: 3px;
|
||||||
|
z-index: 3;
|
||||||
|
}
|
||||||
.progress-bar {
|
.progress-bar {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
|
@ -501,21 +521,6 @@ onMounted(() => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.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>
|
||||||
|
|
|
||||||
|
|
@ -9,10 +9,7 @@
|
||||||
:class="{ active: curUserGroupIndex == index }"
|
:class="{ active: curUserGroupIndex == index }"
|
||||||
>
|
>
|
||||||
<div class="group-type">
|
<div class="group-type">
|
||||||
<img
|
<img src="@/assets/images/linkPrediction/icon/top-icon.png" class="group-type-back" />
|
||||||
src="@/assets/images/linkPrediction/title/group-item-title.png"
|
|
||||||
class="group-type-back"
|
|
||||||
/>
|
|
||||||
<div class="group-type-content">TOP{{ group.rank }}</div>
|
<div class="group-type-content">TOP{{ group.rank }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="user-list-item" v-for="child in group.list" :key="child.id">
|
<div class="user-list-item" v-for="child in group.list" :key="child.id">
|
||||||
|
|
@ -89,10 +86,14 @@ const handleUserItem = (index, group = {}) => {
|
||||||
top: 10px;
|
top: 10px;
|
||||||
.group-type-content {
|
.group-type-content {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 2px;
|
||||||
left: 10px;
|
left: 12px;
|
||||||
font-size: 14px;
|
color: #8efbff;
|
||||||
|
text-shadow: 0 0.552px 1.105px rgba(0, 0, 0, 0.25);
|
||||||
font-family: "PingFang SC";
|
font-family: "PingFang SC";
|
||||||
|
font-size: 14px;
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&:hover {
|
&:hover {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user