From 206d3755a035dad4dd8ef46cdeb094dd43c3f879 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Fri, 24 May 2024 16:15:09 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=BD=91=E5=85=83=E5=85=AC=E5=85=B1?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E8=AE=BE=E7=BD=AEomcIP=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ne/neConfPara5G/index.vue | 25 ++++++++++++++++--- .../components/NeInfoConfigPara5G.vue | 16 +++++++++--- 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/src/views/ne/neConfPara5G/index.vue b/src/views/ne/neConfPara5G/index.vue index e57bee7a..5a0e8bf7 100644 --- a/src/views/ne/neConfPara5G/index.vue +++ b/src/views/ne/neConfPara5G/index.vue @@ -4,7 +4,12 @@ import { PageContainer } from 'antdv-pro-layout'; import { message } from 'ant-design-vue/lib'; import { RESULT_CODE_SUCCESS } from '@/constants/result-constants'; import useI18n from '@/hooks/useI18n'; -import { getPara5GFilee, listNeInfo, savePara5GFile } from '@/api/ne/neInfo'; +import { + getPara5GFilee, + listNeInfo, + savePara5GFile, + updateNeInfo, +} from '@/api/ne/neInfo'; import useNeInfoStore from '@/store/modules/neinfo'; const { t } = useI18n(); @@ -20,6 +25,8 @@ type StateType = { syncMsg: string; /**表单数据 */ from: Record; + /**OMC信息,需修改当前的IP */ + omcInfo: Record; /**确定按钮 loading */ confirmLoading: boolean; }; @@ -71,6 +78,7 @@ let state: StateType = reactive({ n3iwf_ip: '172.16.5.230', }, }, + omcInfo: {}, confirmLoading: false, }); @@ -86,7 +94,10 @@ function fnModalOk() { if (state.sync) { state.syncMsg = res.msg; } else { - message.success('Save Success'); + message.success(t('views.ne.neConfPara5G.save')); + // 更新omc_ip + state.omcInfo.ip = state.from.sbi.omc_ip; + updateNeInfo(toRaw(state.omcInfo)); } }) .finally(() => { @@ -128,6 +139,10 @@ function fnGetData() { ) { for (const item of resArr[1].rows) { switch (item.neType) { + case 'OMC': + state.from.sbi.omc_ip = item.ip; + Object.assign(state.omcInfo, item); + break; case 'IMS': state.from.sbi.ims_ip = item.ip; break; @@ -413,7 +428,11 @@ onMounted(() => { :disabled="state.confirmLoading" > - + ; + /**OMC信息,需修改当前的IP */ + omcInfo: Record; /**确定按钮 loading */ confirmLoading: boolean; }; @@ -63,6 +65,7 @@ let state: StateType = reactive({ n3iwf_ip: '172.16.5.230', }, }, + omcInfo: {}, confirmLoading: false, }); @@ -76,9 +79,12 @@ function fnSave() { syncNe: [], }) .then(res => { - if (res.code === RESULT_CODE_SUCCESS) { - message.success('Save Success'); + if (res.code === RESULT_CODE_SUCCESS) { + message.success(t('views.ne.neConfPara5G.save')); state.saveFile = true; + // 更新omc_ip + state.omcInfo.ip = state.from.sbi.omc_ip + updateNeInfo(toRaw(state.omcInfo)); } else { message.warning(res.nsg); } @@ -109,6 +115,10 @@ function fnGetList() { ) { for (const item of resArr[1].rows) { switch (item.neType) { + case 'OMC': + state.from.sbi.omc_ip = item.ip; + Object.assign(state.omcInfo, item); + break; case 'IMS': state.from.sbi.ims_ip = item.ip; break;