fix: AMF配置WhiteList Content导入index0无效问题

This commit is contained in:
TsMask
2025-10-24 17:57:21 +08:00
parent df7dacdc39
commit d2e6e52fd0

View File

@@ -24,7 +24,7 @@ export default function useArrayImport({
fileetx: '.xlsx',
itemKey: 'index',
item: (row: Record<string, any>) => {
const index = row['Index'] || 0;
const index = row['Index'] ?? -1;
return {
imeiPrefixValue: `${row['IMEI Prefix']}`,
index: parseInt(index),
@@ -36,7 +36,7 @@ export default function useArrayImport({
fileetx: '.xlsx',
itemKey: 'index',
item: (row: Record<string, any>) => {
const index = row['Index'] || 0;
const index = row['Index'] ?? -1;
return {
imsiValue: `${row['IMSI Value']}`,
imeiValue: `${row['IMEI Value/Prefix']}`,
@@ -51,7 +51,7 @@ export default function useArrayImport({
fileetx: '.xlsx',
itemKey: 'index',
item: (row: Record<string, any>) => {
const index = row['Index'] || 0;
const index = row['Index'] ?? -1;
return {
imei: `${row['IMEI']}`,
index: parseInt(index),
@@ -128,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] || -1;
const rowKey = rowItem[importState.itemKey];
let result: any = null;
// 检查index是否定义
const has = arrayState.columnsData.find(