fix: 参数配置隐藏重新载入并移动网元管理

This commit is contained in:
TsMask
2023-11-06 14:42:13 +08:00
parent ca0913a8cf
commit d09a0c9743
4 changed files with 50 additions and 7 deletions

View File

@@ -114,6 +114,7 @@ export default {
}, },
configManage: { configManage: {
neManage: { neManage: {
reload: '重载配置',
restart: 'Restart', restart: 'Restart',
stop: 'Stop', stop: 'Stop',
start: 'Start', start: 'Start',

View File

@@ -114,6 +114,7 @@ export default {
}, },
configManage: { configManage: {
neManage: { neManage: {
reload: '重载配置',
restart: '重启', restart: '重启',
stop: '停止', stop: '停止',
start: '启动', start: '启动',

View File

@@ -1087,7 +1087,7 @@ onMounted(() => {
<a-space <a-space
:size="8" :size="8"
align="center" align="center"
v-show="!['PCF', 'IMS'].includes(neTypeSelect[0])" v-if="false"
> >
<a-popconfirm <a-popconfirm
placement="topLeft" placement="topLeft"

View File

@@ -24,6 +24,7 @@ import { FileType } from 'ant-design-vue/lib/upload/interface';
import { UploadRequestOption } from 'ant-design-vue/lib/vc-upload/interface'; import { UploadRequestOption } from 'ant-design-vue/lib/vc-upload/interface';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants'; import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import useNeInfoStore from '@/store/modules/neinfo'; import useNeInfoStore from '@/store/modules/neinfo';
import { updateNeConfigReload } from '@/api/configManage/configParam';
const { t } = useI18n(); const { t } = useI18n();
/**表格所需option */ /**表格所需option */
@@ -568,13 +569,40 @@ function fnRecordStop(row: Record<string, any>) {
}); });
} }
/**网元重新加载 */
function fnNeReload(row: Record<string, any>) {
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<string, any>) { function fnRecordMore(type: string | number, row: Record<string, any>) {
if (type === 'delete') { if (type === 'delete') {
fnRecordDelete(row); fnRecordDelete(row);
return return;
} }
if (type === 'export') { if (type === 'export') {
@@ -593,6 +621,10 @@ function fnRecordMore(type: string | number, row: Record<string, any>) {
fnRecordStop(row); fnRecordStop(row);
} }
if (type === 'reload') {
fnNeReload(row);
}
if (type === 'import') { if (type === 'import') {
modalState.importFrom = Object.assign(modalState.importFrom, row); modalState.importFrom = Object.assign(modalState.importFrom, row);
modalState.title = '导入'; modalState.title = '导入';
@@ -604,7 +636,7 @@ function fnRecordMore(type: string | number, row: Record<string, any>) {
function fnGetList(pageNum?: number) { function fnGetList(pageNum?: number) {
if (tableState.loading) return; if (tableState.loading) return;
tableState.loading = true; tableState.loading = true;
if(pageNum){ if (pageNum) {
queryParams.pageNum = pageNum; queryParams.pageNum = pageNum;
} }
listNeInfo(toRaw(queryParams)).then(res => { listNeInfo(toRaw(queryParams)).then(res => {
@@ -765,7 +797,7 @@ onMounted(() => {
:data-source="tableState.data" :data-source="tableState.data"
:size="tableState.size" :size="tableState.size"
:pagination="tablePagination" :pagination="tablePagination"
:scroll="{ x: 2000, y:400 }" :scroll="{ x: 2000, y: 400 }"
> >
<template #bodyCell="{ column, record }"> <template #bodyCell="{ column, record }">
<template v-if="column.key === 'id'"> <template v-if="column.key === 'id'">
@@ -780,8 +812,13 @@ onMounted(() => {
</a-button> </a-button>
</a-tooltip> </a-tooltip>
<a-tooltip> <a-tooltip>
<template #title>{{ t('views.configManage.neManage.restart') }}</template> <template #title>{{
<a-button type="link" @click.prevent="fnRecordMore('restart', record)"> t('views.configManage.neManage.restart')
}}</template>
<a-button
type="link"
@click.prevent="fnRecordMore('restart', record)"
>
<template #icon><UndoOutlined /></template> <template #icon><UndoOutlined /></template>
</a-button> </a-button>
</a-tooltip> </a-tooltip>
@@ -812,6 +849,10 @@ onMounted(() => {
<pause-outlined /> <pause-outlined />
{{ t('views.configManage.neManage.stop') }} {{ t('views.configManage.neManage.stop') }}
</a-menu-item> </a-menu-item>
<a-menu-item key="reload">
<SyncOutlined />
{{ t('views.configManage.neManage.reload') }}
</a-menu-item>
<a-menu-item key="delete"> <a-menu-item key="delete">
<DeleteOutlined /> <DeleteOutlined />
{{ t('common.deleteText') }} {{ t('common.deleteText') }}