index.ts 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. /**
  2. * 灾害防范通用常量
  3. */
  4. // 生效状态
  5. export enum ACTIVE_STATUS {
  6. INACTIVE = 0,
  7. ACTIVE,
  8. NOT_EFFECTIVE,
  9. }
  10. export const ACTIVE_STATUS_COLOR = {
  11. [ACTIVE_STATUS.ACTIVE]: '#52c41a',
  12. [ACTIVE_STATUS.INACTIVE]: '#ff4d4f',
  13. [ACTIVE_STATUS.NOT_EFFECTIVE]: '#1890ff',
  14. };
  15. export const ACTIVE_STATUS_MAP: Record<number, string> = {
  16. [ACTIVE_STATUS.ACTIVE]: '生效',
  17. [ACTIVE_STATUS.INACTIVE]: '失效',
  18. [ACTIVE_STATUS.NOT_EFFECTIVE]: '未生效',
  19. };
  20. export const ACTIVE_STATUS_OPTIONS_DEFAULT = [
  21. {
  22. label: '生效',
  23. value: ACTIVE_STATUS.ACTIVE,
  24. },
  25. {
  26. label: '失效',
  27. value: ACTIVE_STATUS.INACTIVE,
  28. },
  29. ];
  30. export const ACTIVE_STATUS_OPTIONS_WARNING = [
  31. {
  32. label: '生效',
  33. value: ACTIVE_STATUS.ACTIVE,
  34. },
  35. {
  36. label: '未生效',
  37. value: ACTIVE_STATUS.NOT_EFFECTIVE,
  38. },
  39. ];
  40. export const ACTIVE_STATUS_OPTIONS_MANAGEMENT = [
  41. {
  42. label: '未生效',
  43. value: ACTIVE_STATUS.NOT_EFFECTIVE,
  44. },
  45. ...ACTIVE_STATUS_OPTIONS_DEFAULT,
  46. ];
  47. /**
  48. * 文件类型图标
  49. */
  50. import word from '@/assets/svg/word.svg';
  51. import excel from '@/assets/svg/excel.svg';
  52. import ppt from '@/assets/svg/ppt.svg';
  53. import pdf from '@/assets/svg/pdf.svg';
  54. export const FILE_TYPE_ICON = {
  55. word: word,
  56. excel: excel,
  57. ppt: ppt,
  58. pdf: pdf,
  59. };
  60. /**
  61. * 灾害类型
  62. */
  63. export const DISASTER_TYPE = [
  64. {
  65. label: '台风',
  66. value: '台风',
  67. },
  68. {
  69. label: '暴雨',
  70. value: '暴雨',
  71. },
  72. {
  73. label: '大风',
  74. value: '大风',
  75. },
  76. {
  77. label: '暴雪',
  78. value: '暴雪',
  79. },
  80. {
  81. label: '高温',
  82. value: '高温',
  83. },
  84. {
  85. label: '强对流',
  86. value: '强对流',
  87. },
  88. {
  89. label: '寒潮',
  90. value: '寒潮',
  91. },
  92. {
  93. label: '沙尘暴',
  94. value: '沙尘暴',
  95. },
  96. {
  97. label: '低温',
  98. value: '低温',
  99. },
  100. {
  101. label: '干旱',
  102. value: '干旱',
  103. },
  104. {
  105. label: '霜冻',
  106. value: '霜冻',
  107. },
  108. {
  109. label: '冰冻',
  110. value: '冰冻',
  111. },
  112. {
  113. label: '大雾',
  114. value: '大雾',
  115. },
  116. {
  117. label: '霾',
  118. value: '霾',
  119. },
  120. ];
  121. /**
  122. * 灾害等级
  123. */
  124. export const DISASTER_LEVEL = [
  125. {
  126. label: 'IV级/一般',
  127. value: 'IV级/一般',
  128. },
  129. {
  130. label: 'III级/较重',
  131. value: 'III级/较重',
  132. },
  133. {
  134. label: 'II级/严重',
  135. value: 'II级/严重',
  136. },
  137. {
  138. label: 'I级/特别严重',
  139. value: 'I级/特别严重',
  140. },
  141. ];