Files
mosr-web/src/views/workflow/process/DefaultNodeProps.js
2024-08-02 19:36:37 +08:00

127 lines
3.3 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//审批节点默认属性
export const APPROVAL_PROPS = {
assignedType: "ASSIGN_USER", //审批类型
mode: "AND", //会签模式
sign: false, //是否签字
headerBgc: '#ff943e', //节点背景颜色
nobody: { //没有审批的的时候需要的操作
handler: "TO_PASS", //操作
assignedUser: [] //审批人列表
},
matrixApproval: true,
dstiMatrix: false,
generalManager: true,
president: true,
duplicateApproval: false,
optionalChargeLeadership: false,
skipSelf: true,
timeLimit: { //边界事件
timeout: { //超时提醒时间
unit: "H",
value: 0
},
handler: { //超时提醒触发时候的操作
type: "REFUSE", //操作
notify: {
once: true, //是否循环
hour: 1
}
}
},
assignedUser: [], // 审批人列表
formPerms: [], //表单权限
selfSelect: { //用户自选
multiple: false //用户自选时是否是多选
},
leaderTop: { //领导
endCondition: "TOP",
endLevel: 1,
},
leader: { //第几级领导
level: 1
},
listener: {
state: false,
list: []
},
roleList: [], //角色列表
refuse: { //拒绝的操作
type: 'TO_END', //驳回规则 TO_END TO_NODE TO_BEFORE
target: '' //驳回到指定ID的节点
},
formUser: '' //表单用户
}
//根节点默认属性
export const ROOT_PROPS = {
assignedUser: [], //审批人
formPerms: [] //表单权限
}
//条件节点默认属性
export const CONDITION_PROPS = {
groupsType: "OR", //条件组逻辑关系 OR、AND
groups: [
{
groupType: "AND", //条件组内条件关系 OR、AND
cids: [], //条件ID集合
conditions: [] //组内子条件
}
],
expression: "" //自定义表达式,灵活构建逻辑关系
}
//抄送节点默认属性
export const CC_PROPS = {
assignedType: "ASSIGN_USER", //审批类型
shouldAdd: false,
assignedUser: [],
formPerms: []
}
//触发器节点默认属性
export const TRIGGER_PROPS = {
type: 'WEBHOOK',
http: {
method: 'GET', //请求方法 支持GET/POST
url: '', //URL地址可以直接带参数
headers: [ //http header
{
name: '',
isField: true,
value: '' //支持表达式 ${xxx} xxx为表单字段id
}
],
contentType: 'FORM', //请求参数类型
params: [ //请求参数
{
name: '',
isField: true, //是表单字段还是自定义
value: '' //支持表达式 ${xxx} xxx为表单字段id
}
],
retry: 1,
handlerByScript: false,
success: 'function handlerSuccess(res) {\n return {\n state: true, \n msg: "请求成功!" \n };\n}',
fail: 'function handlerFail(res) {\n return {\n state: true, \n msg: "请求失败!" \n };\n}'
},
email: {
subject: '',
to: [],
cc: [],
content: ''
}
}
//延时节点默认属性
export const DELAY_PROPS = {
type: "FIXED", //延时类型 FIXED:到达当前节点后延时固定时长 、AUTO:延时到 dateTime设置的时间
time: 0, //延时时间
unit: "M", //时间单位 D天 H小时 M分钟
dateTime: "" //如果当天没有超过设置的此时间点,就延时到这个指定的时间,到了就直接跳过不延时
}
export default {
APPROVAL_PROPS, CC_PROPS, DELAY_PROPS, CONDITION_PROPS, ROOT_PROPS, TRIGGER_PROPS
}