Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
apaas-ui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gzga-jzapi
apaas-ui
Commits
9747d75b
Commit
9747d75b
authored
Aug 13, 2020
by
刘殿昕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
四个缺省页,二级菜单,超管router,流程!流程!流程!
parent
7d09c890
Changes
13
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
1152 additions
and
152 deletions
+1152
-152
src/assets/i18n/language-zh.js
src/assets/i18n/language-zh.js
+4
-1
src/components/general/side-nav-bar-class.vue
src/components/general/side-nav-bar-class.vue
+108
-0
src/components/service-list/service_list.vue
src/components/service-list/service_list.vue
+0
-1
src/components/work-flow/super-flow.vue
src/components/work-flow/super-flow.vue
+308
-92
src/pages/data-analysis/data-analysis.vue
src/pages/data-analysis/data-analysis.vue
+47
-17
src/pages/data-analysis/super-application.vue
src/pages/data-analysis/super-application.vue
+54
-0
src/pages/data-analysis/super-service.vue
src/pages/data-analysis/super-service.vue
+62
-0
src/pages/service_shop/shop_list.vue
src/pages/service_shop/shop_list.vue
+58
-8
src/pages/technical-support/index.vue
src/pages/technical-support/index.vue
+50
-4
src/pages/workbench/component-center/process-management/process-design/edit.vue
...mponent-center/process-management/process-design/edit.vue
+336
-0
src/pages/workbench/component-center/process-management/process-design/index.vue
...ponent-center/process-management/process-design/index.vue
+93
-29
src/request/api/workbench.js
src/request/api/workbench.js
+17
-0
src/router/index.js
src/router/index.js
+15
-0
No files found.
src/assets/i18n/language-zh.js
View file @
9747d75b
...
@@ -38,5 +38,8 @@ export const lang = {
...
@@ -38,5 +38,8 @@ export const lang = {
online_component_tool
:
"
在线组件中心
"
,
online_component_tool
:
"
在线组件中心
"
,
process_design
:
"
流程设计
"
,
process_design
:
"
流程设计
"
,
process_management
:
"
流程管理
"
,
process_management
:
"
流程管理
"
,
new
:
"
新建
"
new
:
"
新建
"
,
// technical-support
technical_support
:
"
技术支持
"
}
}
\ No newline at end of file
src/components/general/side-nav-bar-class.vue
0 → 100644
View file @
9747d75b
<
template
>
<div
class=
"side_nav_bar"
>
<h3
class=
"side_nav_bar_title"
@
click=
"titleAction"
>
<img
:src=
"titleIcon"
width=
"20"
style=
"margin-right: 10px;"
/>
<span
v-text=
"title"
></span>
</h3>
<div
v-for=
"(nav, index) in navList"
:key=
"'nav' + index"
>
<div
class=
"side_nav_bar_first_title"
>
{{
nav
.
name
}}
</div>
<ul
class=
"side_nav_bar_list"
>
<router-link
tag=
"li"
v-for=
"(item, indexs) in nav.child"
:class=
"
{ current: $route.path.indexOf(item.path) > -1 }"
:key="index + 'a' + indexs"
:to="item.path"
>
<span
v-text=
"item.name"
></span>
</router-link>
</ul>
</div>
</div>
</
template
>
<
script
>
export
default
{
name
:
"
sideNavBar
"
,
props
:
{
title
:
{
type
:
String
,
default
:
()
=>
"
我的服务
"
,
},
titleIcon
:
{
type
:
String
,
default
:
()
=>
require
(
"
@/assets/imgs/tool_fuwu.png
"
),
},
titlePath
:
{
type
:
String
,
default
:
()
=>
""
,
},
navList
:
{
type
:
Array
,
default
:
()
=>
[],
},
imgSrc
:
{
type
:
String
,
default
:
"
tool_fuwu
"
,
},
},
methods
:
{
titleAction
()
{
if
(
this
.
titlePath
)
{
this
.
$router
.
push
(
this
.
titlePath
);
}
},
},
};
</
script
>
<
style
scoped
>
.side_nav_bar
{
background-color
:
#0d1847
;
}
.side_nav_bar_title
{
height
:
40px
;
background-color
:
#182665
;
border-radius
:
10px
;
overflow
:
hidden
;
margin
:
20px
15px
20px
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
cursor
:
pointer
;
}
.side_nav_bar_title
>
span
{
font-size
:
16px
;
color
:
#c3caf8
;
}
.side_nav_bar_first_title
{
color
:
#c3caf8
;
font-size
:
14px
;
padding
:
10px
0
10px
34px
;
position
:
relative
;
}
.side_nav_bar_first_title
::before
{
content
:
""
;
position
:
absolute
;
left
:
22px
;
top
:
12px
;
width
:
4px
;
height
:
16px
;
background-color
:
#515fe7
;
border-radius
:
2px
;
}
.side_nav_bar_list
>
li
{
padding
:
12px
10px
12px
42px
;
border-left
:
5px
solid
#0d1847
;
font-size
:
14px
;
line-height
:
24px
;
color
:
#e6ebfe
;
cursor
:
pointer
;
}
.side_nav_bar_list
>
li
:hover
,
.side_nav_bar_list
>
li
.current
{
border-left
:
5px
solid
#e56600
;
background-color
:
#182665
;
color
:
#e6ebfe
;
}
</
style
>
src/components/service-list/service_list.vue
View file @
9747d75b
...
@@ -329,7 +329,6 @@ export default {
...
@@ -329,7 +329,6 @@ export default {
for
(
let
i
=
0
;
i
<
val
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
val
.
length
;
i
++
)
{
this
.
filterLists
[
i
+
1
].
name
=
val
[
i
];
this
.
filterLists
[
i
+
1
].
name
=
val
[
i
];
}
}
console
.
log
(
this
.
filterLists
);
},
},
},
},
},
},
...
...
src/components/work-flow/super-flow.vue
View file @
9747d75b
This diff is collapsed.
Click to expand it.
src/pages/data-analysis/data-analysis.vue
View file @
9747d75b
<
template
>
<
template
>
<div
class=
"fwgl_container"
>
<div
class=
"fwgl_container"
>
<side-nav-bar
<sideNavBar
v-if=
"is_admin == 3 || is_admin == 4 || is_admin == 1"
title=
"运营管控中心"
title=
"运营管控中心"
imgSrc=
"tool_fuwu"
imgSrc=
"tool_fuwu"
:nav-list=
"navList"
:nav-list=
"navList"
:title-path=
"navList[0] && navList[0].path"
:title-path=
"navList[0] && navList[0].path"
></side-nav-bar>
></sideNavBar>
<sideNavBarClass
v-else-if=
"is_admin == 2"
title=
"运营管控中心"
imgSrc=
"tool_fuwu"
:nav-list=
"navList"
:title-path=
"navList[0] && navList[0].path"
></sideNavBarClass>
<div
class=
"main_container"
>
<div
class=
"main_container"
>
<router-view
:key=
"'type_' + $route.params.type"
></router-view>
<router-view
:key=
"'type_' + $route.params.type"
></router-view>
</div>
</div>
...
@@ -14,10 +22,11 @@
...
@@ -14,10 +22,11 @@
<
script
>
<
script
>
import
sideNavBar
from
"
@/components/side-nav-bar
"
;
import
sideNavBar
from
"
@/components/side-nav-bar
"
;
import
sideNavBarClass
from
"
@/components/general/side-nav-bar-class
"
;
export
default
{
export
default
{
components
:
{
components
:
{
sideNavBar
,
sideNavBar
,
sideNavBarClass
,
},
},
data
:
()
=>
({
data
:
()
=>
({
userNav
:
[
userNav
:
[
...
@@ -32,24 +41,46 @@ export default {
...
@@ -32,24 +41,46 @@ export default {
],
],
userNav1
:
[
userNav1
:
[
{
{
name
:
"
组织服务数据
分析
"
,
name
:
"
运营
分析
"
,
path
:
`/data_analysis/org_service`
,
path
:
`/data_analysis/org_service`
,
child
:
[
{
name
:
"
服务分析
"
,
path
:
`/data_analysis/org_service`
,
},
{
name
:
"
应用分析
"
,
path
:
`/data_analysis/org_application`
,
},
],
},
},
{
{
name
:
"
组织应用数据分析
"
,
name
:
"
运行管控
"
,
path
:
`/data_analysis/org_application`
,
path
:
`/data_analysis/operation_overview`
,
child
:
[
{
name
:
"
运行概况
"
,
path
:
`/data_analysis/operation_overview`
,
},
{
name
:
"
服务管控
"
,
path
:
`/data_analysis/service_control`
,
},
],
},
},
],
userNav2
:
[
{
{
name
:
"
运行概况-组织
"
,
name
:
"
服务分析
"
,
path
:
`/data_analysis/
operation_overview
`
,
path
:
`/data_analysis/
super_service
`
,
},
},
{
{
name
:
"
服务管控-组织
"
,
name
:
"
应用分析
"
,
path
:
`/data_analysis/s
ervice_control
`
,
path
:
`/data_analysis/s
uper_application
`
,
},
},
],
],
userNav2
:
[],
navList
:
[],
navList
:
[],
is_admin
:
0
,
}),
}),
watch
:
{
watch
:
{
// "$route.fullPath"(path) {
// "$route.fullPath"(path) {
...
@@ -58,16 +89,15 @@ export default {
...
@@ -58,16 +89,15 @@ export default {
},
},
methods
:
{
methods
:
{
initNavList
()
{
initNavList
()
{
if
(
this
.
is_admin
=
this
.
$store
.
state
.
userInfo
.
is_admin
;
this
.
$store
.
state
.
userInfo
.
is_admin
==
3
||
if
(
this
.
is_admin
==
3
||
this
.
is_admin
==
4
)
{
this
.
$store
.
state
.
userInfo
.
is_admin
==
4
)
{
this
.
navList
=
this
.
userNav
;
this
.
navList
=
this
.
userNav
;
}
else
if
(
this
.
$store
.
state
.
userInfo
.
is_admin
==
2
)
{
}
else
if
(
this
.
is_admin
==
2
)
{
this
.
navList
=
this
.
userNav1
;
this
.
navList
=
this
.
userNav1
;
this
.
$router
.
push
({
name
:
"
orgServiceDataAnalysis
"
});
this
.
$router
.
push
({
name
:
"
orgServiceDataAnalysis
"
});
}
else
if
(
this
.
$store
.
state
.
userInfo
.
is_admin
==
1
)
{
}
else
if
(
this
.
is_admin
==
1
)
{
this
.
navList
=
this
.
userNav2
;
this
.
navList
=
this
.
userNav2
;
this
.
$router
.
push
({
name
:
"
superServiceDataAnalysis
"
});
}
}
},
},
},
},
...
...
src/pages/data-analysis/super-application.vue
0 → 100644
View file @
9747d75b
<
template
>
<div>
<el-breadcrumb
separator=
"/"
class=
"bread_crumb1"
>
<el-breadcrumb-item
:to=
"
{ path: '/data_analysis' }">
{{
$t
(
"
lang.data_analysis
"
)
}}
</el-breadcrumb-item>
<el-breadcrumb-item>
{{
$t
(
"
lang.my_application_data_analysis
"
)
}}
</el-breadcrumb-item>
</el-breadcrumb>
<BlockRadius
class=
"default"
>
<div
class=
"default_img"
>
<h1
class=
"default_title"
>
开发中,敬请期待!
</h1>
<h3
class=
"default_msg"
>
如需技术支持
<br
/>
请联系管理员
</h3>
</div>
</BlockRadius>
</div>
</
template
>
<
script
>
import
BlockRadius
from
"
@/components/general/block-radius
"
;
export
default
{
methods
:
{
getData
()
{},
},
components
:
{
BlockRadius
,
},
};
</
script
>
<
style
lang=
"less"
scoped
>
.default {
height: calc(100vh - 160px);
display: flex;
align-items: center;
justify-content: center;
margin: 0 20px;
.default_img {
width: 1282px;
height: 629px;
background-image: url("~@/assets/imgs/img_default_jszc.png");
.default_title {
color: #264dd9;
font-size: 44px;
font-weight: bold;
margin-bottom: 40px;
}
.default_msg {
color: #58617a;
font-size: 24px;
line-height: 44px;
}
}
}
</
style
>
\ No newline at end of file
src/pages/data-analysis/super-service.vue
0 → 100644
View file @
9747d75b
<
template
>
<div>
<el-breadcrumb
separator=
"/"
class=
"bread_crumb1"
>
<el-breadcrumb-item
:to=
"
{ path: '/data_analysis' }">
{{
$t
(
"
lang.data_analysis
"
)
}}
</el-breadcrumb-item>
<el-breadcrumb-item>
{{
$t
(
"
lang.my_service_data_analysis
"
)
}}
</el-breadcrumb-item>
</el-breadcrumb>
<BlockRadius
class=
"default"
>
<div
class=
"default_img"
>
<h1
class=
"default_title"
>
开发中,敬请期待!
</h1>
<h3
class=
"default_msg"
>
如需技术支持
<br
/>
请联系管理员
</h3>
</div>
</BlockRadius>
</div>
</
template
>
<
script
>
import
BlockRadius
from
"
@/components/general/block-radius
"
;
export
default
{
methods
:
{
getData
()
{},
},
components
:
{
BlockRadius
,
},
};
</
script
>
<
style
lang=
"less"
scoped
>
.default {
height: calc(100vh - 160px);
display: flex;
align-items: center;
justify-content: center;
margin: 0 20px;
.default_img {
width: 1282px;
height: 629px;
background-image: url("~@/assets/imgs/img_default_jszc.png");
.default_title {
color: #264dd9;
font-size: 44px;
font-weight: bold;
margin-bottom: 40px;
}
.default_msg {
color: #58617a;
font-size: 24px;
line-height: 44px;
}
}
}
</
style
>
\ No newline at end of file
src/pages/service_shop/shop_list.vue
View file @
9747d75b
...
@@ -5,7 +5,32 @@
...
@@ -5,7 +5,32 @@
<service-shop-menu></service-shop-menu>
<service-shop-menu></service-shop-menu>
</el-aside>
</el-aside>
<el-main>
<el-main>
<service-list
:filterNames=
"filterNames"
:name=
"name"
:url=
"url"
:urlFilter=
"urlFilter"
></service-list>
<service-list
v-show=
"urlFilter != '7' && urlFilter != '10'"
:filterNames=
"filterNames"
:name=
"name"
:url=
"url"
:urlFilter=
"urlFilter"
></service-list>
<div
v-show=
"urlFilter == '7' || urlFilter == '10'"
>
<el-breadcrumb
separator=
"/"
class=
"bread_crumb1 bread_left"
>
<el-breadcrumb-item
:to=
"
{ path: '/shop' }">
{{
$t
(
"
lang.service_shop
"
)
}}
</el-breadcrumb-item>
<el-breadcrumb-item>
{{
name
}}
</el-breadcrumb-item>
</el-breadcrumb>
<BlockRadius
class=
"default"
>
<div
class=
"default_img"
>
<h1
class=
"default_title"
>
开发中,敬请期待!
</h1>
<h3
class=
"default_msg"
>
如需技术支持
<br
/>
请联系管理员
</h3>
</div>
</BlockRadius>
</div>
</el-main>
</el-main>
</el-container>
</el-container>
</div>
</div>
...
@@ -14,16 +39,18 @@
...
@@ -14,16 +39,18 @@
<
script
>
<
script
>
import
ServiceShopMenu
from
"
@/components/service-list/service_shop_menu
"
;
import
ServiceShopMenu
from
"
@/components/service-list/service_shop_menu
"
;
import
ServiceList
from
"
@/components/service-list/service_list
"
;
import
ServiceList
from
"
@/components/service-list/service_list
"
;
import
BlockRadius
from
"
@/components/general/block-radius
"
;
export
default
{
export
default
{
components
:
{
components
:
{
ServiceShopMenu
,
ServiceShopMenu
,
ServiceList
ServiceList
,
BlockRadius
,
},
},
data
:
()
=>
({
data
:
()
=>
({
urlFilter
:
""
,
urlFilter
:
""
,
url
:
""
,
url
:
""
,
name
:
""
,
name
:
""
,
filterNames
:
[]
filterNames
:
[]
,
}),
}),
mounted
()
{
mounted
()
{
this
.
getVal
(
this
.
$route
.
path
);
this
.
getVal
(
this
.
$route
.
path
);
...
@@ -76,16 +103,39 @@ export default {
...
@@ -76,16 +103,39 @@ export default {
this
.
filterNames
=
[];
this
.
filterNames
=
[];
break
;
break
;
}
}
}
}
,
},
},
watch
:
{
watch
:
{
"
$route.path
"
:
{
"
$route.path
"
:
{
handler
(
val
)
{
handler
(
val
)
{
this
.
getVal
(
val
);
this
.
getVal
(
val
);
}
}
,
}
}
,
}
}
,
};
};
</
script
>
</
script
>
<
style
scoped
>
<
style
lang=
"less"
scoped
>
.default {
height: calc(100vh - 180px);
display: flex;
align-items: center;
justify-content: center;
margin: 0;
.default_img {
width: 1282px;
height: 629px;
background-image: url("~@/assets/imgs/img_default_jszc.png");
.default_title {
color: #264dd9;
font-size: 44px;
font-weight: bold;
margin-bottom: 40px;
}
.default_msg {
color: #58617a;
font-size: 24px;
line-height: 44px;
}
}
}
</
style
>
</
style
>
\ No newline at end of file
src/pages/technical-support/index.vue
View file @
9747d75b
<
template
>
<
template
>
<div
class=
"contain"
></div>
<div
class=
"contain"
>
<div
class=
"technical_head"
>
{{
$t
(
"
lang.technical_support
"
)
}}
</div>
<BlockRadius
class=
"default"
>
<div
class=
"default_img"
>
<h1
class=
"default_title"
>
开发中,敬请期待!
</h1>
<h3
class=
"default_msg"
>
如需技术支持
<br
/>
请联系管理员
</h3>
</div>
</BlockRadius>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
BlockRadius
from
"
@/components/general/block-radius
"
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{};
return
{};
},
},
components
:
{},
components
:
{
BlockRadius
,
},
computed
:
{},
computed
:
{},
created
()
{},
created
()
{},
mounted
()
{},
mounted
()
{},
...
@@ -15,6 +29,38 @@ export default {
...
@@ -15,6 +29,38 @@ export default {
};
};
</
script
>
</
script
>
<
style
>
<
style
lang=
"less"
scoped
>
.contain {
width: calc(100% - 80px);
margin: 0 auto;
margin-top: -157px;
margin-bottom: 20px;
.technical_head {
color: #626de9;
font-size: 14px;
padding: 20px;
}
.default {
height: calc(100vh - 180px);
display: flex;
align-items: center;
justify-content: center;
.default_img {
width: 1282px;
height: 629px;
background-image: url("~@/assets/imgs/img_default_jszc.png");
.default_title {
color: #264dd9;
font-size: 44px;
font-weight: bold;
margin-bottom: 40px;
}
.default_msg {
color: #58617a;
font-size: 24px;
line-height: 44px;
}
}
}
}
</
style
>
</
style
>
src/pages/workbench/component-center/process-management/process-design/edit.vue
0 → 100644
View file @
9747d75b
<
template
>
<div
class=
"design_contain"
>
<el-breadcrumb
separator=
"/"
class=
"bread_crumb1"
>
<el-breadcrumb-item
:to=
"
{ path: '/workplace' }">
{{
$t
(
"
lang.online_component_tool
"
)
}}
</el-breadcrumb-item>
<el-breadcrumb-item
:to=
"
{ path: '/progress/designer' }">
{{
$t
(
"
lang.process_design
"
)
}}
</el-breadcrumb-item>
<el-breadcrumb-item
:to=
"
{ path: '/progress/designer' }">
{{
$t
(
"
lang.process_management
"
)
}}
</el-breadcrumb-item>
<el-breadcrumb-item>
{{
$t
(
"
lang.new
"
)
}}
</el-breadcrumb-item>
</el-breadcrumb>
<BlockRadius
class=
"block_item"
>
<steps
:active-step=
"step"
:done=
"done"
:show-done=
"true"
done-title=
"保存成功"
done-sub-title=
"可返回流程管理列表查看该流程,并进行流程的部署和发布。"
class=
"apaas_steps"
>
<step
title=
"基本信息"
:step=
"0"
:active-icon=
"require('@/assets/imgs/progress_ic_xinxitx.png')"
class=
"apaas_step"
>
<div
class=
"step_in"
>
<el-form
:model=
"basic_form"
:rules=
"rules"
ref=
"basicInformation"
class=
"form_left"
>
<el-form-item
prop=
"name"
>
<p
class=
"formname"
>
流程名称:
</p>
<el-input
v-model=
"basic_form.name"
placeholder=
"请输入流程名称"
></el-input>
</el-form-item>
<el-form-item
prop=
"workplace"
>
<p
class=
"formname"
>
工作区域:
</p>
<el-select
v-model=
"basic_form.workplace"
@
change=
"changeWorkPlace"
placeholder=
"请选择工作区域"
>
<el-option
v-for=
"(item, index) in workplace_list"
:label=
"item.name"
:value=
"item.id"
:key=
"index"
></el-option>
</el-select>
</el-form-item>
<el-form-item
prop=
"desc"
>
<p
class=
"formname"
>
流程描述:
</p>
<el-input
type=
"textarea"
:autosize=
"
{ minRows: 6, maxRows: 10}"
v-model="basic_form.desc"
placeholder="请输入流程描述"
>
</el-input>
</el-form-item>
</el-form>
<div
class=
"btn_footer"
>
<el-button
class=
"cancel"
@
click=
"cancel"
>
取消
</el-button>
<el-button
class=
"next"
@
click=
"next"
>
下一步
</el-button>
</div>
</div>
</step>
<step
title=
"流程设计"
:step=
"1"
:active-icon=
"require('@/assets/imgs/progress_ic_liucheng.png')"
class=
"apaas_step"
>
<div
class=
"step_in"
>
<WorkFlow
ref=
"workFlow"
:node_list=
"node_list"
:link_list=
"link_list"
:node_params_list=
"node_params_list"
class=
"work_flow"
/>
<div
class=
"btn_footer"
>
<el-button
class=
"cancel"
@
click=
"cancel"
>
取消
</el-button>
<div>
<el-button
class=
"cancel"
@
click=
"back"
>
上一步
</el-button>
<el-button
class=
"next"
@
click=
"complete"
>
完成
</el-button>
</div>
</div>
</div>
</step>
<step
title
step-title=
"完成"
:step=
"2"
:active-icon=
"require('@/assets/imgs/progress_ic_wancheng.png')"
class=
"apaas_step"
></step>
<template
slot=
"action"
>
<el-button
type=
"primary"
@
click=
"backToList"
>
返回列表
</el-button>
</
template
>
</steps>
</BlockRadius>
</div>
</template>
<
script
>
import
WorkFlow
from
"
@/components/work-flow/super-flow
"
;
import
BlockRadius
from
"
@/components/general/block-radius
"
;
import
Steps
from
"
@/components/app-build-steps/app-build-steps
"
;
import
Step
from
"
@/components/app-build-steps/app-build-step
"
;
export
default
{
components
:
{
WorkFlow
,
BlockRadius
,
Steps
,
Step
,
},
data
:
()
=>
{
return
{
step
:
0
,
done
:
false
,
basic_form
:
{
name
:
""
,
workplace
:
""
,
desc
:
""
,
},
node_list
:
[],
link_list
:
[],
node_params_list
:
[],
rules
:
{
name
:
[
{
required
:
true
,
message
:
"
请输入流程名称
"
,
trigger
:
"
blur
"
},
{
max
:
16
,
message
:
"
不能超过16个字符
"
,
trigger
:
"
blur
"
},
],
workplace
:
[
{
required
:
true
,
message
:
"
请选择工作区域
"
,
trigger
:
"
blur
"
},
],
desc
:
[
{
required
:
true
,
message
:
"
请输入流程描述
"
,
trigger
:
"
blur
"
},
{
max
:
400
,
message
:
"
不能超过400个字符
"
,
trigger
:
"
blur
"
},
],
},
workplace_list
:
[],
};
},
methods
:
{
verification
()
{
let
self
=
this
;
let
data
=
JSON
.
parse
(
JSON
.
stringify
(
self
.
$refs
.
workFlow
.
getData
()));
console
.
log
(
JSON
.
stringify
(
data
));
let
start_num
=
0
;
let
end_num
=
0
;
let
start_id
=
""
;
let
end_id
=
""
;
let
start_before
=
0
;
let
end_after
=
0
;
let
in_edge
=
0
;
let
out_edge
=
0
;
let
datas
=
{
...
data
.
obj
};
console
.
log
(
data
);
datas
.
nodeList
.
forEach
((
item
)
=>
{
let
da
=
data
.
params
.
find
((
nodep
)
=>
{
return
nodep
.
id
==
item
.
meta
.
id
;
});
item
.
meta
=
da
;
if
(
item
.
meta
.
type
==
1
)
{
start_num
++
;
start_id
=
item
.
id
;
}
if
(
item
.
meta
.
type
==
2
)
{
end_num
++
;
end_id
=
item
.
id
;
}
if
(
datas
.
linkList
.
findIndex
((
el
)
=>
{
return
el
.
startId
==
item
.
id
;
})
==
-
1
&&
item
.
id
!=
end_id
)
{
in_edge
++
;
}
else
if
(
datas
.
linkList
.
findIndex
((
el
)
=>
{
return
el
.
endId
==
item
.
id
;
})
==
-
1
&&
item
.
id
!=
start_id
)
{
out_edge
++
;
}
});
datas
.
linkList
.
forEach
((
item
)
=>
{
if
(
start_id
==
item
.
endId
)
{
start_before
++
;
}
if
(
end_id
==
item
.
startId
)
{
end_after
++
;
}
});
if
(
start_num
!=
1
||
end_num
!=
1
)
{
this
.
$message
({
message
:
"
开始节点与结束节点均应有且只有一个
"
,
type
:
"
warning
"
,
});
return
false
;
}
else
if
(
start_before
!=
0
)
{
this
.
$message
({
message
:
"
开始节点前面不应连接其它节点
"
,
type
:
"
warning
"
,
});
return
false
;
}
else
if
(
end_after
!=
0
)
{
this
.
$message
({
message
:
"
结束节点后面不应连接其它节点
"
,
type
:
"
warning
"
,
});
return
false
;
}
else
if
(
in_edge
!=
0
||
out_edge
!=
0
)
{
this
.
$message
({
message
:
"
请保证每个节点都被连接
"
,
type
:
"
warning
"
,
});
return
false
;
}
else
{
return
datas
;
}
},
backToList
()
{
this
.
$router
.
push
(
"
/message/directed_push
"
);
},
changeWorkPlace
()
{},
cancel
()
{
this
.
$router
.
go
(
-
1
);
},
next
()
{
this
.
$refs
[
"
basicInformation
"
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
step
++
;
}
else
{
}
});
},
back
()
{
this
.
step
--
;
},
complete
()
{
let
self
=
this
;
let
res
=
self
.
verification
();
if
(
res
)
{
let
query
=
{
name
:
self
.
basic_form
.
name
,
workarea
:
self
.
basic_form
.
workplace
,
describe
:
self
.
basic_form
.
desc
,
...
res
,
};
this
.
$api
.
workbench
.
addProcess
(
query
).
then
((
response
)
=>
{
if
(
response
.
data
.
success
==
1
)
{
}
});
}
},
getNameSpaceList
()
{
this
.
$api
.
workbench
.
getProcessNamespaceList
().
then
((
response
)
=>
{
if
(
response
.
data
.
success
==
1
)
{
this
.
workplace_list
=
response
.
data
.
data
.
workareas
;
}
});
},
getProcessDetail
()
{
this
.
$api
.
workbench
.
getProcessDetail
({
id
:
this
.
$route
.
params
.
id
})
.
then
((
response
)
=>
{
if
(
response
.
data
.
success
==
1
)
{
this
.
node_list
=
[];
this
.
link_list
=
[];
this
.
node_params_list
=
[];
this
.
node_list
.
forEach
((
item
)
=>
{
item
.
meta
.
id
=
parseInt
(
Math
.
random
()
*
1000
*
1000
)
+
"
a
"
+
parseInt
(
Math
.
random
()
*
1000
*
1000
);
this
.
node_params_list
.
push
(
item
.
meta
);
});
}
});
},
},
mounted
()
{
this
.
getNameSpaceList
();
this
.
getProcessDetail
();
},
};
</
script
>
<
style
scoped
>
.design_contain
{
width
:
100%
;
height
:
calc
(
100%
-
20px
);
padding
:
0
20px
;
}
.block_item
{
height
:
calc
(
100%
-
56px
);
}
.step_in
{
height
:
100%
;
}
.form_left
{
width
:
55%
;
height
:
calc
(
100%
-
70px
);
}
.btn_footer
{
width
:
calc
(
100%
-
20px
);
height
:
40px
;
padding
:
0
10px
;
display
:
flex
;
justify-content
:
space-between
;
}
.cancel
{
background-color
:
#e3e5ef
;
color
:
#0f2683
;
}
.next
{
background-color
:
#0f2683
;
color
:
#f8f9fd
;
}
.work_flow
{
height
:
calc
(
100%
-
70px
);
}
</
style
>
<
style
>
.block_item
.el-textarea__inner
{
border-radius
:
8px
;
background-color
:
#f7f8f9
;
border
:
solid
1px
#e3e5ef
;
}
.block_item
.el-input__inner
{
background-color
:
#f7f8f9
;
border
:
solid
1px
#e3e5ef
;
}
.block_item
.el-select
{
width
:
100%
;
}
</
style
>
src/pages/workbench/component-center/process-management/process-design/index.vue
View file @
9747d75b
...
@@ -7,8 +7,20 @@
...
@@ -7,8 +7,20 @@
<el-breadcrumb-item>
{{
$t
(
"
lang.new
"
)
}}
</el-breadcrumb-item>
<el-breadcrumb-item>
{{
$t
(
"
lang.new
"
)
}}
</el-breadcrumb-item>
</el-breadcrumb>
</el-breadcrumb>
<BlockRadius
class=
"block_item"
>
<BlockRadius
class=
"block_item"
>
<steps
:active-step=
"step"
:done=
"done"
:show-done=
"true"
done-title=
"保存成功"
done-sub-title=
"可返回流程管理列表查看该流程,并进行流程的部署和发布。"
class=
"apaas_steps"
>
<steps
<step
title=
"基本信息"
:step=
"0"
:active-icon=
"require('@/assets/imgs/progress_ic_xinxitx.png')"
class=
"apaas_step"
>
:active-step=
"step"
:done=
"done"
:show-done=
"true"
done-title=
"保存成功"
done-sub-title=
"可返回流程管理列表查看该流程,并进行流程的部署和发布。"
class=
"apaas_steps"
>
<step
title=
"基本信息"
:step=
"0"
:active-icon=
"require('@/assets/imgs/progress_ic_xinxitx.png')"
class=
"apaas_step"
>
<div
class=
"step_in"
>
<div
class=
"step_in"
>
<el-form
:model=
"basic_form"
:rules=
"rules"
ref=
"basicInformation"
class=
"form_left"
>
<el-form
:model=
"basic_form"
:rules=
"rules"
ref=
"basicInformation"
class=
"form_left"
>
<el-form-item
prop=
"name"
>
<el-form-item
prop=
"name"
>
...
@@ -17,13 +29,27 @@
...
@@ -17,13 +29,27 @@
</el-form-item>
</el-form-item>
<el-form-item
prop=
"workplace"
>
<el-form-item
prop=
"workplace"
>
<p
class=
"formname"
>
工作区域:
</p>
<p
class=
"formname"
>
工作区域:
</p>
<el-select
v-model=
"basic_form.workplace"
@
change=
"changeWorkPlace"
placeholder=
"请选择工作区域"
>
<el-select
<el-option
v-for=
"item in workplace_list"
:label=
"item"
:value=
"item"
:key=
"item"
></el-option>
v-model=
"basic_form.workplace"
@
change=
"changeWorkPlace"
placeholder=
"请选择工作区域"
>
<el-option
v-for=
"(item, index) in workplace_list"
:label=
"item.name"
:value=
"item.id"
:key=
"index"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
prop=
"desc"
>
<el-form-item
prop=
"desc"
>
<p
class=
"formname"
>
流程描述:
</p>
<p
class=
"formname"
>
流程描述:
</p>
<el-input
type=
"textarea"
:autosize=
"
{ minRows: 6, maxRows: 10}" v-model="basic_form.desc" placeholder="请输入流程描述">
</el-input>
<el-input
type=
"textarea"
:autosize=
"
{ minRows: 6, maxRows: 10}"
v-model="basic_form.desc"
placeholder="请输入流程描述"
>
</el-input>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<div
class=
"btn_footer"
>
<div
class=
"btn_footer"
>
...
@@ -32,7 +58,12 @@
...
@@ -32,7 +58,12 @@
</div>
</div>
</div>
</div>
</step>
</step>
<step
title=
"流程设计"
:step=
"1"
:active-icon=
"require('@/assets/imgs/progress_ic_liucheng.png')"
class=
"apaas_step"
>
<step
title=
"流程设计"
:step=
"1"
:active-icon=
"require('@/assets/imgs/progress_ic_liucheng.png')"
class=
"apaas_step"
>
<div
class=
"step_in"
>
<div
class=
"step_in"
>
<WorkFlow
ref=
"workFlow"
class=
"work_flow"
/>
<WorkFlow
ref=
"workFlow"
class=
"work_flow"
/>
<div
class=
"btn_footer"
>
<div
class=
"btn_footer"
>
...
@@ -44,7 +75,13 @@
...
@@ -44,7 +75,13 @@
</div>
</div>
</div>
</div>
</step>
</step>
<step
title
step-title=
"完成"
:step=
"2"
:active-icon=
"require('@/assets/imgs/progress_ic_wancheng.png')"
class=
"apaas_step"
></step>
<step
title
step-title=
"完成"
:step=
"2"
:active-icon=
"require('@/assets/imgs/progress_ic_wancheng.png')"
class=
"apaas_step"
></step>
<template
slot=
"action"
>
<template
slot=
"action"
>
<el-button
type=
"primary"
@
click=
"backToList"
>
返回列表
</el-button>
<el-button
type=
"primary"
@
click=
"backToList"
>
返回列表
</el-button>
...
@@ -65,7 +102,7 @@ export default {
...
@@ -65,7 +102,7 @@ export default {
WorkFlow
,
WorkFlow
,
BlockRadius
,
BlockRadius
,
Steps
,
Steps
,
Step
Step
,
},
},
data
:
()
=>
{
data
:
()
=>
{
return
{
return
{
...
@@ -74,22 +111,22 @@ export default {
...
@@ -74,22 +111,22 @@ export default {
basic_form
:
{
basic_form
:
{
name
:
""
,
name
:
""
,
workplace
:
""
,
workplace
:
""
,
desc
:
""
desc
:
""
,
},
},
rules
:
{
rules
:
{
name
:
[
name
:
[
{
required
:
true
,
message
:
"
请输入流程名称
"
,
trigger
:
"
blur
"
},
{
required
:
true
,
message
:
"
请输入流程名称
"
,
trigger
:
"
blur
"
},
{
max
:
16
,
message
:
"
不能超过16个字符
"
,
trigger
:
"
blur
"
}
{
max
:
16
,
message
:
"
不能超过16个字符
"
,
trigger
:
"
blur
"
}
,
],
],
workplace
:
[
workplace
:
[
{
required
:
true
,
message
:
"
请选择工作区域
"
,
trigger
:
"
blur
"
}
{
required
:
true
,
message
:
"
请选择工作区域
"
,
trigger
:
"
blur
"
}
,
],
],
desc
:
[
desc
:
[
{
required
:
true
,
message
:
"
请输入流程描述
"
,
trigger
:
"
blur
"
},
{
required
:
true
,
message
:
"
请输入流程描述
"
,
trigger
:
"
blur
"
},
{
max
:
400
,
message
:
"
不能超过400个字符
"
,
trigger
:
"
blur
"
}
{
max
:
400
,
message
:
"
不能超过400个字符
"
,
trigger
:
"
blur
"
}
,
]
]
,
},
},
workplace_list
:
[]
workplace_list
:
[]
,
};
};
},
},
methods
:
{
methods
:
{
...
@@ -107,8 +144,8 @@ export default {
...
@@ -107,8 +144,8 @@ export default {
let
out_edge
=
0
;
let
out_edge
=
0
;
let
datas
=
{
...
data
.
obj
};
let
datas
=
{
...
data
.
obj
};
console
.
log
(
data
);
console
.
log
(
data
);
datas
.
nodeList
.
forEach
(
item
=>
{
datas
.
nodeList
.
forEach
(
(
item
)
=>
{
let
da
=
data
.
params
.
find
(
nodep
=>
{
let
da
=
data
.
params
.
find
(
(
nodep
)
=>
{
return
nodep
.
id
==
item
.
meta
.
id
;
return
nodep
.
id
==
item
.
meta
.
id
;
});
});
item
.
meta
=
da
;
item
.
meta
=
da
;
...
@@ -121,14 +158,14 @@ export default {
...
@@ -121,14 +158,14 @@ export default {
end_id
=
item
.
id
;
end_id
=
item
.
id
;
}
}
if
(
if
(
datas
.
linkList
.
findIndex
(
el
=>
{
datas
.
linkList
.
findIndex
(
(
el
)
=>
{
return
el
.
startId
==
item
.
id
;
return
el
.
startId
==
item
.
id
;
})
==
-
1
&&
})
==
-
1
&&
item
.
id
!=
end_id
item
.
id
!=
end_id
)
{
)
{
in_edge
++
;
in_edge
++
;
}
else
if
(
}
else
if
(
datas
.
linkList
.
findIndex
(
el
=>
{
datas
.
linkList
.
findIndex
(
(
el
)
=>
{
return
el
.
endId
==
item
.
id
;
return
el
.
endId
==
item
.
id
;
})
==
-
1
&&
})
==
-
1
&&
item
.
id
!=
start_id
item
.
id
!=
start_id
...
@@ -136,7 +173,7 @@ export default {
...
@@ -136,7 +173,7 @@ export default {
out_edge
++
;
out_edge
++
;
}
}
});
});
datas
.
linkList
.
forEach
(
item
=>
{
datas
.
linkList
.
forEach
(
(
item
)
=>
{
if
(
start_id
==
item
.
endId
)
{
if
(
start_id
==
item
.
endId
)
{
start_before
++
;
start_before
++
;
}
}
...
@@ -147,25 +184,30 @@ export default {
...
@@ -147,25 +184,30 @@ export default {
if
(
start_num
!=
1
||
end_num
!=
1
)
{
if
(
start_num
!=
1
||
end_num
!=
1
)
{
this
.
$message
({
this
.
$message
({
message
:
"
开始节点与结束节点均应有且只有一个
"
,
message
:
"
开始节点与结束节点均应有且只有一个
"
,
type
:
"
warning
"
type
:
"
warning
"
,
});
});
return
false
;
}
else
if
(
start_before
!=
0
)
{
}
else
if
(
start_before
!=
0
)
{
this
.
$message
({
this
.
$message
({
message
:
"
开始节点前面不应连接其它节点
"
,
message
:
"
开始节点前面不应连接其它节点
"
,
type
:
"
warning
"
type
:
"
warning
"
,
});
});
return
false
;
}
else
if
(
end_after
!=
0
)
{
}
else
if
(
end_after
!=
0
)
{
this
.
$message
({
this
.
$message
({
message
:
"
结束节点后面不应连接其它节点
"
,
message
:
"
结束节点后面不应连接其它节点
"
,
type
:
"
warning
"
type
:
"
warning
"
,
});
});
return
false
;
}
else
if
(
in_edge
!=
0
||
out_edge
!=
0
)
{
}
else
if
(
in_edge
!=
0
||
out_edge
!=
0
)
{
this
.
$message
({
this
.
$message
({
message
:
"
请保证每个节点都被连接
"
,
message
:
"
请保证每个节点都被连接
"
,
type
:
"
warning
"
type
:
"
warning
"
,
});
});
return
false
;
}
else
{
return
datas
;
}
}
console
.
log
(
datas
);
},
},
backToList
()
{
backToList
()
{
this
.
$router
.
push
(
"
/message/directed_push
"
);
this
.
$router
.
push
(
"
/message/directed_push
"
);
...
@@ -175,9 +217,8 @@ export default {
...
@@ -175,9 +217,8 @@ export default {
this
.
$router
.
go
(
-
1
);
this
.
$router
.
go
(
-
1
);
},
},
next
()
{
next
()
{
this
.
$refs
[
"
basicInformation
"
].
validate
(
valid
=>
{
this
.
$refs
[
"
basicInformation
"
].
validate
(
(
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
console
.
log
(
"
sss
"
)
this
.
step
++
;
this
.
step
++
;
}
else
{
}
else
{
}
}
...
@@ -187,9 +228,32 @@ export default {
...
@@ -187,9 +228,32 @@ export default {
this
.
step
--
;
this
.
step
--
;
},
},
complete
()
{
complete
()
{
this
.
verification
();
let
self
=
this
;
}
let
res
=
self
.
verification
();
}
if
(
res
)
{
let
query
=
{
name
:
self
.
basic_form
.
name
,
workarea
:
self
.
basic_form
.
workplace
,
describe
:
self
.
basic_form
.
desc
,
...
res
,
};
this
.
$api
.
workbench
.
addProcess
(
query
).
then
((
response
)
=>
{
if
(
response
.
data
.
success
==
1
)
{
}
});
}
},
getNameSpaceList
()
{
this
.
$api
.
workbench
.
getProcessNamespaceList
().
then
((
response
)
=>
{
if
(
response
.
data
.
success
==
1
)
{
this
.
workplace_list
=
response
.
data
.
data
.
workareas
;
}
});
},
},
mounted
()
{
this
.
getNameSpaceList
();
},
};
};
</
script
>
</
script
>
...
...
src/request/api/workbench.js
View file @
9747d75b
...
@@ -57,6 +57,23 @@ const workbench = {
...
@@ -57,6 +57,23 @@ const workbench = {
getServiceTopology
()
{
getServiceTopology
()
{
return
axios
.
get
(
`/apaas/istio/v3/api/namespaces/graph`
)
return
axios
.
get
(
`/apaas/istio/v3/api/namespaces/graph`
)
},
},
// add process
addProcess
(
params
)
{
return
axios
.
post
(
`/apaas/serviceapp/v3/workflows/add`
,
params
)
},
// edit process
editProcess
(
params
)
{
return
axios
.
post
(
`/apaas/serviceapp/v3/workflows/update`
,
params
)
},
// get process detail
getProcessDetail
(
params
)
{
return
axios
.
get
(
`/apaas/serviceapp/v3/workflows/detail?id=
${
params
.
id
}
`
)
},
// get process namespace list
getProcessNamespaceList
()
{
return
axios
.
get
(
`/apaas/serviceapp/v3/workflows/searchConditions`
)
},
}
}
export
default
workbench
;
export
default
workbench
;
src/router/index.js
View file @
9747d75b
...
@@ -284,6 +284,11 @@ export default new Router({
...
@@ -284,6 +284,11 @@ export default new Router({
name
:
"
process_design
"
,
name
:
"
process_design
"
,
component
:
()
=>
import
(
"
@/pages/workbench/component-center/process-management/process-design/index
"
),
component
:
()
=>
import
(
"
@/pages/workbench/component-center/process-management/process-design/index
"
),
},
// 流程设计
},
// 流程设计
{
path
:
"
/progress/designer/design_edit/:id
"
,
name
:
"
process_design_edit
"
,
component
:
()
=>
import
(
"
@/pages/workbench/component-center/process-management/process-design/edit
"
),
},
// 流程编辑
],
],
},
// 流程设计
},
// 流程设计
{
{
...
@@ -445,6 +450,16 @@ export default new Router({
...
@@ -445,6 +450,16 @@ export default new Router({
name
:
"
serviceControl
"
,
name
:
"
serviceControl
"
,
component
:
()
=>
import
(
"
@/pages/data-analysis/service-control
"
),
component
:
()
=>
import
(
"
@/pages/data-analysis/service-control
"
),
},
},
{
path
:
"
/data_analysis/super_service
"
,
// 数据分析中心服务-组织
name
:
"
superServiceDataAnalysis
"
,
component
:
()
=>
import
(
"
@/pages/data-analysis/super-service
"
),
},
{
path
:
"
/data_analysis/super_application
"
,
// 数据分析中心应用-组织
name
:
"
superApplicationDataAnalysis
"
,
component
:
()
=>
import
(
"
@/pages/data-analysis/super-application
"
),
},
],
],
},
},
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment