|
|
@ -777,6 +777,17 @@ const handleFileChange = async (e) => { |
|
|
let dataList = []; |
|
|
let dataList = []; |
|
|
if (importType.value === 'node') { |
|
|
if (importType.value === 'node') { |
|
|
dataList = Array.isArray(json) ? json : (json.nodes || []); |
|
|
dataList = Array.isArray(json) ? json : (json.nodes || []); |
|
|
|
|
|
dataList = dataList.map( |
|
|
|
|
|
item => |
|
|
|
|
|
{ |
|
|
|
|
|
// 如果 label 在映射表里有对应的英文,就替换它,否则保持原样 |
|
|
|
|
|
const |
|
|
|
|
|
mappedLabel = CHINESE_TO_ENGLISH_LABEL[item.label] || item.label; |
|
|
|
|
|
return { |
|
|
|
|
|
...item, |
|
|
|
|
|
label: mappedLabel |
|
|
|
|
|
}; |
|
|
|
|
|
}); |
|
|
} else { |
|
|
} else { |
|
|
dataList = Array.isArray(json) ? json : (json.relationships || json.rels || []); |
|
|
dataList = Array.isArray(json) ? json : (json.relationships || json.rels || []); |
|
|
} |
|
|
} |
|
|
|