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 80bd9658
authored
Feb 23, 2024
by
liuyong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
1 parent
fe426ac4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
305 additions
and
92 deletions
public/drawio/extention/js/exApp.js
public/drawio/extention/js/exGraph.js
src/api/index.js
src/views/archi-evolute-line/通用页面.vue
src/views/archi-view-manage/index.vue
src/views/meta-model-list/index.vue
src/views/metaModelDic/index(旧).vue
src/views/metaModelDic/index.vue
public/drawio/extention/js/exApp.js
View file @
80bd965
...
@@ -185,12 +185,11 @@ const leftCustomGraph = function(that) {//左侧自定义图形
...
@@ -185,12 +185,11 @@ const leftCustomGraph = function(that) {//左侧自定义图形
// }
// }
// })
// })
const
standardGraph_
=
JSON
.
parse
(
localStorage
.
getItem
(
'standardGraph'
));
const
joinGraph_
=
JSON
.
parse
(
localStorage
.
getItem
(
'joinGraph'
));
const
standardGraph
=
standardGraph_
.
graph
;
const
joinGraph
=
joinGraph_
.
graph
;
if
(
joinGraph_
.
state
==
1
)
{
if
(
standardGraph_
.
show
)
{
joinGraph
.
pop
();
standardGraph
.
pop
();
joinGraph
.
forEach
(
function
(
item
)
{
standardGraph
.
forEach
(
function
(
item
)
{
if
(
item
.
eleDtos
)
{
if
(
item
.
eleDtos
)
{
if
(
item
.
eleDtos
.
length
>
0
)
{
if
(
item
.
eleDtos
.
length
>
0
)
{
const
libraryName
=
item
.
arciBelongName
;
const
libraryName
=
item
.
arciBelongName
;
...
@@ -213,6 +212,14 @@ const leftCustomGraph = function(that) {//左侧自定义图形
...
@@ -213,6 +212,14 @@ const leftCustomGraph = function(that) {//左侧自定义图形
}
}
}
}
})
})
}
else
{
joinGraph
.
forEach
(
item
=>
{
item
.
subList
.
forEach
(
item2
=>
{
if
(
item2
.
eleType
==
'1'
)
{
console
.
log
(
item2
)
}
})
})
}
}
}
}
...
...
public/drawio/extention/js/exGraph.js
View file @
80bd965
...
@@ -41,88 +41,34 @@
...
@@ -41,88 +41,34 @@
{
{
const
commonGraph_
=
JSON
.
parse
(
localStorage
.
getItem
(
'commo
nGraph'
));
const
joinGraph_
=
JSON
.
parse
(
localStorage
.
getItem
(
'joi
nGraph'
));
if
(
commonGraph_
.
show
)
{
if
(
joinGraph_
.
state
==
2
)
{
const
graphGroup
=
window
.
location
.
href
.
split
(
"id="
)[
1
].
split
(
"&"
)[
1
].
split
(
"="
)[
1
];
const
joinGraph
=
joinGraph_
.
graph
;
// this.sidebarTitles = true;//勾选标签
const
commonGraph
=
commonGraph_
.
graph
.
filter
(
item
=>
item
.
arciBelongId
==
graphGroup
);
joinGraph
.
forEach
(
item
=>
{
this
.
sidebarTitles
=
true
;
//勾选标签
commonGraph
.
forEach
(
item
=>
{
let
fns
=
[];
let
fns
=
[];
item
.
eleDtos
.
forEach
(
item2
=>
{
item
.
subList
.
forEach
(
item2
=>
{
if
(
item2
.
icon
)
{
if
(
item2
.
eleType
==
'2'
&&
item2
.
iconName
&&
item2
.
color
)
{
if
(
item2
.
icon
.
includes
(
'data'
))
{
fns
.
push
(
let
attr_
=
[];
this
.
createVertexTemplateEntry
(
if
(
item2
.
dicys
&&
item2
.
dicys
.
length
>
0
)
{
item2
.
iconName
+
';fillColor='
+
item2
.
color
+
';'
+
'attr=[];'
,
item2
.
dicys
.
forEach
(
res
=>
{
150
,
if
(
res
.
fieldName
)
{
75
,
attr_
.
push
(
null
,
{
item2
.
assetName
,
name
:
res
.
fieldName
,
null
,
value
:
res
.
propertyValue
,
null
,
id
:
res
.
propertyId
,
'封闭图形2'
controlType
:
res
.
controlType
,
}
)
}
})
}
fns
.
push
(
item2
.
color
?
this
.
createVertexTemplateEntry
(
item2
.
iconName
+
';fillColor='
+
item2
.
color
+
';'
+
'attr='
+
JSON
.
stringify
(
attr_
)
+
';eleId='
+
item2
.
eleBelongId
+
';eaLevel='
+
item2
.
eaLevel
+
';'
,
item2
.
shapeWidth
?
item2
.
shapeWidth
:
150
,
item2
.
shapeHeight
?
item2
.
shapeHeight
:
75
,
null
,
item2
.
eleName
,
null
,
null
,
'封闭图形2'
)
:
this
.
createEdgeTemplateEntry
(
item2
.
iconName
+
'attr='
+
JSON
.
stringify
(
attr_
),
item2
.
shapeWidth
?
item2
.
shapeWidth
:
150
,
item2
.
shapeHeight
?
item2
.
shapeHeight
:
75
,
''
,
item2
.
elementName
,
null
,
'非封闭图形2'
)
)
)
}
)
}
}
})
})
this
.
addPaletteFunctions
(
item
.
arciBelongId
,
item
.
arciBelongName
,
true
,
fns
);
this
.
addPaletteFunctions
(
item
.
assetId
,
item
.
assetName
,
false
,
fns
);
});
});
// $.ajax({
// url: '/drawio/eachart.json', // 代表请求的服务器地址
// method: 'get', // 使用的请求方法
// contentType: 'application/x-www-form-urlencoded', // 请求的 enctype
// dataType: 'json', // 默认根据 response 头部的信息自动推测
// async: true, // 是否使用异步请求的方式
// }).done(data => {
// var ea = data.eadata;
// if(ea) {
// ea.forEach(ele => {
// var ii = ele.elements;
// var items = [];
// ii.forEach(element => {
// // items.push(this.createVertexTemplateEntry(element.styles, element.w, element.h, null, element.name, null, null, element.name));
// items.push(
// this.createEdgeTemplateEntry('endArrow=none;html=1;姓名=测试;', 50, 50, '', 'Line', null, 'simple undirected plain blank no')
// );
// });
// this.addPaletteFunctions(ea.id, ele.title, false, items);
// });
// }
// });
}
}
};
};
})();
})();
\ No newline at end of file
src/api/index.js
View file @
80bd965
...
@@ -453,5 +453,21 @@ export function evoluteFunAndLineAdd(params) {
...
@@ -453,5 +453,21 @@ export function evoluteFunAndLineAdd(params) {
}
}
// 架构视图左侧图元
// 架构视图左侧图元
export
function
queryArchiGraph
(
params
)
{
export
function
queryArchiGraph
(
params
)
{
return
post
(
'/network/arc-ast-cn/assetTree'
,
params
);
return
post
(
'/network/arc-ast-cn/fiveAssetTree'
,
params
);
}
// 元模型字典管理表格
export
function
queryCircleModelDicyTable
(
params
)
{
return
post
(
'/network/archi-model-dict/'
,
params
);
}
// 元模型字典管理,新增
export
function
addCircleModelDicyTable
(
params
)
{
return
post
(
'/network/archi-model-dict/cModelDict'
,
params
);
}
// 元模型字典管理,编辑
export
function
editCircleModelDicyTable
(
params
)
{
return
post
(
'/network/archi-model-dict/uModelDict'
,
params
);
}
// 元模型字典管理,发布,停用
export
function
releaseAndStopCircleModelDicyTable
(
params
)
{
return
post
(
'/network/archi-model-dict/pModelDict'
,
params
);
}
}
\ No newline at end of file
src/views/archi-evolute-line/通用页面.vue
View file @
80bd965
<
temp
late
>
<
temp
late
>
...
@@ -65,6 +65,28 @@
...
@@ -65,6 +65,28 @@
:total=
"pager.total"
>
:total=
"pager.total"
>
</el-pagination>
</el-pagination>
</div>
</div>
<el-dialog
:title=
"is_add_edit == 'add' ? '新建字典' : '编辑字典'"
:visible
.
sync=
"add_dialog"
:center=
"false"
:close-on-click-modal=
"false"
width=
"60%"
>
<el-form
:model=
"ruleForm"
ref=
"form"
:rules=
"rules"
style=
"display: flex;flex-wrap: wrap;"
>
<el-form-item
label=
"字典名称:"
prop=
"let1"
>
<el-input
v-no-backslash
v-model=
"ruleForm.let1"
maxlength=
"100"
></el-input>
</el-form-item>
<el-form-item
label=
"字典标识:"
prop=
"let1"
>
<el-input
v-no-backslash
v-model=
"ruleForm.let1"
maxlength=
"100"
></el-input>
</el-form-item>
<el-form-item
class=
"cross1"
label=
"描述:"
prop=
"let3"
>
<el-input
v-no-backslash
type=
"textarea"
:rows=
"3"
maxlength=
"200"
show-word-limit
placeholder=
"请输入内容"
v-model=
"ruleForm.let3"
></el-input>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
class=
"greenButton"
@
click=
"save_dicy"
>
保存
</el-button>
<el-button
@
click=
"add_dialog = false"
>
取消
</el-button>
</span>
</el-dialog>
</div>
</div>
</template>
</template>
...
@@ -83,9 +105,9 @@ export default {
...
@@ -83,9 +105,9 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
add_dialog
:
false
,
is_add_edit
:
'add'
,
tableData
:
[],
tableData
:
[],
query_item3
:
null
,
query_item4
:
null
,
loading
:
false
,
loading
:
false
,
search_select1
:
[],
search_select1
:
[],
pager
:
{
pager
:
{
...
@@ -99,7 +121,8 @@ export default {
...
@@ -99,7 +121,8 @@ export default {
policyName
:
null
,
policyName
:
null
,
conformCount
:
null
,
conformCount
:
null
,
},
},
fuHeDu
:
[]
fuHeDu
:
[],
};
};
},
},
mounted
(){
mounted
(){
...
@@ -113,6 +136,15 @@ export default {
...
@@ -113,6 +136,15 @@ export default {
})
})
},
},
methods
:
{
methods
:
{
save_dicy
()
{
//保存字典
this
.
$refs
.
form
.
validate
(
valid
=>
{
if
(
valid
)
{
}
else
{
return
false
;
}
});
},
get_fu_he_du_select
()
{
//符合度下拉
get_fu_he_du_select
()
{
//符合度下拉
const
params
=
{
const
params
=
{
key
:
"tech_compliance"
key
:
"tech_compliance"
...
@@ -323,4 +355,23 @@ export default {
...
@@ -323,4 +355,23 @@ export default {
/
deep
/
.el-pagination.is-background
.el-pager
li
:not
(
.disabled
)
.active
{
/
deep
/
.el-pagination.is-background
.el-pager
li
:not
(
.disabled
)
.active
{
background-color
:
#0D867F
;
background-color
:
#0D867F
;
}
}
/
deep
/
.el-dialog__header
{
background-color
:
#0D867F
;
text-align
:
left
;
}
/
deep
/
.el-dialog__title
{
color
:
#fff
;
}
/
deep
/
.el-dialog__close
{
color
:
#fff
;
}
.greenButton
{
background-color
:
#0D867F
;
color
:
#fff
;
}
.el-form-item
{
display
:
flex
;
align-items
:
center
;
width
:
33%
;
}
</
style
>
</
style
>
\ No newline at end of file
src/views/archi-view-manage/index.vue
View file @
80bd965
...
@@ -436,18 +436,28 @@ export default {
...
@@ -436,18 +436,28 @@ export default {
localStorage
.
setItem
(
'xmlData'
,
xmlData
);
localStorage
.
setItem
(
'xmlData'
,
xmlData
);
localStorage
.
setItem
(
'xmlTitle'
,
xmlTitle
);
localStorage
.
setItem
(
'xmlTitle'
,
xmlTitle
);
Promise
.
all
([
this
.
queryDrawioGraph
(
id
),
this
.
queryDrawioGraph2
(
id
)
]).
then
(
res2
=>
{
Promise
.
all
([
this
.
queryDrawioGraph
(
id
),
this
.
queryDrawioGraph2
(
id
)
,
this
.
getArchiGraph
()
]).
then
(
res2
=>
{
localStorage
.
setItem
(
'commonGraph'
,
JSON
.
stringify
({
show
:
true
,
graph
:
res2
[
0
].
dataEle
}));
localStorage
.
setItem
(
'commonGraph'
,
JSON
.
stringify
({
show
:
true
,
graph
:
res2
[
0
].
dataEle
}));
localStorage
.
setItem
(
'standardGraph'
,
JSON
.
stringify
({
show
:
true
,
graph
:
res2
[
1
].
dataEle
}));
localStorage
.
setItem
(
'standardGraph'
,
JSON
.
stringify
({
show
:
true
,
graph
:
res2
[
1
].
dataEle
}));
localStorage
.
setItem
(
'joinGraph'
,
JSON
.
stringify
({
state
:
2
,
graph
:
res2
[
2
]
}));
this
.
$router
.
push
(
`/main/archiViewManageDetails?id=
${
id
}
&info=
${
this
.
graphGroup
}
`
,
()
=>
{},
()
=>
{}
);
});
});
}
}
});
});
},
},
queryArchiGraph
()
{
//查询综合图
getArchiGraph
()
{
//查询综合图
queryArchiGraph
({}).
then
(
res
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
console
.
log
(
res
)
queryArchiGraph
({}).
then
(
res
=>
{
localStorage
.
setItem
(
'joinGraph'
,
JSON
.
stringify
({
graph1
:
res2
[
1
].
dataEle
,
graph2
:
[]
}));
if
(
res
.
code
==
200
)
{
resolve
(
res
.
data
);
}
else
{
Message
({
type
:
'error'
,
message
:
res
.
msg
});
reject
(
res
.
msg
);
}
})
})
})
},
},
treeClick
(
data
,
node
,
e
)
{
//树点击的时候
treeClick
(
data
,
node
,
e
)
{
//树点击的时候
...
...
src/views/meta-model-list/index.vue
View file @
80bd965
...
@@ -309,6 +309,7 @@ export default {
...
@@ -309,6 +309,7 @@ export default {
Promise
.
all
([
this
.
queryDrawioGraph
(
item
.
metaModelId
),
this
.
queryDrawioGraph2
(
item
.
metaModelId
)
]).
then
(
res2
=>
{
Promise
.
all
([
this
.
queryDrawioGraph
(
item
.
metaModelId
),
this
.
queryDrawioGraph2
(
item
.
metaModelId
)
]).
then
(
res2
=>
{
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
[
1
].
dataEle
}));
localStorage
.
setItem
(
'standardGraph'
,
JSON
.
stringify
({
show
:
true
,
graph
:
res2
[
1
].
dataEle
}));
localStorage
.
setItem
(
'joinGraph'
,
JSON
.
stringify
({
state
:
1
,
graph
:
res2
[
1
].
dataEle
}));
this
.
$router
.
push
(
`/main/metaModelListDetails?id=
${
item
.
metaModelId
}
&info=
${
item
.
version
}
`
,
()
=>
{},
()
=>
{}
);
this
.
$router
.
push
(
`/main/metaModelListDetails?id=
${
item
.
metaModelId
}
&info=
${
item
.
version
}
`
,
()
=>
{},
()
=>
{}
);
});
});
}
}
...
...
src/views/metaModelDic/index(旧).vue
0 → 100644
View file @
80bd965
<
template
>
<
template
>
<div
class=
"JiaGouYuanShuGuanLi"
>
<div
class=
"table_container"
>
<el-tabs
v-model=
"activeName"
@
tab-click=
"handleClick"
>
<el-tab-pane
label=
"架构元素"
name=
"page1"
>
<page1></page1>
</el-tab-pane>
<el-tab-pane
label=
"元素关系"
name=
"page2"
>
<page2></page2>
</el-tab-pane>
<el-tab-pane
label=
"架构视图"
name=
"page3"
>
<page3></page3>
</el-tab-pane>
</el-tabs>
</div>
</div>
</
template
>
<
script
>
import
page1
from
"./pages/page1"
;
import
page2
from
"./pages/page2"
;
import
page3
from
"./pages/page3"
;
export
default
{
name
:
'metaModelDic'
,
components
:
{
page1
,
page2
,
page3
,
},
data
()
{
return
{
activeName
:
"page1"
,
};
},
mounted
()
{
},
created
()
{
},
methods
:
{
handleClick
(
tab
)
{
// console.log(tab);
},
},
}
</
script
>
<
style
lang=
"scss"
scoped
>
.JiaGouYuanShuGuanLi
{
width
:
100%
;
height
:
100%
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
flex-start
;
align-items
:
center
;
}
.search_menu
{
display
:
flex
;
justify-content
:
space-between
;
}
.search_menu_item_container
{
display
:
flex
;
align-items
:
center
;
}
.search_menu_btn_container
{
display
:
flex
;
align-items
:
center
;
}
.search_menu_item
{
display
:
flex
;
align-items
:
center
;
width
:
344px
;
}
.search_title
{
/* width: 20%; */
flex-shrink
:
0
;
margin-right
:
15px
;
}
.search_item
{
width
:
60%
;
}
.search_btn
{
width
:
100%
;
display
:
flex
;
margin-top
:
50px
;
margin-bottom
:
20px
;
}
.add_btn
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
width
:
76px
;
height
:
32px
;
background
:
rgba
(
13
,
134
,
127
,
0.1
);
border-radius
:
6px
6px
6px
6px
;
border
:
1px
solid
#0D867F
;
font-size
:
14px
;
color
:
#0D867F
;
cursor
:
pointer
;
}
.version_btn
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
width
:
104px
;
height
:
32px
;
background
:
rgba
(
13
,
134
,
127
,
0.1
);
border-radius
:
6px
6px
6px
6px
;
border
:
1px
solid
#0D867F
;
font-size
:
14px
;
color
:
#0D867F
;
cursor
:
pointer
;
margin-left
:
15px
;
}
.query_btn
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
width
:
76px
;
height
:
32px
;
background
:
rgba
(
13
,
134
,
127
,
1
);
border-radius
:
6px
6px
6px
6px
;
border
:
1px
solid
#0D867F
;
font-size
:
14px
;
color
:
#fff
;
margin-right
:
10px
;
cursor
:
pointer
;
}
.reset_btn
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
width
:
76px
;
height
:
32px
;
background
:
rgba
(
244
,
244
,
244
,
1
);
border-radius
:
6px
6px
6px
6px
;
border
:
1px
solid
#ccc
;
font-size
:
14px
;
color
:
#666
;
cursor
:
pointer
;
}
.btn_icon
{
margin-right
:
10px
;
}
.table_container
{
width
:
97%
;
margin-top
:
20px
;
}
.el-pagination
{
margin-top
:
50px
;
}
.dialog_form_item
{
display
:
flex
;
align-items
:
center
;
margin-bottom
:
10px
;
}
.dialog_form_item_title
{
flex-shrink
:
0
;
margin-right
:
15px
;
width
:
100px
;
text-align
:
right
;
.reqIcon{
color
:
red
;
}
}
/
deep
/
.el-dialog__header
{
text-align
:
left
;
}
/
deep
/
.el-pagination.is-background
.el-pager
li
:not
(
.disabled
)
.active
{
background-color
:
#0D867F
;
}
.greenButton
{
background-color
:
#0D867F
;
color
:
#fff
;
}
</
style
>
\ No newline at end of file
src/views/metaModelDic/index.vue
View file @
80bd965
This diff is collapsed.
Click to expand it.
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