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 b8f560bb
authored
Dec 07, 2023
by
Thews
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
20231207汪皖苏
1 parent
5f8e7c02
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
47 deletions
src/api/index.js
src/views/JiaGouYuanShuGuanXiGuanLi/index.vue
src/api/index.js
View file @
b8f560b
...
...
@@ -46,6 +46,10 @@ export function getJGYSGLlist(params) {
export
function
getJGYSGLAdd
(
params
)
{
return
post
(
'/eleRel/addEleRel'
,
params
);
}
// 编辑元素(state暂存2发布1)
export
function
getJGYSGLUpdate
(
params
)
{
return
post
(
'/eleRel/updateEleRel'
,
params
);
}
// 删除元素
export
function
getJGYSGLDel
(
params
)
{
return
post
(
'/eleRel/deleteEleRel'
,
params
);
...
...
src/views/JiaGouYuanShuGuanXiGuanLi/index.vue
View file @
b8f560b
...
...
@@ -8,7 +8,7 @@
<el-input
v-model=
"params.rsName"
placeholder=
"请输入内容"
class=
"search_item"
></el-input>
</div>
<div
class=
"search_menu_item"
>
<span
class=
"search_title"
>
架构归属
</span>
<span
class=
"search_title"
>
适用范围
</span>
<el-select
v-model=
"params.scope"
placeholder=
"请选择"
class=
"search_item"
>
<el-option
label=
"业务架构"
value=
"业务架构"
></el-option>
<el-option
label=
"应用架构"
value=
"应用架构"
></el-option>
...
...
@@ -20,9 +20,9 @@
<div
class=
"search_menu_item"
>
<span
class=
"search_title"
>
状态
</span>
<el-select
v-model=
"params.state"
placeholder=
"请选择"
class=
"search_item"
>
<el-option
label=
"已发布"
value=
"1"
></el-option>
<el-option
label=
"已停用"
value=
"0"
></el-option>
<el-option
label=
"暂存"
value=
"2"
></el-option>
<el-option
label=
"已发布"
value=
1
></el-option>
<el-option
label=
"已停用"
value=
0
></el-option>
<el-option
label=
"暂存"
value=
2
></el-option>
</el-select>
</div>
</div>
...
...
@@ -115,20 +115,6 @@
<div
class=
"dialog_form_item_title"
>
*元素关系名称
</div>
<el-input
placeholder=
"请输入内容"
class=
"dialog_form_item_content"
v-model=
"formData.rsName"
></el-input>
</div>
<!-- <div class="dialog_form_item">
<div class="dialog_form_item_title">元素关系描述</div>
<el-input placeholder="请输入内容" class="dialog_form_item_content" v-model="let2"></el-input>
</div> -->
<!-- <div class="dialog_form_item">
<div class="dialog_form_item_title">架构归属</div>
<el-select placeholder="请选择" class="search_item" v-model="let3">
<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-select>
</div> -->
<div
class=
"dialog_form_item"
>
<div
class=
"dialog_form_item_title"
>
*元素关系描述
</div>
<el-input
type=
"textarea"
:rows=
"2"
placeholder=
"请输入内容"
class=
"dialog_form_item_content"
v-model=
"formData.content"
></el-input>
...
...
@@ -136,7 +122,7 @@
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
class=
"greenButton"
@
click=
"operate('push')"
>
发布
</el-button>
<el-button
class=
"greenButton"
@
click=
"operate('create')"
>
暂
存
</el-button>
<el-button
class=
"greenButton"
@
click=
"operate('create')"
>
保
存
</el-button>
<el-button
@
click=
"add_dialog = false"
>
取消
</el-button>
</span>
</el-dialog>
...
...
@@ -149,6 +135,7 @@ import {
getJGYSGLlist
,
getJGYSGLAdd
,
getJGYSGLDel
,
getJGYSGLUpdate
,
}
from
"@/api/index.js"
;
export
default
{
...
...
@@ -162,6 +149,7 @@ export default {
],
add_dialog
:
false
,
title
:
""
,
openType
:
""
,
query_item1
:
null
,
query_item3
:
null
,
query_item4
:
null
,
...
...
@@ -237,7 +225,7 @@ export default {
},
// 所有操作
operate
(
type
,
item
){
console
.
log
(
type
,
item
)
;
this
.
openType
=
type
;
if
(
type
==
"add"
)
{
this
.
add_dialog
=
true
;
this
.
title
=
"新建关系元素"
;
...
...
@@ -247,40 +235,57 @@ export default {
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
;
if
(
this
.
formData
.
eleRelaId
)
{
// 编辑保存
getJGYSGLUpdate
(
this
.
formData
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
"保存成功"
);
this
.
add_dialog
=
false
;
this
.
getList
();
}
});
}
else
{
// 新建保存
getJGYSGLAdd
(
this
.
formData
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
"保存成功"
);
this
.
add_dialog
=
false
;
this
.
getList
();
}
});
}
}
else
if
(
type
==
"push"
)
{
this
.
formData
.
state
=
1
;
getJGYSGLAdd
(
this
.
formData
).
then
(
res
=>
{
if
(
this
.
formData
.
eleRelaId
)
{
// 编辑发布
getJGYSGLUpdate
(
this
.
formData
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
"发布成功"
);
this
.
add_dialog
=
false
;
this
.
getList
();
}
});
}
else
{
// 新建发布
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
;
getJGYSGLUpdate
(
this
.
formData
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
"发布成功"
);
this
.
add_dialog
=
false
;
this
.
$message
.
success
(
"停用成功"
);
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
;
...
...
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