{"remainingRequest":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\eslint-loader\\index.js??ref--13-0!D:\\jenkins\\workspace\\xq-web-bpm\\src\\api\\flow.js","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\api\\flow.js","mtime":1675071990819},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\eslint-loader\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import req from \"@/request.js\";\nimport utils from \"@/hotent-ui-util.js\";\nimport { Promise } from \"q\";\nvar model = window.context.bpmModel;\nvar runtime = window.context.bpmRunTime;\nexport default {\n  getInstPage: function getInstPage(param) {\n    return new Promise(function (resolve, reject) {\n      req.post(runtime + '/runtime/instance/v1/getInstDetailList', param).then(function (response) {\n        resolve(response.data);\n      }, function (error) {\n        reject(error);\n      });\n    }); // return roleData.getRolePageJson(param);\n  },\n  forbiddenOrUnForbiddenInst: function forbiddenOrUnForbiddenInst(param) {\n    return new Promise(function (resolve, reject) {\n      var url = runtime + '/runtime/instance/v1/';\n\n      if (param.isForbidden == '1') {\n        url += 'unForbiddenInstance?instId=' + param.id;\n      } else {\n        url += 'forbiddenInstance?instId=' + param.id;\n      }\n\n      req.get(url).then(function (response) {\n        resolve(response.data);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  getDefPage: function getDefPage(param) {\n    return new Promise(function (resolve, reject) {\n      req.post(model + '/flow/def/v1/listJson', param).then(function (response) {\n        resolve(response.data);\n      }, function (error) {\n        reject(error);\n      });\n    }); // return roleData.getRolePageJson(param);\n  },\n  getDefSetting: function getDefSetting(param, cb) {\n    req.get(model + '/flow/node/v1/getDefSetting?defId=' + param.defId + \"&topDefKey=\" + param.topDefKey).then(function (response) {\n      cb(response);\n    });\n  },\n  //获取流程实例明细\n  instanceFlowImage: function instanceFlowImage(data, cb) {\n    req.get(runtime + '/runtime/instance/v1/instanceFlowImage?proInstId=' + data.instId + \"&nodeId=\" + (data.nodeId || '') + \"&type=\" + (data.type || '') + \"&defId=\" + (data.defId || '')).then(function (response) {\n      cb(response);\n    });\n  },\n  //流程图\n  getBpmImage: function getBpmImage(id, proInstId, defId, cb) {\n    req.get(runtime + '/runtime/instance/v1/getBpmImage?taskId=&proInstId=' + proInstId + '&defId=' + defId + '&bpmnInstId=' + id, \"text\").then(function (response) {\n      cb(response);\n    });\n  },\n  //获取审批意见\n  getNodeopinions: function getNodeopinions(data, cb) {\n    req.get(runtime + '/runtime/task/v1/nodeOpinion?instId=' + data.instId + \"&nodeId=\" + data.nodeIds + \"&defId=\" + data.defId).then(function (response) {\n      cb(response);\n    });\n  },\n  getDelegationList: function getDelegationList(param) {\n    return new Promise(function (resolve, reject) {\n      req.post(model + \"/flow/agent/v1/listJson?isMgr=true\", param).then(function (response) {\n        resolve(response.data);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  getDelegationById: function getDelegationById(id) {\n    return new Promise(function (resolve, reject) {\n      req.get(model + \"/flow/agent/v1/agentGet?id=\" + id).then(function (response) {\n        resolve(response.data);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  getAgentList: function getAgentList(param) {\n    return new Promise(function (resolve, reject) {\n      req.post(model + \"/bpmModel/bpmDeputy/v1/list\", param).then(function (response) {\n        resolve(response.data);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  getAgentById: function getAgentById(id) {\n    return new Promise(function (resolve, reject) {\n      req.get(model + \"/bpmModel/bpmDeputy/v1/get/\" + id).then(function (response) {\n        resolve(response.data);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  saveAgent: function saveAgent(param) {\n    return new Promise(function (resolve, reject) {\n      req.post(model + \"/bpmModel/bpmDeputy/v1/save\", param).then(function (response) {\n        resolve(response.data);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  getUserById: function getUserById(id) {\n    return new Promise(function (resolve, reject) {\n      req.get(model + \"/bpmModel/bpmDeputy/v1/getByUserId?userId=\" + id).then(function (response) {\n        resolve(response.data);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  getSecretaryList: function getSecretaryList(param) {\n    return new Promise(function (resolve, reject) {\n      req.post(runtime + \"/runtime/bpmSecretaryManage/v1/list\", param).then(function (response) {\n        resolve(response.data);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  getSecretaryById: function getSecretaryById(id) {\n    return new Promise(function (resolve, reject) {\n      req.get(runtime + \"/runtime/bpmSecretaryManage/v1/get/\" + id).then(function (response) {\n        resolve(response.data);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  saveSecretary: function saveSecretary(param) {\n    return new Promise(function (resolve, reject) {\n      req.post(runtime + \"/runtime/bpmSecretaryManage/v1/save\", param).then(function (response) {\n        resolve(response.data);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  getTransferList: function getTransferList(param) {\n    return new Promise(function (resolve, reject) {\n      req.post(runtime + \"/runtime/bpmTransRecord/v1/list\", param).then(function (response) {\n        resolve(response.data);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  getTransferById: function getTransferById(id) {\n    return new Promise(function (resolve, reject) {\n      req.get(runtime + \"/runtime/bpmTransRecord/v1/get/\" + id).then(function (response) {\n        resolve(response.data);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  getInstList: function getInstList(id, param) {\n    return new Promise(function (resolve, reject) {\n      req.post(runtime + \"/runtime/instance/v1/inst/listJson?userId=\" + id, param).then(function (response) {\n        resolve(response.data);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  turnOver: function turnOver(param) {\n    return new Promise(function (resolve, reject) {\n      req.post(runtime + \"/runtime/bpmTransRecord/v1/turnOver\", param).then(function (response) {\n        resolve(response.data);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  getMessageType: function getMessageType(cb) {\n    req.get(runtime + '/runtime/task/v1/handlerTypes').then(function (response) {\n      cb(response);\n    });\n  },\n  //获取常用语列表\n  getApprovalItemList: function getApprovalItemList(param) {\n    return new Promise(function (resolve, reject) {\n      req.post(model + \"/flow/approvalItem/v1/listJson?isPersonal=false\", param).then(function (resp) {\n        resolve(resp);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  //保存常用语\n  saveApprovalItem: function saveApprovalItem(param) {\n    return new Promise(function (resolve, reject) {\n      req.post(model + \"/flow/approvalItem/v1/save\", param).then(function (resp) {\n        resolve(resp);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  //获取消息模板列表\n  getMsgData: function getMsgData(param) {\n    return new Promise(function (resolve, reject) {\n      req.post(window.context.portal + \"/msg/MsgTemplate/v1/listJson\", param).then(function (resp) {\n        resolve(resp);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  //获取消息分类列表\n  getMsgClassificationData: function getMsgClassificationData(param) {\n    return new Promise(function (resolve, reject) {\n      req.post(window.context.portal + \"/msg/messageType/v1/query\", param).then(function (resp) {\n        resolve(resp);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  //获取消息详情\n  getMsgDetails: function getMsgDetails(id) {\n    return new Promise(function (resolve, reject) {\n      req.get(window.context.portal + \"/msg/MsgTemplate/v1/getById?id=\".concat(id)).then(function (resp) {\n        resolve(resp);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  //获取常用脚本列表\n  getScriptList: function getScriptList(param) {\n    return new Promise(function (resolve, reject) {\n      req.post(runtime + \"/runtime/script/v1/list\", param).then(function (resp) {\n        resolve(resp);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  getNodeBranches: function getNodeBranches(param, cb) {\n    req.get(model + \"/flow/node/v1/branchConditionEdit?defId=\" + param.defId + \"&nodeId=\" + param.nodeId).then(function (resp) {\n      cb(resp);\n    });\n  },\n  //保存流程其他设置\n  flowOtherSettingSave: function flowOtherSettingSave(param) {\n    return new Promise(function (resolve, reject) {\n      req.post(model + \"/flow/def/v1/saveProp\", param).then(function (resp) {\n        resolve(resp.data);\n      }, function (error) {\n        reject(error.data);\n      });\n    });\n  },\n  //获取人员脚本列表\n  getConditionScriptList: function getConditionScriptList(param) {\n    return new Promise(function (resolve, reject) {\n      req.post(runtime + \"/runtime/conditionScript/v1/list\", param).then(function (resp) {\n        resolve(resp);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  //获取脚本类\n  getConditionScriptClassName: function getConditionScriptClassName(type) {\n    return new Promise(function (resolve, reject) {\n      req.get(runtime + \"/runtime/conditionScript/v1/getImplClasses?type=\".concat(type)).then(function (resp) {\n        resolve(resp);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  //获取编辑数据\n  getConditionScriptEditData: function getConditionScriptEditData(id) {\n    return new Promise(function (resolve, reject) {\n      req.get(runtime + \"/runtime/conditionScript/v1/edit?id=\".concat(id)).then(function (resp) {\n        resolve(resp);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  //执行脚本\n  executeScript: function executeScript(param) {\n    return new Promise(function (resolve, reject) {\n      req.post(runtime + \"/runtime/script/v1/executeScript\", param).then(function (resp) {\n        resolve(resp);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  //获取脚本类存在的方法\n  getClassMethod: function getClassMethod(className, id, type) {\n    return new Promise(function (resolve, reject) {\n      req.get(runtime + \"/runtime/conditionScript/v1/getMethodsByName?className=\".concat(className, \"&id=\").concat(id, \"&type=\").concat(type)).then(function (resp) {\n        resolve(resp);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  getSignConfig: function getSignConfig(param, cb) {\n    req.get(model + \"/flow/node/v1/getSignConfig?defId=\" + param.defId + \"&nodeId=\" + param.nodeId).then(function (resp) {\n      cb(resp);\n    });\n  },\n  //获取岗位\n  getPostList: function getPostList() {\n    return new Promise(function (resolve, reject) {\n      req.post(\"\".concat(uc, \"/api/org/v1/orgPosts/getOrgPostPage\")).then(function (resp) {\n        resolve(resp);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  //获取角色\n  getRoleList: function getRoleList() {\n    return new Promise(function (resolve, reject) {\n      req.post(\"\".concat(uc, \"/api/role/v1/roles/getRolePage\")).then(function (resp) {\n        resolve(resp);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  //获取部门\n  getDepartmentList: function getDepartmentList() {\n    return new Promise(function (resolve, reject) {\n      req.post(\"\".concat(uc, \"/api/org/v1/orgs/getOrgPage\")).then(function (resp) {\n        resolve(resp);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  //获取常用语\n  getApproval: function getApproval(id) {\n    return new Promise(function (resolve, reject) {\n      req.get(model + \"/flow/approvalItem/v1/approvalItemGet?id=\".concat(id)).then(function (resp) {\n        resolve(resp);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  //获取常用脚本分类\n  getScriptType: function getScriptType() {\n    return new Promise(function (resolve, reject) {\n      req.get(runtime + \"/runtime/script/v1/getCategoryList\").then(function (resp) {\n        resolve(resp);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  formDeflist: function formDeflist(boCode, formKey, param) {\n    return new Promise(function (resolve, reject) {\n      req.post(model + \"/flow/def/v1/formDeflist?boCode=\" + boCode + \"&formKey=\" + formKey, param).then(function (resp) {\n        resolve(resp.data);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  //获取首页图表\n  getEchartData: function getEchartData(data) {\n    return new Promise(function (resolve, reject) {\n      req.get(runtime + '/runtime/report/v1/getEchartsData?reportId=' + data).then(function (resp) {\n        resolve(resp.data);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  getFlowChartList: function getFlowChartList(param) {\n    return new Promise(function (resolve, reject) {\n      req.post(runtime + \"/runtime/report/v1/listJson\", param).then(function (resp) {\n        resolve(resp.data);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  getPermissionList: function getPermissionList() {\n    return new Promise(function (resolve, reject) {\n      req.get(model + \"/flow/defAuthorize/v1/getPermissionList\").then(function (resp) {\n        resolve(resp.data);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  getReportList: function getReportList(id) {\n    return new Promise(function (resolve, reject) {\n      req.get(runtime + \"/runtime/report/v1/getList?id=\" + id).then(function (resp) {\n        resolve(resp.data);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  getEchartsData: function getEchartsData(id) {\n    return new Promise(function (resolve, reject) {\n      req.get(runtime + \"/runtime/report/v1/getEchartsData?reportId=\" + id).then(function (resp) {\n        resolve(resp.data);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  getSingleEchartsData: function getSingleEchartsData(id) {\n    return new Promise(function (resolve, reject) {\n      req.get(runtime + \"/runtime/report/v1/getSingleEchartsData?id=\" + id).then(function (resp) {\n        resolve(resp.data);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  getAct: function getAct(id) {\n    return new Promise(function (resolve, reject) {\n      req.get(runtime + \"/runtime/report/v1/getAct?id=\" + id).then(function (resp) {\n        resolve(resp.data);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  saveAct: function saveAct(param) {\n    return new Promise(function (resolve, reject) {\n      req.post(runtime + \"/runtime/report/v1/saveAct\", param).then(function (resp) {\n        resolve(resp.data);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  removeAct: function removeAct(id) {\n    return new Promise(function (resolve, reject) {\n      req.remove(runtime + \"/runtime/report/v1/removeAct?ids=\" + id).then(function (resp) {\n        resolve(resp.data);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  saveReport: function saveReport(param) {\n    return new Promise(function (resolve, reject) {\n      req.post(runtime + \"/runtime/report/v1/saveList\", param).then(function (resp) {\n        resolve(resp.data);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  publishReport: function publishReport(id) {\n    return new Promise(function (resolve, reject) {\n      req.post(runtime + \"/runtime/report/v1/publish?id=\" + id).then(function (resp) {\n        resolve(resp.data);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  getBpmdefByDefId: function getBpmdefByDefId(id, cb) {\n    req.get(\"${bpmModel}/flow/def/v1/getBpmdefByDefId?defId=\" + id).then(function (resp) {\n      cb(resp.data);\n    });\n  },\n  getBindRelation: function getBindRelation(defId) {\n    return new Promise(function (resolve, reject) {\n      req.get(model + \"/flow/def/v1/getBindRelation?defId=\".concat(defId)).then(function (resp) {\n        resolve(resp);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  getVarTree: function getVarTree(defId) {\n    return new Promise(function (resolve, reject) {\n      req.post(window.context.bpmModel + \"/flow/node/v1/varTree\", {\n        defId: defId,\n        removeSub: true\n      }).then(function (resp) {\n        resolve(resp.data);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  getWatermarkList: function getWatermarkList(param) {\n    return new Promise(function (resolve, reject) {\n      req.post(\"\".concat(req.getContext().bpmModel, \"/bpmModel/bpmWatermark/v1/listJson\"), param).then(function (resp) {\n        resolve(resp.data);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  getWatermark: function getWatermark(id) {\n    return new Promise(function (resolve, reject) {\n      req.get(\"\".concat(req.getContext().bpmModel, \"/bpmModel/bpmWatermark/v1/getJson?id=\").concat(id)).then(function (resp) {\n        resolve(resp.data);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  getWatermarkTypeList: function getWatermarkTypeList(param) {\n    return new Promise(function (resolve, reject) {\n      req.post(\"\".concat(req.getContext().bpmModel, \"/bpmModel/bpmWatermarkType/v1/listJson\"), param).then(function (resp) {\n        resolve(resp.data);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  saveWatermarkType: function saveWatermarkType(param, isAllSave) {\n    return new Promise(function (resolve, reject) {\n      req.post(\"\".concat(req.getContext().bpmModel, \"/bpmModel/bpmWatermarkType/v1/batchAdd?isAllSave=\").concat(isAllSave), param).then(function (resp) {\n        resolve(resp.data);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  isExistWatermarkType: function isExistWatermarkType(param) {\n    return new Promise(function (resolve, reject) {\n      req.post(\"\".concat(req.getContext().bpmModel, \"/bpmModel/bpmWatermarkType/v1/isExist\"), param).then(function (resp) {\n        resolve(resp.data);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  getAllScript: function getAllScript() {\n    return new Promise(function (resolve, reject) {\n      req.get(runtime + '/runtime/script/v1/getAllScript').then(function (resp) {\n        resolve(resp.data);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  copy: function copy(param) {\n    return req.post(\"\".concat(model, \"/flow/def/v1/copy\"), param);\n  },\n  getWatermarkProcessList: function getWatermarkProcessList(param) {\n    return new Promise(function (resolve, reject) {\n      req.post(\"\".concat(req.getContext().bpmModel, \"/bpmModel/bpmWatermarkProcess/v1/listJson\"), param).then(function (resp) {\n        resolve(resp.data);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  isExistWatermarkProcess: function isExistWatermarkProcess(param) {\n    return new Promise(function (resolve, reject) {\n      req.post(\"\".concat(req.getContext().bpmModel, \"/bpmModel/bpmWatermarkProcess/v1/isExist\"), param).then(function (resp) {\n        resolve(resp.data);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  },\n  saveWatermarkProcess: function saveWatermarkProcess(param, isAllSave) {\n    return new Promise(function (resolve, reject) {\n      req.post(\"\".concat(req.getContext().bpmModel, \"/bpmModel/bpmWatermarkProcess/v1/batchAdd?isAllSave=\").concat(isAllSave), param).then(function (resp) {\n        resolve(resp.data);\n      }, function (error) {\n        reject(error);\n      });\n    });\n  }\n};",null]}