Merge branch 'main-v2' into lite
This commit is contained in:
@@ -2,7 +2,7 @@ import { addNeConfigData, editNeConfigData } from '@/api/ne/neConfig';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { readSheet } from '@/utils/execl-utils';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { reactive, toRaw } from 'vue';
|
||||
import { reactive } from 'vue';
|
||||
import saveAs from 'file-saver';
|
||||
|
||||
/**
|
||||
@@ -22,23 +22,25 @@ export default function useArrayImport({
|
||||
imeiWhitelist: {
|
||||
filename: 'import_amf_imeiWhitelist_template',
|
||||
fileetx: '.xlsx',
|
||||
itemKey: 'imeiPrefixValue',
|
||||
itemKey: 'index',
|
||||
item: (row: Record<string, any>) => {
|
||||
const index = row['Index'] || 0;
|
||||
return {
|
||||
imeiPrefixValue: row['IMEI Prefix'],
|
||||
index: 0,
|
||||
imeiPrefixValue: `${row['IMEI Prefix']}`,
|
||||
index: parseInt(index),
|
||||
};
|
||||
},
|
||||
},
|
||||
whitelist: {
|
||||
filename: 'import_amf_whitelist_template',
|
||||
fileetx: '.xlsx',
|
||||
itemKey: 'imsiValue',
|
||||
itemKey: 'index',
|
||||
item: (row: Record<string, any>) => {
|
||||
const index = row['Index'] || 0;
|
||||
return {
|
||||
imsiValue: row['IMSI Value'],
|
||||
imeiValue: row['IMEI Value/Prefix'],
|
||||
index: 0,
|
||||
imsiValue: `${row['IMSI Value']}`,
|
||||
imeiValue: `${row['IMEI Value/Prefix']}`,
|
||||
index: parseInt(index),
|
||||
};
|
||||
},
|
||||
},
|
||||
@@ -47,11 +49,12 @@ export default function useArrayImport({
|
||||
white_list: {
|
||||
filename: 'import_mme_imeiWhitelist_template',
|
||||
fileetx: '.xlsx',
|
||||
itemKey: 'imei',
|
||||
itemKey: 'index',
|
||||
item: (row: Record<string, any>) => {
|
||||
const index = row['Index'] || 0;
|
||||
return {
|
||||
imei: row['IMEI'],
|
||||
index: 0,
|
||||
imei: `${row['IMEI']}`,
|
||||
index: parseInt(index),
|
||||
};
|
||||
},
|
||||
},
|
||||
@@ -125,7 +128,7 @@ export default function useArrayImport({
|
||||
importState.loading = true;
|
||||
for (const row of rows) {
|
||||
const rowItem = importState.item(row);
|
||||
const rowKey = rowItem[importState.itemKey];
|
||||
const rowKey = rowItem[importState.itemKey] || -1;
|
||||
let result: any = null;
|
||||
// 检查index是否定义
|
||||
const has = arrayState.columnsData.find(
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { reactive, ref, onMounted, toRaw, watch } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { PageContainer } from 'antdv-pro-layout';
|
||||
import { ProModal } from 'antdv-pro-modal';
|
||||
import { message } from 'ant-design-vue/es';
|
||||
@@ -17,6 +18,7 @@ import useArrayBatchDel from './hooks/useArrayBatchDel';
|
||||
import { getAllNeConfig, getNeConfigData } from '@/api/ne/neConfig';
|
||||
const neListStore = useNeListStore();
|
||||
const { t } = useI18n();
|
||||
const route = useRoute();
|
||||
const { ruleVerification, smfByUPFIdLoadData, smfByUPFIdOptions } = useOptions({
|
||||
t,
|
||||
});
|
||||
@@ -404,10 +406,20 @@ onMounted(() => {
|
||||
return;
|
||||
}
|
||||
// 默认选择AMF
|
||||
const item = neCascaderOptions.value.find(s => s.value === 'AMF');
|
||||
const queryNeType = (route.query.neType as string) || 'AMF';
|
||||
const queryNeId = (route.query.neId as string) || '001';
|
||||
const item = neCascaderOptions.value.find(s => s.value === queryNeType);
|
||||
if (item && item.children) {
|
||||
const info = item.children[0];
|
||||
neTypeSelect.value = [info.neType, info.neId];
|
||||
const info = item.children.find((s: any) => s.neId === queryNeId);
|
||||
if (info) {
|
||||
neTypeSelect.value = [info.neType, info.neId];
|
||||
} else {
|
||||
// 默认取第一个网元ID
|
||||
const info = item.children[0];
|
||||
if (info) {
|
||||
neTypeSelect.value = [info.neType, info.neId];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
const info = neCascaderOptions.value[0].children[0];
|
||||
neTypeSelect.value = [info.neType, info.neId];
|
||||
@@ -652,7 +664,6 @@ onMounted(() => {
|
||||
</a-button>
|
||||
<TableColumnsDnd
|
||||
type="ghost"
|
||||
:cache-id="treeState.selectNode.key"
|
||||
:columns="treeState.selectNode.paramPerms.includes('get') ? [...arrayState.columns.filter((s:any)=>s.key !== 'index')] : arrayState.columns"
|
||||
v-model:columns-dnd="arrayState.columnsDnd"
|
||||
></TableColumnsDnd>
|
||||
@@ -795,7 +806,6 @@ onMounted(() => {
|
||||
</a-button>
|
||||
<TableColumnsDnd
|
||||
type="ghost"
|
||||
:cache-id="`${treeState.selectNode.key}:${arrayChildState.loc}`"
|
||||
:columns="[...arrayChildState.columns]"
|
||||
v-model:columns-dnd="arrayChildState.columnsDnd"
|
||||
v-if="arrayChildState.loc"
|
||||
|
||||
@@ -399,6 +399,7 @@ onMounted(() => {
|
||||
v-model:value="modalState.from.neType"
|
||||
:options="NE_TYPE_LIST.map(v => ({ value: v }))"
|
||||
@change="fnNeTypeChange"
|
||||
:disabled="!!modalState.from.id"
|
||||
>
|
||||
<a-input
|
||||
allow-clear
|
||||
@@ -451,6 +452,7 @@ onMounted(() => {
|
||||
:placeholder="t('common.inputPlease')"
|
||||
:maxlength="32"
|
||||
@change="fnNeIdChange"
|
||||
:disabled="!!modalState.from.id"
|
||||
>
|
||||
<template #prefix>
|
||||
<a-tooltip placement="topLeft">
|
||||
|
||||
@@ -2,7 +2,7 @@ import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { Modal, message } from 'ant-design-vue/es';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { updateNeConfigReload } from '@/api/configManage/configParam';
|
||||
import { updateNeConfigReload } from '@/api/tool/mml';
|
||||
import { serviceNeAction } from '@/api/ne/neInfo';
|
||||
import useMaskStore from '@/store/modules/mask';
|
||||
|
||||
|
||||
@@ -165,6 +165,21 @@ watch(
|
||||
placeholder="1-65535"
|
||||
></a-input>
|
||||
</a-form-item>
|
||||
<a-form-item label="UE_POOL" name="external.ue_pool">
|
||||
<a-input
|
||||
v-model:value="fromState.external.ue_pool"
|
||||
allow-clear
|
||||
:placeholder="t('common.inputPlease')"
|
||||
:maxlength="50"
|
||||
>
|
||||
<template #prefix>
|
||||
<a-tooltip placement="topLeft">
|
||||
<template #title> UE IP and mask </template>
|
||||
<InfoCircleOutlined style="opacity: 0.45; color: inherit" />
|
||||
</a-tooltip>
|
||||
</template>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-col>
|
||||
@@ -244,28 +259,6 @@ watch(
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col
|
||||
:lg="12"
|
||||
:md="12"
|
||||
:xs="24"
|
||||
v-if="fromState.external.upf_type === 'LightUPF'"
|
||||
>
|
||||
<a-form-item label="UE_POOL" name="external.ue_pool">
|
||||
<a-input
|
||||
v-model:value="fromState.external.ue_pool"
|
||||
allow-clear
|
||||
:placeholder="t('common.inputPlease')"
|
||||
:maxlength="50"
|
||||
>
|
||||
<template #prefix>
|
||||
<a-tooltip placement="topLeft">
|
||||
<template #title> UE IP and maxk </template>
|
||||
<InfoCircleOutlined style="opacity: 0.45; color: inherit" />
|
||||
</a-tooltip>
|
||||
</template>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col
|
||||
:lg="12"
|
||||
:md="12"
|
||||
|
||||
Reference in New Issue
Block a user