From d09a0c97433012a135443e094e82feaa47102337 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Mon, 6 Nov 2023 14:42:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8F=82=E6=95=B0=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E9=9A=90=E8=97=8F=E9=87=8D=E6=96=B0=E8=BD=BD=E5=85=A5=E5=B9=B6?= =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E7=BD=91=E5=85=83=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/locales/en-US.ts | 1 + src/i18n/locales/zh-CN.ts | 1 + src/views/configManage/configParam/index.vue | 2 +- src/views/configManage/neManage/index.vue | 53 +++++++++++++++++--- 4 files changed, 50 insertions(+), 7 deletions(-) diff --git a/src/i18n/locales/en-US.ts b/src/i18n/locales/en-US.ts index 3651dad6..da57fdff 100644 --- a/src/i18n/locales/en-US.ts +++ b/src/i18n/locales/en-US.ts @@ -114,6 +114,7 @@ export default { }, configManage: { neManage: { + reload: '重载配置', restart: 'Restart', stop: 'Stop', start: 'Start', diff --git a/src/i18n/locales/zh-CN.ts b/src/i18n/locales/zh-CN.ts index 99014206..cda9213e 100644 --- a/src/i18n/locales/zh-CN.ts +++ b/src/i18n/locales/zh-CN.ts @@ -114,6 +114,7 @@ export default { }, configManage: { neManage: { + reload: '重载配置', restart: '重启', stop: '停止', start: '启动', diff --git a/src/views/configManage/configParam/index.vue b/src/views/configManage/configParam/index.vue index 5c6a3ca8..a8192f02 100644 --- a/src/views/configManage/configParam/index.vue +++ b/src/views/configManage/configParam/index.vue @@ -1087,7 +1087,7 @@ onMounted(() => { ) { }); } +/**网元重新加载 */ +function fnNeReload(row: Record) { + Modal.confirm({ + title: '提示', + content: `确认重新载入编号为 【${row.neName}】 的网元配置?`, + onOk() { + const key = 'stopNf'; + message.loading({ content: '请稍等...', key }); + updateNeConfigReload(row.neType, row.neId).then(res => { + if (res.code === RESULT_CODE_SUCCESS) { + message.success({ + content: `网元重新加载完成`, + key, + duration: 2, + }); + } else { + message.error({ + content: `${res.msg}`, + key: key, + duration: 2, + }); + } + }); + }, + }); +} + /** * 记录多项选择 */ function fnRecordMore(type: string | number, row: Record) { if (type === 'delete') { fnRecordDelete(row); - return + return; } if (type === 'export') { @@ -593,6 +621,10 @@ function fnRecordMore(type: string | number, row: Record) { fnRecordStop(row); } + if (type === 'reload') { + fnNeReload(row); + } + if (type === 'import') { modalState.importFrom = Object.assign(modalState.importFrom, row); modalState.title = '导入'; @@ -604,7 +636,7 @@ function fnRecordMore(type: string | number, row: Record) { function fnGetList(pageNum?: number) { if (tableState.loading) return; tableState.loading = true; - if(pageNum){ + if (pageNum) { queryParams.pageNum = pageNum; } listNeInfo(toRaw(queryParams)).then(res => { @@ -765,7 +797,7 @@ onMounted(() => { :data-source="tableState.data" :size="tableState.size" :pagination="tablePagination" - :scroll="{ x: 2000, y:400 }" + :scroll="{ x: 2000, y: 400 }" >