diff --git a/src/i18n/locales/zh-CN.ts b/src/i18n/locales/zh-CN.ts index 0b2a6cbb..532a3a23 100644 --- a/src/i18n/locales/zh-CN.ts +++ b/src/i18n/locales/zh-CN.ts @@ -415,10 +415,10 @@ export default { userTitle:'用户信息', imsUeNum: "IMS 会话数", smfUeNum: "Data 会话数", - gnbBase: "5G 基站数", + gnbBase: "5G 基站在线数", gnbSumBase: "5G 基站总数", gnbUeNum:'5G 用户数', - enbBase: "4G 基站数", + enbBase: "4G 基站在线数", enbSumBase: "4G 基站总数", enbUeNum:'4G 用户数', baseTitle:'在线信息', diff --git a/src/views/dashboard/overview2/components/AlarnTypeBar/index.vue b/src/views/dashboard/overview2/components/AlarnTypeBar/index.vue index 2fc3a9d1..c72fa098 100644 --- a/src/views/dashboard/overview2/components/AlarnTypeBar/index.vue +++ b/src/views/dashboard/overview2/components/AlarnTypeBar/index.vue @@ -78,9 +78,9 @@ const alarmTypeType = ref([ /**告警类型Top数据 */ const alarmTypeTypeTop = ref([ - { name: 'AMF', value: 0 }, - { name: 'UDM', value: 0 }, - { name: 'SMF', value: 0 }, + { neType: 'AMF', total: 0 }, + { neType: 'UDM', total: 0 }, + { neType: 'SMF', total: 0 }, ]); // @@ -92,7 +92,8 @@ function initPicture() { if (res0.code === RESULT_CODE_SUCCESS && Array.isArray(res0.data)) { for (const item of res0.data) { let index = 0; - switch (item.name) { + console.log(res0) + switch (item.severity) { case 'Critical': index = 0; break; @@ -109,20 +110,24 @@ function initPicture() { // index = 4; // break; } - alarmTypeType.value[index].value = Number(item.value); + alarmTypeType.value[index].value = Number(item.total); + console.log(item) + console.log(alarmTypeType.value[0]) + } + } } if (resArr[1].status === 'fulfilled') { const res1 = resArr[1].value; if (res1.code === RESULT_CODE_SUCCESS && Array.isArray(res1.data)) { - alarmTypeTypeTop.value = alarmTypeTypeTop.value - .concat(res1.data) - .sort((a: any, b: any) => { - return b.value - a.value; - }) + console.log(res1.data) + alarmTypeTypeTop.value = res1.data + .sort((a: any, b: any) => b.value - a.value) .slice(0, 3); } + console.log(alarmTypeTypeTop.value) + } }) .then(() => { @@ -166,7 +171,7 @@ function initPicture() { realValue = alarmTypeType.value[param.dataIndex]?.value || 0; } else if (param.seriesIndex === 1) { // 第二个系列(Top3) - realValue = alarmTypeTypeTop.value[param.dataIndex]?.value || 0; + realValue = alarmTypeTypeTop.value[param.dataIndex]?.total || 0; } return `${param.name}: ${realValue}`; } @@ -206,7 +211,7 @@ function initPicture() { { type: 'category', gridIndex: 1, - data: alarmTypeTypeTop.value.map((item: any) => item.name), + data: alarmTypeTypeTop.value.map((item: any) => item.neType), axisLabel: { color: '#fff', fontSize: 12, @@ -304,11 +309,11 @@ function initPicture() { fontSize: 14, formatter: (params: any) => { // 如果是最小值0.1,显示为0 - const realValue = alarmTypeTypeTop.value[params.dataIndex]?.value || 0; + const realValue = alarmTypeTypeTop.value[params.dataIndex]?.total || 0; return `${realValue}`; } }, - data: alarmTypeTypeTop.value.map((item: any) => Math.max(item.value || 0, 0.1)), + data: alarmTypeTypeTop.value.map((item: any) => Math.max(item.total || 0, 0.1)), zlevel: 1 } ]