fix: 网元公共参数设置omcIP进行更新
This commit is contained in:
@@ -3,7 +3,7 @@ import { Modal, message } from 'ant-design-vue/lib';
|
||||
import { onMounted, reactive, toRaw } from 'vue';
|
||||
import { fnToStepName } from '../hooks/useStep';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import { listNeInfo, getPara5GFilee, savePara5GFile } from '@/api/ne/neInfo';
|
||||
import { listNeInfo, getPara5GFilee, savePara5GFile, updateNeInfo } from '@/api/ne/neInfo';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
const { t } = useI18n();
|
||||
|
||||
@@ -15,6 +15,8 @@ type StateType = {
|
||||
saveFile: boolean;
|
||||
/**表单数据 */
|
||||
from: Record<string, any>;
|
||||
/**OMC信息,需修改当前的IP */
|
||||
omcInfo: Record<string, any>;
|
||||
/**确定按钮 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;
|
||||
|
||||
Reference in New Issue
Block a user