getNode.js 581 B

1234567891011121314151617181920212223242526
  1. class FlowNode {
  2. constructor({ nodeType, nodeId, nodeName, groupId, parentGroupId, ...data }) {
  3. if (nodeType === "1") {
  4. return {
  5. id: "root",
  6. groupId: "root",
  7. type: "root",
  8. title: "所有人",
  9. content: "请选择",
  10. isRow: true,
  11. isRoot: true,
  12. data: {}
  13. };
  14. }
  15. if (nodeType === "5") {
  16. return null;
  17. }
  18. this.data = data;
  19. this.id = nodeId;
  20. this.title = nodeName;
  21. this.type = nodeType;
  22. this.groupId = groupId;
  23. this.groupPid = parentGroupId;
  24. }
  25. }
  26. export { FlowNode };