Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
liangzhen
/
framework-tools-web
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit a80f8c69
authored
Jan 05, 2024
by
liuyong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改架构图
1 parent
7aea9674
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
2 deletions
public/drawio/extention/js/exApp.js
public/drawio/extention/js/exFormat.js
src/views/archi-ele-list/index.vue
public/drawio/extention/js/exApp.js
View file @
a80f8c6
...
...
@@ -54,7 +54,7 @@ const setIcon = function (itemIcon, dicys, color) {
svgTag
.
setAttribute
(
'attr_'
+
item2
.
fieldName
,
'attr_'
+
Base64
.
encode
(
item2
.
chineseName
));
})
}
console
.
log
(
svgTag
)
const
svgToString
=
new
XMLSerializer
().
serializeToString
(
svgDocument
);
//svg标签转化为字符串
const
encode_item_icon
=
(
window
.
btoa
)?
btoa
(
svgToString
)
:
Base64
.
encode
(
svgToString
);
//base64编码
...
...
public/drawio/extention/js/exFormat.js
View file @
a80f8c6
...
...
@@ -58,7 +58,7 @@ const initAttributePanel = function(that) {
currentNode
=
obj
;
//文字节点转化为 object标签,属性label值为文字
}
var
clone_currentNode
=
currentNode
.
cloneNode
(
false
);
//
console.log(currentNode)
console
.
log
(
currentNode
)
const
attr_name_array
=
Array
.
from
(
$
(
".attrName"
));
const
attr_value_array
=
Array
.
from
(
$
(
".attrValue"
));
...
...
@@ -91,6 +91,8 @@ const initAttributePanel = function(that) {
clone_currentNode
.
setAttribute
(
item
.
attrName
,
item
.
attrValue
);
})
}
console
.
log
(
unique_attr_name_value
)
graph
.
getModel
().
setValue
(
cell
,
clone_currentNode
);
//更新图形界面
});
...
...
src/views/archi-ele-list/index.vue
View file @
a80f8c6
...
...
@@ -554,6 +554,7 @@ export default {
this
.
pager
.
size
=
result
.
data
.
size
;
if
(
result
.
data
.
records
.
length
>
0
)
{
result
.
data
.
records
.
map
(
item
=>
{
if
(
item
.
icon
.
includes
(
"svg+xml"
))
{
const
item_icon
=
item
.
icon
.
split
(
"base64,"
)[
1
];
const
decode_item_icon
=
window
.
atob
(
item_icon
);
//svg解码,为字符串
const
svgDocument
=
new
DOMParser
().
parseFromString
(
decode_item_icon
,
'text/xml'
);
//svg字符串转标签
...
...
@@ -572,6 +573,7 @@ export default {
const
svgToString
=
new
XMLSerializer
().
serializeToString
(
svgDocument
);
//svg标签转化为字符串
const
encode_item_icon
=
window
.
btoa
(
svgToString
);
//base64编码
item
.
icon
=
'data:image/svg+xml;base64,'
+
encode_item_icon
;
}
})
Promise
.
all
([
this
.
get_dialog_select1
(),
this
.
get_dialog_select2
()
]).
then
(
res2
=>
{
this
.
dialog_select1
=
res2
[
0
];
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment