ref: v3变更,,同步v2.2509.2 -250912

This commit is contained in:
TsMask
2025-09-12 18:05:09 +08:00
parent e8e7a97963
commit 54cf296d2f
8 changed files with 34 additions and 19 deletions

View File

@@ -21,6 +21,8 @@ import dayjs, { type Dayjs } from 'dayjs';
import PQueue from 'p-queue';
import saveAs from 'file-saver';
import { useClipboard } from '@vueuse/core';
import { currentCoreUid } from '@/hooks/useCoreUid';
import { WS_GROUP_SGWC_CDR } from '@/constants/ne-constants';
const { copy } = useClipboard({ legacy: true });
const { t } = useI18n();
const neStore = useNeStore();
@@ -53,9 +55,10 @@ let rangePickerPresets = ref([
/**查询参数 */
let queryParams = reactive({
/**网元类型 */
neType: 'SGWC',
neId: '001',
/**核心网标识 */
coreUid: currentCoreUid(),
/**网元标识 */
neUid: undefined,
imsi: '',
msisdn: '',
sortField: 'timestamp',
@@ -414,6 +417,8 @@ const realTimeData = ref<boolean>(false);
function fnRealTime() {
realTimeData.value = !realTimeData.value;
if (realTimeData.value) {
const neUid = queryParams.neUid;
const coreUid = queryParams.coreUid;
tableState.seached = false;
// 建立链接
const options: OptionsType = {
@@ -423,7 +428,7 @@ function fnRealTime() {
*
* CDR会话事件-SGWC (GroupID:1008_neId)
*/
subGroupID: `1008_${queryParams.neId}`,
subGroupID: `${WS_GROUP_SGWC_CDR}_${coreUid}_${neUid}`,
},
onmessage: wsMessage,
onerror: (ev: any) => {
@@ -450,8 +455,10 @@ function wsMessage(res: Record<string, any>) {
if (!data?.groupId) {
return;
}
const neUid = queryParams.neUid;
const coreUid = queryParams.coreUid;
// cdrEvent CDR会话事件
if (data.groupId === `1008_${queryParams.neId}`) {
if (data.groupId === `${WS_GROUP_SGWC_CDR}_${coreUid}_${neUid}`) {
const cdrEvent = data.data;
let cdrJSON = {};
try {
@@ -490,7 +497,7 @@ onMounted(() => {
return;
}
if (neOtions.value.length > 0) {
queryParams.neId = neOtions.value[0].value;
queryParams.neUid = neOtions.value[0].value;
} else {
message.warning({
content: t('common.noData'),
@@ -520,9 +527,9 @@ onBeforeUnmount(() => {
<a-form :model="queryParams" name="queryParams" layout="horizontal">
<a-row :gutter="16">
<a-col :lg="6" :md="12" :xs="24">
<a-form-item label="SGWC" name="neId ">
<a-form-item label="SGWC" name="neUid ">
<a-select
v-model:value="queryParams.neId"
v-model:value="queryParams.neUid"
:options="neOtions"
:placeholder="t('common.selectPlease')"
@change="fnQueryReset()"

View File

@@ -507,6 +507,8 @@ function fnRecordExport(type: string = 'txt') {
const coreUid = queryParams.coreUid;
if (!neUid || !coreUid) return;
const hide = message.loading(t('common.loading'), 0);
queryParams.pageNum = 1;
queryParams.pageSize = tablePagination.total;
exportUDMAuth({ type, coreUid, neUid, imsis: tableState.selectedRowKeys })
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {

View File

@@ -883,6 +883,8 @@ function fnExportList(type: string) {
const coreUid = queryParams.coreUid;
if (!neUid || !coreUid) return;
const hide = message.loading(t('common.loading'), 0);
queryParams.pageNum = 1;
queryParams.pageSize = tablePagination.total;
exportUDMSub(Object.assign({ type: type }, queryParams))
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {

View File

@@ -361,6 +361,8 @@ function fnExportList(type: string) {
const coreUid = queryParams.coreUid;
if (!neUid || !coreUid) return;
const hide = message.loading(t('common.loading'), 0);
queryParams.pageNum = 1;
queryParams.pageSize = tablePagination.total;
exportUDMVoIP(Object.assign({ type: type }, queryParams))
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {

View File

@@ -447,6 +447,8 @@ function fnExportList(type: string) {
const coreUid = queryParams.coreUid;
if (!neUid || !coreUid) return;
const hide = message.loading(t('common.loading'), 0);
queryParams.pageNum = 1;
queryParams.pageSize = tablePagination.total;
exportUDMVolteIMS(Object.assign({ type: type }, queryParams))
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
@@ -454,7 +456,7 @@ function fnExportList(type: string) {
content: t('common.operateOk'),
duration: 2,
});
saveAs(res.data, `UDM_VOLTE_${Date.now()}.${type}`);
saveAs(res.data, `UDM_VoLTE_${Date.now()}.${type}`);
} else {
message.error({
content: `${res.msg}`,

View File

@@ -234,7 +234,7 @@ let modalState: ModalStateType = reactive({
title: '菜单',
from: {
menuId: undefined,
parentId: '0',
parentId: 0,
menuName: '',
menuSort: 0,
menuType: MENU_TYPE_BUTTON,
@@ -474,7 +474,7 @@ function fnGetList() {
// 转换树状数据
treeDataAll = [
{
menuId: '0',
menuId: 0,
menuName: t('views.system.dept.node'),
children: parseDataToTreeExclude(
data,