ref: v3变更,,同步v2.2508.4

This commit is contained in:
TsMask
2025-09-01 11:19:01 +08:00
parent 2319cdf36b
commit e943b4dedc
129 changed files with 1876 additions and 3032 deletions

View File

@@ -20,8 +20,11 @@ const props = defineProps({
type: Boolean,
default: false,
},
/**网元ID */
neId: {
coreUid: {
type: String,
default: '',
},
neUid: {
type: String,
default: '',
},
@@ -42,15 +45,16 @@ const importState = reactive({
/**查询网元远程服务器备份文件 */
function backupSearch(name?: string) {
const { neType, neId } = modalState.from;
const { neType, neUid, coreUid } = props;
listNeConfigBackup({
neType,
neId,
neUid,
coreUid,
name,
pageNum: 1,
pageSize: 20,
}).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.code === RESULT_CODE_SUCCESS) {
importState.backupData = [];
res.data.rows.forEach((item: any) => {
importState.backupData.push({
@@ -86,7 +90,8 @@ type ModalStateType = {
/**表单数据 */
from: {
neType: string;
neId: string;
neUid: string;
coreUid: string;
type: 'upload' | 'backup';
path: string | undefined;
};
@@ -102,7 +107,8 @@ let modalState: ModalStateType = reactive({
title: '配置文件导入',
from: {
neType: '',
neId: '',
neUid: '',
coreUid: '',
type: 'upload',
path: undefined,
},
@@ -227,9 +233,10 @@ watch(
() => props.open,
val => {
if (val) {
if (props.neType && props.neId) {
if (props.neType && props.neUid && props.coreUid) {
modalState.from.neType = props.neType;
modalState.from.neId = props.neId;
modalState.from.neUid = props.neUid;
modalState.from.coreUid = props.coreUid;
modalState.title = t('views.ne.neInfo.backConf.title');
modalState.openByEdit = true;
}
@@ -241,13 +248,13 @@ watch(
* 网元导出配置
* @param row 网元编号ID
*/
function fnExportConf(neType: string, neId: string) {
function fnExportConf(coreUid: string, neUid: string, neType: string) {
Modal.confirm({
title: t('common.tipTitle'),
content: t('views.ne.neInfo.backConf.exportTip'),
onOk() {
const hide = message.loading(t('common.loading'), 0);
exportNeConfigBackup({ neType, neId })
exportNeConfigBackup({ neType, coreUid, neUid })
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
notification.success({
@@ -256,7 +263,7 @@ function fnExportConf(neType: string, neId: string) {
});
saveAs(
res.data,
`${neType}_${neId}_config_backup_${Date.now()}.zip`
`${neType}_${neUid}_config_backup_${Date.now()}.zip`
);
} else {
message.error(`${res.msg}`, 3);
@@ -280,7 +287,7 @@ defineExpose({
<template>
<ProModal
:drag="true"
:width="800"
:width="500"
:keyboard="false"
:mask-closable="false"
:open="modalState.openByEdit"
@@ -290,82 +297,77 @@ defineExpose({
@cancel="fnModalCancel"
>
<a-form name="modalStateFrom" layout="horizontal" :label-col="{ span: 6 }">
<a-row>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item :label="t('views.ne.common.neType')" name="neType">
{{ modalState.from.neType }}
</a-form-item>
<a-form-item
:label="t('views.ne.neInfo.backConf.importType')"
name="type"
>
<a-select
v-model:value="modalState.from.type"
default-value="server"
:options="importState.typeOption"
@change="typeChange"
>
</a-select>
</a-form-item>
</a-col>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item :label="t('views.ne.common.neId')" name="neId">
{{ modalState.from.neId }}
</a-form-item>
<a-form-item
:label="t('views.ne.neInfo.backConf.server')"
name="fileName"
v-bind="modalStateFrom.validateInfos.path"
v-if="modalState.from.type === 'backup'"
>
<a-select
v-model:value="modalState.from.path"
:options="importState.backupData"
:placeholder="t('common.selectPlease')"
:show-search="true"
:default-active-first-option="false"
:show-arrow="false"
:allow-clear="true"
:filter-option="false"
:not-found-content="null"
@search="backupSearch"
@change="backupChange"
>
</a-select>
</a-form-item>
<a-form-item :label="t('views.ne.common.neType')" name="neType">
{{ modalState.from.neType }}
</a-form-item>
<a-form-item :label="t('views.ne.common.neUid')" name="neId">
{{ modalState.from.neUid }}
</a-form-item>
<a-form-item
:label="t('views.ne.neInfo.backConf.local')"
name="file"
v-bind="modalStateFrom.validateInfos.path"
v-if="modalState.from.type === 'upload'"
>
<a-upload
name="file"
v-model:file-list="modalState.uploadFiles"
accept=".zip"
list-type="text"
:max-count="1"
:show-upload-list="{
showPreviewIcon: false,
showRemoveIcon: true,
showDownloadIcon: false,
}"
@remove="fnBeforeRemoveFile"
:before-upload="fnBeforeUploadFile"
:custom-request="fnUploadFile"
:disabled="modalState.confirmLoading"
>
<a-button type="primary">
<template #icon>
<UploadOutlined />
</template>
{{ t('views.ne.neInfo.backConf.localUpload') }}
</a-button>
</a-upload>
</a-form-item>
</a-col>
</a-row>
<a-form-item
:label="t('views.ne.neInfo.backConf.importType')"
name="type"
>
<a-select
v-model:value="modalState.from.type"
default-value="server"
:options="importState.typeOption"
@change="typeChange"
>
</a-select>
</a-form-item>
<a-form-item
:label="t('views.ne.neInfo.backConf.server')"
name="fileName"
v-bind="modalStateFrom.validateInfos.path"
v-if="modalState.from.type === 'backup'"
>
<a-select
v-model:value="modalState.from.path"
:options="importState.backupData"
:placeholder="t('common.selectPlease')"
:show-search="true"
:default-active-first-option="false"
:show-arrow="false"
:allow-clear="true"
:filter-option="false"
:not-found-content="null"
@search="backupSearch"
@change="backupChange"
>
</a-select>
</a-form-item>
<a-form-item
:label="t('views.ne.neInfo.backConf.local')"
name="file"
v-bind="modalStateFrom.validateInfos.path"
v-if="modalState.from.type === 'upload'"
>
<a-upload
name="file"
v-model:file-list="modalState.uploadFiles"
accept=".zip"
list-type="text"
:max-count="1"
:show-upload-list="{
showPreviewIcon: false,
showRemoveIcon: true,
showDownloadIcon: false,
}"
@remove="fnBeforeRemoveFile"
:before-upload="fnBeforeUploadFile"
:custom-request="fnUploadFile"
:disabled="modalState.confirmLoading"
>
<a-button type="primary">
<template #icon>
<UploadOutlined />
</template>
{{ t('views.ne.neInfo.backConf.localUpload') }}
</a-button>
</a-upload>
</a-form-item>
</a-form>
</ProModal>
</template>

View File

@@ -5,10 +5,12 @@ import { message, Form, Modal } from 'ant-design-vue/es';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { NE_TYPE_LIST } from '@/constants/ne-constants';
import { regExpIPv4, regExpIPv6 } from '@/utils/regular-utils';
import { getNeInfo, addNeInfo, updateNeInfo } from '@/api/ne/neInfo';
import { addNeInfo, updateNeInfo } from '@/api/ne/neInfo';
import { neHostAuthorizedRSA, testNeHost } from '@/api/ne/neHost';
import useDictStore from '@/store/modules/dict';
import useI18n from '@/hooks/useI18n';
import useI18n from '@/hooks/useI18n';
import { currentCoreUid } from '@/hooks/useCoreUid';
import { getNeInfoByNF } from '@/api/ne/neAction';
const { getDict } = useDictStore();
const { t } = useI18n();
const emit = defineEmits(['ok', 'cancel', 'update:open']);
@@ -17,9 +19,17 @@ const props = defineProps({
type: Boolean,
default: false,
},
editId: {
type: Number,
default: 0,
coreUid: {
type: String,
default: '',
},
neUid: {
type: String,
default: '',
},
neType: {
type: String,
default: '',
},
});
@@ -103,14 +113,14 @@ let modalState: ModalStateType = reactive({
title: '网元',
from: {
id: undefined,
neId: '001',
neType: 'AMF',
neName: '',
ip: '',
ipAddr: '',
port: 33030,
pvFlag: 'PNF',
rmUid: '4400HXAMF001',
neAddress: '',
coreUid: currentCoreUid(),
neUid: '',
macAddr: '',
dn: '',
vendorName: '',
province: 'Area',
@@ -158,30 +168,18 @@ const modalStateFrom = Form.useForm(
message: t('views.ne.common.neTypePlease'),
},
],
neId: [
{
required: true,
message: t('views.ne.common.neIdPlease'),
},
],
rmUid: [
{
required: true,
message: t('views.ne.common.rmUidPlease'),
},
],
ip: [
{
required: true,
validator: modalStateFromEqualIPV4AndIPV6,
},
],
neName: [
{
required: true,
message: t('views.ne.common.neNamePlease'),
},
],
ipAddr: [
{
required: true,
validator: modalStateFromEqualIPV4AndIPV6,
},
],
})
);
@@ -209,10 +207,11 @@ function modalStateFromEqualIPV4AndIPV6(
/**
* 对话框弹出显示为 新增或者修改
* @param editId 网元id, 不传为新增
* @param coreUid 核心网ID
* @param neUid 网元ID
*/
function fnModalVisibleByEdit(editId: number) {
if (editId <= 0) {
function fnModalVisibleByEdit(coreUid: string, neUid: string) {
if (!coreUid || !neUid) {
modalStateFrom.resetFields();
modalState.title = t('views.ne.neInfo.addTitle');
modalState.openByEdit = true;
@@ -220,7 +219,7 @@ function fnModalVisibleByEdit(editId: number) {
if (modalState.confirmLoading) return;
const hide = message.loading(t('common.loading'), 0);
modalState.confirmLoading = true;
getNeInfo(editId).then(res => {
getNeInfoByNF(coreUid, neUid).then(res => {
modalState.confirmLoading = false;
hide();
if (res.code === RESULT_CODE_SUCCESS) {
@@ -320,15 +319,6 @@ function fnNeTypeChange(v: any) {
remark: '',
});
}
modalState.from.rmUid = `4400HX${v}${modalState.from.neId}`; // 4400HX1AMF001
}
/**表单修改网元neId */
function fnNeIdChange(e: any) {
const v = e.target.value;
if (v.length < 1) return;
modalState.from.rmUid = `4400HX${modalState.from.neType}${v}`; // 4400HX1AMF001
}
/**表单修改网元IP */
@@ -344,7 +334,7 @@ function fnNeIPChange(e: any) {
watch(
() => props.open,
val => {
if (val) fnModalVisibleByEdit(props.editId);
if (val) fnModalVisibleByEdit(props.coreUid, props.neUid);
}
);
@@ -439,58 +429,31 @@ onMounted(() => {
</a-col>
</a-row>
<a-row>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
:label="t('views.ne.common.neId')"
name="neId"
v-bind="modalStateFrom.validateInfos.neId"
>
<a-input
v-model:value="modalState.from.neId"
allow-clear
:placeholder="t('common.inputPlease')"
:maxlength="32"
@change="fnNeIdChange"
:disabled="!!modalState.from.id"
>
<template #prefix>
<a-tooltip placement="topLeft">
<template #title>
{{ t('views.ne.common.neIdTip') }}
</template>
<InfoCircleOutlined style="opacity: 0.45; color: inherit" />
</a-tooltip>
</template>
</a-input>
</a-form-item>
</a-col>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
:label="t('views.ne.common.neName')"
name="neName"
v-bind="modalStateFrom.validateInfos.neName"
>
<a-input
v-model:value="modalState.from.neName"
allow-clear
:placeholder="t('common.inputPlease')"
:maxlength="64"
>
</a-input>
</a-form-item>
</a-col>
</a-row>
<a-form-item
:label="t('views.ne.common.neName')"
name="neName"
:label-col="{ span: 3 }"
:label-wrap="true"
v-bind="modalStateFrom.validateInfos.neName"
>
<a-input
v-model:value="modalState.from.neName"
allow-clear
:placeholder="t('common.inputPlease')"
:maxlength="64"
>
</a-input>
</a-form-item>
<a-row>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
:label="t('views.ne.common.ipAddr')"
name="ip"
v-bind="modalStateFrom.validateInfos.ip"
name="ipAddr"
v-bind="modalStateFrom.validateInfos.ipAddr"
>
<a-input
v-model:value="modalState.from.ip"
v-model:value="modalState.from.ipAddr"
allow-clear
:placeholder="t('common.inputPlease')"
:maxlength="128"
@@ -536,37 +499,11 @@ onMounted(() => {
</a-col>
</a-row>
<a-form-item
:label="t('views.ne.common.rmUid')"
name="rmUid"
v-bind="modalStateFrom.validateInfos.rmUid"
:label-col="{ span: 3 }"
:labelWrap="true"
>
<a-input
v-model:value="modalState.from.rmUid"
allow-clear
:placeholder="t('common.inputPlease')"
:maxlength="40"
>
<template #prefix>
<a-tooltip placement="topLeft">
<template #title>
<div>
{{ t('views.ne.common.rmUidTip') }}
</div>
</template>
<InfoCircleOutlined style="opacity: 0.45; color: inherit" />
</a-tooltip>
</template>
</a-input>
</a-form-item>
<a-row>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item :label="t('views.ne.neInfo.neAddress')" name="neAddress">
<a-form-item :label="t('views.ne.neInfo.macAddr')" name="macAddr">
<a-input
v-model:value="modalState.from.neAddress"
v-model:value="modalState.from.macAddr"
allow-clear
:placeholder="t('common.inputPlease')"
:maxlength="64"
@@ -574,7 +511,7 @@ onMounted(() => {
<template #prefix>
<a-tooltip placement="topLeft">
<template #title>
<div>{{ t('views.ne.neInfo.neAddressTip') }}</div>
<div>{{ t('views.ne.neInfo.macAddrTip') }}</div>
</template>
<InfoCircleOutlined style="opacity: 0.45; color: inherit" />
</a-tooltip>

View File

@@ -4,7 +4,7 @@ import { ProModal } from 'antdv-pro-modal';
import { message, Form } from 'ant-design-vue/es';
import useI18n from '@/hooks/useI18n';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { getOAMFile, saveOAMFile, serviceNeAction } from '@/api/ne/neInfo';
import { getOAMFile, saveOAMFile, serviceNeAction } from '@/api/ne/neAction';
const { t } = useI18n();
const emit = defineEmits(['ok', 'cancel', 'update:open']);
const props = defineProps({
@@ -12,8 +12,11 @@ const props = defineProps({
type: Boolean,
default: false,
},
/**网元ID */
neId: {
coreUid: {
type: String,
default: '',
},
neUid: {
type: String,
default: '',
},
@@ -72,9 +75,9 @@ const modalStateFrom = Form.useForm(
* @param neType 网元类型
* @param neId 网元ID
*/
function fnModalVisibleByTypeAndId(neType: string, neId: string) {
function fnModalVisibleByTypeAndId(coreUid: string, neUid: string) {
const hide = message.loading(t('common.loading'), 0);
getOAMFile(neType, neId)
getOAMFile(coreUid, neUid)
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
const data = res.data;
@@ -116,8 +119,8 @@ function fnModalOk() {
const hide = message.loading(t('common.loading'), 0);
const from = toRaw(modalState.from);
saveOAMFile({
neType: props.neType,
neId: props.neId,
coreUid: props.coreUid,
neUid: props.neUid,
content: from,
sync: true,
})
@@ -128,7 +131,8 @@ function fnModalOk() {
if (modalState.restart) {
serviceNeAction({
neType: props.neType,
neId: props.neId,
neUid: props.neUid,
coreUid: props.coreUid,
action: 'restart',
});
}
@@ -168,8 +172,8 @@ watch(
() => props.open,
val => {
if (val) {
if (props.neType && props.neId) {
fnModalVisibleByTypeAndId(props.neType, props.neId);
if (props.coreUid && props.neUid) {
fnModalVisibleByTypeAndId(props.coreUid, props.neUid);
}
}
}

View File

@@ -3,7 +3,7 @@ import { Modal, message } from 'ant-design-vue/es';
import useI18n from '@/hooks/useI18n';
import { useRouter } from 'vue-router';
import { updateNeConfigReload } from '@/api/tool/mml';
import { serviceNeAction } from '@/api/ne/neInfo';
import { serviceNeAction } from '@/api/ne/neAction';
import useMaskStore from '@/store/modules/mask';
export default function useNeOptions() {
@@ -24,7 +24,8 @@ export default function useNeOptions() {
const hide = message.loading(t('common.loading'), 0);
serviceNeAction({
neType: row.neType,
neId: row.neId,
neUid: row.neUid,
coreUid: row.coreUid,
action: 'start',
})
.then(res => {
@@ -60,7 +61,8 @@ export default function useNeOptions() {
const hide = message.loading(t('common.loading'), 0);
serviceNeAction({
neType: row.neType,
neId: row.neId,
neUid: row.neUid,
coreUid: row.coreUid,
action: 'restart',
})
.then(res => {
@@ -108,7 +110,8 @@ export default function useNeOptions() {
const hide = message.loading(t('common.loading'), 0);
serviceNeAction({
neType: row.neType,
neId: row.neId,
neUid: row.neUid,
coreUid: row.coreUid,
action: 'stop',
})
.then(res => {
@@ -141,7 +144,7 @@ export default function useNeOptions() {
content: t('views.ne.common.reloadTip'),
onOk() {
const hide = message.loading(t('common.loading'), 0);
updateNeConfigReload(row.neType, row.neId)
updateNeConfigReload(row.coreUid, row.neUid)
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success(t('common.operateOk'), 3);
@@ -165,7 +168,8 @@ export default function useNeOptions() {
name: 'NeFile_2123',
query: {
neType: row.neType,
neId: row.neId,
neUid: row.neUid,
coreUid: row.coreUid,
},
});
}

View File

@@ -8,9 +8,11 @@ import { ColumnsType } from 'ant-design-vue/es/table';
import useI18n from '@/hooks/useI18n';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import useNeStore from '@/store/modules/ne';
import { listNeInfo, delNeInfo, stateNeInfo } from '@/api/ne/neInfo';
import { listNeInfo, delNeInfo } from '@/api/ne/neInfo';
import { stateNeInfo } from '@/api/ne/neAction';
import useDictStore from '@/store/modules/dict';
import useNeOptions from './hooks/useNeOptions';
import { currentCoreUid } from '@/hooks/useCoreUid';
const { getDict } = useDictStore();
const neStore = useNeStore();
const { t } = useI18n();
@@ -45,6 +47,8 @@ let dict: {
/**查询参数 */
let queryParams = reactive({
/**核心网标识 */
coreUid: currentCoreUid(),
/**网元类型 */
neType: '',
/**带状态信息 */
@@ -79,15 +83,18 @@ type TabeStateType = {
data: Record<string, any>[];
/**勾选记录 */
selectedRowKeys: (string | number)[];
/**勾选记录 */
selectedRows: Record<string, any>[];
};
/**表格状态 */
let tableState: TabeStateType = reactive({
loading: false,
size: 'middle',
seached: false,
seached: true,
data: [],
selectedRowKeys: [],
selectedRows: [],
});
/**表格字段列 */
@@ -98,18 +105,6 @@ let tableColumns: ColumnsType = [
align: 'left',
width: 100,
},
{
title: t('views.ne.common.neId'),
dataIndex: 'neId',
align: 'left',
width: 100,
},
{
title: t('views.ne.common.rmUid'),
dataIndex: 'rmUid',
align: 'left',
width: 150,
},
{
title: t('views.ne.common.neName'),
dataIndex: 'neName',
@@ -118,7 +113,7 @@ let tableColumns: ColumnsType = [
},
{
title: t('views.ne.common.ipAddr'),
dataIndex: 'ip',
dataIndex: 'ipAddr',
align: 'left',
width: 150,
},
@@ -176,8 +171,16 @@ function fnTableSize({ key }: MenuInfo) {
}
/**表格多选 */
function fnTableSelectedRowKeys(keys: (string | number)[]) {
function fnTableSelectedRowKeys(keys: (string | number)[], rows: any[]) {
tableState.selectedRowKeys = keys;
tableState.selectedRows = rows.map(item => {
return {
id: item.id,
coreUid: item.coreUid,
neUid: item.neUid,
neType: item.neType,
};
});
}
/**对话框对象信息状态类型 */
@@ -189,9 +192,9 @@ type ModalStateType = {
/**新增框或修改框是否显示 */
openByEdit: boolean;
/**新增框或修改框ID */
editId: number;
/**OAM框网元类型ID */
neId: string;
/**网元修改框 */
coreUid: string;
neUid: string;
neType: string;
/**确定按钮 loading */
confirmLoading: boolean;
@@ -202,8 +205,8 @@ let modalState: ModalStateType = reactive({
openByBackConf: false,
openByOAM: false,
openByEdit: false,
editId: 0,
neId: '',
coreUid: '',
neUid: '',
neType: '',
confirmLoading: false,
});
@@ -214,9 +217,13 @@ let modalState: ModalStateType = reactive({
*/
function fnModalVisibleByEdit(row?: Record<string, any>) {
if (!row) {
modalState.editId = 0;
modalState.coreUid = '';
modalState.neUid = '';
modalState.neType = '';
} else {
modalState.editId = row.id;
modalState.coreUid = row.coreUid;
modalState.neUid = row.neUid;
modalState.neType = row.neType;
}
modalState.openByEdit = !modalState.openByEdit;
}
@@ -227,7 +234,7 @@ function fnModalVisibleByEdit(row?: Record<string, any>) {
*/
function fnModalEditOk(from: Record<string, any>) {
// 新增时刷新列表
if (!from.id) {
if (!from.neUid) {
fnGetList();
return;
}
@@ -237,16 +244,16 @@ function fnModalEditOk(from: Record<string, any>) {
/**局部更新信息 */
function reloadRowInfo(row: Record<string, any>) {
stateNeInfo(row.neType, row.neId)
stateNeInfo(row.coreUid, row.neUid)
.then(res => {
// 找到编辑更新的网元
const item = tableState.data.find(s => s.id === row.id);
if (item && res.code === RESULT_CODE_SUCCESS) {
item.neType = row.neType;
item.neId = row.neId;
item.rmUid = row.rmUid;
item.neUid = row.neUid;
item.coreUid = row.coreUid;
item.neName = row.neName;
item.ip = row.ip;
item.ipAddr = row.ipAddr;
item.port = row.port;
if (res.data.online) {
item.status = '1';
@@ -271,7 +278,9 @@ function reloadRowInfo(row: Record<string, any>) {
* 进行表达规则校验
*/
function fnModalEditCancel() {
modalState.editId = 0;
modalState.coreUid = '';
modalState.neUid = '';
modalState.neType = '';
modalState.openByEdit = false;
modalState.openByOAM = false;
modalState.openByBackConf = false;
@@ -282,7 +291,7 @@ function fnModalEditCancel() {
* @param id 编号
*/
function fnRecordDelete(id: string) {
if (!id || modalState.confirmLoading) return;
if (modalState.confirmLoading) return;
let msg = t('views.ne.neInfo.delTip');
if (id === '0') {
msg = `${msg} ...${tableState.selectedRowKeys.length}`;
@@ -295,9 +304,29 @@ function fnRecordDelete(id: string) {
onOk() {
modalState.confirmLoading = true;
const hide = message.loading(t('common.loading'), 0);
delNeInfo(id)
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
let reqArr: any = [];
if (id === '0') {
tableState.selectedRows.forEach(item => {
reqArr.push(
delNeInfo({ coreUid: item.coreUid, neUid: item.neUid, id: item.id })
);
});
} else {
tableState.data.forEach(item => {
if (item.id === id) {
reqArr.push(
delNeInfo({
coreUid: item.coreUid,
neUid: item.neUid,
id: item.id,
})
);
}
});
}
Promise.all(reqArr)
.then(resArr => {
if (resArr.every((item: any) => item.code === RESULT_CODE_SUCCESS)) {
message.success(t('common.operateOk'), 3);
// 过滤掉删除的id
tableState.data = tableState.data.filter(item => {
@@ -311,7 +340,7 @@ function fnRecordDelete(id: string) {
neStore.fnNelistRefresh();
} else {
message.error({
content: `${res.msg}`,
content: t('common.operateErr'),
duration: 3,
});
}
@@ -348,15 +377,17 @@ function fnRecordMore(type: string | number, row: Record<string, any>) {
fnNeLogFile(row);
break;
case 'oam':
modalState.neId = row.neId;
modalState.coreUid = row.coreUid;
modalState.neUid = row.neUid;
modalState.neType = row.neType;
modalState.openByOAM = !modalState.openByOAM;
break;
case 'backConfExport':
backConf.value.exportConf(row.neType, row.neId);
backConf.value.exportConf(row.coreUid, row.neUid, row.neType);
break;
case 'backConfImport':
modalState.neId = row.neId;
modalState.coreUid = row.coreUid;
modalState.neUid = row.neUid;
modalState.neType = row.neType;
modalState.openByBackConf = !modalState.openByBackConf;
break;
@@ -711,7 +742,9 @@ onMounted(() => {
<!-- 新增框或修改框 -->
<EditModal
v-model:open="modalState.openByEdit"
:edit-id="modalState.editId"
:core-uid="modalState.coreUid"
:ne-uid="modalState.neUid"
:ne-type="modalState.neType"
@ok="fnModalEditOk"
@cancel="fnModalEditCancel"
></EditModal>
@@ -719,7 +752,8 @@ onMounted(() => {
<!-- OAM编辑框 -->
<OAMModal
v-model:open="modalState.openByOAM"
:ne-id="modalState.neId"
:core-uid="modalState.coreUid"
:ne-uid="modalState.neUid"
:ne-type="modalState.neType"
@cancel="fnModalEditCancel"
></OAMModal>
@@ -728,7 +762,8 @@ onMounted(() => {
<BackConfModal
ref="backConf"
v-model:open="modalState.openByBackConf"
:ne-id="modalState.neId"
:core-uid="modalState.coreUid"
:ne-uid="modalState.neUid"
:ne-type="modalState.neType"
@cancel="fnModalEditCancel"
></BackConfModal>