index.js 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. // 1(未送审状态-刚添加了数据)
  2. // 2(未送审状态 - 数据被退回啊)
  3. // 3(护理申请审核 - 审核) - 区民政
  4. // 4(护理指派公司 - 指派) - 区民政
  5. // 5(护理指派人员 - 指派) - 护理公司
  6. // 6(护理打卡 - 打卡) - 护理人员
  7. const STATUS_CONFIGE = [{
  8. dictCode: 119,
  9. dictLabel: "待指派人员",
  10. dictSort: 0,
  11. dictType: "care_apply_status",
  12. dictValue: "wait_assign_nurse"
  13. },
  14. {
  15. dictCode: 110,
  16. dictLabel: "待审核",
  17. dictSort: 1,
  18. dictType: "care_apply_status",
  19. dictValue: "wait_check"
  20. },
  21. {
  22. dictCode: 111,
  23. dictLabel: "已同意",
  24. dictSort: 2,
  25. dictType: "care_apply_status",
  26. dictValue: "agree"
  27. },
  28. {
  29. dictCode: 112,
  30. dictLabel: "不同意",
  31. dictSort: 3,
  32. dictType: "care_apply_status",
  33. dictValue: "disagree"
  34. },
  35. {
  36. dictCode: 113,
  37. dictLabel: "待指派公司",
  38. dictSort: 4,
  39. dictType: "care_apply_status",
  40. dictValue: "wait_assign_company"
  41. },
  42. {
  43. dictCode: 114,
  44. dictLabel: "已指派",
  45. dictSort: 5,
  46. dictType: "care_apply_status",
  47. dictValue: "assigned"
  48. },
  49. {
  50. dictCode: 121,
  51. dictLabel: "未送审",
  52. dictSort: 6,
  53. dictType: "care_apply_status",
  54. dictValue: "no_check"
  55. },
  56. {
  57. dictCode: 1,
  58. dictLabel: "男",
  59. dictSort: 1,
  60. dictType: "sys_user_sex",
  61. dictValue: "0"
  62. }, {
  63. dictCode: 2,
  64. dictLabel: "女",
  65. dictSort: 2,
  66. dictType: "sys_user_sex",
  67. dictValue: "1"
  68. }, {
  69. dictCode: 3,
  70. dictLabel: "未知",
  71. dictSort: 3,
  72. dictType: "sys_user_sex",
  73. dictValue: "2"
  74. }, {
  75. dictCode: 117,
  76. dictLabel: "未结算",
  77. dictSort: 1,
  78. dictType: "pay_status",
  79. dictValue: "dis_pay"
  80. }, {
  81. dictCode: 118,
  82. dictLabel: "已结算",
  83. dictSort: 2,
  84. dictType: "pay_status",
  85. dictValue: "is_pay"
  86. }, {
  87. dictCode: 120,
  88. dictLabel: "未开始",
  89. dictSort: 0,
  90. dictType: "deal_status",
  91. dictValue: "no_start"
  92. }, {
  93. dictCode: 115,
  94. dictLabel: "进行中",
  95. dictSort: 1,
  96. dictType: "deal_status",
  97. dictValue: "in_progress"
  98. }, {
  99. dictCode: 116,
  100. dictLabel: "已完成",
  101. dictSort: 2,
  102. dictType: "deal_status",
  103. dictValue: "complete"
  104. }
  105. ]
  106. export function getDict(query = {}) {
  107. if (typeof query !== 'object') return {};
  108. if (Object.keys(query).length === 0) return {};
  109. let distRes = {};
  110. STATUS_CONFIGE.some((dict) => {
  111. let bool = true;
  112. for (var key in query) {
  113. if (dict.hasOwnProperty(key)) {
  114. if (query[key] != dict[key]) {
  115. bool = false;
  116. }
  117. } else {
  118. bool = false;
  119. }
  120. }
  121. if (bool) {
  122. distRes = dict;
  123. return bool;
  124. }
  125. })
  126. return distRes;
  127. }