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 117f1417
authored
Mar 01, 2024
by
liuyong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
1 parent
3b3052df
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
151 additions
and
44 deletions
src/views/archiViewConfig/index.vue
src/views/busi-assets-list/index.vue
src/views/archiViewConfig/index.vue
View file @
117f141
...
@@ -150,19 +150,25 @@
...
@@ -150,19 +150,25 @@
</el-form>
</el-form>
<div
class=
"dialog_form_item"
>
<div
class=
"dialog_form_item"
>
<div
class=
"dialog_form_item_title"
><span
class=
"reqIcon"
>
*
</span>
元素范围
</div>
<div
class=
"dialog_form_item_title"
><span
class=
"reqIcon"
>
*
</span>
元素范围
</div>
<el-table
:data=
"tableData1"
ref=
"multipleTable1"
border
height=
"195"
@
selection-change=
"handleSelectionChange1"
>
<el-input
v-model=
"formData.eleName"
readonly
></el-input>
<el-button
type=
"primary"
@
click=
"openDialog2"
>
添加
</el-button>
<!-- <el-table :data="tableData1" ref="multipleTable1" border height="195" @selection-change="handleSelectionChange1">
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column type="index" label="序号" width="80" align="center"></el-table-column>
<el-table-column type="index" label="序号" width="80" align="center"></el-table-column>
<el-table-column prop="elementName" label="元素名称" align="center"></el-table-column>
<el-table-column prop="elementName" label="元素名称" align="center"></el-table-column>
</el-table>
</el-table>
-->
</div>
</div>
<div
class=
"dialog_form_item"
>
<div
class=
"dialog_form_item"
>
<div
class=
"dialog_form_item_title"
><span
class=
"reqIcon"
>
*
</span>
元素关系范围
</div>
<div
class=
"dialog_form_item_title"
><span
class=
"reqIcon"
>
*
</span>
元素关系范围
</div>
<el-table
:data=
"tableData2"
ref=
"multipleTable2"
border
height=
"195"
@
selection-change=
"handleSelectionChange2"
>
<el-input
v-model=
"formData.relName"
readonly
></el-input>
<el-button
type=
"primary"
@
click=
"openDialog3"
>
添加
</el-button>
<!-- <el-table :data="tableData2" ref="multipleTable2" border height="195" @selection-change="handleSelectionChange2">
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column type="index" label="序号" width="80" align="center"></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>
<el-table-column prop="rsName" label="元素关系名称" align="center"></el-table-column>
</el-table>
</el-table>
-->
</div>
</div>
<div
style=
"text-align: right;margin: 20px 0 10px 0;width: 96%;"
>
<div
style=
"text-align: right;margin: 20px 0 10px 0;width: 96%;"
>
<el-button
type=
"primary"
size=
"mini"
@
click=
"openDicyDialog"
>
新增
</el-button>
<el-button
type=
"primary"
size=
"mini"
@
click=
"openDicyDialog"
>
新增
</el-button>
...
@@ -247,6 +253,32 @@
...
@@ -247,6 +253,32 @@
</span>
</span>
</el-dialog>
</el-dialog>
<el-dialog
title=
"元素选择"
:visible
.
sync=
"dialog2"
:center=
"false"
:close-on-click-modal=
"false"
width=
"40%"
>
<el-transfer
v-model=
"transferValue1"
:data=
"tableData1"
></el-transfer>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
class=
"greenButton"
@
click=
"saveDialog2"
>
保存
</el-button>
<el-button
@
click=
"cancelDialog2"
>
取消
</el-button>
</span>
</el-dialog>
<el-dialog
title=
"元素关系选择"
:visible
.
sync=
"dialog3"
:center=
"false"
:close-on-click-modal=
"false"
width=
"40%"
>
<el-transfer
v-model=
"transferValue2"
:data=
"tableData2"
></el-transfer>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
class=
"greenButton"
@
click=
"saveDialog3"
>
保存
</el-button>
<el-button
@
click=
"cancelDialog3"
>
取消
</el-button>
</span>
</el-dialog>
</div>
</div>
</template>
</template>
...
@@ -279,6 +311,10 @@ export default {
...
@@ -279,6 +311,10 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
transferValue1
:
[],
transferValue2
:
[],
dialog2
:
false
,
dialog3
:
false
,
dicy_dialog
:
false
,
dicy_dialog
:
false
,
controlValueSelect
:
[],
controlValueSelect
:
[],
is_add_edit2
:
'add'
,
is_add_edit2
:
'add'
,
...
@@ -325,7 +361,7 @@ export default {
...
@@ -325,7 +361,7 @@ export default {
archiEleId
:
""
,
archiEleId
:
""
,
archiEleRelId
:
""
,
archiEleRelId
:
""
,
relName
:
""
,
relName
:
""
,
archiStage
:
null
archiStage
:
null
,
},
},
rules
:
{
rules
:
{
viewName
:
[
viewName
:
[
...
@@ -421,6 +457,52 @@ export default {
...
@@ -421,6 +457,52 @@ export default {
},
},
methods
:
{
methods
:
{
openDialog2
()
{
this
.
dialog2
=
true
;
},
saveDialog2
()
{
let
eleNameArray
=
[];
if
(
this
.
transferValue1
.
length
>
0
)
{
this
.
transferValue1
.
forEach
(
item
=>
{
this
.
tableData1
.
forEach
(
item2
=>
{
if
(
item
==
item2
.
elementId
)
{
eleNameArray
.
push
(
item2
.
elementName
);
}
})
})
this
.
formData
.
eleName
=
eleNameArray
.
join
(
","
);
}
else
{
this
.
formData
.
eleName
=
null
;
}
this
.
dialog2
=
false
;
},
cancelDialog2
()
{
this
.
dialog2
=
false
;
// this.transferValue1 = [];
},
openDialog3
()
{
this
.
dialog3
=
true
;
},
saveDialog3
()
{
let
rsNameArray
=
[];
if
(
this
.
transferValue2
.
length
>
0
)
{
this
.
transferValue2
.
forEach
(
item
=>
{
this
.
tableData2
.
forEach
(
item2
=>
{
if
(
item
==
item2
.
eleRelaId
)
{
rsNameArray
.
push
(
item2
.
rsName
);
}
})
})
this
.
formData
.
relName
=
rsNameArray
.
join
(
","
);
}
else
{
this
.
formData
.
relName
=
null
;
}
this
.
dialog3
=
false
;
},
cancelDialog3
()
{
this
.
dialog3
=
false
;
// this.transferValue2 = [];
},
set_table_height
()
{
//动态设置表格高度
set_table_height
()
{
//动态设置表格高度
const
table_container_height
=
$
(
".table_container"
).
height
();
const
table_container_height
=
$
(
".table_container"
).
height
();
const
search_menu_height
=
$
(
".search_menu"
).
height
();
const
search_menu_height
=
$
(
".search_menu"
).
height
();
...
@@ -605,6 +687,10 @@ export default {
...
@@ -605,6 +687,10 @@ export default {
getEleList
()
{
getEleList
()
{
getEleList
().
then
(
res
=>
{
getEleList
().
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
res
.
data
.
map
(
item
=>
{
item
[
'key'
]
=
item
.
elementId
;
item
[
'label'
]
=
item
.
elementName
;
})
this
.
tableData1
=
res
.
data
;
this
.
tableData1
=
res
.
data
;
}
}
});
});
...
@@ -612,6 +698,10 @@ export default {
...
@@ -612,6 +698,10 @@ export default {
gtEleRelList
()
{
gtEleRelList
()
{
gtEleRelList
().
then
(
res
=>
{
gtEleRelList
().
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
res
.
data
.
map
(
item
=>
{
item
[
'key'
]
=
item
.
eleRelaId
;
item
[
'label'
]
=
item
.
rsName
;
})
this
.
tableData2
=
res
.
data
;
this
.
tableData2
=
res
.
data
;
}
}
});
});
...
@@ -650,6 +740,10 @@ export default {
...
@@ -650,6 +740,10 @@ export default {
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
viewForm
.
resetFields
();
this
.
$refs
.
viewForm
.
resetFields
();
});
});
this
.
formData
.
eleName
=
null
;
this
.
transferValue1
=
[];
this
.
formData
.
relName
=
null
;
this
.
transferValue2
=
[];
}
else
if
(
type
==
"edit"
)
{
}
else
if
(
type
==
"edit"
)
{
this
.
add_dialog
=
true
;
this
.
add_dialog
=
true
;
this
.
title
=
"编辑架构视图"
;
this
.
title
=
"编辑架构视图"
;
...
@@ -657,8 +751,10 @@ export default {
...
@@ -657,8 +751,10 @@ export default {
this
.
viewId
=
item
.
viewId
;
this
.
viewId
=
item
.
viewId
;
this
.
getDicyTable
();
this
.
getDicyTable
();
this
.
formData
=
item
;
this
.
formData
=
item
;
this
.
transferValue1
=
this
.
formData
.
archiEleId
.
split
(
","
).
map
(
item
=>
Number
(
item
));
this
.
transferValue2
=
this
.
formData
.
archiEleRelId
.
split
(
","
).
map
(
item
=>
Number
(
item
));
if
(
item
.
eleName
)
{
if
(
item
.
eleName
)
{
this
.
selectData1
=
item
.
eleName
.
split
(
","
);
this
.
selectData1
=
item
.
eleName
.
split
(
","
);
}
}
...
@@ -671,41 +767,47 @@ export default {
...
@@ -671,41 +767,47 @@ export default {
if
(
item
.
archiEleRelId
)
{
if
(
item
.
archiEleRelId
)
{
this
.
selectData4
=
item
.
archiEleRelId
.
split
(
","
);
this
.
selectData4
=
item
.
archiEleRelId
.
split
(
","
);
}
}
this
.
tableData1
.
forEach
(
item
=>
{
//
this.tableData1.forEach(item => {
this
.
selectData2
.
forEach
(
item2
=>
{
//
this.selectData2.forEach(item2 => {
if
(
item
.
elementId
==
item2
)
{
//
if (item.elementId == item2) {
this
.
$nextTick
(
function
()
{
//
this.$nextTick(function() {
this
.
$refs
.
multipleTable1
.
toggleRowSelection
(
item
,
true
);
//
this.$refs.multipleTable1.toggleRowSelection(item, true);
});
//
});
}
//
}
});
//
});
});
//
});
this
.
tableData2
.
forEach
(
item
=>
{
//
this.tableData2.forEach(item => {
this
.
selectData4
.
forEach
(
item2
=>
{
//
this.selectData4.forEach(item2 => {
if
(
item
.
eleRelaId
==
item2
)
{
//
if (item.eleRelaId == item2) {
this
.
$nextTick
(
function
()
{
//
this.$nextTick(function() {
this
.
$refs
.
multipleTable2
.
toggleRowSelection
(
item
,
true
);
//
this.$refs.multipleTable2.toggleRowSelection(item, true);
});
//
});
}
//
}
});
//
});
});
//
});
}
else
if
(
type
==
"create"
)
{
}
else
if
(
type
==
"create"
)
{
this
.
$refs
.
viewForm
.
validate
(
valid
=>
{
this
.
$refs
.
viewForm
.
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
if
(
this
.
selectData1
.
length
==
0
)
{
if
(
!
this
.
formData
.
eleName
)
{
this
.
$message
.
error
(
"请勾选元素范围"
);
this
.
$message
.
error
(
"请勾选元素范围"
);
return
;
return
;
}
}
if
(
this
.
selectData3
.
length
==
0
)
{
if
(
!
this
.
formData
.
relName
)
{
this
.
$message
.
error
(
"请勾选元素关系范围"
);
this
.
$message
.
error
(
"请勾选元素关系范围"
);
return
;
return
;
}
}
this
.
formData
.
state
=
2
;
this
.
formData
.
state
=
2
;
// 赋值
// 赋值
this
.
formData
.
eleName
=
this
.
selectData1
.
join
(
","
);
this
.
formData
.
archiEleId
=
this
.
selectData2
.
join
(
","
);
// this.formData.eleName = this.selectData1.join(",");
this
.
formData
.
relName
=
this
.
selectData3
.
join
(
","
);
// this.formData.archiEleId = this.selectData2.join(",");
this
.
formData
.
archiEleRelId
=
this
.
selectData4
.
join
(
","
);
// this.formData.relName = this.selectData3.join(",");
// this.formData.archiEleRelId = this.selectData4.join(",");
this
.
formData
.
archiEleId
=
this
.
transferValue1
.
join
(
","
);
this
.
formData
.
archiEleRelId
=
this
.
transferValue2
.
join
(
","
);
if
(
this
.
formData
.
viewId
)
{
if
(
this
.
formData
.
viewId
)
{
// 编辑保存
// 编辑保存
getJGSTPZUpdate
(
this
.
formData
).
then
(
res
=>
{
getJGSTPZUpdate
(
this
.
formData
).
then
(
res
=>
{
...
@@ -735,10 +837,14 @@ export default {
...
@@ -735,10 +837,14 @@ export default {
});
});
}
else
if
(
type
==
"pushAdd"
)
{
}
else
if
(
type
==
"pushAdd"
)
{
this
.
formData
.
state
=
1
;
this
.
formData
.
state
=
1
;
this
.
formData
.
eleName
=
this
.
selectData1
.
join
(
","
);
// this.formData.eleName = this.selectData1.join(",");
this
.
formData
.
archiEleId
=
this
.
selectData2
.
join
(
","
);
// this.formData.archiEleId = this.selectData2.join(",");
this
.
formData
.
relName
=
this
.
selectData3
.
join
(
","
);
// this.formData.relName = this.selectData3.join(",");
this
.
formData
.
archiEleRelId
=
this
.
selectData4
.
join
(
","
);
// this.formData.archiEleRelId = this.selectData4.join(",");
this
.
formData
.
archiEleId
=
this
.
transferValue1
.
join
(
","
);
this
.
formData
.
archiEleRelId
=
this
.
transferValue2
.
join
(
","
);
if
(
this
.
formData
.
viewId
)
{
if
(
this
.
formData
.
viewId
)
{
// 编辑发布
// 编辑发布
getJGSTPZUpdate
(
this
.
formData
).
then
(
res
=>
{
getJGSTPZUpdate
(
this
.
formData
).
then
(
res
=>
{
...
@@ -867,8 +973,8 @@ export default {
...
@@ -867,8 +973,8 @@ export default {
archiStage
:
null
,
archiStage
:
null
,
}
}
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
multipleTable1
.
clearSelection
();
//
this.$refs.multipleTable1.clearSelection();
this
.
$refs
.
multipleTable2
.
clearSelection
();
//
this.$refs.multipleTable2.clearSelection();
});
});
this
.
selectData1
=
[];
this
.
selectData1
=
[];
...
@@ -942,6 +1048,9 @@ export default {
...
@@ -942,6 +1048,9 @@ export default {
height
:
55vh
;
height
:
55vh
;
overflow-y
:
auto
;
overflow-y
:
auto
;
}
}
/
deep
/
.el-transfer-panel__item
{
text-align
:
left
;
}
/
deep
/
.el-dialog__header
{
/
deep
/
.el-dialog__header
{
background-color
:
#0D867F
;
background-color
:
#0D867F
;
text-align
:
left
;
text-align
:
left
;
...
...
src/views/busi-assets-list/index.vue
View file @
117f141
...
@@ -72,7 +72,6 @@
...
@@ -72,7 +72,6 @@
<el-table-column
prop=
"assetName"
label=
"架构组件名称"
width=
"300"
:show-overflow-tooltip=
"true"
align=
"center"
></el-table-column>
<el-table-column
prop=
"assetName"
label=
"架构组件名称"
width=
"300"
:show-overflow-tooltip=
"true"
align=
"center"
></el-table-column>
<el-table-column
prop=
"eleName"
label=
"组件类型"
align=
"center"
></el-table-column>
<el-table-column
prop=
"eleName"
label=
"组件类型"
align=
"center"
></el-table-column>
<!--
<el-table-column
prop=
"parentAssetName"
label=
"上级架构组件名称"
width=
"300"
:show-overflow-tooltip=
"true"
align=
"center"
></el-table-column>
-->
<!--
<el-table-column
prop=
"parentAssetName"
label=
"上级架构组件名称"
width=
"300"
:show-overflow-tooltip=
"true"
align=
"center"
></el-table-column>
-->
<el-table-column
prop=
"createMan"
label=
"创建人"
align=
"center"
></el-table-column>
<el-table-column
prop=
"version"
label=
"版本号"
align=
"center"
></el-table-column>
<el-table-column
prop=
"version"
label=
"版本号"
align=
"center"
></el-table-column>
<el-table-column
label=
"状态"
align=
"center"
>
<el-table-column
label=
"状态"
align=
"center"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
...
@@ -82,6 +81,7 @@
...
@@ -82,6 +81,7 @@
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"createTime"
label=
"创建时间"
align=
"center"
></el-table-column>
<el-table-column
prop=
"createTime"
label=
"创建时间"
align=
"center"
></el-table-column>
<el-table-column
prop=
"createMan"
label=
"创建人"
align=
"center"
></el-table-column>
<el-table-column
label=
"操作"
width=
"200"
align=
"center"
>
<el-table-column
label=
"操作"
width=
"200"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<div
style=
"display: flex;align-items: center;justify-content: center;"
>
<div
style=
"display: flex;align-items: center;justify-content: center;"
>
...
@@ -311,7 +311,7 @@
...
@@ -311,7 +311,7 @@
zuJianLeiXingSelect
:
[],
zuJianLeiXingSelect
:
[],
shangJiJieDianSelect
:
[],
shangJiJieDianSelect
:
[],
treeDefaultExpand
:
[],
treeDefaultExpand
:
[],
edit
Id
:
null
,
edit
Row
:
null
,
guanLianZiChanSelect
:
[],
guanLianZiChanSelect
:
[],
archiBelongId
:
null
,
archiBelongId
:
null
,
assetConstant
:
null
,
assetConstant
:
null
,
...
@@ -403,7 +403,6 @@
...
@@ -403,7 +403,6 @@
}
else
{
}
else
{
targetAsset
=
[{}];
targetAsset
=
[{}];
}
}
console
.
log
(
targetAsset
)
const
params
=
{
const
params
=
{
archiAssetState
:
this
.
searchParams
.
archiAssetState
,
archiAssetState
:
this
.
searchParams
.
archiAssetState
,
archiStage
:
this
.
searchParams
.
archiStage
,
archiStage
:
this
.
searchParams
.
archiStage
,
...
@@ -413,7 +412,6 @@
...
@@ -413,7 +412,6 @@
archiEleId
:
this
.
ruleForm
.
let3
,
archiEleId
:
this
.
ruleForm
.
let3
,
assetName
:
this
.
ruleForm
.
let1
,
assetName
:
this
.
ruleForm
.
let1
,
sort
:
this
.
ruleForm
.
let4
,
sort
:
this
.
ruleForm
.
let4
,
assetId
:
this
.
is_add_edit
==
'add'
?
null
:
this
.
editId
,
parentAssetId
:
this
.
selectValue
,
parentAssetId
:
this
.
selectValue
,
parentAssetName
:
this
.
selectLabel
,
parentAssetName
:
this
.
selectLabel
,
isShow
:
this
.
ruleForm
.
let5
==
'显示'
?
0
:
1
,
isShow
:
this
.
ruleForm
.
let5
==
'显示'
?
0
:
1
,
...
@@ -422,8 +420,9 @@
...
@@ -422,8 +420,9 @@
assetCode
:
this
.
selectCode
,
assetCode
:
this
.
selectCode
,
eleName
:
eleName
eleName
:
eleName
}
}
const
requestParams
=
this
.
is_add_edit
==
'add'
?
{
...
params
,
assetId
:
null
}
:
{
...
this
.
editRow
,
...
params
};
if
(
this
.
is_add_edit
==
'add'
)
{
if
(
this
.
is_add_edit
==
'add'
)
{
addMoreZiChanJiaGouTable
(
p
arams
).
then
(
res
=>
{
addMoreZiChanJiaGouTable
(
requestP
arams
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
this
.
addDialog
=
false
;
this
.
addDialog
=
false
;
this
.
get_table
();
this
.
get_table
();
...
@@ -439,7 +438,7 @@
...
@@ -439,7 +438,7 @@
}
}
})
})
}
else
{
}
else
{
editZiChanJiaGouTable
(
p
arams
).
then
(
res
=>
{
editZiChanJiaGouTable
(
requestP
arams
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
this
.
addDialog
=
false
;
this
.
addDialog
=
false
;
this
.
get_table
();
this
.
get_table
();
...
@@ -555,13 +554,12 @@
...
@@ -555,13 +554,12 @@
this
.
ruleForm
.
let3
=
row
.
archiEleId
;
this
.
ruleForm
.
let3
=
row
.
archiEleId
;
this
.
ruleForm
.
let4
=
row
.
sort
;
this
.
ruleForm
.
let4
=
row
.
sort
;
this
.
ruleForm
.
let5
=
row
.
isShow
==
0
?
'显示'
:
'隐藏'
;
this
.
ruleForm
.
let5
=
row
.
isShow
==
0
?
'显示'
:
'隐藏'
;
this
.
edit
Id
=
row
.
assetId
;
this
.
edit
Row
=
row
;
let
fieldsValue
=
row
.
fieldsValue
;
let
fieldsValue
=
row
.
fieldsValue
;
let
targetAsset
=
row
.
targetAsset
;
let
targetAsset
=
row
.
targetAsset
;
this
.
selectCode
=
row
.
assetCode
;
this
.
selectCode
=
row
.
assetCode
;
this
.
selectLabel
=
row
.
parentAssetName
;
this
.
selectLabel
=
row
.
parentAssetName
;
this
.
selectValue
=
row
.
parentAssetId
;
this
.
selectValue
=
row
.
parentAssetId
;
let
targetAsset_id
=
[];
let
targetAsset_id
=
[];
if
(
targetAsset
.
length
==
4
)
{
if
(
targetAsset
.
length
==
4
)
{
this
.
ruleForm
.
dynamicForm0_
=
[];
this
.
ruleForm
.
dynamicForm0_
=
[];
...
...
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