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