From 101cb708934e1b4b8169764a8a311800e8152ee2 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Thu, 14 Nov 2024 11:33:49 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E9=A1=B5=E9=9D=A2=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/monitor/monitor/index.vue | 4 ++-- src/views/monitor/topology/index.vue | 19 ++++++++++++------- src/views/system/config/index.vue | 1 + 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/views/monitor/monitor/index.vue b/src/views/monitor/monitor/index.vue index fbbc999c..71715741 100644 --- a/src/views/monitor/monitor/index.vue +++ b/src/views/monitor/monitor/index.vue @@ -496,7 +496,7 @@ onMounted(() => { - + @@ -554,7 +554,7 @@ onMounted(() => { - + diff --git a/src/views/monitor/topology/index.vue b/src/views/monitor/topology/index.vue index c3cf9026..3c87d33d 100644 --- a/src/views/monitor/topology/index.vue +++ b/src/views/monitor/topology/index.vue @@ -24,8 +24,9 @@ const graphG6Data = reactive>({ /**查询全部网元数据列表 */ function fnRanderData() { - if (!graphG6Dom.value) return; + if (!graphG6Dom.value) return false; graphG6.value = randerGroph(t, graphG6Dom.value, graphG6Data); + return true; } /**网元状态调度器 */ @@ -140,17 +141,21 @@ function fnGetList(refresh: boolean = false) { } }) .then(hasNeList => { - if (!hasNeList) return; + if (!hasNeList) return false; if (refresh) { // graphG6.value.get('canvas').set('localRefresh', true); graphG6.value.destroy(); // graphG6.value.clear(); } - fnRanderData(); - fnGetState(); - interval10s.value = setInterval(() => { - fnGetState(); // 获取网元状态 - }, 10_000); + return fnRanderData(); + }) + .then(randerGroph => { + if (!randerGroph) return; + fnGetState().finally(() => { + interval10s.value = setInterval(() => { + fnGetState(); // 获取网元状态 + }, 10_000); + }); }); } diff --git a/src/views/system/config/index.vue b/src/views/system/config/index.vue index c0455c89..e97bc9f9 100644 --- a/src/views/system/config/index.vue +++ b/src/views/system/config/index.vue @@ -98,6 +98,7 @@ let tableColumns: ColumnsType = [ title: t('common.rowId'), dataIndex: 'configId', align: 'left', + width: 100, }, { title: t('views.system.config.configName'),