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: {
neManage: {
reload: '重载配置',
restart: 'Restart',
stop: 'Stop',
start: 'Start',

View File

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

View File

@@ -1087,7 +1087,7 @@ onMounted(() => {
<a-space
:size="8"
align="center"
v-show="!['PCF', 'IMS'].includes(neTypeSelect[0])"
v-if="false"
>
<a-popconfirm
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 { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import useNeInfoStore from '@/store/modules/neinfo';
import { updateNeConfigReload } from '@/api/configManage/configParam';
const { t } = useI18n();
/**表格所需option */
@@ -111,7 +112,7 @@ let tableColumns: ColumnsType = [
dataIndex: 'ip',
align: 'center',
width: 5,
},
},
{
title: '端口',
dataIndex: 'port',
@@ -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>) {
if (type === 'delete') {
fnRecordDelete(row);
return
return;
}
if (type === 'export') {
@@ -593,6 +621,10 @@ function fnRecordMore(type: string | number, row: Record<string, any>) {
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<string, any>) {
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 }"
>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'id'">
@@ -780,8 +812,13 @@ onMounted(() => {
</a-button>
</a-tooltip>
<a-tooltip>
<template #title>{{ t('views.configManage.neManage.restart') }}</template>
<a-button type="link" @click.prevent="fnRecordMore('restart', record)">
<template #title>{{
t('views.configManage.neManage.restart')
}}</template>
<a-button
type="link"
@click.prevent="fnRecordMore('restart', record)"
>
<template #icon><UndoOutlined /></template>
</a-button>
</a-tooltip>
@@ -812,6 +849,10 @@ onMounted(() => {
<pause-outlined />
{{ t('views.configManage.neManage.stop') }}
</a-menu-item>
<a-menu-item key="reload">
<SyncOutlined />
{{ t('views.configManage.neManage.reload') }}
</a-menu-item>
<a-menu-item key="delete">
<DeleteOutlined />
{{ t('common.deleteText') }}