95befc9aec0bb1381a503ac4debbaafef651792a.svn-base 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. package org.jeecg.common.util;
  2. /**
  3. * 系统公告自定义跳转方式
  4. */
  5. public enum SysAnnmentTypeEnum {
  6. /**
  7. * 邮件跳转组件
  8. */
  9. EMAIL("email", "component", "modules/eoa/email/modals/EoaEmailInForm"),
  10. /**
  11. * 工作流跳转链接我的办公
  12. */
  13. BPM("bpm", "url", "/bpm/task/MyTaskList");
  14. /**
  15. * 业务类型(email:邮件 bpm:流程)
  16. */
  17. private String type;
  18. /**
  19. * 打开方式 组件:component 路由:url
  20. */
  21. private String openType;
  22. /**
  23. * 组件/路由 地址
  24. */
  25. private String openPage;
  26. SysAnnmentTypeEnum(String type, String openType, String openPage) {
  27. this.type = type;
  28. this.openType = openType;
  29. this.openPage = openPage;
  30. }
  31. public String getType() {
  32. return type;
  33. }
  34. public void setType(String type) {
  35. this.type = type;
  36. }
  37. public String getOpenType() {
  38. return openType;
  39. }
  40. public void setOpenType(String openType) {
  41. this.openType = openType;
  42. }
  43. public String getOpenPage() {
  44. return openPage;
  45. }
  46. public void setOpenPage(String openPage) {
  47. this.openPage = openPage;
  48. }
  49. public static SysAnnmentTypeEnum getByType(String type) {
  50. if (oConvertUtils.isEmpty(type)) {
  51. return null;
  52. }
  53. for (SysAnnmentTypeEnum val : values()) {
  54. if (val.getType().equals(type)) {
  55. return val;
  56. }
  57. }
  58. return null;
  59. }
  60. }