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 e484d4bc
authored
Dec 07, 2023
by
Thews
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
20231207wangwansu
1 parent
ae30e62e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
183 additions
and
45 deletions
src/api/index.js
src/router/index.js
src/views/JiaGouYuanShuGuanXiGuanLi/index.vue
src/api/index.js
View file @
e484d4b
...
@@ -41,3 +41,17 @@ export function edit_jia_gou_yuan_su(params) {// 架构元素管理,新建
...
@@ -41,3 +41,17 @@ export function edit_jia_gou_yuan_su(params) {// 架构元素管理,新建
export
function
add_yuan_mo_xing
(
params
)
{
// 元模型管理,新建
export
function
add_yuan_mo_xing
(
params
)
{
// 元模型管理,新建
return
post
(
'/ynMol/addYnMol'
,
params
);
return
post
(
'/ynMol/addYnMol'
,
params
);
}
}
// 架构元素关系管理
// 列表查询
export
function
getJGYSGLlist
(
params
)
{
return
post
(
'/eleRel/'
,
params
);
}
// 新建元素(state暂存2发布1)
export
function
getJGYSGLAdd
(
params
)
{
return
post
(
'/eleRel/addEleRel'
,
params
);
}
// 删除元素
export
function
getJGYSGLDel
(
params
)
{
return
post
(
'/eleRel/deleteEleRel'
,
params
);
}
\ No newline at end of file
src/router/index.js
View file @
e484d4b
...
@@ -4,6 +4,12 @@ import Home from '@/views/Home.vue'
...
@@ -4,6 +4,12 @@ import Home from '@/views/Home.vue'
Vue
.
use
(
VueRouter
)
Vue
.
use
(
VueRouter
)
// 解决elementUI导航栏中的vue-router在3.0版本以上重复点击菜单报错的问题 ###
const
originalPush
=
VueRouter
.
prototype
.
push
VueRouter
.
prototype
.
push
=
function
push
(
location
)
{
return
originalPush
.
call
(
this
,
location
).
catch
(
err
=>
err
)
}
const
routes
=
[
const
routes
=
[
{
{
path
:
'/'
,
path
:
'/'
,
...
...
src/views/JiaGouYuanShuGuanXiGuanLi/index.vue
View file @
e484d4b
...
@@ -5,11 +5,11 @@
...
@@ -5,11 +5,11 @@
<div
class=
"search_menu_item_container"
>
<div
class=
"search_menu_item_container"
>
<div
class=
"search_menu_item"
>
<div
class=
"search_menu_item"
>
<span
class=
"search_title"
>
元素关系名称
</span>
<span
class=
"search_title"
>
元素关系名称
</span>
<el-input
v-model=
"
query_item3
"
placeholder=
"请输入内容"
class=
"search_item"
></el-input>
<el-input
v-model=
"
params.rsName
"
placeholder=
"请输入内容"
class=
"search_item"
></el-input>
</div>
</div>
<div
class=
"search_menu_item"
>
<div
class=
"search_menu_item"
>
<span
class=
"search_title"
>
架构归属
</span>
<span
class=
"search_title"
>
架构归属
</span>
<el-select
v-model=
"
query_item1
"
placeholder=
"请选择"
class=
"search_item"
>
<el-select
v-model=
"
params.scope
"
placeholder=
"请选择"
class=
"search_item"
>
<el-option
label=
"业务架构"
value=
"业务架构"
></el-option>
<el-option
label=
"业务架构"
value=
"业务架构"
></el-option>
<el-option
label=
"应用架构"
value=
"应用架构"
></el-option>
<el-option
label=
"应用架构"
value=
"应用架构"
></el-option>
<el-option
label=
"内容架构"
value=
"内容架构"
></el-option>
<el-option
label=
"内容架构"
value=
"内容架构"
></el-option>
...
@@ -19,26 +19,26 @@
...
@@ -19,26 +19,26 @@
</div>
</div>
<div
class=
"search_menu_item"
>
<div
class=
"search_menu_item"
>
<span
class=
"search_title"
>
状态
</span>
<span
class=
"search_title"
>
状态
</span>
<el-select
v-model=
"
query_item4
"
placeholder=
"请选择"
class=
"search_item"
>
<el-select
v-model=
"
params.state
"
placeholder=
"请选择"
class=
"search_item"
>
<el-option
label=
"已发布"
value=
"
已发布
"
></el-option>
<el-option
label=
"已发布"
value=
"
1
"
></el-option>
<el-option
label=
"已停用"
value=
"
已停用
"
></el-option>
<el-option
label=
"已停用"
value=
"
0
"
></el-option>
<el-option
label=
"暂存"
value=
"
暂存
"
></el-option>
<el-option
label=
"暂存"
value=
"
2
"
></el-option>
</el-select>
</el-select>
</div>
</div>
</div>
</div>
<div
class=
"search_menu_btn_container"
>
<div
class=
"search_menu_btn_container"
>
<div
class=
"query_btn"
>
<div
class=
"query_btn"
@
click=
"getList"
>
<img
class=
"btn_icon"
src=
"@/assets/查询icon.png"
alt=
""
/>
<img
class=
"btn_icon"
src=
"@/assets/查询icon.png"
alt=
""
/>
<p>
查询
</p>
<p>
查询
</p>
</div>
</div>
<div
class=
"reset_btn"
>
<div
class=
"reset_btn"
@
click=
"reset"
>
<img
class=
"btn_icon"
src=
"@/assets/重置icon.png"
alt=
""
/>
<img
class=
"btn_icon"
src=
"@/assets/重置icon.png"
alt=
""
/>
<p>
重置
</p>
<p>
重置
</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"search_btn"
>
<div
class=
"search_btn"
>
<div
class=
"add_btn"
@
click=
"add_dialog = true
"
>
<div
class=
"add_btn"
@
click=
"operate('add')
"
>
<img
class=
"btn_icon"
src=
"@/assets/新建icon.png"
alt=
""
/>
<img
class=
"btn_icon"
src=
"@/assets/新建icon.png"
alt=
""
/>
<p>
新建
</p>
<p>
新建
</p>
</div>
</div>
...
@@ -50,58 +50,70 @@
...
@@ -50,58 +50,70 @@
<el-table
:data=
"tableData"
stripe
border
>
<el-table
:data=
"tableData"
stripe
border
>
<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=
"
let1
"
label=
"元素关系名称"
width=
"180"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
rsName
"
label=
"元素关系名称"
width=
"180"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
let2
"
label=
"对象1"
width=
"180"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
object1
"
label=
"对象1"
width=
"180"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
let7"
label=
"对象1
"
width=
"180"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
object2"
label=
"对象2
"
width=
"180"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
let3
"
label=
"适用范围"
width=
"180"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
scope
"
label=
"适用范围"
width=
"180"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
let4
"
label=
"关系描述"
width=
"180"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
content
"
label=
"关系描述"
width=
"180"
align=
"center"
></el-table-column>
<el-table-column
label=
"图标"
align=
"center"
>
<el-table-column
label=
"图标"
align=
"center"
>
<template>
<template>
<el-button
type=
"text"
style=
"color: #0D867F;"
>
预览
</el-button>
<el-button
type=
"text"
style=
"color: #0D867F;"
>
预览
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"let5"
label=
"版本"
width=
"180"
align=
"center"
></el-table-column>
<el-table-column
prop=
"version"
label=
"版本"
width=
"180"
align=
"center"
></el-table-column>
<el-table-column
prop=
"let6"
label=
"状态"
align=
"center"
></el-table-column>
<el-table-column
prop=
"state"
label=
"状态"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<span
>
{{
dicObj
.
state
[
scope
.
row
.
state
]
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
width=
"360"
align=
"center"
>
<el-table-column
label=
"操作"
width=
"360"
align=
"center"
>
<
template
>
<
template
slot-scope=
"scope"
>
<div
style=
"display: flex;align-items: center;justify-content: center;"
>
<div
style=
"display: flex;align-items: center;justify-content: center;"
>
<div
class=
"add_btn"
@
click=
"add_dialog = true"
style=
"border: 0;margin-right: 8px;"
>
<el-button
icon=
"el-icon-edit"
size=
"mini"
@
click=
"operate('edit',scope.row)"
:disabled=
"scope.row.state == 1"
>
编辑
</el-button>
<el-button
icon=
"el-icon-remove-outline"
size=
"mini"
@
click=
"operate('stop',scope.row)"
:disabled=
"scope.row.state != 1"
>
停用
</el-button>
<el-button
icon=
"el-icon-upload2"
size=
"mini"
@
click=
"operate('push',scope.row)"
:disabled=
"scope.row.state == 1"
>
发布
</el-button>
<el-button
icon=
"el-icon-delete"
size=
"mini"
@
click=
"operate('del',scope.row)"
:disabled=
"scope.row.state != 2"
>
删除
</el-button>
<!--
<div
class=
"add_btn"
@
click=
"operate('edit',scope.row)"
style=
"border: 0;margin-right: 8px;"
>
<img
class=
"btn_icon"
src=
"@/assets/编辑_icon_default.png"
alt=
""
/>
<img
class=
"btn_icon"
src=
"@/assets/编辑_icon_default.png"
alt=
""
/>
<p>
编辑
</p>
<p>
编辑
</p>
</div>
</div>
<!--
<el-button
type=
"text"
icon=
"el-icon-edit"
@
click=
"add_dialog = true"
>
编辑
</el-button>
-->
<div
class=
"reset_btn"
@
click=
"operate('stop',scope.row)"
style=
"border: 0;margin-right: 8px;"
>
<div
class=
"reset_btn"
style=
"border: 0;margin-right: 8px;"
>
<img
class=
"btn_icon"
src=
"@/assets/停用_icon_default.png"
alt=
""
/>
<img
class=
"btn_icon"
src=
"@/assets/停用_icon_default.png"
alt=
""
/>
<p>
停用
</p>
<p>
停用
</p>
</div>
</div>
<div
class=
"add_btn"
style=
"border: 0;margin-right: 8px;"
>
<div
class=
"add_btn"
@
click=
"operate('push',scope.row)"
style=
"border: 0;margin-right: 8px;"
>
<img
class=
"btn_icon"
src=
"@/assets/发布_icon_default.png"
alt=
""
/>
<img
class=
"btn_icon"
src=
"@/assets/发布_icon_default.png"
alt=
""
/>
<p>
发布
</p>
<p>
发布
</p>
</div>
</div>
<div
class=
"reset_btn"
style=
"border: 0;"
>
<div
class=
"reset_btn"
@
click=
"operate('del',scope.row)"
style=
"border: 0;"
>
<img
class=
"btn_icon"
src=
"@/assets/删除_icon_default.png"
alt=
""
/>
<img
class=
"btn_icon"
src=
"@/assets/删除_icon_default.png"
alt=
""
/>
<p>
删除
</p>
<p>
删除
</p>
</div>
</div>
-->
</div>
</div>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
<el-pagination
<el-pagination
background
background
layout=
"prev, pager, next"
@
size-change=
"handleSizeChange"
:total=
"50"
>
@
current-change=
"handleCurrentChange"
:current-page=
"page.current"
:page-sizes=
"page.sizes"
:page-size=
"page.size"
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"page.total"
>
</el-pagination>
</el-pagination>
</div>
</div>
<el-dialog
<el-dialog
title=
"新建元素关系
"
:title=
"title
"
:visible
.
sync=
"add_dialog"
:visible
.
sync=
"add_dialog"
:center=
"false"
:center=
"false"
width=
"40%"
>
width=
"40%"
>
<div
class=
"add_dialog_content"
>
<div
class=
"add_dialog_content"
>
<div
class=
"dialog_form_item"
>
<div
class=
"dialog_form_item"
>
<div
class=
"dialog_form_item_title"
>
*元素关系名称
</div>
<div
class=
"dialog_form_item_title"
>
*元素关系名称
</div>
<el-input
placeholder=
"请输入内容"
class=
"dialog_form_item_content"
v-model=
"
let1
"
></el-input>
<el-input
placeholder=
"请输入内容"
class=
"dialog_form_item_content"
v-model=
"
formData.rsName
"
></el-input>
</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>
...
@@ -119,12 +131,12 @@
...
@@ -119,12 +131,12 @@
</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>
<el-input
type=
"textarea"
:rows=
"2"
placeholder=
"请输入内容"
class=
"dialog_form_item_content"
v-model=
"
let4
"
></el-input>
<el-input
type=
"textarea"
:rows=
"2"
placeholder=
"请输入内容"
class=
"dialog_form_item_content"
v-model=
"
formData.content
"
></el-input>
</div>
</div>
</div>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
class=
"greenButton"
@
click=
"
add_dialog = false
"
>
发布
</el-button>
<el-button
class=
"greenButton"
@
click=
"
operate('push')
"
>
发布
</el-button>
<el-button
class=
"greenButton"
@
click=
"
add_dialog = false
"
>
暂存
</el-button>
<el-button
class=
"greenButton"
@
click=
"
operate('create')
"
>
暂存
</el-button>
<el-button
@
click=
"add_dialog = false"
>
取消
</el-button>
<el-button
@
click=
"add_dialog = false"
>
取消
</el-button>
</span>
</span>
</el-dialog>
</el-dialog>
...
@@ -135,6 +147,8 @@
...
@@ -135,6 +147,8 @@
import
{
import
{
getJGYSGLlist
,
getJGYSGLlist
,
getJGYSGLAdd
,
getJGYSGLDel
,
}
from
"@/api/index.js"
;
}
from
"@/api/index.js"
;
export
default
{
export
default
{
...
@@ -145,11 +159,9 @@ export default {
...
@@ -145,11 +159,9 @@ export default {
data
()
{
data
()
{
return
{
return
{
tableData
:
[
tableData
:
[
{
let1
:
'分解'
,
let2
:
'业务域'
,
let7
:
'业务职能'
,
let3
:
'业务架构'
,
let4
:
'业务域的基本描述'
,
let5
:
'2023.10.31'
,
let6
:
'已发布'
},
{
let1
:
'支撑'
,
let2
:
'业务域'
,
let7
:
'业务职能'
,
let3
:
'业务架构'
,
let4
:
'业务职能的描述'
,
let5
:
'2023.10.31'
,
let6
:
'已发布'
},
{
let1
:
'聚合'
,
let2
:
'应用域'
,
let7
:
'应用职能'
,
let3
:
'应用架构'
,
let4
:
'应用交互的基本描述'
,
let5
:
'2023.10.31'
,
let6
:
'已发布'
},
],
],
add_dialog
:
false
,
add_dialog
:
false
,
title
:
""
,
query_item1
:
null
,
query_item1
:
null
,
query_item3
:
null
,
query_item3
:
null
,
query_item4
:
null
,
query_item4
:
null
,
...
@@ -157,37 +169,142 @@ export default {
...
@@ -157,37 +169,142 @@ export default {
let2
:
''
,
let2
:
''
,
let3
:
''
,
let3
:
''
,
let4
:
''
,
let4
:
''
,
formData
:
{
rsName
:
""
,
content
:
""
,
},
params
:
{
params
:
{
"current"
:
1
,
current
:
1
,
"delFlag"
:
0
,
pageSize
:
10
,
"id"
:
0
,
rsName
:
""
,
"pageSize"
:
10
,
scope
:
""
,
"rsName"
:
""
,
state
:
""
,
"scope"
:
""
,
},
"state"
:
0
,
page
:
{
}
current
:
1
,
sizes
:
[
10
,
20
,
50
,
100
,
200
],
size
:
10
,
total
:
20
//总条数
},
dicObj
:
{
state
:
{
0
:
"已停用"
,
1
:
"已发布"
,
2
:
"暂存"
,
},
},
};
};
},
},
mounted
()
{
mounted
()
{
// 查询列表
//
初始化
查询列表
this
.
getList
();
this
.
getList
();
},
},
created
()
{
created
()
{
},
},
methods
:
{
methods
:
{
// 查询列表
getList
()
{
getList
()
{
console
.
log
(
this
.
params
);
getJGYSGLlist
(
this
.
params
).
then
(
res
=>
{
getJGYSGLlist
(
this
.
params
).
then
(
res
=>
{
console
.
log
(
res
);
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
// this.page.total = res.data.total;
// this.page.total = res.data.total;
// this.tableData = res.data.records;
// this.tableData = res.data.records;
// console.log(this.tableData);
this
.
tableData
=
res
.
data
;
}
});
},
// 重置
reset
(){
this
.
params
=
{
current
:
1
,
pageSize
:
10
,
rsName
:
""
,
scope
:
""
,
state
:
""
,
}
},
// 分页事件
handleSizeChange
(
val
)
{
this
.
page
.
size
=
val
;
this
.
params
.
pageSize
=
val
;
this
.
getList
();
},
handleCurrentChange
(
val
)
{
this
.
page
.
current
=
val
;
this
.
paramsp
.
current
=
val
;
this
.
getList
();
},
// 所有操作
operate
(
type
,
item
){
console
.
log
(
type
,
item
);
if
(
type
==
"add"
)
{
this
.
add_dialog
=
true
;
this
.
title
=
"新建关系元素"
;
this
.
resetForm
();
}
else
if
(
type
==
"edit"
)
{
this
.
add_dialog
=
true
;
this
.
title
=
"编辑关系元素"
;
this
.
formData
=
item
;
}
else
if
(
type
==
"create"
)
{
// 暂存
this
.
formData
.
state
=
2
;
getJGYSGLAdd
(
this
.
formData
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
"暂存成功"
);
this
.
add_dialog
=
false
;
this
.
getList
();
}
});
}
else
if
(
type
==
"push"
)
{
// 发布
if
(
item
)
{
this
.
formData
=
item
;
}
this
.
formData
.
state
=
1
;
getJGYSGLAdd
(
this
.
formData
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
"发布成功"
);
this
.
add_dialog
=
false
;
this
.
getList
();
}
}
});
});
}
else
if
(
type
==
"stop"
)
{
// 停用
// this.formData = item;
// this.formData.state = 0;
return
;
// getJGYSGLAdd(this.formData).then(res => {
// if (res.code == 200) {
// this.$message.success("发布成功");
// this.add_dialog = false;
// this.getList();
// }
// });
}
else
if
(
type
==
"del"
)
{
// 删除
this
.
formData
=
item
;
this
.
$confirm
(
"确认删除吗"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(()
=>
{
getJGYSGLDel
(
this
.
formData
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
getList
();
}
});
});
}
},
// 新建清空表单
resetForm
(){
this
.
formData
=
{
rsName
:
""
,
content
:
""
,
}
},
},
},
},
}
}
...
...
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