增加初始化参数

This commit is contained in:
pixel
2020-11-17 17:35:23 +08:00
parent 2fad9035d3
commit ac4398873b
9 changed files with 150 additions and 189 deletions
+48
View File
@@ -113,4 +113,52 @@ export const findWorkflowStep = (params) => {
method: 'get',
params
})
}
// @Tags ExaWfLeave
// @Summary 创建ExaWfLeave
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /workflowProcess/startWorkflow [post]
export const startWorkflow = (data, params = { businessType: data.wf.businessType }) => {
return service({
url: "/workflowProcess/startWorkflow",
method: 'post',
data,
params
})
}
// @Tags WorkflowProcess
// @Summary 我发起的工作流
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /workflowProcess/getMyStated [get]
export const getMyStated = () => {
return service({
url: "/workflowProcess/getMyStated",
method: 'get',
})
}
// @Tags WorkflowProcess
// @Summary 我发起的工作流
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /workflowProcess/getMyNeed [get]
export const getMyNeed = () => {
return service({
url: "/workflowProcess/getMyNeed",
method: 'get',
})
}
+1 -1
View File
@@ -36,7 +36,7 @@ export default {
'signalEvent': '信号节点',
'signalEvent.signal': '信号名',
'sequenceFlow': '连接线',
'sequenceFlow.expression': '条件表达式',
'sequenceFlow.expression': '条件参数',
'sequenceFlow.seq': '序号',
'sequenceFlow.reverse': '反向',
'startEvent': '开始节点',
+17
View File
@@ -0,0 +1,17 @@
<template>
<div>
</div>
</template>
<script>
import {getMyNeed} from "@/api/workflowProcess"
export default {
async created(){
const res = await getMyNeed()
if(res.code == 0){
console.log(res.data)
}
}
}
</script>
@@ -0,0 +1,17 @@
<template>
<div>
</div>
</template>
<script>
import {getMyStated} from "@/api/workflowProcess"
export default {
async created(){
const res = await getMyStated()
if(res.code == 0){
console.log(res.data)
}
}
}
</script>
@@ -68,174 +68,8 @@ export default {
lang: "zh",
done:false,
demoData: {
nodes: [
{
clazz: "start",
label: "发起请假",
type: "start-node",
shape: "start-node",
x: 110,
y: 195,
id: "start1603681292875",
style: {}
},
{
clazz: "parallelGateway",
label: "会签",
type: "parallel-gateway-node",
shape: "parallel-gateway-node",
x: 228,
y: 195,
id: "parallelGateway1603681296419",
style: {}
},
{
clazz: "userTask",
label: "审批人1",
type: "user-task-node",
shape: "user-task-node",
x: 372,
y: 84,
id: "userTask1603681299962",
style: {},
assignValue: [1],
assignType: "user"
},
{
clazz: "userTask",
label: "审批人2",
type: "user-task-node",
shape: "user-task-node",
x: 370,
y: 321,
id: "userTask1603681302372",
style: {},
assignValue: [2],
assignType: "user"
},
{
clazz: "parallelGateway",
label: "会签结果检测",
type: "parallel-gateway-node",
shape: "parallel-gateway-node",
x: 519,
y: 195,
id: "parallelGateway1603681338222",
style: {}
},
{
clazz: "end",
label: "请假失败",
type: "end-node",
shape: "end-node",
x: 704,
y: 317,
id: "end1603681358043",
style: {}
},
{
clazz: "end",
label: "请假成功",
type: "end-node",
shape: "end-node",
x: 706.5,
y: 55.5,
id: "end1603681360882",
style: {}
}
],
edges: [
{
id: "flow1603681320738",
clazz: "flow",
source: "parallelGateway1603681296419",
target: "userTask1603681299962",
sourceAnchor: 0,
targetAnchor: 3,
shape: "flow-polyline-round",
style: {},
startPoint: { x: 228, y: 169, index: 0 },
endPoint: { x: 321.5, y: 84, index: 3 }
},
{
id: "flow1603681321969",
clazz: "flow",
source: "parallelGateway1603681296419",
target: "userTask1603681302372",
sourceAnchor: 2,
targetAnchor: 3,
shape: "flow-polyline-round",
style: {},
startPoint: { x: 228, y: 221, index: 2 },
endPoint: { x: 319.5, y: 321, index: 3 }
},
{
id: "flow1603681323274",
clazz: "flow",
source: "start1603681292875",
target: "parallelGateway1603681296419",
sourceAnchor: 1,
targetAnchor: 3,
shape: "flow-polyline-round",
style: {},
startPoint: { x: 138, y: 195, index: 1 },
endPoint: { x: 202, y: 195, index: 3 },
label: "发起",
conditionExpression: "complete"
},
{
id: "flow1603681341777",
clazz: "flow",
source: "userTask1603681299962",
target: "parallelGateway1603681338222",
sourceAnchor: 1,
targetAnchor: 3,
shape: "flow-polyline-round",
style: {},
startPoint: { x: 422.5, y: 84, index: 1 },
endPoint: { x: 493, y: 195, index: 3 }
},
{
id: "flow1603681343425",
clazz: "flow",
source: "userTask1603681302372",
target: "parallelGateway1603681338222",
sourceAnchor: 1,
targetAnchor: 3,
shape: "flow-polyline-round",
style: {},
startPoint: { x: 420.5, y: 321, index: 1 },
endPoint: { x: 493, y: 195, index: 3 }
},
{
id: "flow1603681362913",
clazz: "flow",
source: "parallelGateway1603681338222",
target: "end1603681360882",
sourceAnchor: 0,
targetAnchor: 2,
shape: "flow-polyline-round",
style: {},
startPoint: { x: 519, y: 169, index: 0 },
endPoint: { x: 678.5, y: 55.5, index: 2 },
conditionExpression: "complete",
label: "所有人同意"
},
{
id: "flow1603681392729",
clazz: "flow",
source: "parallelGateway1603681338222",
target: "end1603681358043",
sourceAnchor: 2,
targetAnchor: 2,
shape: "flow-polyline-round",
style: {},
startPoint: { x: 519, y: 221, index: 2 },
endPoint: { x: 676, y: 317, index: 2 },
conditionExpression: "reject",
label: "任何一人拒绝"
}
],
nodes: [],
edges: []
},
wkType:"create",
users: [],
@@ -249,17 +83,8 @@ export default {
signalDefs: [],
messageDefs: [],
},
groups: [
{ id: "1", name: "组1" },
{ id: "2", name: "组2" },
{ id: "3", name: "组3" }
],
categorys: [
{ id: "1", name: "分类1" },
{ id: "2", name: "分类2" },
{ id: "3", name: "分类3" },
{ id: "4", 分组: "分组4" }
]
groups: [],
categorys: []
};
},
methods: {
@@ -271,7 +96,7 @@ export default {
processModel.nodes = JSON.parse(JSON.stringify(obj.nodes))
processModel.nodes.map(item=>{
if(item.assignValue){
item.assignValue = String(item.assignValue)
item.assignValue = ","+String(item.assignValue)+","
}
})
if(!processModel.id){
@@ -328,7 +153,7 @@ export default {
if(res.code == 0){
res.data.reworkflowProcess.nodes.map(item=>{
if(item.assignValue){
const watiUseArr = item.assignValue.split(",")
const watiUseArr =item.assignValue.substr(1,item.assignValue.length-2).split(",")
if(item.assignType == 'user'){
item.assignValue = []
watiUseArr.map(i => {