Commit 1838dc67 by pangchong

feat: 对比调整

parent 2e72ee26
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<!--Arbortext, Inc., 1988-2013, v.4002--> <!--Arbortext, Inc., 1988-2013, v.4002-->
<!DOCTYPE JOBCARD PUBLIC "-//CEA-TEXT//DTD JOBCARD-VER1//EN" "JOBCARD.dtd" [ <!DOCTYPE JOBCARD PUBLIC "-//CEA-TEXT//DTD JOBCARD-VER1//EN" "JOBCARD.dtd" [
<!ENTITY nbsp "&#160;"> <!ENTITY nbsp "&#160;">
<!ENTITY rsquo "&#8217;"> <!ENTITY rsquo "&#8217;">
]> ]>
<JOBCARD> <JOBCARD>
<EOTK-HEADER></EOTK-HEADER> <EOTK-HEADER></EOTK-HEADER>
...@@ -26,19 +26,6 @@ ...@@ -26,19 +26,6 @@
</NOTE> </NOTE>
<SIGNOFF/> <SIGNOFF/>
</STEP> </STEP>
<STEP CK-LEVEL="C">
<EFFECT EFFRG="001999"></EFFECT>
<RECORD-LINE>
<PARAC>发动机序号</PARAC>
<PARA>Engine SN</PARA>
<RECORD></RECORD>
</RECORD-LINE>
<NOTE>
<PARAC>开始工作前请记录。</PARAC>
<PARA>Please record before starting work.</PARA>
</NOTE>
<SIGNOFF/>
</STEP>
</TOPIC> </TOPIC>
<TOPIC CK-LEVEL="C"> <TOPIC CK-LEVEL="C">
<TITLEC>工作准备</TITLEC> <TITLEC>工作准备</TITLEC>
...@@ -368,337 +355,37 @@ ...@@ -368,337 +355,37 @@
</STEP> </STEP>
</TOPIC> </TOPIC>
<TOPIC CK-LEVEL="C"> <TOPIC CK-LEVEL="C">
<TITLEC>工作步骤</TITLEC> <TITLEC>收尾</TITLEC>
<TITLE>PROCEDURE</TITLE> <TITLE>CLOSE UP</TITLE>
<STEP> <SUBTASK CHAPNBR="99" FUNC="999" KEY="EN-SF874" SECTNBR="99" SEQ="999" SUBJNBR="99">
<EFFECT EFFRG="001999"></EFFECT>
<PARAC>发动机QEC拆卸</PARAC>
<PARA>Remove the Engine's QEC</PARA>
<LIST1> <LIST1>
<L1ITEM> <L1ITEM>
<LIST2> <RECORD-LINE>
<L2ITEM> <PARAC>故障处理单记录:</PARAC>
<PARAC>拆卸EBU风扇机匣支架,按EM TASK 71-00-02-000-026-B00。</PARAC> <PARA>Non-routine card record:</PARA>
<PARA>Ref. EM TASK 71-00-02-000-026-B00 (A5-PPBU) - Remove The EBU Fan Case Brackets, Removal-026.</PARA> <RECORD MANDATORY="N" MULTI="N" TAG="SMNRC"></RECORD>
</L2ITEM> </RECORD-LINE>
<L2ITEM> <RECORD-LINE>
<PARAC>拆卸EBU风扇机匣支架,按EM TASK 71-00-02-000-026-B00--EDC。</PARAC> <PARAC>缺陷处理单记录:</PARAC>
<PARA>Ref. EM TASK 71-00-02-000-026-B00 (A5-PPBU) - Remove The EBU Fan Case Brackets, Removal-026--EDC.</PARA> <PARA>Defect card record:</PARA>
</L2ITEM> <RECORD></RECORD>
<L2ITEM> </RECORD-LINE>
<PARAC>拆卸低压中压机匣支架,按EM TASK 71-00-02-000-027-B00。</PARAC>
<PARA>Ref. EM TASK 71-00-02-000-027-B00 (A5-PPBU) - Remove The LP Compressor/Intermediate Case Brackets, Removal-027.</PARA>
</L2ITEM>
</LIST2>
<SIGNOFF/>
</L1ITEM>
<L1ITEM>
<LIST2>
<L2ITEM>
<PARAC>拆卸防冰管(风扇机匣部分),按 AMM TASK 30-21-49-000-010-B, AMM TASK 30-21-49-000-011-B, AMM TASK 30-21-49-000-012-B, AMM TASK 30-21-49-000-013-B, AMM TASK 30-21-49-000-014-B。</PARAC>
<PARA>DUCTS-ANTI ICE, Ref. AMM TASK 30-21-49-000-010-B, AMM TASK 30-21-49-000-011-B, AMM TASK 30-21-49-000-012-B, AMM TASK 30-21-49-000-013-B, AMM TASK 30-21-49-000-014-B.</PARA>
<NOTE>
<PARAC>防冰管隔热罩与防冰管一同拆下。</PARAC>
<PARA>Anti-ice Duct heat shield and Anti-ice Duct together remove.</PARA>
</NOTE>
<SIGNOFF/>
</L2ITEM>
<L2ITEM>
<PARAC>拆卸防冰活门,按AMM TASK 30-21-51-000-010-B。</PARAC>
<PARA>Ref.Removal of the Engine Air Intake Anti-ice Valve AMM TASK 30-21-51-000-010-B.</PARA>
<SIGNOFF/>
</L2ITEM>
</LIST2>
</L1ITEM>
<L1ITEM>
<LIST2>
<L2ITEM>
<PARAC>拆卸IDG,按AMM TASK 24-21-51-000-010-A。</PARAC>
<PARA>Removal of the Integrated Drive Generator -IDG 1(2),Ref.AMM TASK&nbsp;24-21-51-000-010-A.</PARA>
<SIGNOFF/>
</L2ITEM>
<L2ITEM>
<PARAC>拆卸IDG QAD,按AMM TASK&nbsp;24-21-41-000-010-A。</PARAC>
<PARA>Removal of the Quick Attach/Detach (QAD) Adapter of the IDG.Ref. AMM TASK&nbsp;24-21-41-000-010-A.</PARA>
<NOTE>
<PARAC>QEC中的IDG QAD由于备发已补齐,拆卸时可根据实际备发缺件情况完成。</PARAC>
<PARA>IDG QAD can be disassembled according to the actual situation of spare engines because of spare engines have a complete IDG QAD.</PARA>
</NOTE>
<SIGNOFF/>
</L2ITEM>
<L2ITEM>
<PARAC>拆卸IDG导线,按AMM TASK&nbsp;24-21-43-000-010-A。</PARAC>
<PARA>Removal of the IDG Cables.Ref. AMM TASK&nbsp;24-21-43-000-010-A.</PARA>
<SIGNOFF/>
</L2ITEM>
</LIST2>
</L1ITEM>
<L1ITEM>
<LIST2>
<L2ITEM>
<PARAC>拆卸液压泵及液压油滤组件。</PARAC>
<PARA>Removal of the Engine Pump and Engine-Pump Case-Drain Filter.</PARA>
<LIST3>
<L3ITEM>
<PARAC>按EM TASK 71-00-02-000-019 或</PARAC>
<PARAC>AMM TASK&nbsp;29-11-51-000-010-A Removal of the Engine Pump</PARAC>
<PARAC>AMM TASK&nbsp;29-11-43-000-010-A Removal of the Engine-Pump Case-Drain Filter</PARAC>
</L3ITEM>
</LIST3>
<SIGNOFF/>
</L2ITEM>
<L2ITEM>
<PARAC>拆卸液压泵管路。</PARAC>
<PARA>Remove The Hydraulic Tubes.</PARA>
<LIST3>
<L3ITEM>
<PARAC>按EM TASK 71-00-02-000-012-B00 或</PARAC>
<PARAC>AMM TASK&nbsp;29-11-49-000-010-A Removal of the Hydraulic Suction Tubes</PARAC>
<PARAC>AMM TASK&nbsp;29-11-49-000-011-A Removal of the Hydraulic Pressure Tubes</PARAC>
<PARAC>AMM TASK&nbsp;29-11-49-000-012-A Removal of the Hydraulic Case Drain Tubes</PARAC>
</L3ITEM>
</LIST3>
<SIGNOFF/>
</L2ITEM>
<L2ITEM>
<PARAC>拆卸低压电门,按AMM TASK&nbsp;29-11-17-000-010-A Removal of the Engine Pump Pressure Switch。</PARAC>
<PARA>Removal of the Engine Pump Pressure Switch ref.AMM TASK&nbsp;29-11-17-000-010-A.</PARA>
</L2ITEM>
<L2ITEM>
<PARAC>拆下转接头(P/N:740-5777-501,AIPC 29-11-17-80A,ITEM 030)。</PARAC>
<PARA>Removal of the ADAPTOR.</PARA>
</L2ITEM>
<SIGNOFF/>
</LIST2>
</L1ITEM>
<L1ITEM>
<PARAC>拆卸附件区域火警线,按EM TASK 71-00-02-000-018-B00或AMM TASK&nbsp;26-12-15-000-010-B。</PARAC>
<PARA>Ref. EM TASK 71-00-02-000-018-B00 (A5-PPBU) or AMM TASK&nbsp;26-12-15-000-010-B- Remove The Accessory Zone Fire Detector.</PARA>
<SIGNOFF/>
</L1ITEM>
<L1ITEM>
<PARAC>拆卸核心机空气系统和空气系统传感器管路。</PARAC>
<PARA>Remove The Cabin Bleed Air System Ducts, Valves And Air System Sense Tubes.</PARA>
<LIST2>
<L2ITEM>
<PARAC>按EM TASK 71-00-02-000-015-B00 或</PARAC>
<PARAC>AMM TASK&nbsp;36-11-49-000-010-B Removal of the Upper Bleed Air Duct;</PARAC>
<PARAC>AMM TASK&nbsp;36-11-49-000-011-B Removal of the Y-Intersection Bleed Air Duct;</PARAC>
<PARAC>AMM TASK&nbsp;36-11-49-000-012-B Removal of the Lower Bleed Air Duct;</PARAC>
<PARAC>AMM TASK&nbsp;36-11-52-000-010-B Removal of the Bleed Pressure-Regulator Valve;</PARAC>
<PARAC>AMM TASK&nbsp;36-11-41-000-010-A Removal of the Intermediate Pressure (IP) Bleed Check Valve;</PARAC>
<PARAC>AMM TASK&nbsp;36-11-51-000-010-A Removal of the HP Bleed Valve;</PARAC>
<PARAC>AMM TASK&nbsp;36-21-49-000-010-B Removal of the Pressure Indicating Tubes。</PARAC>
</L2ITEM>
</LIST2>
<SIGNOFF/>
</L1ITEM>
<L1ITEM>
<LIST2>
<L2ITEM>
<PARAC>拆卸起动机,起动活门及起动空气管路。</PARAC>
<PARA>Remove The Pneumatic Starter Ducts, The Pneumatic Starter And The Pneumatic Starter Valve.</PARA>
<LIST3>
<L3ITEM>
<PARAC>按EM TASK 71-00-02-000-014-B00 或</PARAC>
<PARAC>AMM TASK&nbsp;80-13-41-000-010-A Removal of the Starter</PARAC>
<PARAC>AMM TASK&nbsp;80-13-51-000-010-B Removal of the Pneumatic Starter Valve</PARAC>
<PARAC>AMM TASK&nbsp;80-13-49-000-010-B Removal of the Starter Duct</PARAC>
</L3ITEM>
</LIST3>
<SIGNOFF/>
</L2ITEM>
<L2ITEM>
<PARAC>拆卸起动机底座,按EM TASK 71-00-02-000-017。</PARAC>
<PARA>Ref.EM TASK 71-00-02-000-017 (A1/A5-PPBU) - Remove The Pneumatic Starter And Housing Adapter.</PARA>
</L2ITEM>
</LIST2>
<SIGNOFF/>
</L1ITEM>
<L1ITEM>
<PARAC>拆卸核心机导线,按EM TASK 71-00-02-000-013-B00 或 AMM TASK&nbsp;71-52-41-000-010-B。</PARAC>
<PARA>Ref.EM TASK 71-00-02-000-013-B00 (A5-PPBU) or AMM TASK&nbsp;71-52-41-000-010-B- Remove The Fire Detection, The Nacelle Temperature And Cabin Services Harnesses.</PARA>
<NOTE>
<PARAC>QEC中的核心机导线由于备发已补齐,拆卸时可根据实际备发缺件情况完成。</PARAC>
<PARA>Core harnesses can be disassembled according to the actual situation of spare engines because of spare engines have a complete Core harnesses.</PARA>
</NOTE>
<SIGNOFF/>
</L1ITEM>
<L1ITEM>
<PARAC>拆卸余油盒,中介机匣以及低压压气机匣的余油管路。</PARAC>
<PARA>Remove The Drains Mast And The LP Compressor/Intermediate Case Module Drains.</PARA>
<LIST2>
<L2ITEM>
<PARAC>按EM TASK 71-00-02-000-021-B00 或</PARAC>
<PARAC>AMM TASK&nbsp;71-71-42-000-010-A Removal of the Drains Mast</PARAC>
<PARAC>AMM TASK&nbsp;71-71-43-000-010-A Removal of the Drain Tubes</PARAC>
</L2ITEM>
</LIST2>
<NOTE> <NOTE>
<PARAC>QEC中的余油盒,余油管路由于备发已补齐,拆卸时可根据实际备发缺件情况完成</PARAC> <PARAC>对实施工作中生成的故障/缺陷处理单,工作者应记录处理单号及相应的工序。完成的故障/缺陷处理单与本工作单卡一并保存。 如未生成故障/缺陷处理单,工作者应在记录中注明</PARAC>
<PARA>Drains Mast and Drain Tubes can be disassembled according to the actual situation of spare engines because of spare engines have a complete Drains Mast and Drain Tubes.</PARA> <PARA>For Non-routine cards found during the work process, the mechanic should note down the report; Non-routine card number and the corresponding work procedure. The Non-routine card should be kept together with this generating task card.N/A should be written if no such report sheet is generated.</PARA>
</NOTE> </NOTE>
<SIGNOFF/> <RECORD-LINE>
</L1ITEM> <PARAC>最终工作结论:</PARAC>
<L1ITEM> <PARA>Final conclusion:</PARA>
<PARAC>拆卸核心区火警探测器及短舱温度探测器。</PARAC> <RECORD></RECORD>
<PARA>Remove The Core Fire Detectors and Nacelle Temperature Sensor.</PARA> <PARAC>完成日期:</PARAC>
<LIST2> <PARA>Date accomplished:</PARA>
<L2ITEM> <RECORD MANDATORY="N" TAG="SMCMPDT"></RECORD>
<PARAC>按EM TASK 71-00-02-000-001-B00 或</PARAC> </RECORD-LINE>
<PARAC>AMM TASK&nbsp;26-12-17-000-010-A Removal of the Core Fire Detectors</PARAC>
<PARAC>AMM TASK&nbsp;75-41-15-000-010-B Removal of the Nacelle Temperature Sensor</PARAC>
</L2ITEM>
</LIST2>
<SIGNOFF/>
</L1ITEM>
<L1ITEM>
<PARAC>拆卸锁销开关,按EM TASK 71-00-02-000-020-B00 或 AMM TASK&nbsp;78-32-56-000-010-A。</PARAC>
<PARA>Ref.EM TASK 71-00-02-000-020-B00 (A5-PPBU) or AMM TASK&nbsp;78-32-56-000-010-A Remove The Open Latch Indicator.</PARA>
<SIGNOFF/>
</L1ITEM>
<L1ITEM>
<PARAC>拆卸燃油供油管,按EM TASK 71-00-02-000-022-B00 或AMM TASK&nbsp;73-11-48-000-010-A。</PARAC>
<PARA>Ref.EM TASK 71-00-02-000-022-B00 (A5-PPBU) or AMM TASK&nbsp;73-11-48-000-010-A Removal of the Power Plant Flexible Fuel Tubes.</PARA>
<SIGNOFF/>
</L1ITEM>
<L1ITEM>
<PARAC>拆卸油气分离器通气管,按EM TASK 71-00-02-000-023-B00或AMM TASK&nbsp;72-61-49-000-010-B。</PARAC>
<PARA>Ref.EM TASK 71-00-02-000-023-B00 (A5-PPBU) or AMM TASK&nbsp;72-61-49-000-010-B Remove The Gearbox Deoiler Breather Duct (GBOD).</PARA>
<SIGNOFF/>
</L1ITEM>
<L1ITEM>
<PARAC>拆卸P2/T2探头软管组件,按EM TASK 71-00-02-000-009或AMM TASK&nbsp;73-22-48-000-010-A。</PARAC>
<PARA>Ref.EM TASK 71-00-02-000-009 (A1/A5-PPBU) or AMM TASK&nbsp;73-22-48-000-010-A Remove The P2/T2 Probe Hose Assembly.</PARA>
<SIGNOFF/>
</L1ITEM>
<L1ITEM>
<PARAC>拆卸尾喷承力座,按EM TASK 71-00-02-000-025。</PARAC>
<PARA>Ref.EM TASK 71-00-02-000-025 (A1/A5-PPBU) - Remove The Load Share Fittings.</PARA>
<SIGNOFF/>
</L1ITEM>
<L1ITEM>
<PARAC>结束工作</PARAC>
<PARA>Finish Work</PARA>
<LIST2>
<L2ITEM>
<PARAC>按照EB-2020-V250-70-201最新版,完成发动机的入库检查。</PARAC>
<PARA>Finish the engine incoming check ref thelatest version of EB-2020-V250-70-201.</PARA>
</L2ITEM>
<L2ITEM>
<PARAC>将发动机拖离工作位。参考EM TASK 71-00-00-560-002。</PARAC>
<PARA>Drag the engine off the working position. Ref EM TASK 71-00-00-560-002 Move The Engine From The Support Pedestals To The Transportation Stand, Handling-002.</PARA>
</L2ITEM>
<L2ITEM>
<PARAC>在发动机安装托架工作结束后,需按照EB-2016-V250-72-202最新版中的要求完成托架的检查与上传。</PARAC>
<PARA>After the engine mounting bracket is finished, Inspection on stand of engine transportation according to the requirements of EB-2016-V250-72-202 the latest version.</PARA>
</L2ITEM>
</LIST2>
<SIGNOFF/>
</L1ITEM>
</LIST1>
</STEP>
<STEP>
<EFFECT EFFRG="001999"></EFFECT>
<PARAC>发动机QEC零件故检,清洗,集件和导线修理</PARAC>
<PARA>Remove the Engine's QEC</PARA>
<LIST1>
<L1ITEM>
<PARAC>使用清洗剂清洗拆下QEC件</PARAC>
<PARA>Clean all QEC parts with cleanser.</PARA>
</L1ITEM>
<L1ITEM>
<PARAC>检查右侧空气系统管路,对开口处堵上堵盖。参考EM 71-00-02。</PARAC>
<PARA>Inspect the air system tubes which installed on the engine&rsquo;s right side, Ref EM manual 71-00-02.</PARA>
</L1ITEM>
<L1ITEM>
<PARAC>检查右侧灭火系统管路,对开口处堵上堵盖。参考EM 71-00-02。</PARAC>
<PARA>Inspect the system tubes which installed on the engine&rsquo;s right side, Ref EM manual 71-00-02.</PARA>
</L1ITEM>
<L1ITEM>
<PARAC>检查左侧液压系统管路,对开口处堵上堵盖。参考EM 71-00-02。</PARAC>
<PARA>Inspect the hydraulic system tubes and hoses which installed on the engine&rsquo;s right side, Ref EM manual 71-00-02.</PARA>
</L1ITEM>
<L1ITEM>
<PARAC>检查右侧燃油总管,对开口处堵上堵盖。参考EM 71-00-02。</PARAC>
<PARA>Inspect the main fuel supply hose tubes which installed on the engine&rsquo;s right side, Ref EM manual 71-00-02.</PARA>
</L1ITEM>
<L1ITEM>
<PARAC>检查右侧启动系统管路,对开口处堵上堵盖。参考EM 71-00-02。</PARAC>
<PARA>Inspect the start system tubes which installed on the engine&rsquo;s right side, Ref EM manual 71-00-02.</PARA>
</L1ITEM>
<L1ITEM>
<PARAC>目视检查IDG。对开口处堵上堵盖。</PARAC>
<PARA>Visual inspect IDG.</PARA>
</L1ITEM>
<L1ITEM>
<PARAC>目视检查液压泵。</PARAC>
<PARA>Visual inspect hydraulic pump.</PARA>
</L1ITEM>
<L1ITEM>
<PARAC>目视检查高压活门。对开口处堵上堵盖。</PARAC>
<PARA>Visual inspect high pressure bleed valve.</PARA>
</L1ITEM>
<L1ITEM>
<PARAC>目视检查调压活门。对开口处堵上堵盖。</PARAC>
<PARA>Visual inspect pressure regulate valve.</PARA>
</L1ITEM>
<L1ITEM>
<PARAC>目视检查起动机。对开口处堵上堵盖。</PARAC>
<PARA>Visual inspect thrust reverse valve.</PARA>
</L1ITEM>
<L1ITEM>
<PARAC>目视检查防冰活门和管路。对开口处堵上堵盖。</PARAC>
<PARA>Visual inspect anti-ice valve and tubes.</PARA>
</L1ITEM>
<L1ITEM>
<PARAC>目视检查所有安装卡圈。参考EM 71-00-02。</PARAC>
<PARA>Visual inspect all the clamps, ref EM manual 71-00-02.</PARA>
</L1ITEM>
<L1ITEM>
<PARAC>目视检查所有支架。参考EM手册71-00-02。</PARAC>
<PARA>Visual inspect all the brackets, ref EM manual 71-00-02.</PARA>
</L1ITEM>
<L1ITEM>
<PARAC>一般目视检查导线及卡子组件,如有故障填写故障处理单并进行排故处理,给未连接插头堵上堵盖。</PARAC>
<PARA>Inspect the wires and clamps, if anything wrong is found, please fill the maintenance fault table.</PARA>
</L1ITEM> </L1ITEM>
</LIST1> </LIST1>
<SIGNOFF/> <SIGNOFF/>
</STEP> </SUBTASK>
</TOPIC> </TOPIC>
<!-- <TOPIC CK-LEVEL="C">-->
<!-- <TITLEC>收尾</TITLEC>-->
<!-- <TITLE>CLOSE UP</TITLE>-->
<!-- <SUBTASK CHAPNBR="99" FUNC="999" KEY="EN-SF874" SECTNBR="99" SEQ="999" SUBJNBR="99">-->
<!-- <LIST1>-->
<!-- <L1ITEM>-->
<!-- <RECORD-LINE>-->
<!-- <PARAC>故障处理单记录:</PARAC>-->
<!-- <PARA>Non-routine card record:</PARA>-->
<!-- <RECORD MANDATORY="N" MULTI="N" TAG="SMNRC"></RECORD>-->
<!-- </RECORD-LINE>-->
<!-- <RECORD-LINE>-->
<!-- <PARAC>缺陷处理单记录:</PARAC>-->
<!-- <PARA>Defect card record:</PARA>-->
<!-- <RECORD></RECORD>-->
<!-- </RECORD-LINE>-->
<!-- <NOTE>-->
<!-- <PARAC>对实施工作中生成的故障/缺陷处理单,工作者应记录处理单号及相应的工序。完成的故障/缺陷处理单与本工作单卡一并保存。 如未生成故障/缺陷处理单,工作者应在记录中注明。</PARAC>-->
<!-- <PARA>For Non-routine cards found during the work process, the mechanic should note down the report; Non-routine card number and the corresponding work procedure. The Non-routine card should be kept together with this generating task card.N/A should be written if no such report sheet is generated.</PARA>-->
<!-- </NOTE>-->
<!-- <RECORD-LINE>-->
<!-- <PARAC>最终工作结论:</PARAC>-->
<!-- <PARA>Final conclusion:</PARA>-->
<!-- <RECORD></RECORD>-->
<!-- <PARAC>完成日期:</PARAC>-->
<!-- <PARA>Date accomplished:</PARA>-->
<!-- <RECORD MANDATORY="N" TAG="SMCMPDT"></RECORD>-->
<!-- </RECORD-LINE>-->
<!-- </L1ITEM>-->
<!-- </LIST1>-->
<!-- <SIGNOFF/>-->
<!-- </SUBTASK>-->
<!-- </TOPIC>-->
</CEP> </CEP>
</JOBCARD> </JOBCARD>
\ No newline at end of file
...@@ -11,14 +11,14 @@ ...@@ -11,14 +11,14 @@
<div class="choose-row bg-progressRailColor" ref="chooseRowRef"></div> <div class="choose-row bg-progressRailColor" ref="chooseRowRef"></div>
<GlobalEditor <GlobalEditor
ref="compareLeftRef" ref="compareLeftRef"
v-model="compareLeftData" v-model="compareData.xmlContentOld"
editorId="compareLeft" editorId="compareLeft"
:editorConfig="{ readOnly: true }" :editorConfig="{ readOnly: true }"
@handleScrollTop="handleScrollTopLeft" @handleScrollTop="handleScrollTopLeft"
/> />
<GlobalEditor <GlobalEditor
ref="compareRightRef" ref="compareRightRef"
v-model="compareRightData" v-model="compareData.xmlContentNew"
editorId="compareRight" editorId="compareRight"
:editorConfig="{ readOnly: true }" :editorConfig="{ readOnly: true }"
@handleScrollTop="handleScrollTopRight" @handleScrollTop="handleScrollTopRight"
...@@ -28,15 +28,7 @@ ...@@ -28,15 +28,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { import { showCompare, compareLeftRef, compareRightRef, compareContainerRef, chooseRowRef, compareData } from '../constants/compare'
showCompare,
compareLeftRef,
compareRightRef,
compareLeftData,
compareRightData,
compareContainerRef,
chooseRowRef
} from '../constants/compare'
import { handleScrollTopLeft, handleScrollTopRight } from '../functions/compare' import { handleScrollTopLeft, handleScrollTopRight } from '../functions/compare'
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
......
import { NewTreeModification, OldTreeModification, TreeRenderResult } from '@/lib/XMLProcessor/src/typing'
export const showCompare = ref(false) export const showCompare = ref(false)
export const compareLeftRef = ref() export const compareLeftRef = ref()
export const compareRightRef = ref() export const compareRightRef = ref()
export const compareLeftData = ref('')
export const compareRightData = ref('')
export const compareContainerRef = ref() export const compareContainerRef = ref()
export const chooseRowRef = ref() export const chooseRowRef = ref()
export const compareData = reactive<{
dataForNew: NewTreeModification
dataForOld: OldTreeModification
domOld: Document
domNew: Document
treeOld: TreeRenderResult[]
treeNew: TreeRenderResult[]
xmlContentOld: string
xmlContentNew: string
}>({
dataForNew: { Added: [] },
dataForOld: { Deleted: [] },
domOld: null as any,
domNew: null as any,
treeOld: [],
treeNew: [],
xmlContentOld: '',
xmlContentNew: ''
})
import { NewTreeModification, OldTreeModification, TreeRenderResult } from '@/lib/XMLProcessor/src/typing' import { TreeRenderResult } from '@/lib/XMLProcessor/src/typing'
import { chooseRowRef, compareContainerRef, compareLeftRef, compareRightRef, showCompare } from '../constants/compare' import { chooseRowRef, compareContainerRef, compareData, compareLeftRef, compareRightRef, showCompare } from '../constants/compare'
import { uniqBy } from 'lodash' import { uniqBy } from 'lodash'
export const handleClickDom = (event: any) => { export const handleClickDom = (event: any) => {
...@@ -22,60 +22,64 @@ export const handleScrollTopRight = (event: Event) => { ...@@ -22,60 +22,64 @@ export const handleScrollTopRight = (event: Event) => {
compareLeftRef.value?.handleScrollTop(scrollTop) compareLeftRef.value?.handleScrollTop(scrollTop)
chooseRowRef.value.style.height = '0px' chooseRowRef.value.style.height = '0px'
} }
export const handleLeftDifferent = (dataForOld: OldTreeModification, treeNew: TreeRenderResult[]) => { export const handleLeftDifferent = () => {
nextTick(() => { nextTick(() => {
const containerLeft = compareLeftRef.value?.editorRef.getEditableContainer() const containerLeft = compareLeftRef.value?.editorRef.getEditableContainer()
const containerRight = compareRightRef.value?.editorRef.getEditableContainer() const containerRight = compareRightRef.value?.editorRef.getEditableContainer()
//新增 const Added = compareData.dataForNew.Added.map((item) => compareNodeAllParent(compareData.treeNew, item.key))
uniqBy(dataForOld.Deleted, 'key').map((item: any) => { uniqBy(compareData.dataForOld.Deleted, 'key').map((item: any) => {
debugger
const allParent = compareNodeAllParent(compareData.treeOld, item.key)
const node = containerLeft!.querySelector(`[data-key="${item.key}"]`) const node = containerLeft!.querySelector(`[data-key="${item.key}"]`)
//处理左边
node.classList.add('bg-errorColorSuppl')
//处理右边
const parentPath = item.chained.slice(0, item.chained.length - 1) const parentPath = item.chained.slice(0, item.chained.length - 1)
const index = item.chained[item.chained.length - 1] const index = item.chained[item.chained.length - 1]
const parentData = findNodeByChained(treeNew, parentPath) const parentData = findNodeByChained(compareData.treeNew, parentPath)
const parentNode = containerRight!.querySelector(`[data-key="${parentData?.key}"]`) const parentNode = containerRight!.querySelector(`[data-key="${parentData?.key}"]`)
// 创建一个新节点 if (Added.some((item) => JSON.stringify(item) === JSON.stringify(allParent))) {
const newDiv = document.createElement('div') //修改
newDiv.style.height = `${node.offsetHeight}px` const node = containerLeft!.querySelector(`[data-key="${item.key}"]`)
newDiv.classList.add('bg-dividerColor') if (node.childNodes.length == 1 && node.childNodes[0].nodeName == 'SPAN') {
parentNode && parentNode.insertBefore(newDiv, parentNode.childNodes[index]) node.classList.add('bg-warningColorSuppl')
}) }
//修改 } else {
dataForOld.Changed.map((item) => { //处理左边
const node = containerLeft!.querySelector(`[data-key="${item.key}"]`) node.classList.add('bg-errorColorSuppl')
if (node.childNodes.length == 1 && node.childNodes[0].nodeName == 'SPAN') { //处理右边
node.classList.add('bg-warningColorSuppl') const newDiv = document.createElement('div')
newDiv.style.height = `${node.offsetHeight}px`
newDiv.classList.add('bg-dividerColor')
parentNode && parentNode.insertBefore(newDiv, parentNode.childNodes[index])
} }
}) })
}) })
} }
export const handleRightDifferent = (dataForNew: NewTreeModification, treeOld: TreeRenderResult[]) => { export const handleRightDifferent = () => {
nextTick(() => { nextTick(() => {
const containerLeft = compareLeftRef.value?.editorRef.getEditableContainer() const containerLeft = compareLeftRef.value?.editorRef.getEditableContainer()
const containerRight = compareRightRef.value?.editorRef.getEditableContainer() const containerRight = compareRightRef.value?.editorRef.getEditableContainer()
//新增 const Deleted = compareData.dataForOld.Deleted.map((item) => compareNodeAllParent(compareData.treeOld, item.key))
uniqBy(dataForNew.Added, 'key').map((item: any) => { uniqBy(compareData.dataForNew.Added, 'key').map((item) => {
const allParent = compareNodeAllParent(compareData.treeNew, item.key)
const node = containerRight!.querySelector(`[data-key="${item.key}"]`) const node = containerRight!.querySelector(`[data-key="${item.key}"]`)
//处理右边
node.classList.add('bg-errorColorSuppl')
//处理左边
const parentPath = item.chained.slice(0, item.chained.length - 1) const parentPath = item.chained.slice(0, item.chained.length - 1)
const index = item.chained[item.chained.length - 1] const index = item.chained[item.chained.length - 1]
const parentData = findNodeByChained(treeOld, parentPath) const parentData = findNodeByChained(compareData.treeOld, parentPath)
const parentNode = containerLeft!.querySelector(`[data-key="${parentData?.key}"]`) const parentNode = containerLeft!.querySelector(`[data-key="${parentData?.key}"]`)
// 创建一个新节点 if (Deleted.some((item) => JSON.stringify(item) === JSON.stringify(allParent))) {
const newDiv = document.createElement('div') //修改
newDiv.style.height = `${node.offsetHeight}px` const node = containerRight!.querySelector(`[data-key="${item.key}"]`)
newDiv.classList.add('bg-dividerColor') if (node.childNodes.length == 1 && node.childNodes[0].nodeName == 'SPAN') {
parentNode && parentNode.insertBefore(newDiv, parentNode.childNodes[index]) node.classList.add('bg-warningColorSuppl')
}) }
//修改 } else {
dataForNew.Changed.map((item: any) => { //新增
const node = containerRight!.querySelector(`[data-key="${item.key}"]`) //处理右边
if (node.childNodes.length == 1 && node.childNodes[0].nodeName == 'SPAN') { node.classList.add('bg-errorColorSuppl')
node.classList.add('bg-warningColorSuppl') //处理左边
const newDiv = document.createElement('div')
newDiv.style.height = `${node.offsetHeight}px`
newDiv.classList.add('bg-dividerColor')
parentNode && parentNode.insertBefore(newDiv, parentNode.childNodes[index])
} }
}) })
}) })
...@@ -110,3 +114,21 @@ export const findNodeByChained = (data: TreeRenderResult[], targetChained: numbe ...@@ -110,3 +114,21 @@ export const findNodeByChained = (data: TreeRenderResult[], targetChained: numbe
} }
return null // 没有找到目标节点 return null // 没有找到目标节点
} }
//根据节点的key获取所有父节点的集合
export const compareNodeAllParent = (root: TreeRenderResult[], key: string) => {
function traverse(node: TreeRenderResult, currentPath: string[]): string[] | null {
currentPath.push(node.label)
if (node.key === key) {
return [...currentPath]
}
if (node.children) {
for (const child of node.children) {
const result = traverse(child, [...currentPath])
if (result) return result
}
}
return null
}
const result = traverse(root[0], [])
return result || []
}
...@@ -3,7 +3,7 @@ import { IDomEditor } from '@wangeditor/editor' ...@@ -3,7 +3,7 @@ import { IDomEditor } from '@wangeditor/editor'
import { treeData, treeRef, treeSelectedKeys } from '../constants/tree' import { treeData, treeRef, treeSelectedKeys } from '../constants/tree'
import { dropdownConfig, editorRef, editorHtml } from '../constants' import { dropdownConfig, editorRef, editorHtml } from '../constants'
import { getUUID } from '@/utils' import { getUUID } from '@/utils'
import { compareLeftData, compareRightData, showCompare } from '../constants/compare' import { compareData, showCompare } from '../constants/compare'
import TextA from '@/assets/file/CES-QEC-V250-A.xml?raw' import TextA from '@/assets/file/CES-QEC-V250-A.xml?raw'
import TextB from '@/assets/file/Trans-Convert.xml?raw' import TextB from '@/assets/file/Trans-Convert.xml?raw'
import { nodeSet, contentHoldNode } from '@/configs/node.config' import { nodeSet, contentHoldNode } from '@/configs/node.config'
...@@ -102,10 +102,8 @@ export const compareXml = () => { ...@@ -102,10 +102,8 @@ export const compareXml = () => {
const xmlProcessing = useXMLProcessing() const xmlProcessing = useXMLProcessing()
const res = xmlProcessing.dualCompareFromString(TextA, TextB, nodeSet, contentHoldNode) const res = xmlProcessing.dualCompareFromString(TextA, TextB, nodeSet, contentHoldNode)
console.log(res) console.log(res)
//渲染数据 Object.assign(compareData, res)
compareLeftData.value = res.xmlContentOld
compareRightData.value = res.xmlContentNew
//比较数据 //比较数据
handleLeftDifferent(res.dataForOld, res.treeNew) handleLeftDifferent()
handleRightDifferent(res.dataForNew, res.treeOld) handleRightDifferent()
} }
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