index.js 2.6 KB

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