@jecloud/plugin
Version:
JECloud 插件库
1 lines • 1.04 kB
JavaScript
import{toBoolean as e}from"@jecloud/utils";var t=function(){function t(t){var i,n,s,l;this.id=null!==(i=t.nodeId)&&void 0!==i?i:t.currentNodeId,this.name=null!==(n=t.nodeName)&&void 0!==n?n:t.currentNodeName,this.target=null!==(l=null!==(s=t.target)&&void 0!==s?s:t.currentTarget)&&void 0!==l?l:t.nodeId,this.endTask=t.endTask,this.type=t.type,this.asynTree=e(t.asynTree),this.selectAll=e(t.selectAll),this.multiple=e(t.multiple),this.showSequentialConfig=e(t.showSequentialConfig),this.sequential=t.sequential,this.simpleApproval=e(t.simpleApproval),this.submitDirectly=e(t.submitDirectly),this.personnelAdjustments=e(t.personnelAdjustments),this.end="end"===this.type,this.users=[]}return t.prototype.setUsers=function(e){void 0===e&&(e=[]);var i=[];e.forEach((function(e){var n=new t(e.workflowConfig);n.children=[],e.users.forEach((function(e){var t;n.children.push({id:e.assignmentConfigType,name:e.assignmentConfigTypeName,children:null!==(t=e.user.children)&&void 0!==t?t:[]})})),i.push(n)})),this.users=i},t}();export default t;