添加统计数
This commit is contained in:
@@ -62,10 +62,9 @@ export async function listUE(query: Record<string, any>) {
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//
|
||||
/**
|
||||
* 查询SMF在线用户数
|
||||
* 首页查询SMF在线用户数
|
||||
* @param query 查询参数
|
||||
* @returns neId
|
||||
*/
|
||||
@@ -74,16 +73,10 @@ export async function listUENum(neId: String) {
|
||||
url: `/api/rest/ueManagement/v1/elementType/smf/objectType/ueNum?neId=${neId}`,
|
||||
method: 'get',
|
||||
});
|
||||
let data: DataList = {
|
||||
total: 0,
|
||||
rows: [],
|
||||
code: result.code,
|
||||
msg: result.msg,
|
||||
};
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
|
||||
const rows = parseObjLineToHump(result.data.data);
|
||||
data.total = rows.length;
|
||||
data.rows = rows;
|
||||
if (result.code === RESULT_CODE_SUCCESS) {
|
||||
let data = result.data.data;
|
||||
return Object.assign(result, {
|
||||
data: parseObjLineToHump(data['ueNum']),
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,11 +10,14 @@ import AlarnTypeBar from './components/AlarnTypeBar/index.vue';
|
||||
import UPFFlow from './components/UPFFlow/index.vue';
|
||||
import { listSub } from '@/api/neUser/sub';
|
||||
import { listUENum } from '@/api/neUser/ue';
|
||||
import { listBase5G } from '@/api/neUser/base5G';
|
||||
|
||||
import { graphNodeClickID } from './hooks/useTopology';
|
||||
import { upfTotalFlow, upfTFActive } from './hooks/useUPFTotalFlow';
|
||||
import { useFullscreen } from '@vueuse/core';
|
||||
import useWS from './hooks/useWS';
|
||||
import useAppStore from '@/store/modules/app';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
const appStore = useAppStore();
|
||||
const { t } = useI18n();
|
||||
const { wsSend, cdrEventSend, ueEventSend, upfTFSend } = useWS();
|
||||
@@ -23,16 +26,16 @@ const { wsSend, cdrEventSend, ueEventSend, upfTFSend } = useWS();
|
||||
let onlineInfo: {
|
||||
/**签约用户数量 */
|
||||
subNum: number;
|
||||
/**告警清除类型 */
|
||||
/**在线用户数 */
|
||||
ueNum: any;
|
||||
/**告警清除类型 */
|
||||
activeAckState: DictType[];
|
||||
/**基站数量 */
|
||||
nbNum: number;
|
||||
/**原始严重程度 */
|
||||
activeAlarmSeverity: DictType[];
|
||||
} = reactive({
|
||||
subNum: 0,
|
||||
ueNum: 0,
|
||||
activeAckState: [],
|
||||
nbNum: 0,
|
||||
activeAlarmSeverity: [],
|
||||
});
|
||||
|
||||
@@ -49,14 +52,34 @@ onMounted(() => {
|
||||
pageNum: '1',
|
||||
pageSize: '20',
|
||||
}),
|
||||
listBase5G({
|
||||
//
|
||||
neName: 'AMF',
|
||||
id: '001',
|
||||
pageNum: 1,
|
||||
/**每页条数 */
|
||||
pageSize: 20,
|
||||
}),
|
||||
listUENum('001'),
|
||||
])
|
||||
.then(resArr => {
|
||||
if (resArr[0].status === 'fulfilled') {
|
||||
onlineInfo.subNum = resArr[0].value.total;
|
||||
}
|
||||
if (resArr[1].status === 'fulfilled') {
|
||||
console.log(resArr);
|
||||
|
||||
if (
|
||||
resArr[1].status === 'fulfilled' &&
|
||||
resArr[1].value.code === RESULT_CODE_SUCCESS &&
|
||||
Array.isArray(resArr[1].value.rows)
|
||||
) {
|
||||
onlineInfo.nbNum = resArr[1].value.rows.length;
|
||||
}
|
||||
|
||||
if (
|
||||
resArr[2].status === 'fulfilled' &&
|
||||
resArr[2].value?.code === RESULT_CODE_SUCCESS
|
||||
) {
|
||||
onlineInfo.ueNum = resArr[2].value?.data;
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
@@ -100,7 +123,7 @@ onMounted(() => {
|
||||
</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<h4>1000</h4>
|
||||
<h4>{{ onlineInfo.ueNum }}</h4>
|
||||
<span>
|
||||
<UserSwitchOutlined style="color: #6acca3" />
|
||||
{{ t('views.dashboard.overview.skim.session') }}
|
||||
@@ -114,7 +137,7 @@ onMounted(() => {
|
||||
</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<h4>2</h4>
|
||||
<h4>{{ onlineInfo.nbNum }}</h4>
|
||||
<span>
|
||||
<WifiOutlined style="color: #edcb35" />
|
||||
{{ t('views.dashboard.overview.skim.base') }}
|
||||
|
||||
Reference in New Issue
Block a user