From da0d49d306034137208c14e22866f87c8425094e Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Mon, 28 Oct 2024 11:02:39 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=A1=B5=E9=9D=A2=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E5=B1=9E=E6=80=A7=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/account/components/base-info.vue | 8 +- src/views/account/components/reset-passwd.vue | 4 +- src/views/account/components/style-layout.vue | 52 +- src/views/account/profile.vue | 3 +- src/views/configManage/backupManage/index.vue | 518 -------- src/views/configManage/neManage/index.vue | 67 +- src/views/configManage/neOverview/index.vue | 12 +- .../components/software-history.vue | 280 ----- .../configManage/softwareManage/index.vue | 1111 ----------------- src/views/dashboard/amfUE/index.vue | 8 +- src/views/dashboard/imsCDR/index.vue | 8 +- .../dashboard/mocn/components/setting.vue | 13 +- src/views/dashboard/mocn/index.vue | 10 +- .../overview/components/Topology/index.vue | 2 +- src/views/dashboard/smscCDR/index.vue | 8 +- src/views/faultManage/active-alarm/index.vue | 104 +- src/views/faultManage/event/index.vue | 67 +- src/views/faultManage/fault-setting/index.vue | 4 +- src/views/faultManage/history-alarm/index.vue | 78 +- src/views/logManage/alarm/index.vue | 6 +- src/views/logManage/exportFile/index.vue | 8 +- src/views/logManage/forwarding/index.vue | 6 +- src/views/logManage/logSet/index.vue | 4 +- src/views/logManage/mml/index.vue | 6 +- .../neFile/components/ViewDrawer.vue | 22 +- src/views/logManage/neFile/index.vue | 74 +- src/views/login.vue | 40 +- src/views/mmlManage/mmlSet/index.vue | 4 +- src/views/mmlManage/neOperate/index.vue | 4 +- src/views/mmlManage/omcOperate/index.vue | 4 +- src/views/mmlManage/udmOperate/index.vue | 4 +- src/views/monitor/cache/index.vue | 6 +- src/views/monitor/job/index.vue | 63 +- src/views/monitor/job/log.vue | 33 +- src/views/monitor/monitor/index.vue | 6 +- src/views/monitor/online/index.vue | 8 +- src/views/monitor/system/info.vue | 2 +- src/views/monitor/topology/index.vue | 6 +- .../monitor/topologyArchitecture/index.vue | 12 +- .../components/GraphEditModal.vue | 87 +- .../monitor/topologyBuild/hooks/useCombo.ts | 2 +- .../monitor/topologyBuild/hooks/useEdge.ts | 2 +- .../monitor/topologyBuild/hooks/useNode.ts | 2 +- src/views/monitor/topologyBuild/index.vue | 80 +- src/views/ne/neConfig/hooks/useConfigArray.ts | 9 +- .../ne/neConfig/hooks/useConfigArrayChild.ts | 9 +- src/views/ne/neConfig/hooks/useConfigList.ts | 4 +- src/views/ne/neConfig/index.vue | 19 +- src/views/ne/neConfigBackup/index.vue | 19 +- src/views/ne/neHost/index.vue | 27 +- src/views/ne/neHostCommand/index.vue | 23 +- .../ne/neInfo/components/BackConfModal.vue | 29 +- src/views/ne/neInfo/components/EditModal.vue | 58 +- src/views/ne/neInfo/components/OAMModal.vue | 29 +- src/views/ne/neInfo/hooks/useNeOptions.ts | 2 +- src/views/ne/neInfo/index.vue | 40 +- .../ne/neLicense/components/EditModal.vue | 29 +- .../components/UploadLicenseFile.vue | 27 +- src/views/ne/neLicense/index.vue | 16 +- .../neQuickSetup/components/NeInfoConfig.vue | 14 +- .../components/NeInfoSoftwareInstall.vue | 14 +- .../components/NeInfoSoftwareLicense.vue | 12 +- .../ne/neQuickSetup/components/Para5GForm.vue | 44 +- .../ne/neQuickSetup/components/Start.vue | 8 +- .../ne/neSoftware/components/EditModal.vue | 29 +- .../neSoftware/components/UploadMoreFile.vue | 25 +- src/views/ne/neSoftware/index.vue | 27 +- src/views/ne/neVersion/index.vue | 39 +- src/views/neUser/base5G/index.vue | 6 +- src/views/neUser/ims/index.vue | 8 +- src/views/neUser/n3iwf/index.vue | 8 +- src/views/neUser/nssf/index.vue | 8 +- src/views/neUser/nssfAmf/index.vue | 13 +- src/views/neUser/ue/index.vue | 27 +- src/views/perfManage/customTarget/index.vue | 40 +- src/views/perfManage/goldTarget/index.vue | 63 +- src/views/perfManage/kpiCReport/index.vue | 13 +- src/views/perfManage/kpiKeyTarget/index.vue | 613 +++++---- src/views/perfManage/perfData/index.vue | 6 +- src/views/perfManage/perfThreshold/index.vue | 38 +- src/views/perfManage/taskManage/index.vue | 60 +- src/views/register.vue | 2 +- src/views/system/config/index.vue | 49 +- src/views/system/dept/index.vue | 43 +- src/views/system/dict/data.vue | 59 +- src/views/system/dict/index.vue | 41 +- src/views/system/log/login/index.vue | 8 +- src/views/system/log/operate/index.vue | 27 +- src/views/system/menu/index.vue | 62 +- src/views/system/post/index.vue | 51 +- .../system/quick-start/components/Done.vue | 2 +- .../quick-start/components/NeInfoConfig.vue | 29 +- .../components/NeInfoConfigPara5G.vue | 5 +- .../components/NeInfoSoftwareInstall.vue | 25 +- .../components/NeInfoSoftwareLicense.vue | 12 +- .../quick-start/components/SystemConfig.vue | 6 +- src/views/system/quick-start/index.vue | 7 +- src/views/system/role/auth-user.vue | 26 +- .../role/components/auth-user-select.vue | 19 +- src/views/system/role/index.vue | 71 +- .../setting/components/change-copyright.vue | 7 +- .../setting/components/change-help-doc.vue | 8 +- .../setting/components/change-home-index.vue | 4 +- .../system/setting/components/change-i18n.vue | 4 +- .../setting/components/change-login-bg.vue | 8 +- .../system/setting/components/change-logo.vue | 8 +- .../components/change-official-url.vue | 4 +- .../setting/components/change-title.vue | 7 +- .../setting/components/system-reset.vue | 14 +- src/views/system/user/index.vue | 87 +- src/views/tool/iperf/index.vue | 6 +- src/views/tool/lockScreen/index.vue | 2 +- src/views/tool/net/index.vue | 2 +- src/views/tool/ping/index.vue | 4 +- src/views/tool/ps/index.vue | 2 +- src/views/tool/terminal/index.vue | 2 +- src/views/tool/upload/index.vue | 10 +- src/views/traceManage/analysis/index.vue | 20 +- src/views/traceManage/pcap/file.vue | 86 +- src/views/traceManage/pcap/index.vue | 15 +- src/views/traceManage/task-hlr/index.vue | 31 +- src/views/traceManage/task/analyze.vue | 6 +- src/views/traceManage/task/index.vue | 43 +- src/views/traceManage/tshark/index.vue | 8 +- src/views/traceManage/wireshark/index.vue | 4 +- 125 files changed, 1775 insertions(+), 3464 deletions(-) delete mode 100644 src/views/configManage/backupManage/index.vue delete mode 100644 src/views/configManage/softwareManage/components/software-history.vue delete mode 100644 src/views/configManage/softwareManage/index.vue diff --git a/src/views/account/components/base-info.vue b/src/views/account/components/base-info.vue index 5f4a309f..7287b028 100644 --- a/src/views/account/components/base-info.vue +++ b/src/views/account/components/base-info.vue @@ -1,7 +1,7 @@ @@ -56,13 +66,31 @@ function fnColorChange(e: Event) { + + {{ t('views.account.settings.theme') }} + + + {{ t('views.account.settings.navTheme') }} diff --git a/src/views/dashboard/overview/components/Topology/index.vue b/src/views/dashboard/overview/components/Topology/index.vue index 8c2116e1..54c57cc5 100644 --- a/src/views/dashboard/overview/components/Topology/index.vue +++ b/src/views/dashboard/overview/components/Topology/index.vue @@ -2,7 +2,7 @@ import { onMounted, ref } from 'vue'; import { RESULT_CODE_SUCCESS } from '@/constants/result-constants'; import { listAllNeInfo } from '@/api/ne/neInfo'; -import { message } from 'ant-design-vue/lib'; +import { message } from 'ant-design-vue/es'; import { getGraphData } from '@/api/monitor/topology'; import { Graph, GraphData, Tooltip } from '@antv/g6'; import { edgeLineAnimateState } from '@/views/monitor/topologyBuild/hooks/registerEdge'; diff --git a/src/views/dashboard/smscCDR/index.vue b/src/views/dashboard/smscCDR/index.vue index 30fc6a5b..0c160722 100644 --- a/src/views/dashboard/smscCDR/index.vue +++ b/src/views/dashboard/smscCDR/index.vue @@ -1,10 +1,10 @@ +const isSaving = ref(false); +const isRestoring = ref(false); +//保存布局按钮 +const handleSaveLayout = async (info: MenuInfo) => { + if (typeof info.key === 'string' && !isSaving.value) { + isSaving.value = true; + isRestoring.value = true; + try { + await saveCurrentLayout(info.key); + } finally { + setTimeout(()=>{ + isSaving.value = false; + isRestoring.value = false; + },700) + } + } else { + console.error('Invalid layout key or operation in progress'); + } +}; +//恢复布局按钮 +const handleRestoreLayout = async (info: MenuInfo) => { + if (typeof info.key === 'string' && !isRestoring.value) { + isRestoring.value = true; + isSaving.value = true; + try { + await restoreSavedLayout(info.key); + } finally { + setTimeout(()=>{ + isSaving.value = false; + isRestoring.value = false; + },700) + } + } else { + console.error('Invalid layout key or operation in progress'); + } +}; + +// 保存当前布局 +const saveCurrentLayout = async (layoutName: string) => { + const savedLayouts = JSON.parse(localStorage.getItem('savedLayouts') || '{}'); + savedLayouts[layoutName] = { + layout: chartOrder.value, + selectedTypes: selectedNeTypes.value + }; + localStorage.setItem('savedLayouts', JSON.stringify(savedLayouts)); + message.success(t('views.perfManage.kpiKeyTarget.saveSuccess', { name: t(`views.perfManage.kpiKeyTarget.${layoutName}`)})); +}; +//恢复已保存的布局 +const restoreSavedLayout = async (layoutName: string) => { + const savedLayouts = JSON.parse(localStorage.getItem('savedLayouts') || '{}'); + const savedLayout = savedLayouts[layoutName]; + if (savedLayout && Array.isArray(savedLayout.selectedTypes) && Array.isArray(savedLayout.layout)) { + selectedNeTypes.value = savedLayout.selectedTypes; + networkElementTypes.value = savedLayout.selectedTypes; + + // 更新布局 + chartOrder.value = savedLayout.layout.filter((item: LayoutItem) => + savedLayout.selectedTypes.includes(item.i) + ); + + // 如果有当前选中的网元类型不在保存的布局中,添加它们 + const missingTypes = savedLayout.selectedTypes.filter((type: AllChartType) => + !chartOrder.value.some(item => item.i === type) + ); + missingTypes.forEach((type: AllChartType) => { + chartOrder.value.push({ + x: (chartOrder.value.length % 2) * 6, + y: Math.floor(chartOrder.value.length / 2) * 4, + w: 6, + h: 4, + i: type, + }); + }); + + localStorage.setItem('chartOrder', JSON.stringify(chartOrder.value)); + localStorage.setItem('selectedNeTypes', JSON.stringify(selectedNeTypes.value)); + + await nextTick(); + await initCharts(); + + message.success(t('views.perfManage.kpiKeyTarget.restoreSavedSuccess', { name: t(`views.perfManage.kpiKeyTarget.${layoutName}`)})); + } else { + message.warning(t('views.perfManage.kpiKeyTarget.noSavedLayout', { name: t(`views.perfManage.kpiKeyTarget.${layoutName}`)})); + } +}; + +// 应用全宽布局 +const applyFullWidthLayout = () => { + isManuallyUpdating.value = true; + const newLayout = selectedNeTypes.value.map((type, index) => ({ + x: 0, + y: index * 8, + w: 12, + h: 8, + i: type, + })); + + nextTick(() => { + Object.assign(chartOrder.value, newLayout) + // chartOrder.value = newLayout; + localStorage.setItem('chartOrder', JSON.stringify(newLayout)); + initCharts(); + // 直接更新图表,不调用 handleLayoutUpdated + chartOrder.value.forEach((item) => { + const state = chartStates[item.i]; + if (state?.chart.value) { + state.chart.value.resize(); + renderChart(item.i); + } + }); + isManuallyUpdating.value = false; + }); +}; + +// 应用两列布局 +const applyTwoColumnLayout = () => { + isManuallyUpdating.value = true; + const newLayout = selectedNeTypes.value.map((type, index) => ({ + x: (index % 2) * 6, + y: Math.floor(index / 2) * 4, + w: 6, + h: 4, + i: type, + })); + nextTick(() => { + // chartOrder.value = newLayout; + Object.assign(chartOrder.value, newLayout) + localStorage.setItem('chartOrder', JSON.stringify(newLayout)); + initCharts(); + // 直接更新图表,不调用 handleLayoutUpdated + chartOrder.value.forEach((item) => { + const state = chartStates[item.i]; + if (state?.chart.value) { + state.chart.value.resize(); + renderChart(item.i); + } + }); + isManuallyUpdating.value = false; + }); +}; +