From 38ea54f41a4f712c453740ed9cab90ac01dd9b85 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Wed, 26 Mar 2025 16:32:10 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=9C=8B=E6=9D=BF=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E6=95=B0=E5=88=87=E6=8D=A2=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/dashboard/overview/index.vue | 81 +++++++++++++++++++++----- 1 file changed, 67 insertions(+), 14 deletions(-) diff --git a/src/views/dashboard/overview/index.vue b/src/views/dashboard/overview/index.vue index a6771975..bf22122c 100644 --- a/src/views/dashboard/overview/index.vue +++ b/src/views/dashboard/overview/index.vue @@ -104,16 +104,16 @@ function fnGetNeState() { /**获取概览信息 */ async function fnGetSkim() { const neHandlers = new Map([ - [ - 'UDM', - { - request: (neId: string) => - listUDMSub({ neId: neId, pageNum: 1, pageSize: 1 }), - process: (res: any) => - res.code === RESULT_CODE_SUCCESS && - (skimState.udmSubNum += res.data.total), - }, - ], + // [ + // 'UDM', + // { + // request: (neId: string) => + // listUDMSub({ neId: neId, pageNum: 1, pageSize: 1 }), + // process: (res: any) => + // res.code === RESULT_CODE_SUCCESS && + // (skimState.udmSubNum += res.data.total), + // }, + // ], [ 'SMF', { @@ -206,6 +206,13 @@ async function fnGetSkim() { requests[index].process(result.value); } }); + + // UDM + listUDMSub({ neId: udmNeId.value, pageNum: 1, pageSize: 1 }).then(res => { + if (res.code === RESULT_CODE_SUCCESS) { + skimState.udmSubNum = res.data.total; + } + }); } /**初始数据函数 */ @@ -261,6 +268,18 @@ function fnSelectNe(value: any, option: any) { // loadData(); } +let udmNeId = ref('001'); +let udmOtions = ref[]>([]); +/**用户数量-选择UDM */ +function fnSelectUDM(e: any) { + udmNeId.value = e.key; + listUDMSub({ neId: udmNeId.value, pageNum: 1, pageSize: 1 }).then(res => { + if (res.code === RESULT_CODE_SUCCESS) { + skimState.udmSubNum = res.data.total; + } + }); +} + // 定义一个方法返回 views 容器 const getPopupContainer = () => { // 使用 ref 或其他方式来引用你的 views 容器 @@ -275,19 +294,31 @@ onMounted(() => { .then(res => { if (res.code === RESULT_CODE_SUCCESS) { if (res.data.length > 0) { + // UPF let arr: Record[] = []; res.data.forEach((v: any) => { if (v.neType === 'UPF') { arr.push({ value: v.neId, label: v.neName, rmUid: v.rmUid }); } }); - neOtions.value = arr; if (arr.length > 0) { //queryParams.neRealId = arr[0].value; fnSelectNe(arr[0].value, arr[0]); } + // UDM + let arr1: Record[] = []; + res.data.forEach((v: any) => { + if (v.neType === 'UDM') { + arr1.push({ value: v.neId, label: v.neName, rmUid: v.rmUid }); + } + }); + udmOtions.value = arr1; + if (arr1.length > 0) { + fnSelectUDM(arr1[0].value); + } + // 过滤不可用的网元 neCascaderOptions.value = neInfoStore.getNeCascaderOptions.filter( (item: any) => { @@ -352,17 +383,28 @@ onBeforeUnmount(() => {
-
+
{{ skimState.udmSubNum }}
- {{ t('views.dashboard.overview.skim.users') }} + +
+ {{ t('views.dashboard.overview.skim.users') }} + +
+ +
{ .toDeep :deep(.ant-select-selection-item) { color: #fff; } + +.toDeep-text { + color: #4c9bfd !important; + font-size: 0.844rem !important; + position: relative !important; + line-height: 2rem !important; + white-space: nowrap !important; + text-align: start !important; + text-overflow: ellipsis !important; + overflow: hidden !important; +}