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 d74e0b78
authored
Apr 15, 2024
by
史敦盼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
便签本添加参数
1 parent
36758108
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
64 additions
and
47 deletions
public/drawio/extention/js/exScratchpad.js
public/drawio/js/diagramly/sidebar/Sidebar.js
src/components/drawio.vue
src/views/archi-view-manage/canvas/index.vue
src/views/archi-view-manage/index.vue
src/views/meta-model-list/canvas/index.vue
src/views/meta-model-list/index.vue
public/drawio/extention/js/exScratchpad.js
View file @
d74e0b7
function
initSetScratchpad
()
{
console
.
log
(
'urlParams'
,
urlParams
)
//左侧便签本初始化数据
$
.
ajax
({
method
:
'post'
,
url
:
`http://
${
ajaxUrl
}
/eadc-architecture/short-cut-model/qSCMList`
,
data
:
JSON
.
stringify
({}),
data
:
{
referenceId
:
urlParams
.
referenceId
,
referenceType
:
isMetaModel
()
},
success
:
function
(
result
)
{
let
images
=
[]
result
.
data
.
forEach
((
item
)
=>
{
...
...
@@ -54,6 +58,13 @@ function initSetScratchpad() {
// 若为压缩的xml,则内容是diagram的内容
}
function
isMetaModel
()
{
if
(
urlParams
.
page
===
'metaModelListDetails'
)
{
return
1
}
else
{
return
2
}
}
function
saveScratchpad
(
data
)
{
//左侧便签本保存数据
...
...
public/drawio/js/diagramly/sidebar/Sidebar.js
View file @
d74e0b7
...
...
@@ -1043,7 +1043,7 @@
}
// 二次开发-画布只保留五大架构元素关系图标
const
joinGraph_
=
JSON
.
parse
(
localStorage
.
getItem
(
'joinGraph'
));
if
(
joinGraph_
&&
joinGraph_
.
state
==
2
)
{
if
(
joinGraph_
&&
joinGraph_
.
state
==
2
&&
urlParams
.
page
!==
'metaModelListDetails'
)
{
this
.
addGeneralPalette
(
this
.
customEntries
==
null
);
//通用图形
}
// this.addMiscPalette(false); //杂项图形
...
...
src/components/drawio.vue
View file @
d74e0b7
<
template
>
<iframe
id=
"drawioGraph"
name=
"content_frame"
:src=
"'/drawio/index.html?id='+id+'&info='+info+'&page='+page"
frameborder=
0
scrolling=
"no"
>
</iframe>
<iframe
id=
"drawioGraph"
name=
"content_frame"
:src=
"getSrc"
frameborder=
"0"
scrolling=
"no"
>
</iframe>
</
template
>
<
script
>
export
default
{
props
:
{
initGraphId
:
Object
},
data
()
{
return
{
id
:
null
,
info
:
null
,
page
:
null
};
},
watch
:
{
initGraphId
:
{
handler
(
newVal
,
oldVal
)
{
this
.
id
=
newVal
.
id
;
this
.
info
=
newVal
.
info
;
this
.
page
=
newVal
.
page
;
},
}
},
mounted
(){
},
}
export
default
{
props
:
{
initGraphId
:
Object
,
},
data
()
{
return
{
id
:
null
,
info
:
null
,
page
:
null
,
referenceId
:
null
,
}
},
watch
:
{
initGraphId
:
{
handler
(
newVal
,
oldVal
)
{
this
.
id
=
newVal
.
id
this
.
info
=
newVal
.
info
this
.
page
=
newVal
.
page
this
.
referenceId
=
newVal
.
referenceId
},
},
},
computed
:
{
getSrc
()
{
return
`/drawio/index.html?id=
${
this
.
id
}
&info=
${
this
.
info
}
&page=
${
this
.
page
}
&referenceId=
${
this
.
referenceId
}
`
},
},
mounted
()
{},
}
</
script
>
<
style
scoped
>
#drawioGraph
{
height
:
100%
;
width
:
100%
;
}
#drawioGraph
{
height
:
100%
;
width
:
100%
;
}
</
style
>
src/views/archi-view-manage/canvas/index.vue
View file @
d74e0b7
...
...
@@ -98,11 +98,13 @@
this
.
getQingDanTable
();
this
.
get_search_select1
();
const
id
=
this
.
$route
.
query
.
id
;
const
graphGroup
=
this
.
$route
.
query
.
info
;
// const id = this.$route.query.id;
// const graphGroup = this.$route.query.info;
const
{
id
,
info
,
referenceId
}
=
this
.
$route
.
query
this
.
routerId
=
{
id
:
id
,
info
:
graphGroup
info
,
referenceId
}
window
.
onmessage
=
e
=>
{
...
...
src/views/archi-view-manage/index.vue
View file @
d74e0b7
...
...
@@ -563,10 +563,7 @@ export default {
JSON
.
stringify
({
state
:
2
,
graph
:
res2
[
2
].
dataEle
}),
)
this
.
$router
.
push
(
`/main/archiViewManageDetails?id=
${
id
}
&info=
${
this
.
graphGroup
}
&viewId=
${
this
.
viewId
}
&assetConstant=
${
this
.
archiType
}
`
,
()
=>
{},
()
=>
{},
)
`/main/archiViewManageDetails?id=
${
id
}
&info=
${
this
.
graphGroup
}
&viewId=
${
this
.
viewId
}
&assetConstant=
${
this
.
archiType
}
&referenceId=
${
item
.
viewDetailsId
}
`
)
})
}
})
...
...
src/views/meta-model-list/canvas/index.vue
View file @
d74e0b7
...
...
@@ -73,11 +73,12 @@
this
.
get_search_select1
();
// const id = this.$route.query.id;
// const version = this.$route.query.info;
const
{
id
,
info
,
page
}
=
this
.
$route
.
query
const
{
id
,
info
,
page
,
referenceId
}
=
this
.
$route
.
query
this
.
routerId
=
{
id
,
info
,
page
page
,
referenceId
}
window
.
onmessage
=
e
=>
{
...
...
src/views/meta-model-list/index.vue
View file @
d74e0b7
...
...
@@ -318,7 +318,7 @@ export default {
localStorage
.
setItem
(
'commonGraph'
,
JSON
.
stringify
({
show
:
false
,
graph
:
res2
[
0
].
dataEle
}));
localStorage
.
setItem
(
'standardGraph'
,
JSON
.
stringify
({
show
:
true
,
graph
:
res2
[
0
].
dataEle
}));
localStorage
.
setItem
(
'metaModelJoinGraph'
,
JSON
.
stringify
({
state
:
1
,
graph
:
res2
[
0
].
dataEle
}));
this
.
$router
.
push
(
`/main/metaModelListDetails?id=
${
item
.
metaModelId
}
&info=
${
item
.
version
}
&page=metaModelListDetails`
);
this
.
$router
.
push
(
`/main/metaModelListDetails?id=
${
item
.
metaModelId
}
&info=
${
item
.
version
}
&page=metaModelListDetails
&referenceId=
${
item
.
metaModelId
}
`
);
});
}
});
...
...
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