Commit 0a4ed742 by pangchong

Merge branch 'master' of 122.112.146.86:pangchong/vue3_onlineEditor

parents 69ed1919 95e0f4ac
...@@ -9,7 +9,8 @@ ...@@ -9,7 +9,8 @@
<CEP> <CEP>
<EFFECT EFFRG="001999"></EFFECT> <EFFECT EFFRG="001999"></EFFECT>
<TITLEC>发动机QEC拆卸(V2500-A5系列)</TITLEC> <TITLEC>发动机QEC拆卸(V2500-A5系列)</TITLEC>
<TITLE>Remove the Engine's QEC(V2500-A5 series)</TITLE> <TITLE>Remove the Engine's QEC(V2500-A5 series)XXXX</TITLE>
<TITLE>Remove the Engine's QEC(V2500-A5 series)XXXX</TITLE>
<TOPIC CK-LEVEL="C"> <TOPIC CK-LEVEL="C">
<TITLEC>飞机/发动机基本信息</TITLEC> <TITLEC>飞机/发动机基本信息</TITLEC>
<TITLE>AIRCRAFT/ENGINE INFORMATION</TITLE> <TITLE>AIRCRAFT/ENGINE INFORMATION</TITLE>
......
...@@ -247,6 +247,7 @@ export class Processing { ...@@ -247,6 +247,7 @@ export class Processing {
} }
const treeOld = reconstructTree(constructNodeA) const treeOld = reconstructTree(constructNodeA)
const treeNew = reconstructTree(constructNodeB) const treeNew = reconstructTree(constructNodeB)
console.log('the resp', {constructNodeA, constructNodeB})
return { return {
treeOld, treeNew treeOld, treeNew
} }
......
...@@ -29,6 +29,7 @@ export function reconstructTree(data: any[]) { ...@@ -29,6 +29,7 @@ export function reconstructTree(data: any[]) {
for (let i = chained.length - 1; i > 0; i--) { for (let i = chained.length - 1; i > 0; i--) {
const parentChained = chained.slice(0, i); const parentChained = chained.slice(0, i);
const parentKey = sortedData.find(d => const parentKey = sortedData.find(d =>
d.type !== 'placeholder' &&
d.chained.length === parentChained.length && d.chained.length === parentChained.length &&
d.chained.every((val: any, idx: number) => val === parentChained[idx]) d.chained.every((val: any, idx: number) => val === parentChained[idx])
)?.key; )?.key;
...@@ -75,7 +76,7 @@ export function reconstructTree(data: any[]) { ...@@ -75,7 +76,7 @@ export function reconstructTree(data: any[]) {
} }
// Create XML document // Create XML document
const doc = document.implementation.createDocument('', '', null); const doc = new Document();
// Use the first element (JOBCARD) as the root if it exists // Use the first element (JOBCARD) as the root if it exists
if (result.length > 0) { if (result.length > 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment