diff --git a/src/i18n/locales/en-US.ts b/src/i18n/locales/en-US.ts index 0e921ae8..0af81942 100644 --- a/src/i18n/locales/en-US.ts +++ b/src/i18n/locales/en-US.ts @@ -511,7 +511,7 @@ export default { delTip: 'Confirm deletion of network element information data items?', oam: { title: 'OAM Configuration', - sync: 'Sync to NE', + restart: 'Restart NE', oamEnable: 'Service', oamPort: 'Port', snmpEnable: 'Service', diff --git a/src/i18n/locales/zh-CN.ts b/src/i18n/locales/zh-CN.ts index 27340829..86fdbf9a 100644 --- a/src/i18n/locales/zh-CN.ts +++ b/src/i18n/locales/zh-CN.ts @@ -511,7 +511,7 @@ export default { delTip: '确认删除网元信息数据项吗?', oam: { title: 'OAM配置', - sync: '同步到网元', + restart: '下发后重启网元', oamEnable: '服务', oamPort: '端口', snmpEnable: '服务', diff --git a/src/views/ne/neInfo/components/OAMModal.vue b/src/views/ne/neInfo/components/OAMModal.vue index 9722da0a..4cb56fe4 100644 --- a/src/views/ne/neInfo/components/OAMModal.vue +++ b/src/views/ne/neInfo/components/OAMModal.vue @@ -4,7 +4,7 @@ import { ProModal } from 'antdv-pro-modal'; import { message, Form } from 'ant-design-vue/es'; import useI18n from '@/hooks/useI18n'; import { RESULT_CODE_SUCCESS } from '@/constants/result-constants'; -import { getOAMFile, saveOAMFile } from '@/api/ne/neInfo'; +import { getOAMFile, saveOAMFile, serviceNeAction } from '@/api/ne/neInfo'; const { t } = useI18n(); const emit = defineEmits(['ok', 'cancel', 'update:open']); const props = defineProps({ @@ -29,8 +29,8 @@ type ModalStateType = { openByEdit: boolean; /**标题 */ title: string; - /**是否同步 */ - sync: boolean; + /**是否重启 */ + restart: boolean; /**表单数据 */ from: Record; /**确定按钮 loading */ @@ -41,7 +41,7 @@ type ModalStateType = { let modalState: ModalStateType = reactive({ openByEdit: false, title: 'OAM Configuration', - sync: true, + restart: false, from: { omcIP: '', oamEnable: true, @@ -114,12 +114,19 @@ function fnModalOk() { neType: props.neType, neId: props.neId, content: from, - sync: modalState.sync, + sync: true, }) .then(res => { if (res.code === RESULT_CODE_SUCCESS) { message.success(t('common.operateOk'), 3); emit('ok'); + if (modalState.restart) { + serviceNeAction({ + neType: props.neType, + neId: props.neId, + action: 'restart', + }); + } fnModalCancel(); } else { message.error({ @@ -145,6 +152,7 @@ function fnModalOk() { function fnModalCancel() { modalState.openByEdit = false; modalState.confirmLoading = false; + modalState.restart = false; modalStateFrom.resetFields(); emit('cancel'); emit('update:open', false); @@ -183,7 +191,7 @@ watch( :labelWrap="true" >