fix: 网元公共参数设置omcIP进行更新
This commit is contained in:
@@ -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<string, any>;
|
||||
/**OMC信息,需修改当前的IP */
|
||||
omcInfo: Record<string, any>;
|
||||
/**确定按钮 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"
|
||||
></a-switch>
|
||||
</a-form-item>
|
||||
<a-form-item :label="t('views.ne.neConfPara5G.syncNe')" name="syncNe" v-if="state.sync">
|
||||
<a-form-item
|
||||
:label="t('views.ne.neConfPara5G.syncNe')"
|
||||
name="syncNe"
|
||||
v-if="state.sync"
|
||||
>
|
||||
<a-select
|
||||
v-model:value="state.syncNe"
|
||||
mode="multiple"
|
||||
|
||||
@@ -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