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;