---用户管理,网元管理等中英文
This commit is contained in:
@@ -84,75 +84,65 @@ let tableState: TabeStateType = reactive({
|
||||
/**表格字段列 */
|
||||
let tableColumns: ColumnsType = [
|
||||
{
|
||||
title: '网元类型',
|
||||
title: t('views.configManage.neManage.neType'),
|
||||
dataIndex: 'neType',
|
||||
align: 'center',
|
||||
width: 3,
|
||||
},
|
||||
{
|
||||
title: '网元内部标识',
|
||||
title: t('views.configManage.neManage.neId'),
|
||||
dataIndex: 'neId',
|
||||
align: 'center',
|
||||
width: 3,
|
||||
},
|
||||
{
|
||||
title: '资源唯一标识',
|
||||
title: t('views.configManage.neManage.uid'),
|
||||
dataIndex: 'rmUid',
|
||||
align: 'center',
|
||||
width: 5,
|
||||
},
|
||||
{
|
||||
title: '网元名称',
|
||||
title: t('views.configManage.neManage.neName'),
|
||||
dataIndex: 'neName',
|
||||
align: 'center',
|
||||
width: 5,
|
||||
},
|
||||
{
|
||||
title: 'IP地址',
|
||||
title: t('views.configManage.neManage.ip'),
|
||||
dataIndex: 'ip',
|
||||
align: 'center',
|
||||
width: 5,
|
||||
},
|
||||
{
|
||||
title: '端口',
|
||||
title: t('views.configManage.neManage.port'),
|
||||
dataIndex: 'port',
|
||||
align: 'center',
|
||||
width: 3,
|
||||
},
|
||||
{
|
||||
title: '网元虚拟化标识',
|
||||
title: t('views.configManage.neManage.pvflag'),
|
||||
dataIndex: 'pvFlag',
|
||||
align: 'center',
|
||||
width: 5,
|
||||
},
|
||||
{
|
||||
title: '网元所在省份',
|
||||
title: t('views.configManage.neManage.province'),
|
||||
dataIndex: 'province',
|
||||
align: 'center',
|
||||
width: 5,
|
||||
},
|
||||
{
|
||||
title: '厂商名称',
|
||||
title: t('views.configManage.neManage.vendorName'),
|
||||
dataIndex: 'vendorName',
|
||||
align: 'center',
|
||||
width: 5,
|
||||
},
|
||||
{
|
||||
title: '网络标识',
|
||||
title: t('views.configManage.neManage.dn'),
|
||||
dataIndex: 'dn',
|
||||
align: 'center',
|
||||
width: 5,
|
||||
},
|
||||
{
|
||||
title: '修改时间',
|
||||
dataIndex: 'updateTime',
|
||||
align: 'center',
|
||||
customRender(opt) {
|
||||
if (!opt.value) return '';
|
||||
return parseDateToStr(opt.value);
|
||||
},
|
||||
width: 5,
|
||||
},
|
||||
{
|
||||
title: t('common.operate'),
|
||||
key: 'id',
|
||||
@@ -247,13 +237,13 @@ let modalState: ModalStateType = reactive({
|
||||
const modalStateFrom = Form.useForm(
|
||||
modalState.from,
|
||||
reactive({
|
||||
neType: [{ required: true, message: '网元类型不能为空' }],
|
||||
neId: [{ required: true, message: '网元内部标识不能为空' }],
|
||||
rmUid: [{ required: true, message: '资源唯一标识不能为空' }],
|
||||
ip: [{ required: true, message: 'IP地址不能为空' }],
|
||||
port: [{ required: true, message: '端口不能为空' }],
|
||||
pvFlag: [{ required: true, message: '请选择网元虚拟化标识' }],
|
||||
neName: [{ required: true, message: '网元名称不能为空' }],
|
||||
neType: [{ required: true, message: t("views.configManage.neManage.neType")+ t("common.unableNull")}],
|
||||
neId: [{ required: true, message: t("views.configManage.neManage.neId")+ t("common.unableNull") }],
|
||||
rmUid: [{ required: true, message: t("views.configManage.neManage.uid")+ t("common.unableNull") }],
|
||||
ip: [{ required: true, message: t("views.configManage.neManage.ip")+ t("common.unableNull") }],
|
||||
port: [{ required: true, message: t("views.configManage.neManage.port")+ t("common.unableNull") }],
|
||||
pvFlag: [{ required: true, message: t("views.configManage.neManage.pvflag")+ t("common.unableNull")}],
|
||||
neName: [{ required: true, message: t("views.configManage.neManage.neName")+ t("common.unableNull") }],
|
||||
})
|
||||
);
|
||||
|
||||
@@ -289,7 +279,7 @@ const importStateFrom = Form.useForm(
|
||||
function fnModalVisibleByEdit(row?: Record<string, any>) {
|
||||
if (!row) {
|
||||
modalStateFrom.resetFields();
|
||||
modalState.title = '添加网元';
|
||||
modalState.title = t('views.configManage.neManage.addNe');
|
||||
modalState.visibleByEdit = true;
|
||||
} else {
|
||||
if (modalState.confirmLoading) return;
|
||||
@@ -300,10 +290,10 @@ function fnModalVisibleByEdit(row?: Record<string, any>) {
|
||||
hide();
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
modalState.from = Object.assign(modalState.from, res.data);
|
||||
modalState.title = '修改网元';
|
||||
modalState.title = t('views.configManage.neManage.editNe');
|
||||
modalState.visibleByEdit = true;
|
||||
} else {
|
||||
message.error(`获取网元信息失败`, 2);
|
||||
message.error(t('views.configManage.neManage.getInfo'), 2);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -422,15 +412,15 @@ function fnModalCancel() {
|
||||
*/
|
||||
function fnRecordDelete(row: Record<string, any>) {
|
||||
Modal.confirm({
|
||||
title: '提示',
|
||||
content: `确认删除网元编号为 【${row.neName}】 的数据项?`,
|
||||
title: t('common.tipTitle'),
|
||||
content: t('views.configManage.neManage.delSure', { msg: row.neName }),
|
||||
onOk() {
|
||||
const key = 'delNotice';
|
||||
message.loading({ content: '请稍等...', key });
|
||||
message.loading({ content: t('common.loading'), key });
|
||||
delNeInfo(row).then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
message.success({
|
||||
content: `删除成功`,
|
||||
content: t('common.msgSuccess', { msg: t('common.deleteText ') }),
|
||||
key,
|
||||
duration: 2,
|
||||
});
|
||||
@@ -455,15 +445,15 @@ function fnRecordDelete(row: Record<string, any>) {
|
||||
*/
|
||||
function fnRecordExport(row: Record<string, any>) {
|
||||
Modal.confirm({
|
||||
title: '提示',
|
||||
content: `确认导出网元编号为 【${row.neName}】 的配置信息?`,
|
||||
title: t('common.tipTitle'),
|
||||
content: t('views.configManage.neManage.exportSure', { msg: row.neName }),
|
||||
onOk() {
|
||||
const key = 'exportSet';
|
||||
message.loading({ content: '请稍等...', key });
|
||||
message.loading({ content: t('common.loading'), key });
|
||||
exportSet(row).then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
message.success({
|
||||
content: `导出成功,请到备份管理进行下载`,
|
||||
content: t('views.configManage.neManage.exportTip'),
|
||||
key,
|
||||
duration: 2,
|
||||
});
|
||||
@@ -485,15 +475,20 @@ function fnRecordExport(row: Record<string, any>) {
|
||||
*/
|
||||
function fnRecordRestart(row: Record<string, any>) {
|
||||
Modal.confirm({
|
||||
title: '提示',
|
||||
content: `确认重启网元编号为 【${row.neName}】 的网元?`,
|
||||
title: t('common.tipTitle'),
|
||||
content: t('views.configManage.neManage.totalSure', {
|
||||
msg: row.neName,
|
||||
oper: t('views.configManage.neManage.restart'),
|
||||
}),
|
||||
onOk() {
|
||||
const key = 'restartNf';
|
||||
message.loading({ content: '请稍等...', key });
|
||||
message.loading({ content: t('common.loading'), key });
|
||||
restartNf(row).then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
message.success({
|
||||
content: `重启执行成功`,
|
||||
content: t('common.msgSuccess', {
|
||||
msg: t('views.configManage.neManage.restart'),
|
||||
}),
|
||||
key,
|
||||
duration: 2,
|
||||
});
|
||||
@@ -515,15 +510,20 @@ function fnRecordRestart(row: Record<string, any>) {
|
||||
*/
|
||||
function fnRecordStart(row: Record<string, any>) {
|
||||
Modal.confirm({
|
||||
title: '提示',
|
||||
content: `确认启动网元编号为 【${row.neName}】 的网元?`,
|
||||
title: t('common.tipTitle'),
|
||||
content: t('views.configManage.neManage.totalSure', {
|
||||
msg: row.neName,
|
||||
oper: t('views.configManage.neManage.start'),
|
||||
}),
|
||||
onOk() {
|
||||
const key = 'startNf';
|
||||
message.loading({ content: '请稍等...', key });
|
||||
message.loading({ content: t('common.loading'), key });
|
||||
startNf(row).then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
message.success({
|
||||
content: `启动执行成功`,
|
||||
content: t('common.msgSuccess', {
|
||||
msg: t('views.configManage.neManage.start'),
|
||||
}),
|
||||
key,
|
||||
duration: 2,
|
||||
});
|
||||
@@ -545,15 +545,20 @@ function fnRecordStart(row: Record<string, any>) {
|
||||
*/
|
||||
function fnRecordStop(row: Record<string, any>) {
|
||||
Modal.confirm({
|
||||
title: '提示',
|
||||
content: `确认停止网元编号为 【${row.neName}】 的网元?`,
|
||||
title: t('common.tipTitle'),
|
||||
content: t('views.configManage.neManage.totalSure', {
|
||||
msg: row.neName,
|
||||
oper: t('views.configManage.neManage.stop'),
|
||||
}),
|
||||
onOk() {
|
||||
const key = 'stopNf';
|
||||
message.loading({ content: '请稍等...', key });
|
||||
message.loading({ content: t('common.loading'), key });
|
||||
stopNf(row).then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
message.success({
|
||||
content: `停止执行成功`,
|
||||
content: t('common.msgSuccess', {
|
||||
msg: t('views.configManage.neManage.stop'),
|
||||
}),
|
||||
key,
|
||||
duration: 2,
|
||||
});
|
||||
@@ -572,15 +577,20 @@ function fnRecordStop(row: Record<string, any>) {
|
||||
/**网元重新加载 */
|
||||
function fnNeReload(row: Record<string, any>) {
|
||||
Modal.confirm({
|
||||
title: '提示',
|
||||
content: `确认重新载入编号为 【${row.neName}】 的网元配置?`,
|
||||
title: t('common.tipTitle'),
|
||||
content: t('views.configManage.neManage.totalSure', {
|
||||
msg: row.neName,
|
||||
oper: t('views.configManage.neManage.reload'),
|
||||
}),
|
||||
onOk() {
|
||||
const key = 'stopNf';
|
||||
message.loading({ content: '请稍等...', key });
|
||||
message.loading({ content: t('common.loading'), key });
|
||||
updateNeConfigReload(row.neType, row.neId).then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
message.success({
|
||||
content: `网元重新加载完成`,
|
||||
content: t('common.msgSuccess', {
|
||||
msg: t('views.configManage.neManage.reload'),
|
||||
}),
|
||||
key,
|
||||
duration: 2,
|
||||
});
|
||||
@@ -627,7 +637,7 @@ function fnRecordMore(type: string | number, row: Record<string, any>) {
|
||||
|
||||
if (type === 'import') {
|
||||
modalState.importFrom = Object.assign(modalState.importFrom, row);
|
||||
modalState.title = '导入';
|
||||
modalState.title = t('views.configManage.neManage.import');
|
||||
modalState.visibleByImport = true;
|
||||
}
|
||||
}
|
||||
@@ -706,11 +716,14 @@ onMounted(() => {
|
||||
<a-form :model="queryParams" name="queryParams" layout="horizontal">
|
||||
<a-row :gutter="16">
|
||||
<a-col :lg="6" :md="12" :xs="24">
|
||||
<a-form-item label="网元类型" name="neType ">
|
||||
<a-form-item
|
||||
:label="t('views.configManage.neManage.neType')"
|
||||
name="neType "
|
||||
>
|
||||
<a-input
|
||||
v-model:value="queryParams.neType"
|
||||
allow-clear
|
||||
placeholder="请输入网元类型"
|
||||
:placeholder="t('views.configManage.neManage.neTypePlease')"
|
||||
></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -797,7 +810,7 @@ onMounted(() => {
|
||||
:data-source="tableState.data"
|
||||
:size="tableState.size"
|
||||
:pagination="tablePagination"
|
||||
:scroll="{ x: 2000, y: 400 }"
|
||||
:scroll="{ x: 2000, y: 480 }"
|
||||
>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'id'">
|
||||
@@ -882,18 +895,20 @@ onMounted(() => {
|
||||
<a-row :gutter="16">
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item
|
||||
label="网元类型"
|
||||
:label="t('views.configManage.neManage.neType')"
|
||||
name="neType"
|
||||
v-bind="modalStateFrom.validateInfos.neType"
|
||||
>
|
||||
<a-input
|
||||
v-model:value="modalState.from.neType"
|
||||
allow-clear
|
||||
placeholder="请输入网元类型"
|
||||
:placeholder="t('views.configManage.neManage.neTypePlease')"
|
||||
>
|
||||
<template #prefix>
|
||||
<a-tooltip placement="topLeft">
|
||||
<template #title> 填写创建的网元类型,如:SMF </template>
|
||||
<template #title>{{
|
||||
t('views.configManage.neManage.neTypeTip')
|
||||
}}</template>
|
||||
<InfoCircleOutlined style="color: rgba(0, 0, 0, 0.45)" />
|
||||
</a-tooltip>
|
||||
</template>
|
||||
@@ -902,14 +917,13 @@ onMounted(() => {
|
||||
</a-col>
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item
|
||||
label="网元内部标识"
|
||||
:label="t('views.configManage.neManage.neId')"
|
||||
name="neId"
|
||||
v-bind="modalStateFrom.validateInfos.neId"
|
||||
>
|
||||
<a-input
|
||||
v-model:value="modalState.from.neId"
|
||||
allow-clear
|
||||
placeholder="请输入网元内部标识"
|
||||
></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -918,33 +932,36 @@ onMounted(() => {
|
||||
<a-row :gutter="16">
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item
|
||||
label="资源唯一标识"
|
||||
:label="t('views.configManage.neManage.uid')"
|
||||
name="rmUid"
|
||||
v-bind="modalStateFrom.validateInfos.rmUid"
|
||||
>
|
||||
<a-input
|
||||
v-model:value="modalState.from.rmUid"
|
||||
allow-clear
|
||||
placeholder="请输入资源唯一标识"
|
||||
:placeholder="t('views.configManage.neManage.uidTip')"
|
||||
>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item
|
||||
label="网元虚拟化标识"
|
||||
:label="t('views.configManage.neManage.pvflag')"
|
||||
name="pvFlag"
|
||||
v-bind="modalStateFrom.validateInfos.pvFlag"
|
||||
>
|
||||
<a-select
|
||||
v-model:value="modalState.from.pvFlag"
|
||||
default-value="PNF"
|
||||
placeholder="请选择网元虚拟化标识"
|
||||
>
|
||||
<a-select-opt-group label="物理网元">
|
||||
<a-select-opt-group
|
||||
:label="t('views.configManage.neManage.pnf')"
|
||||
>
|
||||
<a-select-option value="PNF">PNF</a-select-option>
|
||||
</a-select-opt-group>
|
||||
<a-select-opt-group label="虚拟网元">
|
||||
<a-select-opt-group
|
||||
:label="t('views.configManage.neManage.vnf')"
|
||||
>
|
||||
<a-select-option value="VNF">VNF</a-select-option>
|
||||
</a-select-opt-group>
|
||||
</a-select>
|
||||
@@ -955,28 +972,20 @@ onMounted(() => {
|
||||
<a-row :gutter="16">
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item
|
||||
label="IP地址"
|
||||
:label="t('views.configManage.neManage.ip')"
|
||||
name="ip"
|
||||
v-bind="modalStateFrom.validateInfos.ip"
|
||||
>
|
||||
<a-input
|
||||
v-model:value="modalState.from.ip"
|
||||
allow-clear
|
||||
placeholder="请输入IP地址"
|
||||
></a-input>
|
||||
<a-input v-model:value="modalState.from.ip" allow-clear></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item
|
||||
label="端口号"
|
||||
:label="t('views.configManage.neManage.port')"
|
||||
name="port"
|
||||
v-bind="modalStateFrom.validateInfos.port"
|
||||
>
|
||||
<a-input
|
||||
v-model:value="modalState.from.port"
|
||||
allow-clear
|
||||
placeholder="请输入端口"
|
||||
>
|
||||
<a-input v-model:value="modalState.from.port" allow-clear>
|
||||
<template #prefix>
|
||||
<a-tooltip placement="topLeft">
|
||||
<template #title> <div>最大范围0~65535</div> </template>
|
||||
@@ -991,28 +1000,24 @@ onMounted(() => {
|
||||
<a-row :gutter="16">
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item
|
||||
label="网元名称"
|
||||
:label="t('views.configManage.neManage.neName')"
|
||||
name="neName"
|
||||
v-bind="modalStateFrom.validateInfos.neName"
|
||||
>
|
||||
<a-input
|
||||
v-model:value="modalState.from.neName"
|
||||
allow-clear
|
||||
placeholder="请输入网元名称"
|
||||
>
|
||||
<a-input v-model:value="modalState.from.neName" allow-clear>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item label="网元地址" name="neAddress">
|
||||
<a-input
|
||||
v-model:value="modalState.from.neAddress"
|
||||
allow-clear
|
||||
placeholder="请输入网元地址"
|
||||
<a-form-item
|
||||
:label="t('views.configManage.neManage.mac')"
|
||||
name="neAddress"
|
||||
>
|
||||
<a-input v-model:value="modalState.from.neAddress" allow-clear
|
||||
><template #prefix>
|
||||
<a-tooltip placement="topLeft">
|
||||
<template #title>
|
||||
<div>能够定位网元的物理地址(MAC)</div>
|
||||
<div>{{ t('views.configManage.neManage.macTip') }}</div>
|
||||
</template>
|
||||
<InfoCircleOutlined style="color: rgba(0, 0, 0, 0.45)" />
|
||||
</a-tooltip> </template
|
||||
@@ -1023,30 +1028,30 @@ onMounted(() => {
|
||||
|
||||
<a-row :gutter="16">
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item label="网元所在省份" name="province">
|
||||
<a-input
|
||||
v-model:value="modalState.from.province"
|
||||
allow-clear
|
||||
placeholder="请输入网元所在省份"
|
||||
></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6" :md="6" :xs="24">
|
||||
<a-form-item label="厂商名称" name="vendorName">
|
||||
<a-input
|
||||
v-model:value="modalState.from.vendorName"
|
||||
allow-clear
|
||||
placeholder="请输入厂商名称"
|
||||
>
|
||||
<a-form-item
|
||||
:label="t('views.configManage.neManage.vendorName')"
|
||||
name="vendorName"
|
||||
>
|
||||
<a-input v-model:value="modalState.from.vendorName" allow-clear>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6" :md="6" :xs="24">
|
||||
<a-form-item label="网络标识" name="dn">
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item :label="t('views.configManage.neManage.dn')" name="dn">
|
||||
<a-input v-model:value="modalState.from.dn" allow-clear></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<a-row :gutter="16">
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item
|
||||
:label="t('views.configManage.neManage.province')"
|
||||
name="province"
|
||||
>
|
||||
<a-input
|
||||
v-model:value="modalState.from.dn"
|
||||
v-model:value="modalState.from.province"
|
||||
allow-clear
|
||||
placeholder="请输入网络标识"
|
||||
></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -1069,7 +1074,7 @@ onMounted(() => {
|
||||
<a-row :gutter="16">
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item
|
||||
label="网元类型"
|
||||
:label="t('views.configManage.neManage.neType')"
|
||||
name="neType"
|
||||
v-bind="importStateFrom.validateInfos.neType"
|
||||
>
|
||||
@@ -1083,7 +1088,7 @@ onMounted(() => {
|
||||
</a-col>
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item
|
||||
label="网元内部标识"
|
||||
:label="t('views.configManage.neManage.neId')"
|
||||
name="neId"
|
||||
v-bind="importStateFrom.validateInfos.neId"
|
||||
>
|
||||
@@ -1096,7 +1101,7 @@ onMounted(() => {
|
||||
</a-row>
|
||||
|
||||
<a-form-item
|
||||
label="文件来源"
|
||||
:label="t('views.configManage.neManage.fileForm')"
|
||||
name="importType"
|
||||
v-bind="importStateFrom.validateInfos.importType"
|
||||
>
|
||||
@@ -1110,7 +1115,7 @@ onMounted(() => {
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item
|
||||
label="导入远程文件"
|
||||
:label="t('views.configManage.neManage.server')"
|
||||
name="fileName"
|
||||
v-bind="importStateFrom.validateInfos.fileName"
|
||||
v-show="modalState.importFrom.importType === 'server'"
|
||||
@@ -1123,7 +1128,7 @@ onMounted(() => {
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item
|
||||
label="导入本地文件"
|
||||
:label="t('views.configManage.neManage.local')"
|
||||
name="file"
|
||||
v-bind="importStateFrom.validateInfos.file"
|
||||
v-show="modalState.importFrom.importType === 'local'"
|
||||
|
||||
Reference in New Issue
Block a user