Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
vue3_onlineEditor
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pangchong
vue3_onlineEditor
Commits
511aa96f
Commit
511aa96f
authored
Apr 01, 2025
by
pangchong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 对比数据渲染
parent
c6cc39f5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
8 deletions
+15
-8
src/assets/file/Trans-Convert.xml
+1
-1
src/components/GlobalEditor.vue
+0
-1
src/views/editor/components/Compare.vue
+3
-4
src/views/editor/constants/compare.ts
+2
-0
src/views/editor/functions/index.ts
+9
-2
No files found.
src/assets/file/Trans-Convert.xml
View file @
511aa96f
...
...
@@ -9,7 +9,7 @@
<CEP>
<EFFECT
EFFRG=
"001999"
></EFFECT>
<TITLEC>
发动机QEC拆卸(V2500-A5系列)
</TITLEC>
<TITLE>
Remove the Engine's QEC(V2500-A
5
series)
</TITLE>
<TITLE>
Remove the Engine's QEC(V2500-A series)
</TITLE>
<TOPIC
CK-LEVEL=
"C"
>
<TITLEC>
飞机/发动机基本信息
</TITLEC>
<TITLE>
AIRCRAFT/ENGINE INFORMATION
</TITLE>
...
...
src/components/GlobalEditor.vue
View file @
511aa96f
...
...
@@ -87,7 +87,6 @@ const message = useMessage()
const
editorConfig
=
computed
(():
IEditorConfig
=>
{
return
Object
.
assign
(
{
placeholder
:
'请输入内容...'
,
readOnly
:
ps
.
readonly
,
customAlert
:
(
s
:
string
,
t
:
string
)
=>
{
switch
(
t
)
{
...
...
src/views/editor/components/Compare.vue
View file @
511aa96f
...
...
@@ -10,14 +10,14 @@
<div
class=
"flex h-full"
>
<GlobalEditor
ref=
"compareLeftRef"
v-model=
"
editorHtml
"
v-model=
"
compareLeftData
"
editorId=
"compareLeft"
:editorConfig=
"
{ readOnly: true }"
@handleScrollTop="handleScrollTopLeft"
/>
<GlobalEditor
ref=
"compareRightRef"
v-model=
"
editorHtml
"
v-model=
"
compareRightData
"
editorId=
"compareRight"
:editorConfig=
"
{ readOnly: true }"
@handleScrollTop="handleScrollTopRight"
...
...
@@ -27,8 +27,7 @@
</
template
>
<
script
setup
lang=
"ts"
>
import
{
editorHtml
}
from
'../constants'
import
{
showCompare
,
compareLeftRef
,
compareRightRef
}
from
'../constants/compare'
import
{
showCompare
,
compareLeftRef
,
compareRightRef
,
compareLeftData
,
compareRightData
}
from
'../constants/compare'
import
{
handleScrollTopLeft
,
handleScrollTopRight
}
from
'../functions/compare'
</
script
>
<
style
lang=
"less"
scoped
></
style
>
src/views/editor/constants/compare.ts
View file @
511aa96f
export
const
showCompare
=
ref
(
false
)
export
const
compareLeftRef
=
ref
()
export
const
compareRightRef
=
ref
()
export
const
compareLeftData
=
ref
(
''
)
export
const
compareRightData
=
ref
(
''
)
src/views/editor/functions/index.ts
View file @
511aa96f
import
{
showLoading
}
from
'../constants'
import
{
nodeSet
}
from
'@/configs/node.config'
import
{
IDomEditor
}
from
'@wangeditor/editor'
import
{
treeData
,
treeRef
,
treeSelectedKeys
}
from
'../constants/tree'
import
{
dropdownConfig
,
editorRef
,
editorHtml
}
from
'../constants'
import
{
getUUID
}
from
'@/utils'
import
{
showCompare
}
from
'../constants/compare'
import
{
compareLeftData
,
compareRightData
,
showCompare
}
from
'../constants/compare'
import
TextA
from
'@/assets/file/CES-QEC-V250-A.xml?raw'
import
TextB
from
'@/assets/file/Trans-Convert.xml?raw'
import
{
nodeSet
}
from
'@/configs/node.config'
export
const
handleCreated
=
(
editor
:
IDomEditor
)
=>
{
editorRef
.
value
=
editor
...
...
@@ -96,4 +98,9 @@ export const uploadXml = async () => {
//xml对比
export
const
compareXml
=
()
=>
{
showCompare
.
value
=
true
const
xmlProcessing
=
useXMLProcessing
()
const
res
=
xmlProcessing
.
dualCompareFromString
(
TextA
,
TextB
,
nodeSet
)
console
.
log
(
res
)
compareLeftData
.
value
=
res
.
xmlContentOld
compareRightData
.
value
=
res
.
xmlContentNew
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment