From 5180dfaf60045e94dbc8b9af0fbdafb825e9172a Mon Sep 17 00:00:00 2001 From: chendaofei <857448963@qq.com> Date: Wed, 12 Nov 2025 14:50:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0redis=E7=BC=93=E5=AD=98?= =?UTF-8?q?=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/statistics/index.ts | 9 ++ .../components/eventStatistics/index.vue | 2 +- .../components/manage/securityDetail.vue | 8 +- src/views/VoltageSag_BJ/index.vue | 137 ++++++++++-------- 4 files changed, 91 insertions(+), 65 deletions(-) diff --git a/src/api/statistics/index.ts b/src/api/statistics/index.ts index d0fb962..fb53688 100644 --- a/src/api/statistics/index.ts +++ b/src/api/statistics/index.ts @@ -90,6 +90,15 @@ export function msgHandle(data: object) { data, }); } + +//刷新redis缓存 +export function refreshRedis() { + return service({ + url: "/accept/refreshIdCache", + method: "get", + }); +} + // 地图统计数量 export function mapCount(data: object) { return service({ diff --git a/src/views/SagTraceResult_WX/components/eventStatistics/index.vue b/src/views/SagTraceResult_WX/components/eventStatistics/index.vue index e8f1d7d..10bb6ce 100644 --- a/src/views/SagTraceResult_WX/components/eventStatistics/index.vue +++ b/src/views/SagTraceResult_WX/components/eventStatistics/index.vue @@ -967,7 +967,7 @@ const initialResponsibilityList = () => { // 根据实际字段进行拼接,示例: const content = `${item.lineName || ""}进行${ item.dataTimes || "" - }次谐波电压溯源,溯源对象:${item.userDataName || ""}`.trim(); + }次谐波电压溯源,溯源对象:${item.userDataName || "系统测点"}`.trim(); return { ...item, content: content, diff --git a/src/views/SagTraceResult_WX/components/manage/securityDetail.vue b/src/views/SagTraceResult_WX/components/manage/securityDetail.vue index e665b3a..82427aa 100644 --- a/src/views/SagTraceResult_WX/components/manage/securityDetail.vue +++ b/src/views/SagTraceResult_WX/components/manage/securityDetail.vue @@ -422,7 +422,13 @@ align="center" label="责任对象" show-overflow-tooltip - /> + > + +
+
- +
{{ title }}
- +
- + @@ -80,33 +83,33 @@
- + - + - +
{{ + class="count" + v-if="bottomTextRef?.urgentList.length > 0" + >{{ bottomTextRef?.urgentList.length > 99 - ? "99+" - : bottomTextRef?.urgentList.length + ? "99+" + : bottomTextRef?.urgentList.length }}
@@ -129,18 +132,18 @@
- + - +
@@ -148,22 +151,22 @@
- + - +
@@ -179,11 +182,11 @@ import { watch, } from "vue"; -import { formatTime, getDateRange, stopSpeak } from "@/utils/index"; //引入封装好的 +import {formatTime, getDateRange, stopSpeak} from "@/utils/index"; //引入封装好的 import useDraw from "@/utils/useDraw"; // 引入封装好的屏幕适配方法 -import { WEEK, title, subtitle, moduleInfo, color } from "@/constant/index"; //引入封装的标题日期 +import {WEEK, title, subtitle, moduleInfo, color} from "@/constant/index"; //引入封装的标题日期 import datePicker from "@/components/datePicker/index.vue"; -import { Menu, BellFilled, WarnTriangleFilled } from "@element-plus/icons-vue"; +import {Menu, BellFilled, WarnTriangleFilled} from "@element-plus/icons-vue"; //页面组件 import eventStatistics from "./components/eventStatistics.vue"; //统计事件 import endpointStatistics from "./components/endpointStatistics.vue"; //终端在线统计 @@ -194,10 +197,12 @@ import Map from "./components/bdMap.vue"; //地图 import smsQueries from "./components/smsQueries.vue"; // //短信查询 import bottomText from "./components/bottomText.vue"; //边框组件 import socketClient from "@/utils/webSocketClient"; -import { useStore } from "vuex"; +import {useStore} from "vuex"; import Config from "./components/config.vue"; import ReportForms from "./components/reportForms.vue"; -import { exportLineData } from "@/api/statistics/index"; +import {exportLineData,refreshRedis} from "@/api/statistics/index"; +import {ElMessage} from "element-plus"; + const store = useStore(); const smsQueriesRef = ref(); // 短信查询组件引用 const endpointStatisticsRef = ref(); // 终端在线统计组件引用 @@ -226,7 +231,7 @@ const timeInfo: any = reactive({ const timeType = ref(3); const reportForms = ref(); // 适配处理 -const { appRef, calcRate, windowDraw, unWindowDraw } = useDraw(); +const {appRef, calcRate, windowDraw, unWindowDraw} = useDraw(); // 连接webSocket客户端 const init = () => { if (!dataSocket.socketServe) { @@ -317,6 +322,12 @@ const handleClick = (type: string) => { document.body.removeChild(link); }); } + if (type === "6") { + refreshRedis().then((res: any) => { + ElMessage.success("刷新缓存成功"); + }); + } + }, 100); }; @@ -347,13 +358,13 @@ const inquire = async () => { }; watch( - store.state, - (val) => { - timeChangeInfo(); - }, - { - deep: true, - } + store.state, + (val) => { + timeChangeInfo(); + }, + { + deep: true, + } );