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 116ce6e1
authored
Apr 10, 2024
by
史敦盼
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'sdp-v1'
2 parents
792ccee5
28d6ee83
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
80 additions
and
44 deletions
public/drawio/extention/js/exFormat.js
public/drawio/js/grapheditor/Sidebar.js
src/router/index.js
src/views/archi-ele-list/index.vue
src/views/archiEleRela/index.vue
src/views/archiViewConfig/index.vue
src/views/busi-assets-list/index.vue
public/drawio/extention/js/exFormat.js
View file @
116ce6e
...
...
@@ -65,29 +65,29 @@ const initAttributePanel = function(that) {
}
//保存属性按钮--------------------------------------------------------------------------
const
save_button
=
document
.
createElement
(
'button'
);
save_button
.
innerHTML
=
'保存属性'
;
save_button
.
style
.
cssText
=
'padding: 4px;text-align: center;cursor: pointer;background-color: rgb(228,228,228);color: rgb(97, 97, 97);'
;
//
二次开发-
保存属性按钮--------------------------------------------------------------------------
//
const save_button = document.createElement('button');
//
save_button.innerHTML = '保存属性';
//
save_button.style.cssText = 'padding: 4px;text-align: center;cursor: pointer;background-color: rgb(228,228,228);color: rgb(97, 97, 97);';
save_button
.
style
.
display
=
propertyList
.
length
>
0
?
'block'
:
'none'
;
//
save_button.style.display = propertyList.length > 0 ? 'block' : 'none';
save_button
.
addEventListener
(
'click'
,
()
=>
{
//
save_button.addEventListener('click', () => {
let
propertyArray
=
[];
propertyList
.
forEach
(
item
=>
{
propertyArray
.
push
({
propertyId
:
item
.
id
,
propertyValue
:
item
.
value
})
})
//
let propertyArray = [];
// console.log('propertyList', propertyList)
//
propertyList.forEach(item => {
//
propertyArray.push({
//
propertyId: item.id,
//
propertyValue: item.value
//
})
//
})
window
.
parent
.
postMessage
({
type
:
'saveProperty'
,
data
:
propertyArray
},
'*'
);
});
//
window.parent.postMessage({ type: 'saveProperty', data: propertyArray }, '*');
//
});
button_container
.
appendChild
(
save_button
);
that
.
container
.
appendChild
(
button_container
);
//
button_container.appendChild(save_button);
//
that.container.appendChild(button_container);
if
(
propertyList
.
length
>
0
)
{
...
...
@@ -165,6 +165,7 @@ const addListPanel = function(that, originAttr, attrName_, attrValue_, controlTy
const
item_right_input
=
document
.
createElement
(
'input'
);
item_right_input
.
type
=
"text"
;
item_right_input
.
value
=
attrValue_
;
item_right_input
.
readOnly
=
true
;
item_right_input
.
style
.
cssText
=
'width: 100%;'
;
item_right_input
.
className
=
'attrValue'
;
item_right_input
.
oninput
=
function
(
e
)
{
...
...
public/drawio/js/grapheditor/Sidebar.js
View file @
116ce6e
...
...
@@ -3771,17 +3771,18 @@ Sidebar.prototype.addClickHandler = function(elt, ds, cells, clickFn)
ds
.
mouseDown
=
function
(
evt
)
{
if
(
cells
[
0
].
style
.
includes
(
"assetName"
))
{
//二次开发,左侧点击图形时候给图形设置名称
const
assetNameList
=
cells
[
0
].
style
.
match
(
/assetName=
\[[^\]]
*
\]
/
);
const
assetName
=
assetNameList
[
0
].
split
(
"assetName=["
)[
1
].
split
(
"]"
)[
0
];
// console.log(assetName);
cells
[
0
].
value
=
assetName
;
}
// if(cells[0].style.includes("assetName")) {//二次开发,左侧点击图形时候给图形设置名称
// const assetNameList = cells[0].style.match(/assetName=\[[^\]]*\]/);
// const assetName = assetNameList[0].split("assetName=[")[1].split("]")[0];
// // console.log(assetName);
// cells[0].value = assetName;
// }
// 二次开发-元模型管理详情
console
.
log
(
evt
,
cells
[
0
]
)
if
(
evt
.
target
.
text
)
{
console
.
log
(
evt
,
cells
)
if
(
evt
.
target
.
text
&&
!
evt
.
target
.
text
.
includes
(
'图例'
)
)
{
cells
[
0
].
value
=
evt
.
target
.
text
;
cells
[
0
].
style
=
cells
[
0
].
style
.
replace
(
'fontColor=#ffffff;'
,
'fontColor=#000000'
)
cells
[
0
].
style
=
cells
[
0
].
style
.
replace
(
'fontColor=#ffffff;'
,
'fontColor=#000000
;
'
)
// cells[0].geometry.x = 0
// cells[0].geometry.y = 0
}
...
...
src/router/index.js
View file @
116ce6e
...
...
@@ -104,6 +104,7 @@ export const routes = [
component
:
()
=>
import
(
'@/views/meta-model-list/index.vue'
),
meta
:
{
title
:
'元模型管理'
,
keepAlive
:
true
},
},
{
...
...
@@ -193,6 +194,7 @@ export const routes = [
component
:
()
=>
import
(
'@/views/archi-view-manage/index.vue'
),
meta
:
{
title
:
'架构视图管理'
,
keepAlive
:
true
},
},
{
...
...
src/views/archi-ele-list/index.vue
View file @
116ce6e
...
...
@@ -646,9 +646,9 @@
}"
v-for=
"(item, index) in search_select1"
:key=
"item.belongId"
@
click=
"showCurrentGraph2(item.
name
, index)"
@
click=
"showCurrentGraph2(item.
label
, index)"
>
{{ item.
name
}}
{{ item.
label
}}
</div>
</div>
<div
...
...
@@ -681,7 +681,7 @@
</div>
</div>
</el-tab-pane>
<el-tab-pane
label=
"常规图元"
name=
"常规图元"
style=
"height: 400px"
>
<
!-- <
el-tab-pane label="常规图元" name="常规图元" style="height: 400px">
<div style="height: 400px; display: flex; align-items: center">
<div
style="
...
...
@@ -738,7 +738,7 @@
</div>
</div>
</div>
</el-tab-pane>
</el-tab-pane>
-->
</el-tabs>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
class=
"greenButton"
@
click=
"save_graph"
>
确定
</el-button>
...
...
@@ -1106,8 +1106,8 @@ export default {
openGraphDialog
()
{
//打开图形选择窗口
this
.
graph_dialog
=
true
this
.
showCurrentGraph
(
this
.
search_select1
[
0
].
name
,
0
)
this
.
showCurrentGraph2
(
this
.
search_select1
[
0
].
name
,
0
)
//
this.showCurrentGraph(this.search_select1[0].name, 0)
this
.
showCurrentGraph2
(
this
.
search_select1
[
0
].
label
,
0
)
},
tabsClick
(
data
)
{
console
.
log
(
data
)
...
...
src/views/archiEleRela/index.vue
View file @
116ce6e
...
...
@@ -295,7 +295,7 @@
</div>
</div>
</div>
<div
class=
"dialog_form_item"
>
<
!-- <
div class="dialog_form_item">
<div class="dialog_form_item_title">元素关系</div>
<div class="formArea">
<div
...
...
@@ -305,7 +305,7 @@
>
情况{{ index + 1 }}
<div class="formItem">
<div
class=
"label"
>
起点元素
1
</div>
<div class="label">起点元素</div>
<el-select
filterable
v-model="item.eleGtId"
...
...
@@ -322,7 +322,7 @@
</el-select>
</div>
<div class="formItem">
<div
class=
"label"
>
终点元素
2
</div>
<div class="label">终点元素</div>
<el-select
filterable
v-model="item.eleLtId"
...
...
@@ -372,7 +372,7 @@
</div>
</div>
</div>
</div>
</div>
-->
<div
style=
"text-align: right; margin: 20px 0 10px 0"
v-if=
"title != '新建元素关系'"
...
...
src/views/archiViewConfig/index.vue
View file @
116ce6e
...
...
@@ -1135,6 +1135,7 @@ export default {
}
else
if
(
type
==
'edit'
)
{
this
.
add_dialog
=
true
this
.
title
=
'编辑架构视图'
this
.
$refs
.
viewForm
.
resetFields
()
this
.
resetForm
()
this
.
viewId
=
item
.
viewId
...
...
src/views/busi-assets-list/index.vue
View file @
116ce6e
...
...
@@ -164,6 +164,13 @@
align=
"center"
></el-table-column>
<el-table-column
prop=
"assetNumber"
label=
"资产编号"
width=
"140"
:show-overflow-tooltip=
"true"
align=
"center"
></el-table-column>
<el-table-column
prop=
"eleName"
label=
"所属元素"
align=
"center"
...
...
@@ -320,7 +327,21 @@
</el-select>
</el-form-item>
<el-form-item
label=
"上级元素:"
v-if=
"ruleForm.let3 && preArcList.length"
>
<el-tag
:class=
"{'m-r-10': idx!= preArcList.length-1}"
v-for=
"(item, idx) in preArcList"
:key=
"idx"
>
{{ item.parentElement }}
</el-tag>
<el-select
:disabled=
"is_add_edit == 'view' ? true : false"
v-model=
"ruleForm.preArc"
filterable
clearable
placeholder=
"请选择"
>
<el-option
v-for=
"(item, idx) in preArcList"
:key=
"idx"
:label=
"item.parentElement"
:value=
"item.parentElement"
></el-option>
</el-select>
<!-- <el-tag :class="{'m-r-10': idx!= preArcList.length-1}" v-for="(item, idx) in preArcList" :key="idx">{{ item.parentElement }}</el-tag> -->
</el-form-item>
<!-- <el-form-item label="关联资产:" prop="let6">
<el-select clearable @change="guanLianZiChanChange" filterable remote :remote-method="queryGuanLianZiChan" placeholder="请选择" multiple v-model="ruleForm.let6">
...
...
@@ -346,6 +367,7 @@
</el-form-item>
<el-form-item
label=
"上级节点:"
prop=
"let2"
>
<el-cascader
:disabled=
"is_add_edit == 'view' || !ruleForm.preArc ? true : false"
v-model=
"cascaderValue"
:options=
"treeSelectData"
filterable
...
...
@@ -596,6 +618,7 @@ export default {
color
:
'#d2edfd'
,
dynamicForm0_
:
[],
dynamicForm_
:
[],
preArc
:
''
},
rules
:
{
let1
:
[{
required
:
true
,
message
:
'请输入资产名称'
,
trigger
:
'blur'
}],
...
...
@@ -784,7 +807,7 @@ export default {
}
else
{
targetAsset
=
[{}]
}
const
parentElement
=
this
.
preArcList
.
map
(
v
=>
v
.
parentElement
)
||
[]
//
const parentElement = this.preArcList.map(v => v.parentElement) || []
const
params
=
{
archiAssetState
:
this
.
searchParams
.
archiAssetState
,
archiStage
:
this
.
searchParams
.
archiStage
,
...
...
@@ -804,7 +827,7 @@ export default {
icon
:
this
.
selectGraphSrc
,
iconName
:
this
.
selectGraphShape
,
color
:
this
.
ruleForm
.
color
,
parentElement
parentElement
:
[
this
.
ruleForm
.
preArc
]
}
const
requestParams
=
this
.
is_add_edit
==
'add'
...
...
@@ -995,15 +1018,20 @@ export default {
},
viewItem
(
row
)
{
//查看架构
this
.
getZuJianLeiXingSelect
(
null
).
then
((
res
)
=>
{
this
.
zuJianLeiXingSelect
=
res
})
this
.
addDialog
=
true
console
.
log
(
1
)
this
.
is_add_edit
=
'view'
this
.
ruleForm
.
let1
=
row
.
assetName
this
.
ruleForm
.
let2
=
row
.
parentAssetName
this
.
ruleForm
.
let3
=
row
.
archiEleId
this
.
ruleForm
.
preArc
=
row
.
parentElement
?.
replace
(
/
\]
|
\[
|
\/?
]/g
,
''
)
this
.
getZuJianLeiXingSelect
(
null
).
then
((
res
)
=>
{
this
.
zuJianLeiXingSelect
=
res
if
(
this
.
ruleForm
.
let3
)
{
this
.
zuJianLeiXingSelectChange
(
this
.
ruleForm
.
let3
)
}
})
this
.
ruleForm
.
let4
=
row
.
sort
this
.
ruleForm
.
let5
=
row
.
isShow
==
0
?
'显示'
:
'隐藏'
this
.
ruleForm
.
color
=
row
.
color
...
...
@@ -1052,7 +1080,7 @@ export default {
this
.
ruleForm
.
let1
=
row
.
assetName
this
.
ruleForm
.
let2
=
row
.
parentAssetName
this
.
ruleForm
.
let3
=
row
.
archiEleId
this
.
ruleForm
.
preArc
=
row
.
parentElement
?.
replace
(
/
\]
|
\[
|
\/?
]/g
,
''
)
this
.
ruleForm
.
let4
=
row
.
sort
this
.
ruleForm
.
let5
=
row
.
isShow
==
0
?
'显示'
:
'隐藏'
this
.
ruleForm
.
color
=
row
.
color
...
...
@@ -1070,6 +1098,9 @@ export default {
const
currentItem
=
this
.
zuJianLeiXingSelect
.
find
(
(
item
)
=>
item
.
elementId
==
this
.
ruleForm
.
let3
,
)
if
(
this
.
ruleForm
.
let3
)
{
this
.
zuJianLeiXingSelectChange
(
this
.
ruleForm
.
let3
)
}
if
(
currentItem
&&
currentItem
.
eaLevel
==
1
)
{
this
.
disabled1
=
true
}
else
{
...
...
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