diff --git a/src/service/api/groupEvolution.js b/src/service/api/groupEvolution.js index 6e1eebd..d3938f3 100644 --- a/src/service/api/groupEvolution.js +++ b/src/service/api/groupEvolution.js @@ -83,23 +83,24 @@ export function getGroupMemberEvolutionAnalysisChart() { // 4.异常群体捕捉 // 4.1获取时间轴 export function getAbnormalGroupTimeLine() { - return http.get(`/groupEvolution/groupMember/timeline`) + return http.get(`/groupEvolution/groupException/timeList`) } // 4.2获取异常群体列表-z左上 -export function getAbnormalGroupList(time) { - return http.get(`/groupEvolution/abnormalGroup/infoList?time=${time}`) +export function getAbnormalGroupList() { + return http.get(`/groupEvolution/groupException/infoList`) } // 4.3全局异常互动时刻表-左下 export function getAbnormalGroupInteractionChart() { - return http.get(`/groupEvolution/abnormalGroup/chart`) + return http.get(`/groupEvolution/groupException/chart`) } // 4.4异常行为分析 export function getAbnormalGroupBehaviorPosts(time) { - return http.get(`/groupEvolution/abnormalGroup/posts/date=${time}`) + console.log(time) + return http.get(`/groupEvolution/groupException/posts?date=${time}`) } -// 4.5 异常互动行为内容详情 +// 4.5 异常互动行为内容详情-右上 export function getAbnormalGroupBehaviorDetail(time) { - return http.get(`/groupEvolution/abnormalGroup/detail?time=${time}`) + return http.get(`/groupEvolution/groupException/rightChart?date=${time}`) } diff --git a/src/store/groupEvolution/index.js b/src/store/groupEvolution/index.js index 7d50b04..a05c379 100644 --- a/src/store/groupEvolution/index.js +++ b/src/store/groupEvolution/index.js @@ -569,141 +569,7 @@ export const useGroupMemberStore = defineStore("groupMember", { graph: {}, chartData: {}, chartsData: {}, - posts: [ - { - id: 1, - time: "2024-01-04 0:03:16", - type: "群体一", - memberAddCount: 1 - }, - { - id: 2, - time: "2024-02-03 12:58:53", - type: "群体二", - memberAddCount: 2 - }, - { - id: 3, - time: "2024-02-22 17:13:44", - type: "群体三", - memberAddCount: 4 - }, - { - id: 4, - time: "2024-02-23 17:54:46", - type: "群体一", - memberAddCount: 4 - }, - { - id: 5, - time: "2024-03-14 09:58:12", - type: "群体三", - memberAddCount: 4 - }, - { - id: 6, - time: "2024-03-23 21:20:40", - type: "群体二", - memberAddCount: 4 - }, - { - id: 7, - time: "2024-03-23 21:42:36", - type: "群体一", - memberAddCount: 2 - }, - { - id: 8, - time: "2024-04-06 18:17:30", - type: "群体二", - memberAddCount: 4 - }, - { - id: 9, - time: "2024-04-06 19:19:50", - type: "群体一", - memberAddCount: 4 - }, - { - id: 10, - time: "2024-05-16 00:22:18", - type: "群体二", - memberAddCount: 5 - } - ], - wordCloudData: [ - { - text: "中国海警", - top: 115.5, - left: 200.5, - width: 150, - height: 40, - fontSize: 28, - opacity: 1 - }, - { text: "渔民", top: 160.5, left: 69.5, width: 70, height: 35, fontSize: 20, opacity: 1 }, - { - text: "缴获", - top: 72.5, - left: 132.5, - width: 60, - height: 22, - fontSize: 12, - opacity: 1 - }, - { - text: "菲律宾", - top: 171.5, - left: 200.5, - width: 81, - height: 22, - fontSize: 14, - opacity: 0.8 - }, - { text: "枪支", top: 135.5, left: 42.5, width: 57, height: 24, fontSize: 16, opacity: 1 }, - { - text: "装甲船", - top: 223.5, - left: 230.5, - width: 81, - height: 22, - fontSize: 14, - opacity: 0.8 - }, - { - text: "渔民吃瓜", - top: 200.5, - left: 38.5, - width: 73, - height: 19, - fontSize: 12, - opacity: 0.7 - }, - { - text: "执法", - top: 223.5, - left: 130.5, - width: 60, - height: 19, - fontSize: 12, - opacity: 0.7 - }, - { - text: "登检", - top: 200.5, - left: 143.5, - width: 60, - height: 19, - fontSize: 12, - opacity: 1 - }, - { text: "蹲下", top: 176.5, left: 15.5, width: 49, height: 19, fontSize: 12, opacity: 0.8 }, - { text: "解决", top: 87.5, left: 36.5, width: 53, height: 22, fontSize: 14, opacity: 1 }, - { text: "抱头", top: 103.5, left: 95.5, width: 49, height: 19, fontSize: 12, opacity: 0.8 }, - { text: "包夹", top: 57.5, left: 72.5, width: 49, height: 19, fontSize: 12, opacity: 0.6 }, - { text: "吃瓜", top: 77.5, left: 264.5, width: 49, height: 19, fontSize: 12, opacity: 0.7 }, - { text: "手指", top: 195.5, left: 287.5, width: 49, height: 19, fontSize: 12, opacity: 0.8 } - ] + posts: [] }), actions: { // 获取时间轴 @@ -853,40 +719,7 @@ export const useGroupMemberStore = defineStore("groupMember", { export const useAnomalousGroup = defineStore("anomalousGroup", { state: () => ({ - groupList: [ - { - id: 1, - type: "异常社团组一", - abnormalGroup: [ - { - groupId: "G02", - nodeCount: 112, - postNum: 21 - }, - { - groupId: "G07", - nodeCount: 183, - postNum: 13 - } - ] - }, - { - id: 2, - type: "异常社团组二", - abnormalGroup: [ - { - groupId: "G04", - nodeCount: 86, - postNum: 12 - }, - { - groupId: "G08", - nodeCount: 143, - postNum: 7 - } - ] - } - ], + groupList: [], graph: {}, timeList: [], wordCloudData: [ @@ -970,60 +803,7 @@ export const useAnomalousGroup = defineStore("anomalousGroup", { { text: "吃瓜", top: 77.5, left: 264.5, width: 49, height: 19, fontSize: 12, opacity: 0.7 }, { text: "手指", top: 195.5, left: 287.5, width: 49, height: 19, fontSize: 12, opacity: 0.8 } */ ], - abnormalContentList: [ - { - id: 1, - // 评论人 - commenter: { - userId: "1", - userName: "Trump-Good", - userAvatar: defaultAvatar - }, - // 评论接收人 - commentRecipient: { - userId: "2", - userName: "疾风中青劲草", - userAvatar: defaultAvatar - }, - // - mutualCommentCount: 3, - // 评论内容 - content: - "在我国海域偷运軍械彈藥是應該依法拘捕送交法院睿理判刑,而且在中国的裹服刑的!难道外国人特权?更何况是這千点小国!#中国海警首次登检菲律宾运补船只# #外交部回应中国海警缴获菲士兵枪支#", - // 点赞数 - likeCount: "4.8w", - // 评论数 - commentCount: 100, - // 转发数 - shareCount: 6890 - }, - { - id: 2, - // 评论人 - commenter: { - userId: "1", - userName: "Trump-Good", - userAvatar: defaultAvatar - }, - // 评论接收人 - commentRecipient: { - userId: "2", - userName: "疾风中青劲草", - userAvatar: defaultAvatar - }, - // - mutualCommentCount: 3, - // 评论内容 - content: - "在我国海域偷运軍械彈藥是應該依法拘捕送交法院睿理判刑,而且在中国的裹服刑的!难道外国人特权?更何况是這千点小国!#中国海警首次登检菲律宾运补船只# #外交部回应中国海警缴获菲士兵枪支#", - // 点赞数 - likeCount: "4.8w", - // 评论数 - commentCount: 100, - // 转发数 - shareCount: 6890 - } - ], + abnormalContentList: [], chartData: { xAxisData: ["t0", "t1", "t2", "t3", "t4", "t5", "t6"], yAxisRange: { min: 0, max: 5, interval: 1 }, @@ -1087,10 +867,10 @@ export const useAnomalousGroup = defineStore("anomalousGroup", { } }, // 异常用户组展示-左上 - async initializeAbnormalGroupList(time = "2024-06-19T07:57:46Z") { - const res = await getAbnormalGroupList(time) + async initializeAbnormalGroupList() { + const res = await getAbnormalGroupList() if (res.code === 200) { - this.abnormalGroupList = res.data + this.groupList = res.data } }, // 全局异常互动时刻表-左下 @@ -1099,9 +879,9 @@ export const useAnomalousGroup = defineStore("anomalousGroup", { const xAxisData = res.data.xaxisData.map((item) => utcStringToHHMMSS(item)) const yAxisRange = res.data.yaxisRange const themeColors = { - 社团组一: "#2AB8FD", - 社团组二: "#02D7DA", - 社团组三: "#FFDA09" + 社团一: "#2AB8FD", + 社团二: "#02D7DA", + 社团三: "#FFDA09" } const seriesList = res.data.seriesList.map((item) => ({ data: item.data.map((item) => item.toFixed(2)), @@ -1118,15 +898,26 @@ export const useAnomalousGroup = defineStore("anomalousGroup", { async initializeAbnormalGroupPosts(time = "2024-06-19T07:57:46Z") { const res = await getAbnormalGroupBehaviorPosts(time) if (res.code === 200) { - this.posts = res.data + this.posts = res.data.map((item => ({ + id: item.id, + abnormalGroup: item.abnormalGroup, + explanation: item.explanation, + firstDiscoverTime: TansTimestamp(item.firstDiscoverTime, "YYYY-MM-DD"), + duration: item.duration, + JS: parseFloat(item.js), + CUSUM: parseFloat(item.cusum), + KS: parseFloat(item.ks) + }))) + } + }, // 异常互动详情-右上 async initializeAbnormalGroupInteractionDetail(time = "2024-06-19T07:57:46Z") { const res = await getAbnormalGroupBehaviorDetail(time) if (res.code === 200) { - this.interactionDetail = res.data + this.abnormalContentList = res.data } } }, diff --git a/src/views/GroupEvolution/abnormalGroup/components/anomalousContentInfo.vue b/src/views/GroupEvolution/abnormalGroup/components/anomalousContentInfo.vue index 4b1401d..4dedd57 100644 --- a/src/views/GroupEvolution/abnormalGroup/components/anomalousContentInfo.vue +++ b/src/views/GroupEvolution/abnormalGroup/components/anomalousContentInfo.vue @@ -20,13 +20,11 @@
- -
{{ content.commenter.userName }}
+
{{ content.commenter }}
- -
{{ content.commentRecipient.userName }}
+
{{ content.commentRecipitient }}
diff --git a/src/views/GroupEvolution/abnormalGroup/index.vue b/src/views/GroupEvolution/abnormalGroup/index.vue index bd26da6..0a07912 100644 --- a/src/views/GroupEvolution/abnormalGroup/index.vue +++ b/src/views/GroupEvolution/abnormalGroup/index.vue @@ -88,6 +88,8 @@ const moduleName = "异常行为分析" const handleChangeXAxis = (utcTime) => { // 根据时间轴变化更改群体结构信息列表 // 根据时间轴变化更改群体结构演化分析的群体演化信息-中下-随时间轴变化 + anomalousGroupStore.initializeAbnormalGroupPosts(utcTime) + anomalousGroupStore.initializeAbnormalGroupInteractionDetail(utcTime) } //控制弹窗 @@ -103,6 +105,11 @@ const handleOpenPostDialog = (post) => { onMounted(async () => { await anomalousGroupStore.initializeAbnormalGroupTimeLine() + await anomalousGroupStore.initializeAbnormalGroupList() + await anomalousGroupStore.initializeAbnormalGroupPosts() + await anomalousGroupStore.initializeAbnormalGroupInteractionDetail() + await anomalousGroupStore.initializeAbnormalGroupInteractionChart() + }) diff --git a/src/views/GroupEvolution/component/groupPost.vue b/src/views/GroupEvolution/component/groupPost.vue index 1ba421b..39fb1a9 100644 --- a/src/views/GroupEvolution/component/groupPost.vue +++ b/src/views/GroupEvolution/component/groupPost.vue @@ -64,7 +64,7 @@
首次发现:{{ post.firstDiscoverTime }}
-
持续时间:{{ post.duration }}
+
持续时间:{{ post.duration }}天
@@ -80,7 +80,7 @@
-
{{ post.JS }}
+
{{ post.JS.toFixed(2) }}
异常
@@ -94,7 +94,8 @@
-
{{ post.CUSUM }}
+
{{ post.CUSUM.toFixed(2) }}
+
异常
@@ -108,7 +109,8 @@
-
{{ post.KS }}
+
{{ post.KS.toFixed(3) }}
+
正常