diff --git "a/public/data\345\255\227\346\256\265\346\263\250\351\207\212.js" "b/public/data\345\255\227\346\256\265\346\263\250\351\207\212.js" index c182ad6..4c9b127 100644 --- "a/public/data\345\255\227\346\256\265\346\263\250\351\207\212.js" +++ "b/public/data\345\255\227\346\256\265\346\263\250\351\207\212.js" @@ -1,137 +1,140 @@ export default { - "code": "200", - "msg": "success", - "data": { - "tableId": 1,//审批id - "workFlowDef": { - "name": "合同审批",//审批名称 - }, - "directorMaxLevel": 4,//审批主管最大层级 - "flowPermission": [],//发起人 - "nodeConfig": { - "nodeName": "发起人",//节点名称 - "type": 0,// 0 发起人 1审批 2抄送 3条件 4路由 - "priorityLevel": "",// 条件优先级 - "settype": "",// 审批人设置 1指定成员 2主管 4发起人自选 5发起人自己 7连续多级主管 - "selectMode": "", //审批人数 1选一个人 2选多个人 - "selectRange": "", //选择范围 1.全公司 2指定成员 2指定角色 - "directorLevel": "", //审批终点 最高层主管数 - "examineMode": "", //多人审批时采用的审批方式 1依次审批 2会签 - "noHanderAction": "",//审批人为空时 1自动审批通过/不允许发起 2转交给审核管理员 - "examineEndDirectorLevel": "", //审批终点 第n层主管 - "ccSelfSelectFlag": "", //允许发起人自选抄送人 - "conditionList": [], //当审批单同时满足以下条件时进入此流程 - "nodeUserList": [], //操作人 - "childNode": { - "nodeName": "审核人", - "error": false, //当前审批是否通过校验 - "type": 1, - "settype": 2, - "selectMode": 0, - "selectRange": 0, - "directorLevel": 1, - "examineMode": 1, - "noHanderAction": 2, - "examineEndDirectorLevel": 0, - "childNode": { - "nodeName": "路由", - "type": 4, - "priorityLevel": 1, - "settype": 1, - "selectMode": 0, - "selectRange": 0, - "directorLevel": 1, - "examineMode": 1, - "noHanderAction": 2, - "examineEndDirectorLevel": 1, - "ccSelfSelectFlag": 1, - "conditionList": [], - "nodeUserList": [], - "childNode": { - "nodeName": "抄送人", - "type": 2, - "ccSelfSelectFlag": 1, - "childNode": null, - "nodeUserList": [], - "error": false - }, - "conditionNodes": [{ //条件节点 - "nodeName": "条件1", - "type": 3, - "priorityLevel": 1, - "settype": 1, - "selectMode": 0, - "selectRange": 0, - "directorLevel": 1, - "examineMode": 1, - "noHanderAction": 2, - "examineEndDirectorLevel": 1, - "ccSelfSelectFlag": 1, - "conditionList": [{ //当前条件 - "columnId": 0, //发起人 - "type": 1, //1 发起人 2其他 - "optType": "", //["", "<", ">", "≤", "=", "≥"][optType] - "zdy1": "",//左侧自定义内容 - "zdy2": "",//右侧自定义内容 - "opt1": "",//左侧符号 < ≤ - "opt2": "",//右侧符号 < ≤ - "columnDbname": "",//条件字段名称 - "columnType": "",//条件字段类型 - "showType": "",//3多选 其他 - "showName": "",//展示名 - "fixedDownBoxValue": ""//多选数组 - }], - "nodeUserList": [{ - "targetId": 85, - "type": 1, - "name": "天旭" - }], - "childNode": { - "nodeName": "审核人", - "type": 1, - "priorityLevel": 1, - "settype": 1, - "selectMode": 0, - "selectRange": 0, - "directorLevel": 1, - "examineMode": 1, - "noHanderAction": 2, - "examineEndDirectorLevel": 1, - "ccSelfSelectFlag": 1, - "conditionList": [], - "nodeUserList": [{ - "targetId": 2515744, - "type": 1, - "name": "哈哈哈哈" - }], - "childNode": null, - "conditionNodes": [], - "error": false - }, - "conditionNodes": [], - "error": false - }, { - "nodeName": "条件2", - "type": 3, - "priorityLevel": 2, - "settype": 1, - "selectMode": 0, - "selectRange": 0, - "directorLevel": 1, - "examineMode": 1, - "noHanderAction": 2, - "examineEndDirectorLevel": 1, - "ccSelfSelectFlag": 1, - "conditionList": [], - "nodeUserList": [], - "childNode": null, - "conditionNodes": [], - "error": false - }] - }, - "nodeUserList": [] - }, - "conditionNodes": [] - } - } + "_value": { + "formId":"",//表单id + "formName":"",//表单名称 + "formDesc":"",//表单描述 + "tableId": 1,//审批id + "workFlowDef": { + "id":"",//流程定义id,更新流程定义使用(更新必传) + "directorId":"",//传入用户id,代表流程负责人 + "name": "合同审批",//审批名称 + }, + "directorMaxLevel": 4,//审批主管最大层级 + "flowPermission": [],//发起人 + "nodeConfig": { + "nodeName": "发起人",//节点名称 + "type": 0,// 0 发起人 1审批 2抄送 3条件 4路由 + "priorityLevel": "",// 条件优先级 + "settype": "",// 审批人设置 1指定成员 2主管 4发起人自选 5发起人自己 7连续多级主管 + "selectMode": "", //审批人数 1选一个人 2选多个人 + "selectRange": "", //选择范围 1.全公司 2指定成员 2指定角色 + "directorLevel": "", //审批终点 最高层主管数 + "examineMode": "", //多人审批时采用的审批方式 1依次审批 2会签 3或签 + "noHanderAction": "",//审批人为空时 1自动审批通过/不允许发起 2转交给审核管理员 + "examineEndDirectorLevel": "", //审批终点 第n层主管 + "ccSelfSelectFlag": "", //允许发起人自选抄送人 + "conditionList": [], //当审批单同时满足以下条件时进入此流程 + "nodeUserList": [], //操作人 + "childNode": { + "nodeName": "审核人", + "error": false, //当前审批是否通过校验 + "type": 1, + "settype": 2, + "selectMode": 0, + "selectRange": 0, + "directorLevel": 1, + "examineMode": 1, + "noHanderAction": 2, + "examineEndDirectorLevel": 0, + "childNode": { + "nodeName": "路由", + "type": 4, + "priorityLevel": 1, + "settype": 1, + "selectMode": 0, + "selectRange": 0, + "directorLevel": 1, + "examineMode": 1, + "noHanderAction": 2, + "examineEndDirectorLevel": 1, + "ccSelfSelectFlag": 1, + "conditionList": [], + "nodeUserList": [], + "childNode": { + "nodeName": "抄送人", + "type": 2, + "ccSelfSelectFlag": 1, + "childNode": null, + "nodeUserList": [], + "error": false + }, + "conditionNodes": [{ //条件节点 + "nodeName": "条件1", + "type": 3, + "priorityLevel": 1, + "settype": 1, + "selectMode": 0, + "selectRange": 0, + "directorLevel": 1, + "examineMode": 1, + "noHanderAction": 2, + "examineEndDirectorLevel": 1, + "ccSelfSelectFlag": 1, + "conditionList": [{ //当前条件 + "columnId": 0, //发起人 + "type": 1, //1 发起人 2其他 + "optType": "", //["", "<", ">", "≤", "=", "≥"][optType] + "zdy1": "",//左侧自定义内容 + "zdy2": "",//右侧自定义内容 + "opt1": "",//左侧符号 < ≤ + "opt2": "",//右侧符号 < ≤ + "columnDbname": "",//条件字段名称 + "columnType": "",//条件字段类型 + "showType": "",//3多选 其他 + "showName": "",//展示名 + "fixedDownBoxValue": ""//多选数组 + }], + "nodeUserList": [{ + "targetId": 85, + "type": 1, + "name": "天旭" + }], + "childNode": { + "nodeName": "审核人", + "type": 1, + "priorityLevel": 1, + "settype": 1, + "selectMode": 0, + "selectRange": 0, + "directorLevel": 1, + "examineMode": 1, + "noHanderAction": 2, + "examineEndDirectorLevel": 1, + "ccSelfSelectFlag": 1, + "conditionList": [], + "nodeUserList": [{ + "targetId": 2515744, + "type": 1, + "name": "哈哈哈哈" + }], + "childNode": null, + "conditionNodes": [], + "error": false + }, + "conditionNodes": [], + "error": false + }, { + "nodeName": "条件2", + "type": 3, + "priorityLevel": 2, + "settype": 1, + "selectMode": 0, + "selectRange": 0, + "directorLevel": 1, + "examineMode": 1, + "noHanderAction": 2, + "examineEndDirectorLevel": 1, + "ccSelfSelectFlag": 1, + "conditionList": [], + "nodeUserList": [], + "childNode": null, + "conditionNodes": [], + "error": false + }] + }, + "nodeUserList": [] + }, + "conditionNodes": [] + } + } } diff --git "a/public/data\345\255\227\346\256\265\346\263\250\351\207\212.js" "b/public/data\345\255\227\346\256\265\346\263\250\351\207\212.js" index c182ad6..4c9b127 100644 --- "a/public/data\345\255\227\346\256\265\346\263\250\351\207\212.js" +++ "b/public/data\345\255\227\346\256\265\346\263\250\351\207\212.js" @@ -1,137 +1,140 @@ export default { - "code": "200", - "msg": "success", - "data": { - "tableId": 1,//审批id - "workFlowDef": { - "name": "合同审批",//审批名称 - }, - "directorMaxLevel": 4,//审批主管最大层级 - "flowPermission": [],//发起人 - "nodeConfig": { - "nodeName": "发起人",//节点名称 - "type": 0,// 0 发起人 1审批 2抄送 3条件 4路由 - "priorityLevel": "",// 条件优先级 - "settype": "",// 审批人设置 1指定成员 2主管 4发起人自选 5发起人自己 7连续多级主管 - "selectMode": "", //审批人数 1选一个人 2选多个人 - "selectRange": "", //选择范围 1.全公司 2指定成员 2指定角色 - "directorLevel": "", //审批终点 最高层主管数 - "examineMode": "", //多人审批时采用的审批方式 1依次审批 2会签 - "noHanderAction": "",//审批人为空时 1自动审批通过/不允许发起 2转交给审核管理员 - "examineEndDirectorLevel": "", //审批终点 第n层主管 - "ccSelfSelectFlag": "", //允许发起人自选抄送人 - "conditionList": [], //当审批单同时满足以下条件时进入此流程 - "nodeUserList": [], //操作人 - "childNode": { - "nodeName": "审核人", - "error": false, //当前审批是否通过校验 - "type": 1, - "settype": 2, - "selectMode": 0, - "selectRange": 0, - "directorLevel": 1, - "examineMode": 1, - "noHanderAction": 2, - "examineEndDirectorLevel": 0, - "childNode": { - "nodeName": "路由", - "type": 4, - "priorityLevel": 1, - "settype": 1, - "selectMode": 0, - "selectRange": 0, - "directorLevel": 1, - "examineMode": 1, - "noHanderAction": 2, - "examineEndDirectorLevel": 1, - "ccSelfSelectFlag": 1, - "conditionList": [], - "nodeUserList": [], - "childNode": { - "nodeName": "抄送人", - "type": 2, - "ccSelfSelectFlag": 1, - "childNode": null, - "nodeUserList": [], - "error": false - }, - "conditionNodes": [{ //条件节点 - "nodeName": "条件1", - "type": 3, - "priorityLevel": 1, - "settype": 1, - "selectMode": 0, - "selectRange": 0, - "directorLevel": 1, - "examineMode": 1, - "noHanderAction": 2, - "examineEndDirectorLevel": 1, - "ccSelfSelectFlag": 1, - "conditionList": [{ //当前条件 - "columnId": 0, //发起人 - "type": 1, //1 发起人 2其他 - "optType": "", //["", "<", ">", "≤", "=", "≥"][optType] - "zdy1": "",//左侧自定义内容 - "zdy2": "",//右侧自定义内容 - "opt1": "",//左侧符号 < ≤ - "opt2": "",//右侧符号 < ≤ - "columnDbname": "",//条件字段名称 - "columnType": "",//条件字段类型 - "showType": "",//3多选 其他 - "showName": "",//展示名 - "fixedDownBoxValue": ""//多选数组 - }], - "nodeUserList": [{ - "targetId": 85, - "type": 1, - "name": "天旭" - }], - "childNode": { - "nodeName": "审核人", - "type": 1, - "priorityLevel": 1, - "settype": 1, - "selectMode": 0, - "selectRange": 0, - "directorLevel": 1, - "examineMode": 1, - "noHanderAction": 2, - "examineEndDirectorLevel": 1, - "ccSelfSelectFlag": 1, - "conditionList": [], - "nodeUserList": [{ - "targetId": 2515744, - "type": 1, - "name": "哈哈哈哈" - }], - "childNode": null, - "conditionNodes": [], - "error": false - }, - "conditionNodes": [], - "error": false - }, { - "nodeName": "条件2", - "type": 3, - "priorityLevel": 2, - "settype": 1, - "selectMode": 0, - "selectRange": 0, - "directorLevel": 1, - "examineMode": 1, - "noHanderAction": 2, - "examineEndDirectorLevel": 1, - "ccSelfSelectFlag": 1, - "conditionList": [], - "nodeUserList": [], - "childNode": null, - "conditionNodes": [], - "error": false - }] - }, - "nodeUserList": [] - }, - "conditionNodes": [] - } - } + "_value": { + "formId":"",//表单id + "formName":"",//表单名称 + "formDesc":"",//表单描述 + "tableId": 1,//审批id + "workFlowDef": { + "id":"",//流程定义id,更新流程定义使用(更新必传) + "directorId":"",//传入用户id,代表流程负责人 + "name": "合同审批",//审批名称 + }, + "directorMaxLevel": 4,//审批主管最大层级 + "flowPermission": [],//发起人 + "nodeConfig": { + "nodeName": "发起人",//节点名称 + "type": 0,// 0 发起人 1审批 2抄送 3条件 4路由 + "priorityLevel": "",// 条件优先级 + "settype": "",// 审批人设置 1指定成员 2主管 4发起人自选 5发起人自己 7连续多级主管 + "selectMode": "", //审批人数 1选一个人 2选多个人 + "selectRange": "", //选择范围 1.全公司 2指定成员 2指定角色 + "directorLevel": "", //审批终点 最高层主管数 + "examineMode": "", //多人审批时采用的审批方式 1依次审批 2会签 3或签 + "noHanderAction": "",//审批人为空时 1自动审批通过/不允许发起 2转交给审核管理员 + "examineEndDirectorLevel": "", //审批终点 第n层主管 + "ccSelfSelectFlag": "", //允许发起人自选抄送人 + "conditionList": [], //当审批单同时满足以下条件时进入此流程 + "nodeUserList": [], //操作人 + "childNode": { + "nodeName": "审核人", + "error": false, //当前审批是否通过校验 + "type": 1, + "settype": 2, + "selectMode": 0, + "selectRange": 0, + "directorLevel": 1, + "examineMode": 1, + "noHanderAction": 2, + "examineEndDirectorLevel": 0, + "childNode": { + "nodeName": "路由", + "type": 4, + "priorityLevel": 1, + "settype": 1, + "selectMode": 0, + "selectRange": 0, + "directorLevel": 1, + "examineMode": 1, + "noHanderAction": 2, + "examineEndDirectorLevel": 1, + "ccSelfSelectFlag": 1, + "conditionList": [], + "nodeUserList": [], + "childNode": { + "nodeName": "抄送人", + "type": 2, + "ccSelfSelectFlag": 1, + "childNode": null, + "nodeUserList": [], + "error": false + }, + "conditionNodes": [{ //条件节点 + "nodeName": "条件1", + "type": 3, + "priorityLevel": 1, + "settype": 1, + "selectMode": 0, + "selectRange": 0, + "directorLevel": 1, + "examineMode": 1, + "noHanderAction": 2, + "examineEndDirectorLevel": 1, + "ccSelfSelectFlag": 1, + "conditionList": [{ //当前条件 + "columnId": 0, //发起人 + "type": 1, //1 发起人 2其他 + "optType": "", //["", "<", ">", "≤", "=", "≥"][optType] + "zdy1": "",//左侧自定义内容 + "zdy2": "",//右侧自定义内容 + "opt1": "",//左侧符号 < ≤ + "opt2": "",//右侧符号 < ≤ + "columnDbname": "",//条件字段名称 + "columnType": "",//条件字段类型 + "showType": "",//3多选 其他 + "showName": "",//展示名 + "fixedDownBoxValue": ""//多选数组 + }], + "nodeUserList": [{ + "targetId": 85, + "type": 1, + "name": "天旭" + }], + "childNode": { + "nodeName": "审核人", + "type": 1, + "priorityLevel": 1, + "settype": 1, + "selectMode": 0, + "selectRange": 0, + "directorLevel": 1, + "examineMode": 1, + "noHanderAction": 2, + "examineEndDirectorLevel": 1, + "ccSelfSelectFlag": 1, + "conditionList": [], + "nodeUserList": [{ + "targetId": 2515744, + "type": 1, + "name": "哈哈哈哈" + }], + "childNode": null, + "conditionNodes": [], + "error": false + }, + "conditionNodes": [], + "error": false + }, { + "nodeName": "条件2", + "type": 3, + "priorityLevel": 2, + "settype": 1, + "selectMode": 0, + "selectRange": 0, + "directorLevel": 1, + "examineMode": 1, + "noHanderAction": 2, + "examineEndDirectorLevel": 1, + "ccSelfSelectFlag": 1, + "conditionList": [], + "nodeUserList": [], + "childNode": null, + "conditionNodes": [], + "error": false + }] + }, + "nodeUserList": [] + }, + "conditionNodes": [] + } + } } diff --git a/src/api/system/process.ts b/src/api/system/process.ts index 8da9b84..b768187 100644 --- a/src/api/system/process.ts +++ b/src/api/system/process.ts @@ -2,11 +2,53 @@ import request from '../index' const prefix = '/system/flow' -// 价格列表查询 +// 列表 export function getProcessList(data: object) { + console.log('offset:', data.offset) + console.log('limit', data.limit) return request({ - url: `${prefix}/listPage?offset=${data.offset}&limit=${data.limit}`, + url: `${prefix}/listPage`, method: 'post', + headers: { + offset: data.offset, + limit: data.limit, + }, data, }) } + +// 删除 +export function delProcessList(id: string) { + const param = { + deployId: id, + } + return request({ + url: `${prefix}/delete`, + method: 'post', + data: param, + }) +} +// 废止 +export function updateState(id: string, state: number) { + const param = { + deployId: id, + state, + } + return request({ + url: `${prefix}/updateState`, + method: 'post', + data: param, + }) +} + +// 加载流程定义 +export function unloadProcess(params: Object) { + const param = { + jsonObject: params, + } + return request({ + url: `${prefix}/jsonToBpmn`, + method: 'post', + data: param, + }) +} diff --git "a/public/data\345\255\227\346\256\265\346\263\250\351\207\212.js" "b/public/data\345\255\227\346\256\265\346\263\250\351\207\212.js" index c182ad6..4c9b127 100644 --- "a/public/data\345\255\227\346\256\265\346\263\250\351\207\212.js" +++ "b/public/data\345\255\227\346\256\265\346\263\250\351\207\212.js" @@ -1,137 +1,140 @@ export default { - "code": "200", - "msg": "success", - "data": { - "tableId": 1,//审批id - "workFlowDef": { - "name": "合同审批",//审批名称 - }, - "directorMaxLevel": 4,//审批主管最大层级 - "flowPermission": [],//发起人 - "nodeConfig": { - "nodeName": "发起人",//节点名称 - "type": 0,// 0 发起人 1审批 2抄送 3条件 4路由 - "priorityLevel": "",// 条件优先级 - "settype": "",// 审批人设置 1指定成员 2主管 4发起人自选 5发起人自己 7连续多级主管 - "selectMode": "", //审批人数 1选一个人 2选多个人 - "selectRange": "", //选择范围 1.全公司 2指定成员 2指定角色 - "directorLevel": "", //审批终点 最高层主管数 - "examineMode": "", //多人审批时采用的审批方式 1依次审批 2会签 - "noHanderAction": "",//审批人为空时 1自动审批通过/不允许发起 2转交给审核管理员 - "examineEndDirectorLevel": "", //审批终点 第n层主管 - "ccSelfSelectFlag": "", //允许发起人自选抄送人 - "conditionList": [], //当审批单同时满足以下条件时进入此流程 - "nodeUserList": [], //操作人 - "childNode": { - "nodeName": "审核人", - "error": false, //当前审批是否通过校验 - "type": 1, - "settype": 2, - "selectMode": 0, - "selectRange": 0, - "directorLevel": 1, - "examineMode": 1, - "noHanderAction": 2, - "examineEndDirectorLevel": 0, - "childNode": { - "nodeName": "路由", - "type": 4, - "priorityLevel": 1, - "settype": 1, - "selectMode": 0, - "selectRange": 0, - "directorLevel": 1, - "examineMode": 1, - "noHanderAction": 2, - "examineEndDirectorLevel": 1, - "ccSelfSelectFlag": 1, - "conditionList": [], - "nodeUserList": [], - "childNode": { - "nodeName": "抄送人", - "type": 2, - "ccSelfSelectFlag": 1, - "childNode": null, - "nodeUserList": [], - "error": false - }, - "conditionNodes": [{ //条件节点 - "nodeName": "条件1", - "type": 3, - "priorityLevel": 1, - "settype": 1, - "selectMode": 0, - "selectRange": 0, - "directorLevel": 1, - "examineMode": 1, - "noHanderAction": 2, - "examineEndDirectorLevel": 1, - "ccSelfSelectFlag": 1, - "conditionList": [{ //当前条件 - "columnId": 0, //发起人 - "type": 1, //1 发起人 2其他 - "optType": "", //["", "<", ">", "≤", "=", "≥"][optType] - "zdy1": "",//左侧自定义内容 - "zdy2": "",//右侧自定义内容 - "opt1": "",//左侧符号 < ≤ - "opt2": "",//右侧符号 < ≤ - "columnDbname": "",//条件字段名称 - "columnType": "",//条件字段类型 - "showType": "",//3多选 其他 - "showName": "",//展示名 - "fixedDownBoxValue": ""//多选数组 - }], - "nodeUserList": [{ - "targetId": 85, - "type": 1, - "name": "天旭" - }], - "childNode": { - "nodeName": "审核人", - "type": 1, - "priorityLevel": 1, - "settype": 1, - "selectMode": 0, - "selectRange": 0, - "directorLevel": 1, - "examineMode": 1, - "noHanderAction": 2, - "examineEndDirectorLevel": 1, - "ccSelfSelectFlag": 1, - "conditionList": [], - "nodeUserList": [{ - "targetId": 2515744, - "type": 1, - "name": "哈哈哈哈" - }], - "childNode": null, - "conditionNodes": [], - "error": false - }, - "conditionNodes": [], - "error": false - }, { - "nodeName": "条件2", - "type": 3, - "priorityLevel": 2, - "settype": 1, - "selectMode": 0, - "selectRange": 0, - "directorLevel": 1, - "examineMode": 1, - "noHanderAction": 2, - "examineEndDirectorLevel": 1, - "ccSelfSelectFlag": 1, - "conditionList": [], - "nodeUserList": [], - "childNode": null, - "conditionNodes": [], - "error": false - }] - }, - "nodeUserList": [] - }, - "conditionNodes": [] - } - } + "_value": { + "formId":"",//表单id + "formName":"",//表单名称 + "formDesc":"",//表单描述 + "tableId": 1,//审批id + "workFlowDef": { + "id":"",//流程定义id,更新流程定义使用(更新必传) + "directorId":"",//传入用户id,代表流程负责人 + "name": "合同审批",//审批名称 + }, + "directorMaxLevel": 4,//审批主管最大层级 + "flowPermission": [],//发起人 + "nodeConfig": { + "nodeName": "发起人",//节点名称 + "type": 0,// 0 发起人 1审批 2抄送 3条件 4路由 + "priorityLevel": "",// 条件优先级 + "settype": "",// 审批人设置 1指定成员 2主管 4发起人自选 5发起人自己 7连续多级主管 + "selectMode": "", //审批人数 1选一个人 2选多个人 + "selectRange": "", //选择范围 1.全公司 2指定成员 2指定角色 + "directorLevel": "", //审批终点 最高层主管数 + "examineMode": "", //多人审批时采用的审批方式 1依次审批 2会签 3或签 + "noHanderAction": "",//审批人为空时 1自动审批通过/不允许发起 2转交给审核管理员 + "examineEndDirectorLevel": "", //审批终点 第n层主管 + "ccSelfSelectFlag": "", //允许发起人自选抄送人 + "conditionList": [], //当审批单同时满足以下条件时进入此流程 + "nodeUserList": [], //操作人 + "childNode": { + "nodeName": "审核人", + "error": false, //当前审批是否通过校验 + "type": 1, + "settype": 2, + "selectMode": 0, + "selectRange": 0, + "directorLevel": 1, + "examineMode": 1, + "noHanderAction": 2, + "examineEndDirectorLevel": 0, + "childNode": { + "nodeName": "路由", + "type": 4, + "priorityLevel": 1, + "settype": 1, + "selectMode": 0, + "selectRange": 0, + "directorLevel": 1, + "examineMode": 1, + "noHanderAction": 2, + "examineEndDirectorLevel": 1, + "ccSelfSelectFlag": 1, + "conditionList": [], + "nodeUserList": [], + "childNode": { + "nodeName": "抄送人", + "type": 2, + "ccSelfSelectFlag": 1, + "childNode": null, + "nodeUserList": [], + "error": false + }, + "conditionNodes": [{ //条件节点 + "nodeName": "条件1", + "type": 3, + "priorityLevel": 1, + "settype": 1, + "selectMode": 0, + "selectRange": 0, + "directorLevel": 1, + "examineMode": 1, + "noHanderAction": 2, + "examineEndDirectorLevel": 1, + "ccSelfSelectFlag": 1, + "conditionList": [{ //当前条件 + "columnId": 0, //发起人 + "type": 1, //1 发起人 2其他 + "optType": "", //["", "<", ">", "≤", "=", "≥"][optType] + "zdy1": "",//左侧自定义内容 + "zdy2": "",//右侧自定义内容 + "opt1": "",//左侧符号 < ≤ + "opt2": "",//右侧符号 < ≤ + "columnDbname": "",//条件字段名称 + "columnType": "",//条件字段类型 + "showType": "",//3多选 其他 + "showName": "",//展示名 + "fixedDownBoxValue": ""//多选数组 + }], + "nodeUserList": [{ + "targetId": 85, + "type": 1, + "name": "天旭" + }], + "childNode": { + "nodeName": "审核人", + "type": 1, + "priorityLevel": 1, + "settype": 1, + "selectMode": 0, + "selectRange": 0, + "directorLevel": 1, + "examineMode": 1, + "noHanderAction": 2, + "examineEndDirectorLevel": 1, + "ccSelfSelectFlag": 1, + "conditionList": [], + "nodeUserList": [{ + "targetId": 2515744, + "type": 1, + "name": "哈哈哈哈" + }], + "childNode": null, + "conditionNodes": [], + "error": false + }, + "conditionNodes": [], + "error": false + }, { + "nodeName": "条件2", + "type": 3, + "priorityLevel": 2, + "settype": 1, + "selectMode": 0, + "selectRange": 0, + "directorLevel": 1, + "examineMode": 1, + "noHanderAction": 2, + "examineEndDirectorLevel": 1, + "ccSelfSelectFlag": 1, + "conditionList": [], + "nodeUserList": [], + "childNode": null, + "conditionNodes": [], + "error": false + }] + }, + "nodeUserList": [] + }, + "conditionNodes": [] + } + } } diff --git a/src/api/system/process.ts b/src/api/system/process.ts index 8da9b84..b768187 100644 --- a/src/api/system/process.ts +++ b/src/api/system/process.ts @@ -2,11 +2,53 @@ import request from '../index' const prefix = '/system/flow' -// 价格列表查询 +// 列表 export function getProcessList(data: object) { + console.log('offset:', data.offset) + console.log('limit', data.limit) return request({ - url: `${prefix}/listPage?offset=${data.offset}&limit=${data.limit}`, + url: `${prefix}/listPage`, method: 'post', + headers: { + offset: data.offset, + limit: data.limit, + }, data, }) } + +// 删除 +export function delProcessList(id: string) { + const param = { + deployId: id, + } + return request({ + url: `${prefix}/delete`, + method: 'post', + data: param, + }) +} +// 废止 +export function updateState(id: string, state: number) { + const param = { + deployId: id, + state, + } + return request({ + url: `${prefix}/updateState`, + method: 'post', + data: param, + }) +} + +// 加载流程定义 +export function unloadProcess(params: Object) { + const param = { + jsonObject: params, + } + return request({ + url: `${prefix}/jsonToBpmn`, + method: 'post', + data: param, + }) +} diff --git a/src/components/workFlow/nodeWrap.vue b/src/components/workFlow/nodeWrap.vue index 98d33e6..3e571a5 100644 --- a/src/components/workFlow/nodeWrap.vue +++ b/src/components/workFlow/nodeWrap.vue @@ -2,6 +2,7 @@ import { computed, getCurrentInstance, onMounted, ref, watch } from 'vue' import $func from '@/plugins/preload' import useWorkFlowStore from '@/store/modules/workFlow' +import useUserStore from '@/store/modules/user' const props = defineProps({ nodeConfig: { type: Object, @@ -15,6 +16,8 @@ const emits = defineEmits(['update:flowPermission', 'update:nodeConfig']) +const userStore = useUserStore() + const workFlowStore = useWorkFlowStore() const _uid = getCurrentInstance().uid @@ -26,7 +29,7 @@ const showText = computed(() => { console.log('showText') if (props.nodeConfig.type == 0) { - return '发起人' + return userStore.name // return $func.arrToStr(props.flowPermission) || '所有人' } if (props.nodeConfig.type == 1) { diff --git "a/public/data\345\255\227\346\256\265\346\263\250\351\207\212.js" "b/public/data\345\255\227\346\256\265\346\263\250\351\207\212.js" index c182ad6..4c9b127 100644 --- "a/public/data\345\255\227\346\256\265\346\263\250\351\207\212.js" +++ "b/public/data\345\255\227\346\256\265\346\263\250\351\207\212.js" @@ -1,137 +1,140 @@ export default { - "code": "200", - "msg": "success", - "data": { - "tableId": 1,//审批id - "workFlowDef": { - "name": "合同审批",//审批名称 - }, - "directorMaxLevel": 4,//审批主管最大层级 - "flowPermission": [],//发起人 - "nodeConfig": { - "nodeName": "发起人",//节点名称 - "type": 0,// 0 发起人 1审批 2抄送 3条件 4路由 - "priorityLevel": "",// 条件优先级 - "settype": "",// 审批人设置 1指定成员 2主管 4发起人自选 5发起人自己 7连续多级主管 - "selectMode": "", //审批人数 1选一个人 2选多个人 - "selectRange": "", //选择范围 1.全公司 2指定成员 2指定角色 - "directorLevel": "", //审批终点 最高层主管数 - "examineMode": "", //多人审批时采用的审批方式 1依次审批 2会签 - "noHanderAction": "",//审批人为空时 1自动审批通过/不允许发起 2转交给审核管理员 - "examineEndDirectorLevel": "", //审批终点 第n层主管 - "ccSelfSelectFlag": "", //允许发起人自选抄送人 - "conditionList": [], //当审批单同时满足以下条件时进入此流程 - "nodeUserList": [], //操作人 - "childNode": { - "nodeName": "审核人", - "error": false, //当前审批是否通过校验 - "type": 1, - "settype": 2, - "selectMode": 0, - "selectRange": 0, - "directorLevel": 1, - "examineMode": 1, - "noHanderAction": 2, - "examineEndDirectorLevel": 0, - "childNode": { - "nodeName": "路由", - "type": 4, - "priorityLevel": 1, - "settype": 1, - "selectMode": 0, - "selectRange": 0, - "directorLevel": 1, - "examineMode": 1, - "noHanderAction": 2, - "examineEndDirectorLevel": 1, - "ccSelfSelectFlag": 1, - "conditionList": [], - "nodeUserList": [], - "childNode": { - "nodeName": "抄送人", - "type": 2, - "ccSelfSelectFlag": 1, - "childNode": null, - "nodeUserList": [], - "error": false - }, - "conditionNodes": [{ //条件节点 - "nodeName": "条件1", - "type": 3, - "priorityLevel": 1, - "settype": 1, - "selectMode": 0, - "selectRange": 0, - "directorLevel": 1, - "examineMode": 1, - "noHanderAction": 2, - "examineEndDirectorLevel": 1, - "ccSelfSelectFlag": 1, - "conditionList": [{ //当前条件 - "columnId": 0, //发起人 - "type": 1, //1 发起人 2其他 - "optType": "", //["", "<", ">", "≤", "=", "≥"][optType] - "zdy1": "",//左侧自定义内容 - "zdy2": "",//右侧自定义内容 - "opt1": "",//左侧符号 < ≤ - "opt2": "",//右侧符号 < ≤ - "columnDbname": "",//条件字段名称 - "columnType": "",//条件字段类型 - "showType": "",//3多选 其他 - "showName": "",//展示名 - "fixedDownBoxValue": ""//多选数组 - }], - "nodeUserList": [{ - "targetId": 85, - "type": 1, - "name": "天旭" - }], - "childNode": { - "nodeName": "审核人", - "type": 1, - "priorityLevel": 1, - "settype": 1, - "selectMode": 0, - "selectRange": 0, - "directorLevel": 1, - "examineMode": 1, - "noHanderAction": 2, - "examineEndDirectorLevel": 1, - "ccSelfSelectFlag": 1, - "conditionList": [], - "nodeUserList": [{ - "targetId": 2515744, - "type": 1, - "name": "哈哈哈哈" - }], - "childNode": null, - "conditionNodes": [], - "error": false - }, - "conditionNodes": [], - "error": false - }, { - "nodeName": "条件2", - "type": 3, - "priorityLevel": 2, - "settype": 1, - "selectMode": 0, - "selectRange": 0, - "directorLevel": 1, - "examineMode": 1, - "noHanderAction": 2, - "examineEndDirectorLevel": 1, - "ccSelfSelectFlag": 1, - "conditionList": [], - "nodeUserList": [], - "childNode": null, - "conditionNodes": [], - "error": false - }] - }, - "nodeUserList": [] - }, - "conditionNodes": [] - } - } + "_value": { + "formId":"",//表单id + "formName":"",//表单名称 + "formDesc":"",//表单描述 + "tableId": 1,//审批id + "workFlowDef": { + "id":"",//流程定义id,更新流程定义使用(更新必传) + "directorId":"",//传入用户id,代表流程负责人 + "name": "合同审批",//审批名称 + }, + "directorMaxLevel": 4,//审批主管最大层级 + "flowPermission": [],//发起人 + "nodeConfig": { + "nodeName": "发起人",//节点名称 + "type": 0,// 0 发起人 1审批 2抄送 3条件 4路由 + "priorityLevel": "",// 条件优先级 + "settype": "",// 审批人设置 1指定成员 2主管 4发起人自选 5发起人自己 7连续多级主管 + "selectMode": "", //审批人数 1选一个人 2选多个人 + "selectRange": "", //选择范围 1.全公司 2指定成员 2指定角色 + "directorLevel": "", //审批终点 最高层主管数 + "examineMode": "", //多人审批时采用的审批方式 1依次审批 2会签 3或签 + "noHanderAction": "",//审批人为空时 1自动审批通过/不允许发起 2转交给审核管理员 + "examineEndDirectorLevel": "", //审批终点 第n层主管 + "ccSelfSelectFlag": "", //允许发起人自选抄送人 + "conditionList": [], //当审批单同时满足以下条件时进入此流程 + "nodeUserList": [], //操作人 + "childNode": { + "nodeName": "审核人", + "error": false, //当前审批是否通过校验 + "type": 1, + "settype": 2, + "selectMode": 0, + "selectRange": 0, + "directorLevel": 1, + "examineMode": 1, + "noHanderAction": 2, + "examineEndDirectorLevel": 0, + "childNode": { + "nodeName": "路由", + "type": 4, + "priorityLevel": 1, + "settype": 1, + "selectMode": 0, + "selectRange": 0, + "directorLevel": 1, + "examineMode": 1, + "noHanderAction": 2, + "examineEndDirectorLevel": 1, + "ccSelfSelectFlag": 1, + "conditionList": [], + "nodeUserList": [], + "childNode": { + "nodeName": "抄送人", + "type": 2, + "ccSelfSelectFlag": 1, + "childNode": null, + "nodeUserList": [], + "error": false + }, + "conditionNodes": [{ //条件节点 + "nodeName": "条件1", + "type": 3, + "priorityLevel": 1, + "settype": 1, + "selectMode": 0, + "selectRange": 0, + "directorLevel": 1, + "examineMode": 1, + "noHanderAction": 2, + "examineEndDirectorLevel": 1, + "ccSelfSelectFlag": 1, + "conditionList": [{ //当前条件 + "columnId": 0, //发起人 + "type": 1, //1 发起人 2其他 + "optType": "", //["", "<", ">", "≤", "=", "≥"][optType] + "zdy1": "",//左侧自定义内容 + "zdy2": "",//右侧自定义内容 + "opt1": "",//左侧符号 < ≤ + "opt2": "",//右侧符号 < ≤ + "columnDbname": "",//条件字段名称 + "columnType": "",//条件字段类型 + "showType": "",//3多选 其他 + "showName": "",//展示名 + "fixedDownBoxValue": ""//多选数组 + }], + "nodeUserList": [{ + "targetId": 85, + "type": 1, + "name": "天旭" + }], + "childNode": { + "nodeName": "审核人", + "type": 1, + "priorityLevel": 1, + "settype": 1, + "selectMode": 0, + "selectRange": 0, + "directorLevel": 1, + "examineMode": 1, + "noHanderAction": 2, + "examineEndDirectorLevel": 1, + "ccSelfSelectFlag": 1, + "conditionList": [], + "nodeUserList": [{ + "targetId": 2515744, + "type": 1, + "name": "哈哈哈哈" + }], + "childNode": null, + "conditionNodes": [], + "error": false + }, + "conditionNodes": [], + "error": false + }, { + "nodeName": "条件2", + "type": 3, + "priorityLevel": 2, + "settype": 1, + "selectMode": 0, + "selectRange": 0, + "directorLevel": 1, + "examineMode": 1, + "noHanderAction": 2, + "examineEndDirectorLevel": 1, + "ccSelfSelectFlag": 1, + "conditionList": [], + "nodeUserList": [], + "childNode": null, + "conditionNodes": [], + "error": false + }] + }, + "nodeUserList": [] + }, + "conditionNodes": [] + } + } } diff --git a/src/api/system/process.ts b/src/api/system/process.ts index 8da9b84..b768187 100644 --- a/src/api/system/process.ts +++ b/src/api/system/process.ts @@ -2,11 +2,53 @@ import request from '../index' const prefix = '/system/flow' -// 价格列表查询 +// 列表 export function getProcessList(data: object) { + console.log('offset:', data.offset) + console.log('limit', data.limit) return request({ - url: `${prefix}/listPage?offset=${data.offset}&limit=${data.limit}`, + url: `${prefix}/listPage`, method: 'post', + headers: { + offset: data.offset, + limit: data.limit, + }, data, }) } + +// 删除 +export function delProcessList(id: string) { + const param = { + deployId: id, + } + return request({ + url: `${prefix}/delete`, + method: 'post', + data: param, + }) +} +// 废止 +export function updateState(id: string, state: number) { + const param = { + deployId: id, + state, + } + return request({ + url: `${prefix}/updateState`, + method: 'post', + data: param, + }) +} + +// 加载流程定义 +export function unloadProcess(params: Object) { + const param = { + jsonObject: params, + } + return request({ + url: `${prefix}/jsonToBpmn`, + method: 'post', + data: param, + }) +} diff --git a/src/components/workFlow/nodeWrap.vue b/src/components/workFlow/nodeWrap.vue index 98d33e6..3e571a5 100644 --- a/src/components/workFlow/nodeWrap.vue +++ b/src/components/workFlow/nodeWrap.vue @@ -2,6 +2,7 @@ import { computed, getCurrentInstance, onMounted, ref, watch } from 'vue' import $func from '@/plugins/preload' import useWorkFlowStore from '@/store/modules/workFlow' +import useUserStore from '@/store/modules/user' const props = defineProps({ nodeConfig: { type: Object, @@ -15,6 +16,8 @@ const emits = defineEmits(['update:flowPermission', 'update:nodeConfig']) +const userStore = useUserStore() + const workFlowStore = useWorkFlowStore() const _uid = getCurrentInstance().uid @@ -26,7 +29,7 @@ const showText = computed(() => { console.log('showText') if (props.nodeConfig.type == 0) { - return '发起人' + return userStore.name // return $func.arrToStr(props.flowPermission) || '所有人' } if (props.nodeConfig.type == 1) { diff --git a/src/views/setting.vue b/src/views/setting.vue index 664598f..3fa6db9 100644 --- a/src/views/setting.vue +++ b/src/views/setting.vue @@ -1,6 +1,6 @@