ref: v3变更,,api路由调整
This commit is contained in:
@@ -73,12 +73,12 @@ let modalState: ModalStateType = reactive({
|
||||
from: {
|
||||
id: undefined,
|
||||
neType: '',
|
||||
neId: '',
|
||||
neUid: '',
|
||||
coreUid: currentCoreUid(),
|
||||
neName: '',
|
||||
ip: '',
|
||||
ipAddr: '',
|
||||
port: 33030,
|
||||
pvFlag: 'PNF',
|
||||
coreUid: currentCoreUid(),
|
||||
macAddr: '',
|
||||
dn: '-',
|
||||
vendorName: '-',
|
||||
@@ -108,13 +108,13 @@ let tableColumns: any = [
|
||||
},
|
||||
{
|
||||
title: t('views.ne.common.neUid'),
|
||||
dataIndex: 'neId',
|
||||
dataIndex: 'neUid',
|
||||
align: 'left',
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
title: t('views.ne.common.ipAddr'),
|
||||
dataIndex: 'ip',
|
||||
dataIndex: 'ipAddr',
|
||||
align: 'left',
|
||||
width: 150,
|
||||
},
|
||||
@@ -228,20 +228,19 @@ function fnNeTypeChange(v: any, data: any) {
|
||||
}
|
||||
|
||||
//打开新增或修改界面
|
||||
function fnModalVisibleByEdit(record?: any) {
|
||||
function fnModalVisibleByEdit(record?: Record<string, any>) {
|
||||
if (!record) {
|
||||
//modalStateFrom.resetFields();
|
||||
modalState.title = t('views.ne.neInfo.addTitle');
|
||||
const neId = `${new Date().getMilliseconds()}`.padStart(3, '0');
|
||||
modalState.from = {
|
||||
id: undefined,
|
||||
neId: neId,
|
||||
coreUid: currentCoreUid(),
|
||||
neUid: '',
|
||||
neType: '',
|
||||
neName: `New_${neId}`,
|
||||
ip: '',
|
||||
neName: '',
|
||||
ipAddr: '',
|
||||
port: 33030,
|
||||
pvFlag: 'PNF',
|
||||
rmUid: `4400HXNew${neId}`,
|
||||
macAddr: '',
|
||||
dn: '-',
|
||||
vendorName: '-',
|
||||
@@ -301,8 +300,6 @@ function fnModalVisibleByEdit(record?: any) {
|
||||
function fnModalOk() {
|
||||
modalState.confirmLoading = true;
|
||||
const from = toRaw(modalState.from);
|
||||
from.rmUid = `4400HX${from.neType}${from.neId}`; // 4400HX1AMF001
|
||||
from.neName = `${from.neType}_${from.neId}`; // AMF_001
|
||||
const result = from.id ? updateNeInfo(from) : addNeInfo(from);
|
||||
const hide = message.loading(t('common.loading'), 0);
|
||||
result
|
||||
@@ -330,14 +327,18 @@ function fnModalOk() {
|
||||
* 删除网元
|
||||
* @param data 当前选项的data
|
||||
*/
|
||||
function fnDelete(data: any) {
|
||||
function fnDelete(row: Record<string, any>) {
|
||||
Modal.confirm({
|
||||
title: t('common.tipTitle'),
|
||||
content: `${data.neName} ${t('views.ne.neInfo.delTip')}`,
|
||||
content: `${row.neName} ${t('views.ne.neInfo.delTip')}`,
|
||||
onOk() {
|
||||
tableState.loading = true;
|
||||
const hide = message.loading(t('common.loading'), 0);
|
||||
delNeInfo(data.id)
|
||||
delNeInfo({
|
||||
coreUid: row.coreUid,
|
||||
neUid: row.neUid,
|
||||
id: row.id,
|
||||
})
|
||||
.then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
message.success(t('common.operateOk'), 3);
|
||||
@@ -486,7 +487,7 @@ function fnGetList() {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
tabState.panes = [];
|
||||
res.data.forEach((item: any, index: any) => {
|
||||
if (item.neType === 'OMC' || !Array.isArray(item.hosts)) return;
|
||||
if (!Array.isArray(item.hosts)) return;
|
||||
item.key = index + 1;
|
||||
tabState.panes.push(item);
|
||||
});
|
||||
@@ -665,27 +666,19 @@ onMounted(() => {
|
||||
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item
|
||||
:label="t('views.ne.common.neUid')"
|
||||
name="neId"
|
||||
:label="t('views.ne.common.neName')"
|
||||
name="neName"
|
||||
:rules="{
|
||||
required: true,
|
||||
message: t('views.ne.common.neUidPlease'),
|
||||
message: t('views.ne.common.neNamePlease'),
|
||||
}"
|
||||
>
|
||||
<a-input
|
||||
v-model:value="modalState.from.neId"
|
||||
v-model:value="modalState.from.neName"
|
||||
allow-clear
|
||||
:placeholder="t('views.ne.common.neUidPlease')"
|
||||
:maxlength="24"
|
||||
>
|
||||
<template #prefix>
|
||||
<a-tooltip placement="topLeft">
|
||||
<template #title>
|
||||
{{ t('views.ne.common.neUidTip') }}
|
||||
</template>
|
||||
<InfoCircleOutlined style="opacity: 0.45; color: inherit" />
|
||||
</a-tooltip>
|
||||
</template>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -695,7 +688,7 @@ onMounted(() => {
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item
|
||||
:label="t('views.ne.common.ipAddr')"
|
||||
name="ip"
|
||||
name="ipAddr"
|
||||
:rules="[
|
||||
{
|
||||
required: true,
|
||||
@@ -706,7 +699,7 @@ onMounted(() => {
|
||||
]"
|
||||
>
|
||||
<a-input
|
||||
v-model:value="modalState.from.ip"
|
||||
v-model:value="modalState.from.ipAddr"
|
||||
allow-clear
|
||||
:placeholder="t('views.ne.common.ipAddrPlease')"
|
||||
:maxlength="128"
|
||||
|
||||
@@ -3,10 +3,11 @@ import { Modal, message } from 'ant-design-vue/es';
|
||||
import { onMounted, reactive, toRaw } from 'vue';
|
||||
import { fnToStepName } from '../hooks/useStep';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import { listNeInfo, updateNeInfo } from '@/api/ne/neInfo';
|
||||
import { listAllNeInfo, updateNeInfo } from '@/api/ne/neInfo';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import Para5GForm from '@/views/ne/neQuickSetup/components/Para5GForm.vue';
|
||||
import { getPara5GFilee, savePara5GFile } from '@/api/ne/neAction';
|
||||
import { currentCoreUid } from '@/hooks/useCoreUid';
|
||||
const { t } = useI18n();
|
||||
|
||||
/**对象信息信息状态类型 */
|
||||
@@ -50,7 +51,6 @@ function fnSave() {
|
||||
if (state.confirmLoading) return;
|
||||
state.confirmLoading = true;
|
||||
savePara5GFile({
|
||||
fileType: 'yaml',
|
||||
content: toRaw(state.from),
|
||||
syncNe: [],
|
||||
})
|
||||
@@ -75,9 +75,9 @@ function fnGetList() {
|
||||
state.loading = true;
|
||||
Promise.all([
|
||||
getPara5GFilee(),
|
||||
listNeInfo({
|
||||
pageNum: 1,
|
||||
pageSize: 100,
|
||||
listAllNeInfo({
|
||||
coreUid: currentCoreUid(),
|
||||
bandStatus: false,
|
||||
}),
|
||||
]).then(resArr => {
|
||||
// 已保存的配置
|
||||
@@ -86,63 +86,63 @@ function fnGetList() {
|
||||
}
|
||||
// 填充固定网元类型的ip
|
||||
if (resArr[1].code === RESULT_CODE_SUCCESS) {
|
||||
const { rows } = resArr[1].data;
|
||||
for (const item of rows) {
|
||||
for (const item of resArr[1].data) {
|
||||
const ipAddr = item.ipAddr;
|
||||
switch (item.neType) {
|
||||
case 'OMC':
|
||||
state.from.sbi.omc_ip = item.ip;
|
||||
state.from.sbi.omc_ip = ipAddr;
|
||||
Object.assign(state.omcInfo, item);
|
||||
break;
|
||||
case 'IMS':
|
||||
state.from.sbi.ims_ip = item.ip;
|
||||
// state.from.external.ims_sip_ip = item.ip;
|
||||
state.from.sbi.ims_ip = ipAddr;
|
||||
// state.from.external.ims_sip_ip = ipAddr;
|
||||
state.hasNE.ims = true;
|
||||
break;
|
||||
case 'AMF':
|
||||
state.from.sbi.amf_ip = item.ip;
|
||||
state.from.sbi.amf_ip = ipAddr;
|
||||
state.hasNE.amf = true;
|
||||
break;
|
||||
case 'AUSF':
|
||||
state.from.sbi.ausf_ip = item.ip;
|
||||
state.from.sbi.ausf_ip = ipAddr;
|
||||
break;
|
||||
case 'UDM':
|
||||
state.from.sbi.udm_ip = item.ip;
|
||||
state.from.sbi.udm_ip = ipAddr;
|
||||
state.from.sbi.db_ip = '0.0.0.0';
|
||||
break;
|
||||
case 'SMF':
|
||||
state.from.sbi.smf_ip = item.ip;
|
||||
state.from.sbi.smf_ip = ipAddr;
|
||||
break;
|
||||
case 'PCF':
|
||||
state.from.sbi.pcf_ip = item.ip;
|
||||
state.from.sbi.pcf_ip = ipAddr;
|
||||
break;
|
||||
case 'NSSF':
|
||||
state.from.sbi.nssf_ip = item.ip;
|
||||
state.from.sbi.nssf_ip = ipAddr;
|
||||
break;
|
||||
case 'NRF':
|
||||
state.from.sbi.nrf_ip = item.ip;
|
||||
state.from.sbi.nrf_ip = ipAddr;
|
||||
break;
|
||||
case 'UPF':
|
||||
state.from.sbi.upf_ip = item.ip;
|
||||
state.from.sbi.upf_ip = ipAddr;
|
||||
state.hasNE.upf = true;
|
||||
break;
|
||||
case 'LMF':
|
||||
state.from.sbi.lmf_ip = item.ip;
|
||||
state.from.sbi.lmf_ip = ipAddr;
|
||||
break;
|
||||
case 'NEF':
|
||||
state.from.sbi.nef_ip = item.ip;
|
||||
state.from.sbi.nef_ip = ipAddr;
|
||||
break;
|
||||
case 'MME':
|
||||
state.from.sbi.mme_ip = item.ip;
|
||||
if (item.ip.includes('.')) {
|
||||
state.from.external.mmes11_ip = item.ip + '/24';
|
||||
state.from.sbi.mme_ip = ipAddr;
|
||||
if (ipAddr.includes('.')) {
|
||||
state.from.external.mmes11_ip = ipAddr + '/24';
|
||||
}
|
||||
state.hasNE.mme = true;
|
||||
break;
|
||||
case 'N3IWF':
|
||||
state.from.sbi.n3iwf_ip = item.ip;
|
||||
state.from.sbi.n3iwf_ip = ipAddr;
|
||||
break;
|
||||
case 'SMSC':
|
||||
state.from.sbi.smsc_ip = item.ip;
|
||||
state.from.sbi.smsc_ip = ipAddr;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,11 +8,12 @@ import useDictStore from '@/store/modules/dict';
|
||||
import { listNeVersion, operateNeVersion } from '@/api/ne/neVersion';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { NE_TYPE_LIST } from '@/constants/ne-constants';
|
||||
import { currentCoreUid } from '@/hooks/useCoreUid';
|
||||
const { t } = useI18n();
|
||||
const { getDict } = useDictStore();
|
||||
|
||||
const UploadMoreFile = defineAsyncComponent(
|
||||
() => import('../../../ne/neSoftware/components/UploadMoreFile.vue')
|
||||
() => import('@/views/ne/neSoftware/components/UploadMoreFile.vue')
|
||||
);
|
||||
|
||||
/**字典数据-状态 */
|
||||
@@ -28,7 +29,7 @@ let tableColumns = ref<TableColumnsType>([
|
||||
},
|
||||
{
|
||||
title: t('views.ne.common.neUid'),
|
||||
dataIndex: 'neId',
|
||||
dataIndex: 'neUid',
|
||||
align: 'left',
|
||||
width: 100,
|
||||
},
|
||||
@@ -152,8 +153,9 @@ async function fnRecordInstall() {
|
||||
for (const row of selectRows) {
|
||||
if (row.newVersion === '-' || row.newVersion === '') {
|
||||
state.operateDataUpgrade.push({
|
||||
coreUid: row.coreUid,
|
||||
neType: row.neType,
|
||||
neId: row.neId,
|
||||
neUid: row.neUid,
|
||||
status: 'fail',
|
||||
log: t('views.system.quickStart.stepInstallNotNewVer'),
|
||||
});
|
||||
@@ -165,8 +167,9 @@ async function fnRecordInstall() {
|
||||
preinput = { pisCSCF: 'y', updateMFetc: 'No', updateMFshare: 'No' };
|
||||
}
|
||||
const installData = {
|
||||
coreUid: row.coreUid,
|
||||
neType: row.neType,
|
||||
neId: row.neId,
|
||||
neUid: row.neUid,
|
||||
action: 'install',
|
||||
preinput: preinput,
|
||||
};
|
||||
@@ -174,8 +177,9 @@ async function fnRecordInstall() {
|
||||
try {
|
||||
const res = await operateNeVersion(installData);
|
||||
const operateData = {
|
||||
coreUid: row.coreUid,
|
||||
neType: row.neType,
|
||||
neId: row.neId,
|
||||
neUid: row.neUid,
|
||||
status: 'fail',
|
||||
log: t('common.operateErr'),
|
||||
};
|
||||
@@ -200,11 +204,10 @@ async function fnRecordInstall() {
|
||||
function fnGetList() {
|
||||
state.loading = true;
|
||||
listNeVersion({
|
||||
neType: undefined,
|
||||
neId: '',
|
||||
version: '',
|
||||
coreUid: currentCoreUid(),
|
||||
checkVersion: false,
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
pageSize: 50,
|
||||
}).then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
// 取消勾选
|
||||
@@ -283,10 +286,6 @@ onMounted(() => {
|
||||
|
||||
<div class="ne-oper">
|
||||
<a-space direction="horizontal" :size="18">
|
||||
<a-button @click="fnStepPrev()">
|
||||
{{ t('views.system.quickStart.stepPrev') }}
|
||||
</a-button>
|
||||
|
||||
<a-button
|
||||
type="dashed"
|
||||
:disabled="state.selectedRowKeys.length > 1"
|
||||
@@ -308,6 +307,10 @@ onMounted(() => {
|
||||
{{ t('views.system.quickStart.stepInstallText') }}
|
||||
</a-button>
|
||||
|
||||
<a-button @click="fnStepPrev()">
|
||||
{{ t('views.system.quickStart.stepPrev') }}
|
||||
</a-button>
|
||||
|
||||
<a-button type="primary" @click="fnStepNext('NeInfoSoftwareLicense')">
|
||||
{{ t('views.system.quickStart.stepNext') }}
|
||||
</a-button>
|
||||
@@ -360,9 +363,9 @@ onMounted(() => {
|
||||
</a-alert>
|
||||
</p>
|
||||
|
||||
<p v-for="o in state.operateDataUpgrade" :key="o.neId">
|
||||
<p v-for="o in state.operateDataUpgrade" :key="o.neUid">
|
||||
<a-alert
|
||||
:message="`${o.neType}-${o.neId}`"
|
||||
:message="`${o.neType}-${o.neUid}`"
|
||||
:description="o.log"
|
||||
:type="o.status === 'done' ? 'success' : 'error'"
|
||||
show-icon
|
||||
|
||||
@@ -11,10 +11,11 @@ import {
|
||||
stateNeLicense,
|
||||
} from '@/api/ne/neLicense';
|
||||
import saveAs from 'file-saver';
|
||||
import { currentCoreUid } from '@/hooks/useCoreUid';
|
||||
const { t } = useI18n();
|
||||
const { getDict } = useDictStore();
|
||||
const UploadLicenseFile = defineAsyncComponent(
|
||||
() => import('../../../ne/neLicense/components/UploadLicenseFile.vue')
|
||||
() => import('@/views/ne/neLicense/components/UploadLicenseFile.vue')
|
||||
);
|
||||
|
||||
/**字典数据-状态 */
|
||||
@@ -30,7 +31,7 @@ let tableColumns = ref<TableColumnsType>([
|
||||
},
|
||||
{
|
||||
title: t('views.ne.common.neUid'),
|
||||
dataIndex: 'neId',
|
||||
dataIndex: 'neUid',
|
||||
align: 'left',
|
||||
width: 100,
|
||||
},
|
||||
@@ -163,11 +164,13 @@ function fnRecordCode() {
|
||||
if (row.neType.toUpperCase() === 'OMC') {
|
||||
continue;
|
||||
}
|
||||
const res = await codeNeLicense(row.neType, row.neId);
|
||||
const res = await codeNeLicense(row.coreUid, row.neUid);
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
const activationRequestCode = res.data;
|
||||
row.activationRequestCode = activationRequestCode;
|
||||
codeArr.push(`[${row.neType} ${row.neId}]: ${activationRequestCode}`);
|
||||
codeArr.push(
|
||||
`[${row.neType} ${row.neUid}]: ${activationRequestCode}`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -188,11 +191,9 @@ function fnRecordCode() {
|
||||
function fnGetList() {
|
||||
state.loading = true;
|
||||
listNeLicense({
|
||||
neType: undefined,
|
||||
neId: '',
|
||||
version: '',
|
||||
coreUid: currentCoreUid(),
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
pageSize: 50,
|
||||
}).then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
// 取消勾选
|
||||
@@ -286,19 +287,6 @@ onMounted(() => {
|
||||
|
||||
<div class="ne-oper">
|
||||
<a-space direction="horizontal" :size="18">
|
||||
<a-button @click="fnStepPrev()">
|
||||
{{ t('views.system.quickStart.stepPrev') }}
|
||||
</a-button>
|
||||
|
||||
<a-button
|
||||
type="dashed"
|
||||
:disabled="state.selectedRowKeys.length < 1"
|
||||
@click.prevent="fnModalOpen"
|
||||
>
|
||||
<template #icon><UploadOutlined /></template>
|
||||
{{ t('views.ne.neLicense.uploadFile') }}
|
||||
</a-button>
|
||||
|
||||
<a-button
|
||||
type="primary"
|
||||
ghost
|
||||
@@ -321,6 +309,19 @@ onMounted(() => {
|
||||
{{ t('views.system.quickStart.stepLicenseDownCode') }}
|
||||
</a-button>
|
||||
|
||||
<a-button
|
||||
type="dashed"
|
||||
:disabled="state.selectedRowKeys.length <= 0"
|
||||
@click.prevent="fnModalOpen"
|
||||
>
|
||||
<template #icon><UploadOutlined /></template>
|
||||
{{ t('views.ne.neLicense.uploadFile') }}
|
||||
</a-button>
|
||||
|
||||
<a-button @click="fnStepPrev()">
|
||||
{{ t('views.system.quickStart.stepPrev') }}
|
||||
</a-button>
|
||||
|
||||
<a-button type="primary" @click="fnStepNext('Done')">
|
||||
{{ t('views.system.quickStart.stepLicenseEnd') }}
|
||||
</a-button>
|
||||
|
||||
@@ -31,7 +31,7 @@ export const stepState: StepStateType = reactive({
|
||||
},
|
||||
{
|
||||
title: '网元许可授权',
|
||||
description: '获取网元许可激活码进行授权认证',
|
||||
description: '获取网元授权码进行授权认证',
|
||||
},
|
||||
],
|
||||
neStepsCurrent: -1,
|
||||
|
||||
Reference in New Issue
Block a user