From 54109692b50c45d1a50e576a83ad8b8d97f28d6f Mon Sep 17 00:00:00 2001 From: "qumeng039@126.com" <86925389+qumen@users.noreply.github.com> Date: Tue, 5 Aug 2025 17:47:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=94=9A=E7=82=B9=E7=83=AD?= =?UTF-8?q?=E5=BA=A6=E5=9B=BE=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/timeAxis.vue | 5 +- src/store/groupEvolution/index.js | 52 +++++------ src/store/keyNodeRecognition/index.js | 87 +++++++++---------- .../GroupEvolution/component/groupPost.vue | 7 +- .../groupIdentifyDiscovery/index.vue | 5 +- .../components/anchorGraph.vue | 4 +- 6 files changed, 78 insertions(+), 82 deletions(-) diff --git a/src/components/timeAxis.vue b/src/components/timeAxis.vue index 295cff8..c03f204 100644 --- a/src/components/timeAxis.vue +++ b/src/components/timeAxis.vue @@ -207,15 +207,14 @@ const handlePointPointerDown = (e) => { document.addEventListener("pointerup", handlePointerUp) } -// 点击时间段时的处理函数 const timeSectionWidth = 4 // 与样式保持一致 const handleSectionPointerDown = (time) => { pause() // 计算该时间点的中心位置 const left = getTimeSectionLeft.value(time) + timeSectionWidth / 2 currentPosition.value = left - currentTime.value = TansTimestamp(new Date(time), "YYYY-MM-DD HH:mm:ss") - emit("click:pointerDown", currentTime.value) + currentTime.value = time // 保持与 timeList 精确一致 + emit("click:pointerDown", time) // 直接发送原始时间 } //重置时间轴 diff --git a/src/store/groupEvolution/index.js b/src/store/groupEvolution/index.js index bcd8ef5..b4d0031 100644 --- a/src/store/groupEvolution/index.js +++ b/src/store/groupEvolution/index.js @@ -140,7 +140,7 @@ export const useGroupDiscoveryStore = defineStore("groupDiscovery", { posts: [] }), actions: { - async initializeGroupList(time = "2024-05-16 16:56:04") { + async initializeGroupList(time = "") { const res = await getGroupEvolutionGroupList(time) if (res.code != 200) return const iconMap = { @@ -607,31 +607,31 @@ export const useGroupMemberStore = defineStore("groupMember", { } ], chartData: { - xAxisData: ["07:57:46", "09:30:14", "09:57:32", "10:04:47", "10:12:57"], - yAxisRange: { min: 0, max: 25, interval: 5}, - seriesList: [ - { - data: [0.9237, 0.14507, 0, 0, 0], - name: "分裂指数", - themeColor: "#2AB8FD" - }, - { - data: [9.8011, 21.3123, 10.4338, 14.1912, 10.1523], - name: "合并指数", - themeColor: "#02D7DA" - }, - { - data: [1.9057, 1.5123, 1.0338, 0.5912, 0.1523], - name: "收缩指数", - themeColor: "#FFDA09" - }, - { - data: [15.1119, 6.5123, 10.6338, 9.5912, 4.1523], - name: "扩展指数", - themeColor: "#EB57B0" - } - ] - }, + xAxisData: ["07:57:46", "09:30:14", "09:57:32", "10:04:47", "10:12:57"], + yAxisRange: { min: 0, max: 25, interval: 5 }, + seriesList: [ + { + data: [0.9237, 0.14507, 0, 0, 0], + name: "分裂指数", + themeColor: "#2AB8FD" + }, + { + data: [9.8011, 21.3123, 10.4338, 14.1912, 10.1523], + name: "合并指数", + themeColor: "#02D7DA" + }, + { + data: [1.9057, 1.5123, 1.0338, 0.5912, 0.1523], + name: "收缩指数", + themeColor: "#FFDA09" + }, + { + data: [15.1119, 6.5123, 10.6338, 9.5912, 4.1523], + name: "扩展指数", + themeColor: "#EB57B0" + } + ] + }, chartsData: { topSelfMedia: [ { diff --git a/src/store/keyNodeRecognition/index.js b/src/store/keyNodeRecognition/index.js index cba3207..1c424d8 100644 --- a/src/store/keyNodeRecognition/index.js +++ b/src/store/keyNodeRecognition/index.js @@ -402,10 +402,9 @@ export const useKeyNodeRecognitionStore = defineStore("keyNodeRecognition", { statisticsList: [ { id: 1, name: "节点数", icon: nodeNumber, number: 0 }, { id: 2, name: "社团数", icon: teamNumber, number: Object.keys(communityList).length }, - { id: 3, name: "锚点数", icon: position, number: Object.keys(anchorList).length }, - { id: 4, name: "已监控锚点", icon: monitor, number: 20 }, - { id: 5, name: "活跃预警事件", icon: warning, number: 0 }, - { id: 6, name: "高风险事件", icon: danger, number: 0 } + { id: 3, name: "推荐锚点账号", icon: monitor, number: 20 }, + { id: 4, name: "锚点实时关注话题", icon: warning, number: 0 }, + { id: 5, name: "高风险事件", icon: danger, number: 0 } ], //贴文列表 posts: [ @@ -541,8 +540,8 @@ export const useKeyNodeRecognitionStore = defineStore("keyNodeRecognition", { backimg: high3Img, riskType: "低风险", chart: { - predictedData: [12000, 12690, 12108, 10790, 9004, 5000, 4890, 3300], - realityData: [8959, 7460, 8334, 7902, 5753, 3070, "-", "-"] + predictedData: [5678, 6643, 8123, 8356, 8523, 7653, 7533, 6533], + realityData: [5745, 6768, 7975, 8045, 8467, 7564, "-", "-"] } } ], @@ -560,8 +559,8 @@ export const useKeyNodeRecognitionStore = defineStore("keyNodeRecognition", { backimg: high3Img, riskType: "低风险", chart: { - predictedData: [11000, 11690, 10108, 10690, 11004, 10006, 11890, 10878], - realityData: [9959, 8860, 8334, 9902, 8753, 7070, "-", "-"] + predictedData: [5678, 6643, 8123, 8356, 8523, 7653, 7533, 6533], + realityData: [5745, 6768, 7975, 8045, 8467, 7564, "-", "-"] } }, { @@ -577,8 +576,8 @@ export const useKeyNodeRecognitionStore = defineStore("keyNodeRecognition", { backimg: high3Img, riskType: "低风险", chart: { - predictedData: [11500, 10690, 9108, 12690, 13004, 13006, 12890, 9878], - realityData: [10959, 9860, 8334, 11902, 12753, 11070, "-", "-"] + predictedData: [6522, 7023, 7112, 7233, 7590, 5421, 5211, 3086], + realityData: [6543, 6885, 7044, 7362, 7422, 5223, "-", "-"] } } ], @@ -596,8 +595,8 @@ export const useKeyNodeRecognitionStore = defineStore("keyNodeRecognition", { backimg: high3Img, riskType: "低风险", chart: { - predictedData: [10000, 10390, 9808, 10690, 11004, 12006, 10890, 8878], - realityData: [9090, 9860, 8434, 10902, 11753, 10070, "-", "-"] + predictedData: [5678, 6643, 8123, 8356, 8523, 7653, 7533, 6533], + realityData: [5745, 6768, 7975, 8045, 8467, 7564, "-", "-"] } }, { @@ -613,8 +612,8 @@ export const useKeyNodeRecognitionStore = defineStore("keyNodeRecognition", { backimg: high3Img, riskType: "低风险", chart: { - predictedData: [10000, 10390, 9808, 10690, 11004, 12006, 10890, 9878], - realityData: [9090, 9860, 8434, 10902, 11753, 10070, "-", "-"] + predictedData: [6522, 7023, 7112, 7233, 7590, 5421, 5211, 3086], + realityData: [6543, 6885, 7044, 7362, 7422, 5223, "-", "-"] } }, { @@ -630,8 +629,8 @@ export const useKeyNodeRecognitionStore = defineStore("keyNodeRecognition", { backimg: high3Img, riskType: "低风险", chart: { - predictedData: [8001, 8500, 9500, 9756, 9655, 8545, 10556, 10545], - realityData: [9090, 9860, 8434, 10902, 11753, 10070, "-", "-"] + predictedData: [3256, 3489, 3907, 4579, 4378, 4269, 4123, 3789], + realityData: [3463, 3790, 4378, 4678, 4567, 4324, "-", "-"] } } ], @@ -649,8 +648,8 @@ export const useKeyNodeRecognitionStore = defineStore("keyNodeRecognition", { backimg: high2Img, riskType: "中风险", chart: { - predictedData: [9001, 8500, 9500, 9756, 9655, 8545, 10556, 12545], - realityData: [9090, 9860, 8434, 9902, 9753, 10070, "-", "-"] + predictedData: [5678, 6643, 8123, 8356, 8523, 7653, 7533, 6533], + realityData: [5745, 6768, 7975, 8045, 8467, 7564, "-", "-"] } }, { @@ -666,8 +665,8 @@ export const useKeyNodeRecognitionStore = defineStore("keyNodeRecognition", { backimg: high3Img, riskType: "低风险", chart: { - predictedData: [8001, 8500, 9500, 9756, 9655, 8545, 10556, 10956], - realityData: [9090, 9860, 8434, 10902, 11753, 10070, "-", "-"] + predictedData: [6522, 7023, 7112, 7233, 7590, 5421, 5211, 3086], + realityData: [6543, 6885, 7044, 7362, 7422, 5223, "-", "-"] } }, { @@ -683,8 +682,8 @@ export const useKeyNodeRecognitionStore = defineStore("keyNodeRecognition", { backimg: high3Img, riskType: "低风险", chart: { - predictedData: [8646, 8895, 9570, 9656, 8655, 8545, 10556, 10487], - realityData: [8090, 8840, 8434, 9002, 7053, 8070, "-", "-"] + predictedData: [3256, 3489, 3907, 4579, 4378, 4269, 4123, 3789], + realityData: [3463, 3790, 4378, 4678, 4567, 4324, "-", "-"] } }, { @@ -701,8 +700,8 @@ export const useKeyNodeRecognitionStore = defineStore("keyNodeRecognition", { backimg: high3Img, riskType: "低风险", chart: { - predictedData: [8646, 8895, 9570, 9656, 8655, 8545, 10556, 11314], - realityData: [8090, 8840, 8434, 9002, 7053, 8070, "-", "-"] + predictedData: [3290, 3546, 3997, 4602, 4422, 4337, 4168, 3812], + realityData: [3522, 3835, 4401, 4712, 4635, 4413, "-", "-"] } } ], @@ -720,8 +719,8 @@ export const useKeyNodeRecognitionStore = defineStore("keyNodeRecognition", { backimg: high1Img, riskType: "高风险", chart: { - predictedData: [8646, 8895, 9570, 9656, 8655, 8545, 10556, 16597], - realityData: [8090, 8840, 8434, 9002, 7053, 8070, "-", "-"] + predictedData: [5678, 6643, 8123, 8356, 8523, 7653, 7533, 6533], + realityData: [5745, 6768, 7975, 8045, 8467, 7564, "-", "-"] } }, { @@ -737,8 +736,8 @@ export const useKeyNodeRecognitionStore = defineStore("keyNodeRecognition", { backimg: high2Img, riskType: "中风险", chart: { - predictedData: [8646, 8895, 9570, 9656, 8655, 8545, 10556, 12545], - realityData: [8090, 8840, 8434, 9002, 7053, 8070, "-", "-"] + predictedData: [6522, 7023, 7112, 7233, 7590, 5421, 5211, 3086], + realityData: [6543, 6885, 7044, 7362, 7422, 5223, "-", "-"] } }, { @@ -754,8 +753,8 @@ export const useKeyNodeRecognitionStore = defineStore("keyNodeRecognition", { backimg: high3Img, riskType: "低风险", chart: { - predictedData: [9646, 9895, 10570, 11000, 10546, 10664, 12056, 10557], - realityData: [8698, 7865, 6545, 8084, 9000, 9854, "-", "-"] + predictedData: [3256, 3489, 3907, 4579, 4378, 4269, 4123, 3789], + realityData: [3463, 3790, 4378, 4678, 4567, 4324, "-", "-"] } }, { @@ -772,8 +771,8 @@ export const useKeyNodeRecognitionStore = defineStore("keyNodeRecognition", { backimg: high3Img, riskType: "低风险", chart: { - predictedData: [8646, 8895, 9570, 9656, 8655, 8545, 10556, 8556], - realityData: [8090, 8840, 8434, 9002, 7053, 8070, "-", "-"] + predictedData: [3290, 3546, 3997, 4602, 4422, 4337, 4168, 3812], + realityData: [3522, 3835, 4401, 4712, 4635, 4413, "-", "-"] } }, { @@ -789,8 +788,8 @@ export const useKeyNodeRecognitionStore = defineStore("keyNodeRecognition", { backimg: high3Img, riskType: "低风险", chart: { - predictedData: [9855, 12531, 13556, 12011, 10145, 95545, 13524, 10697], - realityData: [9045, 11004, 12554, 10055, 9542, 10001, "-", "-"] + predictedData: [3349, 3591, 4020, 4636, 4490, 4426, 4212, 3880], + realityData: [3556, 3892, 4491, 4735, 4679, 4481, "-", "-"] } } ], @@ -808,8 +807,8 @@ export const useKeyNodeRecognitionStore = defineStore("keyNodeRecognition", { backimg: high2Img, riskType: "中风险", chart: { - predictedData: [10565, 11554, 12565, 13265, 11012, 15631, 13556, 13005], - realityData: [10000, 10456, 9000, 9500, 10500, 11500, "-", "-"] + predictedData: [5678, 6643, 8123, 8356, 8523, 7653, 7533, 6533], + realityData: [5745, 6768, 7975, 8045, 8467, 7564, "-", "-"] } }, { @@ -825,8 +824,8 @@ export const useKeyNodeRecognitionStore = defineStore("keyNodeRecognition", { backimg: high3Img, riskType: "低风险", chart: { - predictedData: [8646, 8895, 9570, 9656, 8655, 8545, 10556, 11545], - realityData: [8090, 8840, 8434, 9002, 7053, 8070, "-", "-"] + predictedData: [6522, 7023, 7112, 7233, 7590, 5421, 5211, 3086], + realityData: [6543, 6885, 7044, 7362, 7422, 5223, "-", "-"] } }, { @@ -842,8 +841,8 @@ export const useKeyNodeRecognitionStore = defineStore("keyNodeRecognition", { backimg: high3Img, riskType: "低风险", chart: { - predictedData: [9646, 10000, 12000, 11000, 12001, 10000, 13001, 9000], - realityData: [8090, 8840, 9002, 10365, 11001, 9000, "-", "-"] + predictedData: [3256, 3489, 3907, 4579, 4378, 4269, 4123, 3789], + realityData: [3463, 3790, 4378, 4678, 4567, 4324, "-", "-"] } }, { @@ -860,8 +859,8 @@ export const useKeyNodeRecognitionStore = defineStore("keyNodeRecognition", { backimg: high3Img, riskType: "低风险", chart: { - predictedData: [12000, 10895, 12570, 12656, 11655, 12545, 13556, 8745], - realityData: [10090, 9840, 9434, 10002, 9053, 9070, "-", "-"] + predictedData: [3290, 3546, 3997, 4602, 4422, 4337, 4168, 3812], + realityData: [3522, 3835, 4401, 4712, 4635, 4413, "-", "-"] } }, { @@ -877,8 +876,8 @@ export const useKeyNodeRecognitionStore = defineStore("keyNodeRecognition", { backimg: high3Img, riskType: "低风险", chart: { - predictedData: [10646, 12895, 12570, 10656, 9655, 8545, 10556, 9048], - realityData: [9090, 10040, 10434, 9012, 9053, 7070, "-", "-"] + predictedData: [3349, 3591, 4020, 4636, 4490, 4426, 4212, 3880], + realityData: [3556, 3892, 4491, 4735, 4679, 4481, "-", "-"] } } ] diff --git a/src/views/GroupEvolution/component/groupPost.vue b/src/views/GroupEvolution/component/groupPost.vue index 6fb7c56..7dc3250 100644 --- a/src/views/GroupEvolution/component/groupPost.vue +++ b/src/views/GroupEvolution/component/groupPost.vue @@ -154,14 +154,15 @@ function resumeScroll() { startScroll() } -//当贴文列表更新,自动滚动到最底 +let lastPostsLength = 0 //当列表更新时,记录上一次的长度 watch( () => props.posts, - () => { + (newVal) => { nextTick(() => { - if (listRef.value) { + if (listRef.value && newVal.length > lastPostsLength) { listRef.value.scrollTop = listRef.value.scrollHeight } + lastPostsLength = newVal.length //实现按需滚动 }) }, { deep: true } diff --git a/src/views/GroupEvolution/groupIdentifyDiscovery/index.vue b/src/views/GroupEvolution/groupIdentifyDiscovery/index.vue index 546bde5..4443c3e 100644 --- a/src/views/GroupEvolution/groupIdentifyDiscovery/index.vue +++ b/src/views/GroupEvolution/groupIdentifyDiscovery/index.vue @@ -75,10 +75,7 @@ const handleOpenPostDialog = (post) => { } const handleChangeXAxis = (utcTime) => { - const timeList = groupDiscoveryStore.timeList - console.log(utcTime) - - if (!timeList.includes(utcTime)) return + groupDiscoveryStore.initializeGroupList(utcTime) //随着时间变动,更新群体列表 groupDiscoveryStore.initialPostByUtcTime(utcTime) //随着时间轴变动,更新贴文列表 } diff --git a/src/views/keyNodeRecognition3/components/anchorGraph.vue b/src/views/keyNodeRecognition3/components/anchorGraph.vue index 076c802..a4a3fa0 100644 --- a/src/views/keyNodeRecognition3/components/anchorGraph.vue +++ b/src/views/keyNodeRecognition3/components/anchorGraph.vue @@ -47,8 +47,8 @@ watch(riskEventIndex, (newIndex) => { const tooltipList = keyNodeStore.tooltipList const highRiskCount = tooltipList[newIndex].filter((item) => item.riskType == "高风险").length - keyNodeStore.statisticsList[5].number = highRiskCount - keyNodeStore.statisticsList[4].number = tooltipList[newIndex].length + keyNodeStore.statisticsList[4].number = highRiskCount + keyNodeStore.statisticsList[3].number = tooltipList[newIndex].length }) const emit = defineEmits(["click:openAnchorDialog"])