diff --git a/src/views/ne/neInfo/components/OAMModal.vue b/src/views/ne/neInfo/components/OAMModal.vue index 9722da0a..dd770814 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,15 +191,15 @@ watch( :labelWrap="true" >