From 021f9f28f6ab00e3b04797231d523d4a3a25e1c7 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Tue, 12 Nov 2024 10:12:32 +0800 Subject: [PATCH 1/6] =?UTF-8?q?fix;=20SMSC-CDR=E6=97=B6=E9=97=B4=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/dashboard/smscCDR/index.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/views/dashboard/smscCDR/index.vue b/src/views/dashboard/smscCDR/index.vue index 0c160722..7afae735 100644 --- a/src/views/dashboard/smscCDR/index.vue +++ b/src/views/dashboard/smscCDR/index.vue @@ -176,7 +176,10 @@ let tableColumns: ColumnsType = [ width: 150, customRender(opt) { const cdrJSON = opt.value; - return parseDateToStr(+cdrJSON.updateTime * 1000); + if (typeof cdrJSON.seizureTime === 'number') { + return parseDateToStr(+cdrJSON.updateTime * 1000); + } + return cdrJSON.updateTime; }, }, { From 348b11e2016bde9006332712e28d7a10ab88eeab Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Thu, 14 Nov 2024 11:33:17 +0800 Subject: [PATCH 2/6] =?UTF-8?q?fix:=20=E7=BD=91=E5=85=83=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E6=97=B6=E5=91=BD=E4=BB=A4=E6=93=8D=E4=BD=9C=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E8=BF=87=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/tool/iperf/index.vue | 17 ++++++++++++++--- src/views/tool/ping/index.vue | 30 +++++++++++++++++++----------- 2 files changed, 33 insertions(+), 14 deletions(-) diff --git a/src/views/tool/iperf/index.vue b/src/views/tool/iperf/index.vue index 3119a83a..f9b0ee0d 100644 --- a/src/views/tool/iperf/index.vue +++ b/src/views/tool/iperf/index.vue @@ -80,6 +80,14 @@ async function fnIPerf() { }); return; } + + // 网元切换时重置 + if (neType !== state.params.neType || neId !== state.params.neId) { + state.initialized = false; + state.params.neType = neType; + state.params.neId = neId; + } + // 软件版本检查 state.params.neType = neType; state.params.neId = neId; @@ -88,7 +96,6 @@ async function fnIPerf() { neId, version: state.data.version, }); - if (resVersion.code !== RESULT_CODE_SUCCESS) { Modal.confirm({ title: t('common.tipTitle'), @@ -99,6 +106,7 @@ async function fnIPerf() { } else { state.versionInfo = resVersion.data; } + // 初始化的直接重发 if (state.initialized) { fnResend(); @@ -145,8 +153,8 @@ function fnResend() { if (!toolTerminal.value) return; state.running = true; toolTerminal.value.ctrlC(); - toolTerminal.value.clear(); setTimeout(() => { + toolTerminal.value.clear(); const data = JSON.parse(JSON.stringify(state.data)); if (state.dataType === 'options') data.command = ''; toolTerminal.value.send('iperf', data); @@ -180,9 +188,12 @@ function fnProcessMessage(data: string): string { if (lestIndex !== -1) { text = text.substring(0, lestIndex); } + if (text.endsWith('# ')) { + text = text.substring(0, text.lastIndexOf('\r\n') + 2); + } // console.log({ parts, text }); - if (parts[0].startsWith('iperf')) { + if (parts.length > 1 && parts[0].startsWith('iperf')) { return parts[0] + '\r\n' + text; } return text; diff --git a/src/views/tool/ping/index.vue b/src/views/tool/ping/index.vue index 0e909def..260ee5ec 100644 --- a/src/views/tool/ping/index.vue +++ b/src/views/tool/ping/index.vue @@ -72,13 +72,15 @@ async function fnPing() { }); return; } - if (state.initialized) { - fnResend(); - return; + + // 网元切换时重置 + if (neType !== state.params.neType || neId !== state.params.neId) { + state.initialized = false; + state.params.neType = neType; + state.params.neId = neId; } - state.params.neType = neType; - state.params.neId = neId; + // 软件版本检查 const resVersion = await pingV({ neType, neId }); if (resVersion.code !== RESULT_CODE_SUCCESS) { message.warning({ @@ -89,6 +91,12 @@ async function fnPing() { } else { state.versionInfo = resVersion.data; } + + // 初始化的直接重发 + if (state.initialized) { + fnResend(); + return; + } state.initialized = true; } @@ -108,8 +116,8 @@ function fnResend() { if (!toolTerminal.value) return; state.running = true; toolTerminal.value.ctrlC(); - toolTerminal.value.clear(); setTimeout(() => { + toolTerminal.value.clear(); const data = JSON.parse(JSON.stringify(state.data)); if (state.dataType === 'options') data.command = ''; toolTerminal.value.send('ping', data); @@ -143,9 +151,12 @@ function fnProcessMessage(data: string): string { if (lestIndex !== -1) { text = text.substring(0, lestIndex); } + if (text.endsWith('# ')) { + text = text.substring(0, text.lastIndexOf('\r\n') + 2); + } // console.log({ parts, text }); - if (parts[0].startsWith('ping')) { + if (parts.length > 1 && parts[0].startsWith('ping')) { return parts[0] + '\r\n' + text; } return text; @@ -377,10 +388,7 @@ onBeforeUnmount(() => {}); 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 3/6] =?UTF-8?q?style:=20=E9=A1=B5=E9=9D=A2=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=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'), From dab76add738088de569e90d657a96d397bae7cc9 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Thu, 14 Nov 2024 14:18:52 +0800 Subject: [PATCH 4/6] =?UTF-8?q?style:=20=E7=BD=91=E5=85=83license=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E5=9B=BE=E6=A0=87=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ne/neLicense/index.vue | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/views/ne/neLicense/index.vue b/src/views/ne/neLicense/index.vue index db979361..42d32688 100644 --- a/src/views/ne/neLicense/index.vue +++ b/src/views/ne/neLicense/index.vue @@ -413,7 +413,7 @@ onMounted(() => { :loading="modalState.confirmLoading" @click.prevent="fnRecordStateBatch()" > - + {{ t('views.ne.neLicense.reloadBatch') }} @@ -505,19 +505,19 @@ onMounted(() => {