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