From ebe1ce8536f4076a01af183e4179ff8ffb06b69c Mon Sep 17 00:00:00 2001 From: duanhao Date: Thu, 7 Aug 2025 20:13:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A8=A1=E5=9D=97=E5=9B=9B=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=87=86=E5=A4=87=EF=BC=8C=E5=B0=8F=E9=97=AE=E9=A2=98=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/service/api/groupEvolution.js | 23 ++++++ src/store/groupEvolution/index.js | 78 +++++++++++++++++-- .../GroupEvolution/abnormalGroup/index.vue | 27 ++++++- .../GroupEvolution/component/groupChart.vue | 2 +- .../groupMember/components/groupAnalysis.vue | 1 + .../groupMember/components/groupPanel.vue | 18 ++--- .../components/groupAnalysis.vue | 24 +++++- 7 files changed, 153 insertions(+), 20 deletions(-) diff --git a/src/service/api/groupEvolution.js b/src/service/api/groupEvolution.js index a003d19..6e1eebd 100644 --- a/src/service/api/groupEvolution.js +++ b/src/service/api/groupEvolution.js @@ -80,3 +80,26 @@ export function getGroupMemberEvolutionAnalysisChart() { return http.get(`/groupEvolution/groupMember/rightChart`) } +// 4.异常群体捕捉 +// 4.1获取时间轴 +export function getAbnormalGroupTimeLine() { + return http.get(`/groupEvolution/groupMember/timeline`) +} +// 4.2获取异常群体列表-z左上 +export function getAbnormalGroupList(time) { + return http.get(`/groupEvolution/abnormalGroup/infoList?time=${time}`) +} +// 4.3全局异常互动时刻表-左下 +export function getAbnormalGroupInteractionChart() { + return http.get(`/groupEvolution/abnormalGroup/chart`) +} +// 4.4异常行为分析 +export function getAbnormalGroupBehaviorPosts(time) { + return http.get(`/groupEvolution/abnormalGroup/posts/date=${time}`) +} + +// 4.5 异常互动行为内容详情 +export function getAbnormalGroupBehaviorDetail(time) { + return http.get(`/groupEvolution/abnormalGroup/detail?time=${time}`) +} + diff --git a/src/store/groupEvolution/index.js b/src/store/groupEvolution/index.js index c1a9cf9..88aeeb3 100644 --- a/src/store/groupEvolution/index.js +++ b/src/store/groupEvolution/index.js @@ -24,6 +24,14 @@ import { getGroupMemberChart, getGroupMemberEvolutionInfoByTime, getGroupMemberEvolutionAnalysisChart, + + // 4.异常群体捕捉 + getAbnormalGroupTimeLine, + getAbnormalGroupList, + getAbnormalGroupInteractionChart, + getAbnormalGroupBehaviorPosts, + getAbnormalGroupBehaviorDetail, + getRelationGraphByUtcTime } from "@/service/api/groupEvolution" import { TansTimestamp, utcStringToHHMMSS, getMaxCeiled, parsePercentage } from "@/utils/transform" @@ -299,7 +307,7 @@ export const useGroupStructureStore = defineStore("groupStructure", { ] }, chartsData: { - topSelfMedia: [ + /* topSelfMedia: [ { id: 1, name: "内部密度指数演化", @@ -394,7 +402,7 @@ export const useGroupStructureStore = defineStore("groupStructure", { ] } } - ] + ] */ }, wordCloudData: [ { @@ -1039,11 +1047,13 @@ export const useGroupMemberStore = defineStore("groupMember", { ] }), actions: { + // 获取时间轴 async initializeGroupMemberTimeLine() { const res = await getGroupMemberTimeLine() this.timeList = res.data // console.log("测试获取timeList:",this.timeList); }, + // 群体成员演化信息列表-左上 async initializeGroupList(time = "2024-06-19T07:57:46Z") { const res = await getGroupMemberInfoList(time) console.log("测试获取groupMemberInfoList:", res) @@ -1095,7 +1105,7 @@ export const useGroupMemberStore = defineStore("groupMember", { xAxisData: item.chart.xaxisData.map((item) => utcStringToHHMMSS(item)), yAxisRange: {min: 0, max: Math.ceil((item.chart.yaxisRange.max) / 5) * 5, interval: Math.ceil((item.chart.yaxisRange.max) / 5)}, seriesList: item.chart.seriesList.map((item) => ({ - data: item.data, + data: item.data.map((item) => item.toFixed(2)), name: item.name, themeColor: themeColors[item.name] })) @@ -1109,7 +1119,7 @@ export const useGroupMemberStore = defineStore("groupMember", { xAxisData: item.chart.xaxisData.map((item) => utcStringToHHMMSS(item)), yAxisRange: {min: 0, max: Math.ceil((item.chart.yaxisRange.max) / 5) * 5, interval: Math.ceil((item.chart.yaxisRange.max) / 5)}, seriesList: item.chart.seriesList.map((item) => ({ - data: item.data, + data: item.data.map((item) => item.toFixed(2)), name: item.name, themeColor: themeColors[item.name] })) @@ -1123,7 +1133,7 @@ export const useGroupMemberStore = defineStore("groupMember", { xAxisData: item.chart.xaxisData.map((item) => utcStringToHHMMSS(item)), yAxisRange: {min: 0, max: Math.ceil((item.chart.yaxisRange.max) / 5) * 5, interval: Math.ceil((item.chart.yaxisRange.max) / 5)}, seriesList: item.chart.seriesList.map((item) => ({ - data: item.data, + data: item.data.map((item) => item.toFixed(2)), name: item.name, themeColor: themeColors[item.name] })) @@ -1176,6 +1186,8 @@ export const useAnomalousGroup = defineStore("anomalousGroup", { ] } ], + graph: {}, + timeList: [], wordCloudData: [ { text: "局座", @@ -1364,5 +1376,59 @@ export const useAnomalousGroup = defineStore("anomalousGroup", { KS: 0.02 } ] - }) + }), + actions: { + // 获取时间轴数据-中间时间轴 + async initializeAbnormalGroupTimeLine() { + const res = await getAbnormalGroupTimeLine() + if (res.code === 200) { + this.timeList = res.data + } + }, + // 异常用户组展示-左上 + async initializeAbnormalGroupList(time = '2024-06-19T07:57:46Z') { + const res = await getAbnormalGroupList(time) + if (res.code === 200) { + this.abnormalGroupList = res.data + } + }, + // 全局异常互动时刻表-左下 + async initializeAbnormalGroupInteractionChart() { + const res = await getAbnormalGroupInteractionChart() + const xAxisData = res.data.xaxisData.map((item) => utcStringToHHMMSS(item)) + const yAxisRange = res.data.yaxisRange + const themeColors = { + 社团组一: "#2AB8FD", + 社团组二: "#02D7DA", + 社团组三: "#FFDA09" + } + const seriesList = res.data.seriesList.map((item) => ({ + data: item.data.map((item) => item.toFixed(2)), + name: item.name, + themeColor: themeColors[item.name] + })) + this.chartData = { + xAxisData, + yAxisRange, + seriesList + } + }, + // 异常行为分析-中下 + async initializeAbnormalGroupPosts(time = '2024-06-19T07:57:46Z') { + const res = await getAbnormalGroupBehaviorPosts(time) + if (res.code === 200) { + this.posts = res.data + } + }, + + // 异常互动详情-右上 + async initializeAbnormalGroupInteractionDetail(time = '2024-06-19T07:57:46Z') { + const res = await getAbnormalGroupBehaviorDetail(time) + if (res.code === 200) { + this.interactionDetail = res.data + } + }, + + }, + persist: true // 开启持久化 }) diff --git a/src/views/GroupEvolution/abnormalGroup/index.vue b/src/views/GroupEvolution/abnormalGroup/index.vue index ca4964b..3055533 100644 --- a/src/views/GroupEvolution/abnormalGroup/index.vue +++ b/src/views/GroupEvolution/abnormalGroup/index.vue @@ -18,7 +18,12 @@
-
+
+ +
@@ -58,10 +63,11 @@