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 89c21da4
authored
Feb 23, 2024
by
liuyong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
1 parent
7ba42abc
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
202 additions
and
17 deletions
public/drawio/extention/js/exGraph.js
src/views/archi-view-manage/canvas/index.vue
src/views/archi-view-manage/details.vue
src/views/archiEleRela/index.vue
src/views/archiViewConfig/index.vue
public/drawio/extention/js/exGraph.js
View file @
89c21da
...
...
@@ -45,7 +45,7 @@
if
(
joinGraph_
.
state
==
2
)
{
const
joinGraph
=
joinGraph_
.
graph
;
//
this.sidebarTitles = true;//勾选标签
this
.
sidebarTitles
=
true
;
//勾选标签
joinGraph
.
forEach
(
item
=>
{
let
fns
=
[];
...
...
@@ -54,7 +54,7 @@
if
(
item2
.
eleType
==
'2'
&&
item2
.
iconName
&&
item2
.
color
)
{
fns
.
push
(
this
.
createVertexTemplateEntry
(
item2
.
iconName
+
';fillColor='
+
item2
.
color
+
';'
+
'attr=[];'
,
item2
.
iconName
+
';fillColor='
+
item2
.
color
+
';'
+
'attr=[];'
+
'assetId='
+
item2
.
assetId
+
';'
+
'archiBelongId='
+
item2
.
archiBelongId
+
';'
,
150
,
75
,
null
,
...
...
src/views/archi-view-manage/canvas/index.vue
View file @
89c21da
<
template
>
<div
class=
"canvas"
>
<div
class=
"left_graph_container"
>
<Drawio
:initGraphId=
"routerId"
></Drawio>
</div>
<div
class=
"right_graph_container"
>
</div>
<el-dialog
title=
"属性关联"
...
...
@@ -53,6 +58,8 @@
saveVersionArchiViewManageCardDetails
,
save_drawio_attribute
,
}
from
'@/api/index.js'
;
import
$
from
'jquery'
;
export
default
{
name
:
'Canvas'
,
components
:
{
...
...
@@ -67,6 +74,7 @@
search_select1
:
[],
graphList
:
[],
eleLevel
:
null
,
status
:
1
,
};
},
mounted
(){
...
...
@@ -126,6 +134,18 @@
}
},
methods
:
{
openDrawer
()
{
if
(
this
.
status
==
1
)
{
$
(
".left_graph_container"
).
animate
({
width
:
"85%"
},
300
,
'linear'
,
function
()
{
$
(
".right_graph_container"
).
css
(
'display'
,
'block'
);
});
this
.
status
=
2
;
}
else
{
$
(
".left_graph_container"
).
animate
({
width
:
"100%"
},
300
,
'linear'
);
$
(
".right_graph_container"
).
css
(
'display'
,
'none'
);
this
.
status
=
1
;
}
},
showCurrentGraph
(
name
,
idx
)
{
//图形选择窗口的文字点击
this
.
nameIndex
=
idx
;
this
.
graphIndex
=
-
1
;
...
...
@@ -243,9 +263,19 @@
}
</
style
>
<
style
scoped
>
.left_graph_container
{
width
:
100%
;
height
:
100%
;
}
.right_graph_container
{
width
:
15%
;
height
:
100%
;
display
:
none
;
}
.canvas
{
width
:
100%
;
height
:
100%
;
display
:
flex
;
}
/
deep
/
.el-dialog__header
{
background-color
:
#0D867F
;
...
...
src/views/archi-view-manage/details.vue
View file @
89c21da
<
template
>
<div
class=
"Details"
>
<template
v-if=
"showBtn"
>
<el-button
type=
"text"
class=
"lookListbtn"
@
click=
"lookList"
>
清单目录
</el-button>
<el-button
type=
"text"
class=
"backPrevGraphbtn"
@
click=
"backGraph"
>
返回上级图形
</el-button>
<el-button
type=
"text"
class=
"versionBtn"
@
click=
"releaseVersion"
>
版本发布
</el-button>
<el-button
type=
"text"
class=
"saveFileBtn"
@
click=
"saveFile"
>
保存
</el-button>
...
...
@@ -11,7 +12,7 @@
<span
slot=
"label"
>
<i
class=
"el-icon-picture"
></i>
</span>
<Graph></Graph>
<Graph
ref=
"graphComponent"
></Graph>
</el-tab-pane>
<el-tab-pane>
<span
slot=
"label"
>
...
...
@@ -38,6 +39,7 @@ import {
saveVersionArchiViewManageCardDetails
,
saveArchiViewManageCardDetails
}
from
'@/api/index.js'
;
export
default
{
name
:
'Details'
,
components
:
{
...
...
@@ -91,6 +93,9 @@ export default {
}
},
methods
:
{
lookList
()
{
this
.
$refs
.
graphComponent
.
openDrawer
();
},
saveFile
()
{
document
.
getElementById
(
"drawioGraph"
).
contentWindow
.
postMessage
({
type
:
'saveFileSignal'
}
,
'*'
);
},
...
...
@@ -153,6 +158,13 @@ export default {
height
:
100%
;
position
:
relative
;
}
.lookListbtn
{
position
:
absolute
;
right
:
480px
;
top
:
0px
;
z-index
:
9
;
color
:
#0D867F
;
}
.backPrevGraphbtn
{
position
:
absolute
;
right
:
360px
;
...
...
src/views/archiEleRela/index.vue
View file @
89c21da
...
...
@@ -41,7 +41,7 @@
<p>
版本发布
</p>
</div>
</div>
<el-table
:data=
"tableData"
stripe
border
@
selection-change=
"handleSelectionChange"
height=
"450"
>
<el-table
:data=
"tableData"
stripe
border
v-loading=
"loading"
@
selection-change=
"handleSelectionChange"
height=
"450"
>
<el-table-column
type=
"selection"
width=
"55"
:selectable=
"selectInit"
></el-table-column>
<el-table-column
type=
"index"
label=
"序号"
width=
"80"
align=
"center"
></el-table-column>
<el-table-column
prop=
"rsName"
label=
"元素关系名称"
align=
"center"
></el-table-column>
...
...
@@ -66,11 +66,11 @@
<el-table-column
label=
"操作"
width=
"450"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<div
style=
"display: flex;align-items: center;justify-content: center;"
>
<el-button
icon=
"el-icon-view"
size=
"mini"
@
click=
"operate('view',scope.row)"
>
查看
</el-button>
<el-button
:class=
"scope.row.state == 1 ? '':'editBtn'
"
icon=
"el-icon-edit"
size=
"mini"
@
click=
"operate('edit',scope.row)"
:disabled=
"scope.row.state == 1"
>
编辑
</el-button>
<el-button
:class=
"scope.row.state == 1 ? '':'editBtn'
"
icon=
"el-icon-upload2"
size=
"mini"
@
click=
"operate('pushEdit',scope.row)"
:disabled=
"scope.row.state == 1"
>
发布
</el-button>
<el-button
:class=
"scope.row.state != 1 ? '':'stopBtn'
"
icon=
"el-icon-remove-outline"
size=
"mini"
@
click=
"operate('stop',scope.row)"
:disabled=
"scope.row.state != 1"
>
停用
</el-button>
<el-button
:class=
"scope.row.state != 2 ? '':'delBtn'
"
icon=
"el-icon-delete"
size=
"mini"
@
click=
"operate('del',scope.row)"
:disabled=
"scope.row.state != 2"
>
删除
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-view"
size=
"mini"
@
click=
"operate('view',scope.row)"
>
查看
</el-button>
<el-button
type=
"primary
"
icon=
"el-icon-edit"
size=
"mini"
@
click=
"operate('edit',scope.row)"
:disabled=
"scope.row.state == 1"
>
编辑
</el-button>
<el-button
type=
"primary
"
icon=
"el-icon-upload2"
size=
"mini"
@
click=
"operate('pushEdit',scope.row)"
:disabled=
"scope.row.state == 1"
>
发布
</el-button>
<el-button
class=
"tingYong_btn
"
icon=
"el-icon-remove-outline"
size=
"mini"
@
click=
"operate('stop',scope.row)"
:disabled=
"scope.row.state != 1"
>
停用
</el-button>
<el-button
class=
"shanChu_btn
"
icon=
"el-icon-delete"
size=
"mini"
@
click=
"operate('del',scope.row)"
:disabled=
"scope.row.state != 2"
>
删除
</el-button>
</div>
</
template
>
</el-table-column>
...
...
@@ -274,8 +274,14 @@ import {
getJGYSGLUpdateBatch
,
getEleList
,
query_jia_gou_gui_shu
,
getYMXZDGLProyList
,
getYMXZDGLProyAdd
,
getYMXZDGLProyUpdate
,
getYMXZDGLProyDel
,
gAllDictKey
}
from
"@/api/index.js"
;
import
$
from
'jquery'
;
import
{
MessageBox
,
Message
}
from
'element-ui'
;
export
default
{
...
...
@@ -285,6 +291,7 @@ export default {
},
data
()
{
return
{
loading
:
false
,
dicy_dialog
:
false
,
ruleForm2
:
{
let1
:
null
,
...
...
@@ -434,11 +441,56 @@ export default {
created
()
{
},
methods
:
{
queryAllKey
()
{
//查询控件右边的下拉框值
gAllDictKey
().
then
(
res
=>
{
this
.
controlValueSelect
=
res
.
data
;
})
},
edit_dicy
(
row
){
//编辑字典
this
.
dicy_dialog
=
true
;
this
.
is_add_edit2
=
'edit'
;
this
.
queryAllKey
();
this
.
propertyId
=
row
.
propertyId
;
this
.
ruleForm2
.
let1
=
row
.
fieldName
;
this
.
ruleForm2
.
let2
=
row
.
cnName
;
this
.
ruleForm2
.
let3
=
row
.
displayOrder
;
this
.
ruleForm2
.
let4
=
row
.
contentLength
;
this
.
ruleForm2
.
let5
=
row
.
notNull
==
'0'
?
'是'
:
'否'
;
this
.
ruleForm2
.
let6
=
row
.
isShow
==
'0'
?
'显示'
:
'不显示'
;
this
.
ruleForm2
.
let7
=
String
(
row
.
controlType
);
this
.
ruleForm2
.
let8
=
row
.
dictKey
;
},
delete_dicy
(
row
){
//删除字典
MessageBox
.
confirm
(
'确定删除?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
customClass
:
'messageClass'
,
confirmButtonClass
:
'confirmClass'
,
type
:
'warning'
}).
then
(()
=>
{
const
params
=
{
propertyId
:
row
.
propertyId
,
}
getYMXZDGLProyDel
(
params
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
getDicyTable
();
Message
({
type
:
'success'
,
message
:
'删除成功!'
});
}
else
{
Message
({
type
:
'error'
,
message
:
res
.
msg
});
}
});
}).
catch
(()
=>
{
Message
({
type
:
'info'
,
message
:
'已取消'
});
});
},
openDicyDialog
()
{
//打开字典窗口
this
.
dicy_dialog
=
true
;
...
...
@@ -453,11 +505,57 @@ export default {
this
.
ruleForm2
.
let6
=
'显示'
;
this
.
ruleForm2
.
let7
=
null
;
});
this
.
queryAllKey
();
},
save_dicy
()
{
//字典窗口保存
this
.
$refs
.
form2
.
validate
(
valid
=>
{
if
(
valid
)
{
const
params
=
{
fieldName
:
this
.
ruleForm2
.
let1
,
cnName
:
this
.
ruleForm2
.
let2
,
displayOrder
:
this
.
ruleForm2
.
let3
,
contentLength
:
this
.
ruleForm2
.
let4
,
controlType
:
this
.
ruleForm2
.
let7
,
type
:
2
,
typeId
:
this
.
formData
.
eleRelaId
,
dictKey
:
this
.
ruleForm2
.
let8
,
notNull
:
this
.
ruleForm2
.
let5
==
'是'
?
0
:
1
,
isShow
:
this
.
ruleForm2
.
let6
==
'显示'
?
0
:
1
,
};
const
requestParams
=
this
.
is_add_edit2
==
'add'
?
params
:
{
...
params
,
propertyId
:
this
.
propertyId
};
if
(
this
.
is_add_edit2
==
'add'
)
{
getYMXZDGLProyAdd
(
requestParams
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
dicy_dialog
=
false
;
this
.
getDicyTable
();
Message
({
type
:
'success'
,
message
:
'保存成功!'
});
}
else
{
Message
({
type
:
'error'
,
message
:
res
.
msg
});
}
});
}
else
{
getYMXZDGLProyUpdate
(
requestParams
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
dicy_dialog
=
false
;
this
.
getDicyTable
();
Message
({
type
:
'success'
,
message
:
'保存成功!'
});
}
else
{
Message
({
type
:
'error'
,
message
:
res
.
msg
});
}
});
}
}
else
{
return
false
;
}
...
...
@@ -465,11 +563,13 @@ export default {
},
// 查询列表
getList
()
{
this
.
loading
=
true
;
if
(
this
.
params
.
state
!=
''
)
{
this
.
params
.
state
=
Number
(
this
.
params
.
state
)
}
getJGYSGLlist
(
this
.
params
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
loading
=
false
;
this
.
page
.
total
=
res
.
data
.
total
;
this
.
tableData
=
res
.
data
.
records
;
}
...
...
@@ -521,6 +621,18 @@ export default {
this
.
params
.
current
=
val
;
this
.
getList
();
},
getDicyTable
()
{
//字典表格
const
params
=
{
type
:
2
,
typeId
:
this
.
formData
.
eleRelaId
}
getYMXZDGLProyList
(
params
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
// console.log(res.data)
this
.
tableData2
=
res
.
data
;
}
});
},
// 所有操作
operate
(
type
,
item
){
this
.
openType
=
type
;
...
...
@@ -535,6 +647,7 @@ export default {
this
.
add_dialog
=
true
;
this
.
title
=
"编辑关系元素"
;
this
.
formData
=
item
;
this
.
getDicyTable
();
}
else
if
(
type
==
"view"
)
{
this
.
add_dialog3
=
true
;
this
.
formData
=
item
;
...
...
@@ -621,6 +734,8 @@ export default {
this
.
$confirm
(
"确认发布吗"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
customClass
:
'messageClass'
,
confirmButtonClass
:
'confirmClass'
,
type
:
"warning"
}).
then
(()
=>
{
this
.
formData
=
item
...
...
@@ -637,9 +752,11 @@ export default {
});
}
else
if
(
type
==
"stop"
)
{
// 停用
this
.
$confirm
(
"确认停用吗"
,
"提示"
,
{
this
.
$confirm
(
"确认停用吗
?
"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
customClass
:
'messageClass'
,
confirmButtonClass
:
'confirmClass'
,
type
:
"warning"
}).
then
(()
=>
{
this
.
formData
=
item
;
...
...
@@ -656,9 +773,11 @@ export default {
});
}
else
if
(
type
==
"del"
)
{
// 删除
this
.
$confirm
(
"确认删除吗"
,
"提示"
,
{
this
.
$confirm
(
"确认删除吗
?
"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
customClass
:
'messageClass'
,
confirmButtonClass
:
'confirmClass'
,
type
:
"warning"
}).
then
(()
=>
{
this
.
formData
=
item
;
...
...
@@ -806,6 +925,14 @@ export default {
}
</
script
>
<
style
>
.confirmClass
{
background-color
:
#0D867F
!important
;
}
.el-message-box__content
{
padding
:
60px
15px
60px
15px
;
}
</
style
>
<
style
lang=
"scss"
scoped
>
.JiaGouYuanShuGuanXiGuanLi
{
width
:
100%
;
...
...
@@ -835,6 +962,18 @@ export default {
color
:
#0D867F
;
border
:
0
;
}
.el-button.is-disabled
{
color
:
#C0C4CC
!important
;
background-color
:
#fff
!important
;
}
.shanChu_btn
{
color
:
#DD6A15
;
background-color
:
#F8EBE2
;
}
.tingYong_btn
{
color
:
#DEA82A
;
background-color
:
#FDF6E6
;
}
/
deep
/
.dialog1
.el-dialog__body
{
height
:
55vh
;
overflow-y
:
auto
;
...
...
src/views/archiViewConfig/index.vue
View file @
89c21da
...
...
@@ -67,10 +67,10 @@
<el-table-column
label=
"操作"
width=
"360"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<div
style=
"display: flex;align-items: center;justify-content: center;"
>
<el-button
:class=
"scope.row.state == 1 ? '':'editBtn'
"
icon=
"el-icon-edit"
size=
"mini"
@
click=
"operate('edit',scope.row)"
:disabled=
"scope.row.state == 1"
>
编辑
</el-button>
<el-button
:class=
"scope.row.state == 1 ? '':'editBtn'
"
icon=
"el-icon-upload2"
size=
"mini"
@
click=
"operate('pushEdit',scope.row)"
:disabled=
"scope.row.state == 1"
>
发布
</el-button>
<el-button
:class=
"scope.row.state != 1 ? '':'stopBtn'
"
icon=
"el-icon-remove-outline"
size=
"mini"
@
click=
"operate('stop',scope.row)"
:disabled=
"scope.row.state != 1"
>
停用
</el-button>
<el-button
:class=
"scope.row.state != 2 ? '':'delBtn'
"
icon=
"el-icon-delete"
size=
"mini"
@
click=
"operate('del',scope.row)"
:disabled=
"scope.row.state != 2"
>
删除
</el-button>
<el-button
type=
"primary
"
icon=
"el-icon-edit"
size=
"mini"
@
click=
"operate('edit',scope.row)"
:disabled=
"scope.row.state == 1"
>
编辑
</el-button>
<el-button
type=
"primary
"
icon=
"el-icon-upload2"
size=
"mini"
@
click=
"operate('pushEdit',scope.row)"
:disabled=
"scope.row.state == 1"
>
发布
</el-button>
<el-button
class=
"tingYong_btn
"
icon=
"el-icon-remove-outline"
size=
"mini"
@
click=
"operate('stop',scope.row)"
:disabled=
"scope.row.state != 1"
>
停用
</el-button>
<el-button
class=
"shanChu_btn
"
icon=
"el-icon-delete"
size=
"mini"
@
click=
"operate('del',scope.row)"
:disabled=
"scope.row.state != 2"
>
删除
</el-button>
</div>
</
template
>
</el-table-column>
...
...
@@ -860,6 +860,10 @@ export default {
color
:
#0D867F
;
border
:
0
;
}
.el-button.is-disabled
{
color
:
#C0C4CC
!important
;
background-color
:
#fff
!important
;
}
.el-form-item
{
display
:
flex
;
align-items
:
center
;
...
...
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