改动监控页的ws文件

This commit is contained in:
lai
2024-07-01 19:22:31 +08:00
parent 7c420c7c95
commit 60dc02010d
4 changed files with 70 additions and 21 deletions

View File

@@ -21,6 +21,8 @@ import {
neStateRequestMap,
} from './hooks/useTopology';
import { upfTotalFlow, upfTFActive } from './hooks/useUPFTotalFlow';
import { upfWhoId, upfWhoRmUid } from './hooks/useWS';
import { useFullscreen } from '@vueuse/core';
import useWS from './hooks/useWS';
import useAppStore from '@/store/modules/app';
@@ -32,12 +34,12 @@ import useNeInfoStore from '@/store/modules/neinfo';
const router = useRouter();
const appStore = useAppStore();
const { t } = useI18n();
const { wsSend, userActivitySend, upfTFSend } = useWS();
const { wsSend, userActivitySend, upfTFSend, reSendUPF } = useWS();
/**网元参数 */
let neOtions = ref<Record<string, any>[]>([]);
/**网元Id */
/**UPF网元Id */
let neRealId = ref<any>;
/**概览状态类型 */
@@ -193,6 +195,16 @@ function fnToRouter(name: string, query?: any) {
router.push({ name, query });
}
// UPF实时流量下拉框选择
function fnSelectNe(value: any, option: any) {
neRealId = value;
upfWhoId.value = value;
reSendUPF(option.rmUid);
upfTotalFlow.value.map((item: any) => {
item.requestFlag = false;
});
}
onMounted(() => {
fnGetSkim().then(() => {
loadData();
@@ -206,12 +218,14 @@ onMounted(() => {
let arr: Record<string, any>[] = [];
res.data.forEach(i => {
if (i.neType === 'UPF') {
arr.push({ value: i.neId, label: i.neName });
arr.push({ value: i.neId, label: i.neName, rmUid: i.rmUid });
}
});
//arr.push({ value: '002', label: 'UPF_002', rmUid: '4400HXUPF002' });
neOtions.value = arr;
if (arr.length > 0) {
neRealId = arr[0].value;
reSendUPF(arr[0].rmUid);
}
}
} else {
@@ -243,7 +257,9 @@ onBeforeUnmount(() => {
<FullscreenExitOutlined v-if="isFullscreen" />
<FullscreenOutlined v-else />
</div>
<div class="brand-desc">{{ appStore.appName }}</div>
<div class="brand-desc">
{{ appStore.appName }}
</div>
</div>
<div class="column">
@@ -399,7 +415,8 @@ onBeforeUnmount(() => {
v-model:value="neRealId"
:options="neOtions"
class="toDeep"
style="width: 100px; color: #fff;"
style="width: 100px; color: #fff"
@change="fnSelectNe"
/>
</div>
</h3>
@@ -519,8 +536,6 @@ onBeforeUnmount(() => {
</div>
</template>
<style lang="less" scoped>
@import url('./css/index.css');
.toDeep {
@@ -531,11 +546,11 @@ onBeforeUnmount(() => {
background-color: #101129;
}
.toDeep :deep(.ant-select-arrow){
.toDeep :deep(.ant-select-arrow) {
color: #fff;
}
.toDeep :deep(.ant-select-selector){
border:none;
.toDeep :deep(.ant-select-selector) {
border: none;
}
</style>