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
6b6cf633
Commit
6b6cf633
authored
Aug 12, 2020
by
刘殿昕
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ldx' into dev
parents
fac63235
c988ee90
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
358 additions
and
262 deletions
+358
-262
src/components/work-flow/super-flow.vue
src/components/work-flow/super-flow.vue
+323
-201
src/pages/workbench/component-center/process-management/process-design/index.vue
...ponent-center/process-management/process-design/index.vue
+35
-61
No files found.
src/components/work-flow/super-flow.vue
View file @
6b6cf633
...
...
@@ -14,37 +14,16 @@
<div
class=
"node-container"
>
<p
class=
"label_head"
>
节点类型
</p>
<p
class=
"label_explanation"
>
请拖拽添加到流程中
</p>
<div
class=
"node-item"
:class=
"
{'node-item-begin': item.value.meta.type == 1, 'node-item-end': item.value.meta.type == 2, 'node-item-default': item.value.meta.type == 3}"
v-for="(item, index) in nodeItemList"
:key="index"
@mousedown="evt => nodeItemMouseDown(evt, item.value)"
>
<div
class=
"node-item"
:class=
"
{'node-item-begin': item.value.meta.type == 1, 'node-item-end': item.value.meta.type == 2, 'node-item-default': item.value.meta.type == 3}" v-for="(item, index) in nodeItemList" :key="index" @mousedown="evt => nodeItemMouseDown(evt, item.value)">
<span>
{{
item
.
label
}}
</span>
</div>
</div>
</div>
<div
class=
"flow-container"
ref=
"flowContainer"
>
<super-flow
ref=
"superFlow"
:node-list=
"nodeList"
:link-list=
"linkList"
:link-menu=
"linkMenu"
line-color=
"#c4d8f8"
onLineColor=
"#94a8c8"
:origin=
"origin"
>
<super-flow
ref=
"superFlow"
:node-list=
"nodeList"
:link-list=
"linkList"
:link-menu=
"linkMenu"
line-color=
"#c4d8f8"
onLineColor=
"#94a8c8"
:origin=
"origin"
>
<template
v-slot:node=
"
{meta}">
<div
:class=
"
{'flow-node-begin': nodeParams(meta.id).type == 1, 'flow-node-end': nodeParams(meta.id).type == 2, 'flow-node-default': nodeParams(meta.id).type == 3
&&
meta.id != nodeItem.id, 'flow-node-default-active': nodeParams(meta.id).type == 3
&&
meta.id == nodeItem.id }"
:id="meta.id"
>
<div
class=
"node_span"
@
click=
"clickItem(meta.id)"
@
blur=
"blurItem"
>
{{
nodeParams
(
meta
.
id
).
name
}}
</div>
<div
:class=
"
{'flow-node-begin': nodeParams(meta.id).type == 1, 'flow-node-end': nodeParams(meta.id).type == 2, 'flow-node-default': nodeParams(meta.id).type == 3
&&
meta.id != nodeItem.id, 'flow-node-default-active': nodeParams(meta.id).type == 3
&&
meta.id == nodeItem.id }" :id="meta.id">
<div
class=
"node_span"
@
click=
"clickItem(meta.id)"
@
blur=
"blurItem"
>
{{
nodeParams
(
meta
.
id
).
name
}}
</div>
</div>
</
template
>
</super-flow>
...
...
@@ -63,25 +42,18 @@
<img
:src=
"require('@/assets/imgs/lcsj_ic_jiekou.png')"
class=
"options_item_img"
/>
<p
class=
"options_item_text"
>
接口插件
</p>
</div>
<div
class=
"options_pop_item"
>
<div
class=
"options_pop_item"
@
click=
"showProcessService"
>
<img
:src=
"require('@/assets/imgs/lcsj_ic_liucheng.png')"
class=
"options_item_img"
/>
<p
class=
"options_item_text"
>
流程服务
</p>
</div>
<div
class=
"options_pop_item"
>
<div
class=
"options_pop_item"
@
click=
"showTimeoutManagement"
>
<img
:src=
"require('@/assets/imgs/lcsj_ic_chaoshi.png')"
class=
"options_item_img"
/>
<p
class=
"options_item_text"
>
超时管理
</p>
</div>
</div>
</div>
</div>
<el-dialog
:visible.sync=
"dialog_general"
top=
"25vh"
width=
"420px"
:modal-append-to-body=
"false"
title=
"常规设置"
:close-on-click-modal=
"false"
>
<el-dialog
:visible.sync=
"dialog_general"
top=
"25vh"
width=
"420px"
:modal-append-to-body=
"false"
title=
"常规设置"
:close-on-click-modal=
"false"
>
<div
class=
"general_settings"
>
<p
class=
"general_title"
>
节点编号:
</p>
<p
class=
"general_val"
>
{{ nodeParams(nodeItem.id).node_code }}
</p>
...
...
@@ -95,14 +67,7 @@
</div>
</div>
</el-dialog>
<el-dialog
:visible.sync=
"dialog_interface"
top=
"25vh"
width=
"80vw"
:modal-append-to-body=
"false"
title=
"接口插件"
:close-on-click-modal=
"false"
>
<el-dialog
:visible.sync=
"dialog_interface"
top=
"25vh"
width=
"80vw"
:modal-append-to-body=
"false"
title=
"接口插件"
:close-on-click-modal=
"false"
>
<div
class=
"interface_plugin"
>
<div
class=
"interface_msg"
>
<i
class=
"el-icon-warning-outline"
></i>
...
...
@@ -111,46 +76,16 @@
<div
class=
"interface_plugin_item"
>
<div
class=
"fwcs_fwdz"
>
服务地址:
</div>
<div
class=
"fwcs_fwdz_inner"
>
<el-input
placeholder=
"请输入内容"
@
input=
"getUrl"
v-model=
"serviceUrl"
class=
"input-with-select"
>
<el-input
placeholder=
"请输入内容"
@
input=
"getUrl"
v-model=
"serviceUrl"
class=
"input-with-select"
>
<el-select
v-model=
"select"
slot=
"prepend"
placeholder=
"请选择"
>
<el-option
v-for=
"item in optionType"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
></el-option>
<el-option
v-for=
"item in optionType"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
></el-option>
</el-select>
</el-input>
<el-button
@
click=
"clickFwcs()"
class=
"fwcs_btn_fwcs"
>
连接测试
</el-button>
</div>
<el-tabs
v-model=
"activeName"
class=
"fwcs_tabs"
@
tab-click=
"clickTab"
>
<el-tab-pane
label=
"请求参数"
name=
"0"
>
<CesTable
ref=
"fwcs_sjfw_qq"
size=
"mini"
:border=
"true"
:headers=
"sjfwQqcs"
url
:datas=
"datasSj"
:searchShow=
"false"
:addRowBtn=
"false"
:autoAdd=
"true"
:isDialog=
"false"
:isSelection=
"false"
:isIndex=
"true"
:radius=
"true"
:emptyText=
"emptyText"
:stripe=
"false"
:paginationShow=
"false"
:pageSizeShow=
"false"
headerCellClassName=
"th_pink"
@
changeTable=
"changeTable"
></CesTable>
<CesTable
ref=
"fwcs_sjfw_qq"
size=
"mini"
:border=
"true"
:headers=
"sjfwQqcs"
url
:datas=
"datasSj"
:searchShow=
"false"
:addRowBtn=
"false"
:autoAdd=
"true"
:isDialog=
"false"
:isSelection=
"false"
:isIndex=
"true"
:radius=
"true"
:emptyText=
"emptyText"
:stripe=
"false"
:paginationShow=
"false"
:pageSizeShow=
"false"
headerCellClassName=
"th_pink"
@
changeTable=
"changeTable"
></CesTable>
</el-tab-pane>
<el-tab-pane
label=
"请求体"
name=
"1"
>
<div
class=
"sjfw_qqt"
>
...
...
@@ -165,12 +100,7 @@
<el-col
:span=
"6"
>
<div
class=
"sqxx_title"
>
授权方式:
</div>
<el-select
v-model=
"sqfsVal"
placeholder=
"请选择"
class=
"sqxx_select"
>
<el-option
v-for=
"item in optionsSq"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
></el-option>
<el-option
v-for=
"item in optionsSq"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
></el-option>
</el-select>
</el-col>
<el-col
:span=
"2"
class=
"center_line_c"
>
...
...
@@ -186,47 +116,9 @@
<div
v-show=
"resultShow && resSuccess"
class=
"add_params"
>
<div
class=
"split_line"
></div>
<div
class=
"sjfw_qqcstx"
>
请求参数信息填写:
</div>
<CesTable
ref=
"fwcs_sjfw_qqcs"
size=
"mini"
:border=
"true"
:headers=
"sjfwQqcstx"
url
:datas=
"datasQqcs"
:searchShow=
"false"
:addRowBtn=
"false"
:autoAdd=
"false"
:isDialog=
"false"
:isSelection=
"false"
:isIndex=
"true"
:radius=
"true"
:emptyText=
"emptyText"
:stripe=
"false"
:paginationShow=
"false"
:pageSizeShow=
"false"
headerCellClassName=
"th_pink"
></CesTable>
<CesTable
ref=
"fwcs_sjfw_qqcs"
size=
"mini"
:border=
"true"
:headers=
"sjfwQqcstx"
url
:datas=
"datasQqcs"
:searchShow=
"false"
:addRowBtn=
"false"
:autoAdd=
"false"
:isDialog=
"false"
:isSelection=
"false"
:isIndex=
"true"
:radius=
"true"
:emptyText=
"emptyText"
:stripe=
"false"
:paginationShow=
"false"
:pageSizeShow=
"false"
headerCellClassName=
"th_pink"
></CesTable>
<div
class=
"sjfw_fhcstx"
>
返回参数信息填写:
</div>
<CesTable
ref=
"fwcs_sjfw_fhcs"
size=
"mini"
:border=
"true"
:headers=
"sjfwFhcstx"
url
:datas=
"datasFhcs"
:searchShow=
"false"
:addRowBtn=
"false"
:autoAdd=
"false"
:isDialog=
"false"
:isSelection=
"false"
:isIndex=
"true"
:radius=
"true"
:emptyText=
"emptyText"
:stripe=
"false"
:paginationShow=
"false"
:pageSizeShow=
"false"
headerCellClassName=
"th_pink"
></CesTable>
<CesTable
ref=
"fwcs_sjfw_fhcs"
size=
"mini"
:border=
"true"
:headers=
"sjfwFhcstx"
url
:datas=
"datasFhcs"
:searchShow=
"false"
:addRowBtn=
"false"
:autoAdd=
"false"
:isDialog=
"false"
:isSelection=
"false"
:isIndex=
"true"
:radius=
"true"
:emptyText=
"emptyText"
:stripe=
"false"
:paginationShow=
"false"
:pageSizeShow=
"false"
headerCellClassName=
"th_pink"
></CesTable>
</div>
<div
v-show=
"resultShow && !resSuccess"
>
<div
class=
"skfw_csfwxx"
>
测试服务信息:
</div>
...
...
@@ -243,6 +135,65 @@
</div>
</div>
</el-dialog>
<el-dialog
:visible.sync=
"dialog_process"
top=
"25vh"
width=
"500px"
:modal-append-to-body=
"false"
title=
"流程服务"
:close-on-click-modal=
"false"
>
<div
class=
"process_service"
>
<div
class=
"process_msg"
>
<i
class=
"el-icon-warning-outline"
></i>
<span>
配置流程服务插件后,该节点可调用流程服务,并在此节点触发该流程。
</span>
</div>
<p
class=
"process_title"
>
我的服务:
</p>
<p
class=
"process_input"
>
<el-select
v-model=
"service"
placeholder=
"请选择服务"
>
<el-option
v-for=
"item in my_service_list"
:label=
"item"
:value=
"item"
:key=
"item"
></el-option>
</el-select>
</p>
<div
class=
"dia_footer"
>
<el-button
class=
"cancel"
@
click=
"processCancel"
>
取消
</el-button>
<el-button
class=
"submit"
@
click=
"processSubmit"
>
确定
</el-button>
</div>
</div>
</el-dialog>
<el-dialog
:visible.sync=
"dialog_timeout"
top=
"25vh"
width=
"500px"
:modal-append-to-body=
"false"
title=
"超时管理"
:close-on-click-modal=
"false"
>
<div
class=
"timeout_service"
>
<div
class=
"timeout_msg"
>
<i
class=
"el-icon-warning-outline"
></i>
<span>
添加超时管理插件后,根据配置该节点超时后会发送消息给请求方。
</span>
</div>
<p
class=
"timeout_title"
>
超时设置:
</p>
<div
class=
"timeout_input"
>
<div
class=
"timeout_row"
>
<div
class=
"timeout_input_group"
>
<div
class=
"input_left"
>
最大时长
</div>
<el-input-number
v-model=
"max_time_0"
controls-position=
"right"
:min=
"0"
></el-input-number>
<el-select
v-model=
"max_time_type_0"
class=
"input_right_select"
placeholder=
"请选择申请时长"
>
<el-option
v-for=
"item in durationOptions"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
></el-option>
</el-select>
</div>
<div
class=
"timeout_check"
>
<el-checkbox
v-model=
"max_time_check_0"
>
超时提醒
</el-checkbox>
</div>
</div>
</div>
<div
class=
"timeout_input margin_high"
>
<div
class=
"timeout_row"
>
<div
class=
"timeout_input_group"
>
<div
class=
"input_left"
>
最大时长
</div>
<el-input-number
v-model=
"max_time_1"
controls-position=
"right"
:min=
"0"
></el-input-number>
<el-select
v-model=
"max_time_type_1"
class=
"input_right_select"
placeholder=
"请选择申请时长"
>
<el-option
v-for=
"item in durationOptions"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
></el-option>
</el-select>
</div>
<div
class=
"timeout_check"
>
<el-checkbox
v-model=
"max_time_check_1"
>
超时提醒
</el-checkbox>
</div>
</div>
</div>
<div
class=
"dia_footer"
>
<el-button
class=
"cancel"
@
click=
"timeoutCancel"
>
取消
</el-button>
<el-button
class=
"submit"
@
click=
"timeoutSubmit"
>
确定
</el-button>
</div>
</div>
</el-dialog>
</div>
</template>
...
...
@@ -251,12 +202,12 @@ import CesTable from "@/components/table/table-um";
import
Codes
from
"
@/components/general/codes
"
;
const
drawerType
=
{
node
:
0
,
link
:
1
,
link
:
1
};
export
default
{
components
:
{
CesTable
,
Codes
,
Codes
},
data
()
{
return
{
...
...
@@ -297,14 +248,14 @@ export default {
}
else
{
this
.
$refs
.
linkSetting
.
clearValidate
();
}
}
,
}
},
linkSetting
:
{
desc
:
""
,
desc
:
""
},
nodeSetting
:
{
name
:
""
,
desc
:
""
,
desc
:
""
},
dragConf
:
{
isDown
:
false
,
...
...
@@ -314,7 +265,7 @@ export default {
clientX
:
0
,
clientY
:
0
,
ele
:
null
,
info
:
null
,
info
:
null
},
nodeItemList
:
[
{
...
...
@@ -325,9 +276,9 @@ export default {
meta
:
{
label
:
"
普通节点
"
,
name
:
"
普通节点
"
,
type
:
3
,
}
,
}
,
type
:
3
}
}
},
{
label
:
"
开始
"
,
...
...
@@ -337,9 +288,9 @@ export default {
meta
:
{
label
:
"
开始
"
,
name
:
"
开始
"
,
type
:
1
,
}
,
}
,
type
:
1
}
}
},
{
label
:
"
结束
"
,
...
...
@@ -349,27 +300,27 @@ export default {
meta
:
{
label
:
"
结束
"
,
name
:
"
结束
"
,
type
:
2
,
}
,
}
,
}
,
type
:
2
}
}
}
],
nodeParamsList
:
[],
linkMenu
:
[
[
{
label
:
"
删除
"
,
selected
:
(
link
)
=>
{
selected
:
link
=>
{
console
.
log
(
link
);
link
.
remove
();
}
,
}
,
]
,
}
}
]
],
dialog_general
:
false
,
nodeItem
:
{
id
:
""
,
name
:
""
,
name
:
""
},
node_name
:
""
,
show_options_pop
:
false
,
...
...
@@ -378,7 +329,7 @@ export default {
{
label
:
"
GET
"
,
value
:
1
},
{
label
:
"
POST
"
,
value
:
2
},
{
label
:
"
PUT
"
,
value
:
3
},
{
label
:
"
DELETE
"
,
value
:
4
}
,
{
label
:
"
DELETE
"
,
value
:
4
}
],
select
:
1
,
serviceUrl
:
""
,
...
...
@@ -391,9 +342,9 @@ export default {
label
:
"
请求字段编码
"
,
prop
:
"
requestEncoding
"
,
type
:
"
input
"
,
align
:
"
left
"
,
align
:
"
left
"
},
{
label
:
"
请求值
"
,
prop
:
"
requestValue
"
,
type
:
"
input
"
,
align
:
"
left
"
}
,
{
label
:
"
请求值
"
,
prop
:
"
requestValue
"
,
type
:
"
input
"
,
align
:
"
left
"
}
],
datasSj
:
[],
optionsSq
:
[{
label
:
"
Bearer Token
"
,
value
:
"
Bearer
"
}],
...
...
@@ -407,13 +358,13 @@ export default {
prop
:
"
show_type
"
,
type
:
""
,
align
:
"
left
"
,
width
:
"
140
"
,
width
:
"
140
"
},
{
label
:
"
字段名称*
"
,
prop
:
"
label
"
,
type
:
"
input
"
,
align
:
"
left
"
,
align
:
"
left
"
},
{
label
:
"
是否必须*
"
,
...
...
@@ -421,13 +372,10 @@ export default {
type
:
"
select
"
,
align
:
"
left
"
,
width
:
100
,
selectArr
:
[
{
label
:
"
是
"
,
value
:
1
},
{
label
:
"
否
"
,
value
:
0
},
],
hasDefault
:
true
,
selectArr
:
[{
label
:
"
是
"
,
value
:
1
},
{
label
:
"
否
"
,
value
:
0
}],
hasDefault
:
true
},
{
label
:
"
字段说明
"
,
prop
:
"
descript
"
,
type
:
"
input
"
,
align
:
"
left
"
}
,
{
label
:
"
字段说明
"
,
prop
:
"
descript
"
,
type
:
"
input
"
,
align
:
"
left
"
}
],
sjfwFhcstx
:
[
{
label
:
"
字段编码
"
,
prop
:
"
name
"
,
type
:
""
,
align
:
"
left
"
},
...
...
@@ -437,14 +385,34 @@ export default {
label
:
"
字段名称*
"
,
prop
:
"
label
"
,
type
:
"
input
"
,
align
:
"
left
"
,
align
:
"
left
"
},
{
label
:
"
字段说明
"
,
prop
:
"
descript
"
,
type
:
"
input
"
,
align
:
"
left
"
}
,
{
label
:
"
字段说明
"
,
prop
:
"
descript
"
,
type
:
"
input
"
,
align
:
"
left
"
}
],
datasQqcs
:
[],
datasFhcs
:
[],
resSuccess
:
false
,
resultShow
:
false
,
dataType
:
""
,
body_fields
:
[],
param_fields
:
[],
request_fields
:
[],
response_fields
:
[],
dialog_process
:
false
,
my_service_list
:
[],
service
:
""
,
dialog_timeout
:
false
,
durationOptions
:
[
{
value
:
1
,
label
:
"
分钟
"
},
{
value
:
2
,
label
:
"
小时
"
},
{
value
:
3
,
label
:
"
天
"
}
],
max_time_0
:
undefined
,
max_time_1
:
undefined
,
max_time_type_0
:
1
,
max_time_type_1
:
1
,
max_time_check_0
:
false
,
max_time_check_1
:
false
};
},
mounted
()
{
...
...
@@ -479,7 +447,7 @@ export default {
top
,
right
,
bottom
,
left
,
left
}
=
this
.
$refs
.
flowContainer
.
getBoundingClientRect
();
// 判断鼠标是否进入 flow container
if
(
...
...
@@ -511,10 +479,10 @@ export default {
console
.
log
(
query
);
this
.
$refs
.
superFlow
.
addNode
({
coordinate
,
...
query
,
...
query
});
if
(
this
.
nodeParamsList
.
findIndex
(
(
item
)
=>
{
this
.
nodeParamsList
.
findIndex
(
item
=>
{
return
item
.
id
==
query
.
meta
.
id
;
})
==
-
1
)
{
...
...
@@ -524,21 +492,21 @@ export default {
label
:
"
开始
"
,
name
:
"
开始
"
,
type
:
1
,
id
:
query
.
meta
.
id
,
id
:
query
.
meta
.
id
};
}
else
if
(
conf
.
info
.
meta
.
type
==
2
)
{
obj
=
{
label
:
"
结束
"
,
name
:
"
结束
"
,
type
:
2
,
id
:
query
.
meta
.
id
,
id
:
query
.
meta
.
id
};
}
else
if
(
conf
.
info
.
meta
.
type
==
3
)
{
obj
=
{
label
:
"
普通节点
"
,
name
:
"
普通节点
"
,
type
:
3
,
id
:
query
.
meta
.
id
,
id
:
query
.
meta
.
id
};
}
this
.
nodeParamsList
.
push
(
obj
);
...
...
@@ -563,7 +531,7 @@ export default {
clientY
:
clientY
,
info
,
ele
,
isDown
:
true
,
isDown
:
true
});
ele
.
style
.
position
=
"
fixed
"
;
ele
.
style
.
margin
=
"
0
"
;
...
...
@@ -578,14 +546,14 @@ export default {
},
blurItem
()
{
this
.
nodeItem
=
{
id
:
""
,
id
:
""
};
console
.
log
(
this
.
nodeItem
);
},
getData
()
{
return
{
obj
:
this
.
$refs
.
superFlow
.
toJSON
(),
params
:
this
.
nodeParamsList
,
params
:
this
.
nodeParamsList
};
},
handleChange
()
{},
...
...
@@ -597,14 +565,14 @@ export default {
}
else
{
self
.
$message
({
message
:
"
开始和结束节点不可被编辑
"
,
type
:
"
warning
"
,
type
:
"
warning
"
});
return
false
;
}
}
else
{
self
.
$message
({
message
:
"
请选择节点
"
,
type
:
"
warning
"
,
type
:
"
warning
"
});
return
false
;
}
...
...
@@ -612,7 +580,7 @@ export default {
showGeneralSettings
()
{
if
(
this
.
checkNodeCouldEdit
())
{
let
self
=
this
;
self
.
node_name
=
self
.
nodeParamsList
.
find
(
(
item
)
=>
{
self
.
node_name
=
self
.
nodeParamsList
.
find
(
item
=>
{
return
item
.
id
==
self
.
nodeItem
.
id
;
}).
name
;
self
.
dialog_general
=
true
;
...
...
@@ -622,7 +590,7 @@ export default {
this
.
dialog_interface
=
true
;
},
nodeParams
(
id
)
{
let
index
=
this
.
nodeParamsList
.
findIndex
(
(
item
)
=>
{
let
index
=
this
.
nodeParamsList
.
findIndex
(
item
=>
{
return
item
.
id
==
id
;
});
if
(
index
!=
-
1
)
{
...
...
@@ -637,7 +605,7 @@ export default {
generalSubmit
()
{
let
self
=
this
;
if
(
self
.
nodeItem
.
type
==
3
)
{
let
index
=
self
.
nodeParamsList
.
findIndex
(
(
item
)
=>
{
let
index
=
self
.
nodeParamsList
.
findIndex
(
item
=>
{
return
item
.
id
==
self
.
nodeItem
.
id
;
});
if
(
index
!=
-
1
)
{
...
...
@@ -645,7 +613,7 @@ export default {
}
else
{
self
.
$message
({
message
:
"
修改失败
"
,
type
:
"
error
"
,
type
:
"
error
"
});
}
}
...
...
@@ -716,9 +684,9 @@ export default {
body
:
bodys
,
content_type
:
contentType
,
data_service_type1
:
5
,
data_service_type2
:
12
,
data_service_type2
:
12
};
this
.
$api
.
workbench
.
fwzcFwcs
(
query
).
then
(
(
response
)
=>
{
this
.
$api
.
workbench
.
fwzcFwcs
(
query
).
then
(
response
=>
{
if
(
response
.
data
.
success
==
1
)
{
let
data
=
response
.
data
.
data
;
this
.
body_fields
=
data
.
body_fields
;
...
...
@@ -744,36 +712,78 @@ export default {
this
.
dialog_interface
=
false
;
},
interfaceSubmit
()
{
let
requestData
=
this
.
$refs
.
fwcs_sjfw_qqcs
.
getTableData
();
let
responseData
=
this
.
$refs
.
fwcs_sjfw_fhcs
.
getTableData
();
this
.
requestRules
=
0
;
this
.
responseRules
=
0
;
this
.
checkTable
(
requestData
,
0
);
this
.
checkTable
(
responseData
,
1
);
if
(
this
.
requestRules
==
0
&&
this
.
responseRules
==
0
)
{
this
.
request_fields
=
requestData
;
this
.
response_fields
=
responseData
;
let
self
=
this
;
let
index
=
this
.
nodeParamsList
.
findIndex
((
item
)
=>
{
return
(
item
.
id
=
self
.
nodeItem
.
id
);
});
self
.
nodeParamsList
[
index
].
plugins
.
push
({
plugin_type
:
1
,
url
:
self
.
serviceUrl
,
req_type
:
Number
(
self
.
select
),
auth_method
:
self
.
sqfsVal
,
auth_token
:
self
.
tokenVal
,
query_fields
:
"
this is response_fields value1
"
,
body_fields
:
"
this is response_fields value1
"
,
response_fields
:
"
this is response_fields value1
"
,
});
}
else
if
(
this
.
requestRules
!=
0
)
{
this
.
$message
.
error
(
"
请完善请求参数信息中的字段名称
"
);
}
else
if
(
this
.
responseRules
!=
0
)
{
this
.
$message
.
error
(
"
请完善返回参数信息中的字段名称
"
);
if
(
this
.
resSuccess
)
{
let
requestData
=
this
.
$refs
.
fwcs_sjfw_qqcs
.
getTableData
();
let
responseData
=
this
.
$refs
.
fwcs_sjfw_fhcs
.
getTableData
();
this
.
requestRules
=
0
;
this
.
responseRules
=
0
;
this
.
checkTable
(
requestData
,
0
);
this
.
checkTable
(
responseData
,
1
);
if
(
this
.
requestRules
==
0
&&
this
.
responseRules
==
0
)
{
this
.
request_fields
=
requestData
;
this
.
response_fields
=
responseData
;
let
self
=
this
;
let
index
=
this
.
nodeParamsList
.
findIndex
(
item
=>
{
return
(
item
.
id
=
self
.
nodeItem
.
id
);
});
self
.
nodeParamsList
[
index
].
plugins
.
push
({
plugin_type
:
1
,
url
:
self
.
serviceUrl
,
req_type
:
Number
(
self
.
select
),
auth_method
:
self
.
sqfsVal
,
auth_token
:
self
.
tokenVal
,
query_fields
:
self
.
dataType
==
"
body
"
?
self
.
request_fields
:
self
.
body_fields
,
body_fields
:
self
.
dataType
==
"
param
"
?
self
.
request_fields
:
self
.
param_fields
,
response_fields
:
self
.
response_fields
});
console
.
log
(
self
.
nodeParamsList
);
self
.
dialog_interface
=
false
;
}
else
if
(
this
.
requestRules
!=
0
)
{
this
.
$message
.
error
(
"
请完善请求参数信息中的字段名称
"
);
}
else
if
(
this
.
responseRules
!=
0
)
{
this
.
$message
.
error
(
"
请完善返回参数信息中的字段名称
"
);
}
}
else
{
this
.
$message
.
error
(
"
请保证接口有效
"
);
}
},
},
checkTable
(
arr
,
rule
)
{
let
self
=
this
;
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
if
(
arr
[
i
].
name
&&
arr
[
i
].
name
!=
""
)
{
if
(
!
arr
[
i
].
label
||
arr
[
i
].
label
==
""
)
{
if
(
rule
==
0
)
{
this
.
requestRules
=
1
;
}
else
if
(
rule
==
1
)
{
this
.
responseRules
=
1
;
}
return
false
;
}
}
if
(
arr
[
i
].
children
&&
arr
[
i
].
children
.
length
!=
0
)
{
self
.
checkTable
(
arr
[
i
].
children
,
rule
);
}
}
},
showProcessService
()
{
this
.
dialog_process
=
true
;
},
processCancel
()
{
this
.
dialog_process
=
false
;
},
processSubmit
()
{},
showTimeoutManagement
()
{
this
.
dialog_timeout
=
true
;
},
timeoutCancel
()
{
this
.
dialog_timeout
=
false
;
},
timeoutSubmit
()
{}
}
};
</
script
>
...
...
@@ -1034,6 +1044,71 @@ export default {
margin: 30px 15px 10px;
font-size: 14px;
}
.skcs_jg {
height: 100px;
display: flex;
align-items: center;
justify-content: center;
color: #0f2683;
font-size: 20px;
.skcs_jg_img {
position: relative;
top: 3px;
}
}
}
}
.process_service {
font-size: 14px;
text-align: left;
.process_msg {
font-size: 12px;
color: #58617a;
width: 430px;
margin: 0 auto;
padding: 10px 0;
background-color: #f4f7fc;
border-radius: 8px;
text-align: center;
}
.process_title {
margin: 20px 0 10px;
padding-left: 10px;
}
.process_val {
margin-bottom: 30px;
padding-left: 10px;
}
.process_input {
margin-bottom: 50px;
}
}
.timeout_service {
font-size: 14px;
text-align: left;
.timeout_msg {
font-size: 12px;
color: #58617a;
width: 430px;
margin: 0 auto;
padding: 10px 0;
background-color: #f4f7fc;
border-radius: 8px;
text-align: center;
}
.timeout_title {
margin: 20px 0 10px;
padding-left: 10px;
}
.timeout_val {
margin-bottom: 30px;
padding-left: 10px;
}
.timeout_input {
margin-bottom: 20px;
}
.margin_high {
margin-bottom: 50px;
}
}
.dia_footer {
...
...
@@ -1139,4 +1214,51 @@ export default {
.interface_plugin .el-tabs__header .el-tabs__item:hover {
color: #e56600;
}
.timeout_input {
.timeout_row {
display: flex;
.timeout_input_group {
width: 300px;
display: flex;
.input_left {
display: inline-block;
width: 90px;
height: 40px;
padding: 0 0 0 15px;
background-color: #edeef4;
border: 1px #e3e5ef solid;
color: #8890a7;
border-radius: 8px 0 0 8px;
line-height: 40px;
font-size: 14px;
}
.el-input-number {
flex: 1;
.el-input__inner {
border-radius: 0;
color: #242c43;
}
}
.input_right_select.el-select {
width: 80px;
}
.input_right_select.el-select .el-input {
width: 80px;
background-color: #0f2683;
color: #ffffff;
border-radius: 0 8px 8px 0;
}
.input_right_select .el-input .el-input__inner {
background-color: #0f2683;
color: #ffffff;
border: none;
}
}
.timeout_check {
margin-left: 20px;
line-height: 40px;
font-size: 16px;
}
}
}
</
style
>
\ No newline at end of file
src/pages/workbench/component-center/process-management/process-design/index.vue
View file @
6b6cf633
...
...
@@ -7,44 +7,23 @@
<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"
>
<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>
<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=
"
preson
"
>
<el-form-item
prop=
"
workplace
"
>
<p
class=
"formname"
>
工作区域:
</p>
<el-select
v-model=
"basic_form.workplace"
@
change=
"changeWorkPlace"
placeholder=
"请选择工作区域"
>
<el-select
v-model=
"basic_form.workplace"
@
change=
"changeWorkPlace"
placeholder=
"请选择工作区域"
>
<el-option
v-for=
"item in workplace_list"
:label=
"item"
:value=
"item"
:key=
"item"
></el-option>
</el-select>
</el-form-item>
<el-form-item
prop=
"
phone
"
>
<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-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"
>
...
...
@@ -53,12 +32,7 @@
</div>
</div>
</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"
>
<WorkFlow
ref=
"workFlow"
class=
"work_flow"
/>
<div
class=
"btn_footer"
>
...
...
@@ -70,13 +44,7 @@
</div>
</div>
</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"
>
<el-button
type=
"primary"
@
click=
"backToList"
>
返回列表
</el-button>
...
...
@@ -97,7 +65,7 @@ export default {
WorkFlow
,
BlockRadius
,
Steps
,
Step
,
Step
},
data
:
()
=>
{
return
{
...
...
@@ -106,29 +74,29 @@ export default {
basic_form
:
{
name
:
""
,
workplace
:
""
,
desc
:
""
,
desc
:
""
},
rules
:
{
name
:
[
{
required
:
true
,
message
:
"
请输入流程名称
"
,
trigger
:
"
blur
"
},
{
max
:
16
,
message
:
"
不能超过16个字符
"
,
trigger
:
"
blur
"
}
,
{
max
:
16
,
message
:
"
不能超过16个字符
"
,
trigger
:
"
blur
"
}
],
workplace
:
[
{
required
:
true
,
message
:
"
请选择工作区域
"
,
trigger
:
"
blur
"
}
,
{
required
:
true
,
message
:
"
请选择工作区域
"
,
trigger
:
"
blur
"
}
],
desc
:
[
{
required
:
true
,
message
:
"
请输入流程描述
"
,
trigger
:
"
blur
"
},
{
max
:
400
,
message
:
"
不能超过400个字符
"
,
trigger
:
"
blur
"
}
,
]
,
{
max
:
400
,
message
:
"
不能超过400个字符
"
,
trigger
:
"
blur
"
}
]
},
workplace_list
:
[]
,
workplace_list
:
[]
};
},
methods
:
{
verification
()
{
let
self
=
this
;
let
data
=
JSON
.
parse
(
JSON
.
stringify
(
self
.
$refs
.
workFlow
.
getData
()));
console
.
log
(
JSON
.
stringify
(
data
))
console
.
log
(
JSON
.
stringify
(
data
))
;
let
start_num
=
0
;
let
end_num
=
0
;
let
start_id
=
""
;
...
...
@@ -139,8 +107,8 @@ export default {
let
out_edge
=
0
;
let
datas
=
{
...
data
.
obj
};
console
.
log
(
data
);
datas
.
nodeList
.
forEach
(
(
item
)
=>
{
let
da
=
data
.
params
.
find
(
(
nodep
)
=>
{
datas
.
nodeList
.
forEach
(
item
=>
{
let
da
=
data
.
params
.
find
(
nodep
=>
{
return
nodep
.
id
==
item
.
meta
.
id
;
});
item
.
meta
=
da
;
...
...
@@ -153,14 +121,14 @@ export default {
end_id
=
item
.
id
;
}
if
(
datas
.
linkList
.
findIndex
(
(
el
)
=>
{
datas
.
linkList
.
findIndex
(
el
=>
{
return
el
.
startId
==
item
.
id
;
})
==
-
1
&&
item
.
id
!=
end_id
)
{
in_edge
++
;
}
else
if
(
datas
.
linkList
.
findIndex
(
(
el
)
=>
{
datas
.
linkList
.
findIndex
(
el
=>
{
return
el
.
endId
==
item
.
id
;
})
==
-
1
&&
item
.
id
!=
start_id
...
...
@@ -168,7 +136,7 @@ export default {
out_edge
++
;
}
});
datas
.
linkList
.
forEach
(
(
item
)
=>
{
datas
.
linkList
.
forEach
(
item
=>
{
if
(
start_id
==
item
.
endId
)
{
start_before
++
;
}
...
...
@@ -179,22 +147,22 @@ export default {
if
(
start_num
!=
1
||
end_num
!=
1
)
{
this
.
$message
({
message
:
"
开始节点与结束节点均应有且只有一个
"
,
type
:
"
warning
"
,
type
:
"
warning
"
});
}
else
if
(
start_before
!=
0
)
{
this
.
$message
({
message
:
"
开始节点前面不应连接其它节点
"
,
type
:
"
warning
"
,
type
:
"
warning
"
});
}
else
if
(
end_after
!=
0
)
{
this
.
$message
({
message
:
"
结束节点后面不应连接其它节点
"
,
type
:
"
warning
"
,
type
:
"
warning
"
});
}
else
if
(
in_edge
!=
0
||
out_edge
!=
0
)
{
this
.
$message
({
message
:
"
请保证每个节点都被连接
"
,
type
:
"
warning
"
,
type
:
"
warning
"
});
}
console
.
log
(
datas
);
...
...
@@ -207,15 +175,21 @@ export default {
this
.
$router
.
go
(
-
1
);
},
next
()
{
this
.
step
++
;
this
.
$refs
[
"
basicInformation
"
].
validate
(
valid
=>
{
if
(
valid
)
{
console
.
log
(
"
sss
"
)
this
.
step
++
;
}
else
{
}
});
},
back
()
{
this
.
step
--
;
},
complete
()
{
this
.
verification
();
}
,
}
,
}
}
};
</
script
>
...
...
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