feat: 参数配置刷新无法正常打开,导入白名单字段格式转换

This commit is contained in:
TsMask
2025-07-21 15:40:13 +08:00
parent 394cef66c2
commit d37fd4deae
3 changed files with 21 additions and 7 deletions

View File

@@ -13,6 +13,7 @@ import { validHttp } from '@/utils/regular-utils';
import useUserStore from '@/store/modules/user';
import useAppStore from '@/store/modules/app';
import useRouterStore from '@/store/modules/router';
import useNeInfoStore from '@/store/modules/neinfo';
// NProgress Configuration
NProgress.configure({ showSpinner: false });
@@ -211,6 +212,7 @@ router.beforeEach(async (to, from, next) => {
const user = useUserStore();
if (user.roles && user.roles.length === 0) {
try {
useNeInfoStore().fnRefreshNelist();
// 获取用户信息
await user.fnGetInfo();
// 获取路由信息

View File

@@ -25,7 +25,7 @@ export default function useArrayImport({
itemKey: 'imeiPrefixValue',
item: (row: Record<string, any>) => {
return {
imeiPrefixValue: row['IMEI Prefix'],
imeiPrefixValue: `${row['IMEI Prefix']}`,
index: 0,
};
},
@@ -36,8 +36,8 @@ export default function useArrayImport({
itemKey: 'imsiValue',
item: (row: Record<string, any>) => {
return {
imsiValue: row['IMSI Value'],
imeiValue: row['IMEI Value/Prefix'],
imsiValue: `${row['IMSI Value']}`,
imeiValue: `${row['IMEI Value/Prefix']}`,
index: 0,
};
},
@@ -50,7 +50,7 @@ export default function useArrayImport({
itemKey: 'imei',
item: (row: Record<string, any>) => {
return {
imei: row['IMEI'],
imei: `${row['IMEI']}`,
index: 0,
};
},

View File

@@ -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 = useNeInfoStore();
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];