From b16a91ca749ef63fd156b7d9d5214461c4c915da Mon Sep 17 00:00:00 2001
From: TsMask <340112800@qq.com>
Date: Tue, 5 Aug 2025 11:23:55 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E5=85=B3=E9=97=AD=E7=BD=91=E5=85=83relo?=
=?UTF-8?q?ad=E6=93=8D=E4=BD=9C=EF=BC=8C=E5=8F=AA=E6=9C=89amf=20smf=20upf?=
=?UTF-8?q?=20udm=E5=9B=9B=E4=B8=AA=E7=BD=91=E5=85=83=E6=94=AF=E6=8C=81?=
=?UTF-8?q?=EF=BC=8C=E6=94=B9=E7=94=A8mml=E5=8F=91=E9=80=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/configManage/configParam.ts | 35 -----------------------
src/api/tool/mml.ts | 16 +++++++++++
src/views/ne/neInfo/hooks/useNeOptions.ts | 2 +-
src/views/ne/neInfo/index.vue | 7 +----
4 files changed, 18 insertions(+), 42 deletions(-)
delete mode 100644 src/api/configManage/configParam.ts
create mode 100644 src/api/tool/mml.ts
diff --git a/src/api/configManage/configParam.ts b/src/api/configManage/configParam.ts
deleted file mode 100644
index 494176cb..00000000
--- a/src/api/configManage/configParam.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-import {
- RESULT_CODE_ERROR,
- RESULT_CODE_SUCCESS,
- RESULT_MSG_ERROR,
-} from '@/constants/result-constants';
-import { language, request } from '@/plugins/http-fetch';
-
-/**
- * 更新网元配置重新载入
- * @param neType 网元类型
- * @param neId 网元ID
- * @returns
- */
-export async function updateNeConfigReload(neType: string, neId: string) {
- // 发起请求
- const result = await request({
- url: `/api/rest/operationManagement/v1/elementType/${neType}/objectType/mml?ne_id=${neId}`,
- method: 'POST',
- data: { mml: ['reload'] },
- timeout: 180_000,
- });
- // 解析数据
- if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
- const v = result.data.data[0];
- const str = v.toLowerCase();
- if (str.indexOf('ok') !== -1) {
- delete result.data;
- } else if (str.indexOf('success') !== -1) {
- delete result.data;
- } else {
- return { code: RESULT_CODE_ERROR, msg: RESULT_MSG_ERROR[language] };
- }
- }
- return result;
-}
diff --git a/src/api/tool/mml.ts b/src/api/tool/mml.ts
new file mode 100644
index 00000000..5c7e38c1
--- /dev/null
+++ b/src/api/tool/mml.ts
@@ -0,0 +1,16 @@
+import { request } from '@/plugins/http-fetch';
+
+// 更新网元配置重新载入
+export function updateNeConfigReload(neType: string, neId: string) {
+ return request({
+ url: '/tool/mml/command',
+ method: 'POST',
+ data: {
+ neType: neType,
+ neId: neId,
+ type: 'General',
+ command: ['reload'],
+ },
+ timeout: 180_000,
+ });
+}
diff --git a/src/views/ne/neInfo/hooks/useNeOptions.ts b/src/views/ne/neInfo/hooks/useNeOptions.ts
index 66bbeb27..c1c7a443 100644
--- a/src/views/ne/neInfo/hooks/useNeOptions.ts
+++ b/src/views/ne/neInfo/hooks/useNeOptions.ts
@@ -2,7 +2,7 @@ import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { Modal, message } from 'ant-design-vue/es';
import useI18n from '@/hooks/useI18n';
import { useRouter } from 'vue-router';
-import { updateNeConfigReload } from '@/api/configManage/configParam';
+import { updateNeConfigReload } from '@/api/tool/mml';
import { serviceNeAction } from '@/api/ne/neInfo';
import useMaskStore from '@/store/modules/mask';
diff --git a/src/views/ne/neInfo/index.vue b/src/views/ne/neInfo/index.vue
index 3bada583..82461775 100644
--- a/src/views/ne/neInfo/index.vue
+++ b/src/views/ne/neInfo/index.vue
@@ -588,12 +588,7 @@ onMounted(() => {
{{ t('views.ne.common.stop') }}
-
+
{{ t('views.ne.common.reload') }}