@vtx/modals2 5.0.3 → 5.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (294) hide show
  1. package/lib/_components/index.js +4 -3
  2. package/lib/_components/vm-bar-charts/index.js +10 -6
  3. package/lib/_components/vm-calendar/style/index.less +4 -7
  4. package/lib/_components/vm-card-statistics/index.less +27 -27
  5. package/lib/_components/vm-extra-tab/style/index.less +6 -3
  6. package/lib/_components/vm-factor/index.js +10 -5
  7. package/lib/_components/vm-factor/style/index.less +5 -1
  8. package/lib/_components/vm-factor-list/index.less +11 -11
  9. package/lib/_components/vm-filter/style/index.less +2 -1
  10. package/lib/_components/vm-info-collection/index.js +2 -2
  11. package/lib/_components/vm-line-charts/index.js +1 -1
  12. package/lib/_components/vm-map/index.js +5 -5
  13. package/lib/_components/vm-pie-charts/index.js +9 -5
  14. package/lib/_components/vm-repair-maintain/RmInfoSummary.js +46 -0
  15. package/lib/_components/vm-repair-maintain/RmMonthTrend.js +44 -0
  16. package/lib/_components/vm-repair-maintain/RmRecord.js +157 -0
  17. package/lib/_components/vm-repair-maintain/RmType.js +32 -0
  18. package/lib/_components/vm-repair-maintain/api.js +92 -0
  19. package/lib/_components/vm-repair-maintain/imgs/amount.png +0 -0
  20. package/lib/_components/vm-repair-maintain/imgs/amount_light.png +0 -0
  21. package/lib/_components/vm-repair-maintain/imgs/count.png +0 -0
  22. package/lib/_components/vm-repair-maintain/imgs/count_light.png +0 -0
  23. package/lib/_components/vm-repair-maintain/index.js +56 -0
  24. package/lib/_components/vm-repair-maintain/style/index.js +1 -0
  25. package/lib/_components/vm-repair-maintain/style/index.less +25 -0
  26. package/lib/_components/vm-table/index.js +7 -4
  27. package/lib/_components/vm-table/style/index.less +3 -2
  28. package/lib/_components/vm-tag/style/index.less +10 -0
  29. package/lib/_components/vm-title/index.js +3 -2
  30. package/lib/_components/vm-video/HistoryGrid.js +52 -0
  31. package/lib/_components/vm-video/RealtimeGrid.js +8 -4
  32. package/lib/_components/vm-video/index.js +298 -112
  33. package/lib/_components/vm-video/index.less +10 -1
  34. package/lib/_components/vm-wrapper/index.js +32 -10
  35. package/lib/_components/vm-wrapper/style/index.less +28 -0
  36. package/lib/_service/index.js +5 -0
  37. package/lib/_util/index.js +0 -5
  38. package/lib/index.js +7 -2
  39. package/lib/style/index.less +2 -6
  40. package/lib/vtx-area-modal/components/BaseInfo/ListZymx.js +2 -1
  41. package/lib/vtx-base-modal/Header/index.js +3 -1
  42. package/lib/vtx-base-modal/Header/index.less +98 -98
  43. package/lib/vtx-base-modal/Tabs/index.less +31 -31
  44. package/lib/vtx-base-modal/index.js +11 -5
  45. package/lib/vtx-car-modal/api.js +4 -3
  46. package/lib/vtx-car-modal/components/Info/index.js +2 -1
  47. package/lib/vtx-car-modal/components/Info/index.less +6 -6
  48. package/lib/vtx-car-modal/content/Cc/AlarmInfo/StaticInfo.js +0 -1
  49. package/lib/vtx-car-modal/content/Cc/BaseInfo/index.js +3 -0
  50. package/lib/vtx-car-modal/content/Cc/WorkRecord/Summary.js +1 -0
  51. package/lib/vtx-car-modal/content/Common/BaseInfo/index.js +5 -1
  52. package/lib/vtx-car-modal/content/Common/OilConsumption/index.less +6 -6
  53. package/lib/vtx-car-modal/content/Common/StaticInfo/index.js +1 -0
  54. package/lib/vtx-car-modal/content/Common/WaterConsumption/index.js +1 -0
  55. package/lib/vtx-car-modal/content/Common/WaterConsumption/index.less +6 -6
  56. package/lib/vtx-car-modal/content/JXH/AlarmInfo/List.js +9 -3
  57. package/lib/vtx-car-modal/content/JXH/BaseInfo/index.js +134 -103
  58. package/lib/vtx-car-modal/content/JXH/StaticInfo/index.js +210 -161
  59. package/lib/vtx-car-modal/content/JXH/WorkRecord/index.js +39 -16
  60. package/lib/vtx-car-modal/content/Ljsy/BaseInfo/index.js +3 -0
  61. package/lib/vtx-car-modal/content/Ljsy/WorkRecord/Summary.js +1 -0
  62. package/lib/vtx-car-modal/content/Ljzy/BaseInfo/index.js +3 -0
  63. package/lib/vtx-car-modal/content/Ljzy/WorkRecord/Summary.js +1 -0
  64. package/lib/vtx-car-modal/content/Unmanned/Analysis/index.js +33 -0
  65. package/lib/vtx-car-modal/content/Unmanned/Calendar/index.js +255 -0
  66. package/lib/vtx-car-modal/content/Unmanned/Monitor/index.js +75 -0
  67. package/lib/vtx-car-modal/content/Unmanned/Monitor/index.less +22 -0
  68. package/lib/vtx-car-modal/content/Unmanned/WorkInfo/index.js +87 -0
  69. package/lib/vtx-car-modal/content/Unmanned/WorkInfo/index.less +0 -0
  70. package/lib/vtx-car-modal/content/Unmanned/index.js +10 -0
  71. package/lib/vtx-car-modal/content/index.js +2 -1
  72. package/lib/vtx-car-modal/imgs/butter.png +0 -0
  73. package/lib/vtx-car-modal/imgs/butter_dark.png +0 -0
  74. package/lib/vtx-car-modal/imgs/clock.png +0 -0
  75. package/lib/vtx-car-modal/imgs/clock_dark.png +0 -0
  76. package/lib/vtx-car-modal/imgs/clock_green.png +0 -0
  77. package/lib/vtx-car-modal/imgs/clock_green_dark.png +0 -0
  78. package/lib/vtx-car-modal/imgs/factor_bg.png +0 -0
  79. package/lib/vtx-car-modal/imgs/track.png +0 -0
  80. package/lib/vtx-car-modal/imgs/track_dark.png +0 -0
  81. package/lib/vtx-car-modal/imgs/track_green.png +0 -0
  82. package/lib/vtx-car-modal/imgs/track_green_dark.png +0 -0
  83. package/lib/vtx-car-modal/imgs/water.png +0 -0
  84. package/lib/vtx-car-modal/imgs/water_dark.png +0 -0
  85. package/lib/vtx-car-modal/index.js +24 -4
  86. package/lib/vtx-cc-cp-modal/api.js +381 -0
  87. package/lib/vtx-cc-cp-modal/components/AlarmInfo/AlarmRecord.js +120 -0
  88. package/lib/vtx-cc-cp-modal/components/AlarmInfo/AlarmTrend.js +27 -0
  89. package/lib/vtx-cc-cp-modal/components/AlarmInfo/AlarmTypeAnalysis.js +32 -0
  90. package/lib/vtx-cc-cp-modal/components/AlarmInfo/StaticInfo.js +41 -0
  91. package/lib/vtx-cc-cp-modal/components/AlarmInfo/index.js +69 -0
  92. package/lib/vtx-cc-cp-modal/components/BaseInfo/AllWork.js +103 -0
  93. package/lib/vtx-cc-cp-modal/components/BaseInfo/Info.js +75 -0
  94. package/lib/vtx-cc-cp-modal/components/BaseInfo/Rules.js +58 -0
  95. package/lib/vtx-cc-cp-modal/components/BaseInfo/SyRecord.js +142 -0
  96. package/lib/vtx-cc-cp-modal/components/BaseInfo/index.js +63 -0
  97. package/lib/vtx-cc-cp-modal/components/BaseInfo/index.less +16 -0
  98. package/lib/vtx-cc-cp-modal/components/Calendar/index.js +168 -0
  99. package/lib/vtx-cc-cp-modal/components/Calendar/index.less +93 -0
  100. package/lib/vtx-cc-cp-modal/components/ExceptionInfo/ExceptionTrend.js +27 -0
  101. package/lib/vtx-cc-cp-modal/components/ExceptionInfo/ExceptionTypeAnalysis.js +32 -0
  102. package/lib/vtx-cc-cp-modal/components/ExceptionInfo/ExeceptionRecord.js +118 -0
  103. package/lib/vtx-cc-cp-modal/components/ExceptionInfo/StaticInfo.js +41 -0
  104. package/lib/vtx-cc-cp-modal/components/ExceptionInfo/index.js +69 -0
  105. package/lib/vtx-cc-cp-modal/components/Restaurant/index.js +111 -0
  106. package/lib/vtx-cc-cp-modal/components/Restaurant/index.less +3 -0
  107. package/lib/vtx-cc-cp-modal/components/SyInfo/Ljcsl.js +46 -0
  108. package/lib/vtx-cc-cp-modal/components/SyInfo/SummaryInfo.js +81 -0
  109. package/lib/vtx-cc-cp-modal/components/SyInfo/index.js +78 -0
  110. package/lib/vtx-cc-cp-modal/components/index.js +7 -0
  111. package/lib/vtx-cc-cp-modal/imgs/rwnsjts.png +0 -0
  112. package/lib/vtx-cc-cp-modal/imgs/rwnsjts_dark.png +0 -0
  113. package/lib/vtx-cc-cp-modal/imgs/rwnsjzl.png +0 -0
  114. package/lib/vtx-cc-cp-modal/imgs/rwnsjzl_dark.png +0 -0
  115. package/lib/vtx-cc-cp-modal/imgs/rwnsscs.png +0 -0
  116. package/lib/vtx-cc-cp-modal/imgs/rwnsscs_dark.png +0 -0
  117. package/lib/vtx-cc-cp-modal/imgs/zsjts.png +0 -0
  118. package/lib/vtx-cc-cp-modal/imgs/zsjts_dark.png +0 -0
  119. package/lib/vtx-cc-cp-modal/imgs/zsjzl.png +0 -0
  120. package/lib/vtx-cc-cp-modal/imgs/zsjzl_dark.png +0 -0
  121. package/lib/vtx-cc-cp-modal/imgs/zsscs.png +0 -0
  122. package/lib/vtx-cc-cp-modal/imgs/zsscs_dark.png +0 -0
  123. package/lib/vtx-cc-cp-modal/index.js +119 -0
  124. package/lib/vtx-cc-cp-modal/style/index.js +1 -0
  125. package/lib/vtx-cc-cp-modal/style/index.less +13 -0
  126. package/lib/vtx-cc-unit-modal/api.js +361 -0
  127. package/lib/vtx-cc-unit-modal/components/BaseInfo/CollectRecord.js +69 -0
  128. package/lib/vtx-cc-unit-modal/components/BaseInfo/DetailList.js +66 -0
  129. package/lib/vtx-cc-unit-modal/components/BaseInfo/Factory.js +60 -0
  130. package/lib/vtx-cc-unit-modal/components/BaseInfo/Statistics.js +91 -0
  131. package/lib/vtx-cc-unit-modal/components/BaseInfo/index.js +118 -0
  132. package/lib/vtx-cc-unit-modal/components/BaseInfo/index.less +6 -0
  133. package/lib/vtx-cc-unit-modal/components/CarList/index.js +129 -0
  134. package/lib/vtx-cc-unit-modal/components/Collection/index.js +95 -0
  135. package/lib/vtx-cc-unit-modal/components/DetailInfo/index.js +126 -0
  136. package/lib/vtx-cc-unit-modal/components/Factory/index.js +149 -0
  137. package/lib/vtx-cc-unit-modal/components/RestaurantList/index.js +127 -0
  138. package/lib/vtx-cc-unit-modal/components/index.js +7 -0
  139. package/lib/vtx-cc-unit-modal/imgs/jccc.png +0 -0
  140. package/lib/vtx-cc-unit-modal/imgs/jccc_dark.png +0 -0
  141. package/lib/vtx-cc-unit-modal/imgs/jcl.png +0 -0
  142. package/lib/vtx-cc-unit-modal/imgs/jcl_dark.png +0 -0
  143. package/lib/vtx-cc-unit-modal/imgs/syts.png +0 -0
  144. package/lib/vtx-cc-unit-modal/imgs/syts_dark.png +0 -0
  145. package/lib/vtx-cc-unit-modal/imgs/syzl.png +0 -0
  146. package/lib/vtx-cc-unit-modal/imgs/syzl_dark.png +0 -0
  147. package/lib/vtx-cc-unit-modal/index.js +137 -0
  148. package/lib/vtx-cc-unit-modal/style/index.js +1 -0
  149. package/lib/vtx-cc-unit-modal/style/index.less +14 -0
  150. package/lib/vtx-cp-modal/api.js +3 -3
  151. package/lib/vtx-cp-modal/index.js +4 -1
  152. package/lib/vtx-default-modal/components/BaseInfo/index.js +3 -2
  153. package/lib/vtx-default-modal/index.js +10 -8
  154. package/lib/vtx-device-modal/api.js +531 -0
  155. package/lib/vtx-device-modal/components/BaseInfo/index.js +140 -0
  156. package/lib/vtx-device-modal/components/DataAnalysis/AlarmAnalysis.js +279 -0
  157. package/lib/vtx-device-modal/components/DataAnalysis/MonitorAnalysis.js +610 -0
  158. package/lib/vtx-device-modal/components/DataAnalysis/TabsList.js +23 -0
  159. package/lib/vtx-device-modal/components/DataAnalysis/index.js +24 -0
  160. package/lib/vtx-device-modal/components/DataAnalysis/index.less +66 -0
  161. package/lib/vtx-device-modal/components/index.js +3 -0
  162. package/lib/vtx-device-modal/config.js +21 -0
  163. package/lib/vtx-device-modal/imgs/current.png +0 -0
  164. package/lib/vtx-device-modal/imgs/current_dark.png +0 -0
  165. package/lib/vtx-device-modal/imgs/history.png +0 -0
  166. package/lib/vtx-device-modal/imgs/history_dark.png +0 -0
  167. package/lib/vtx-device-modal/index.js +96 -0
  168. package/lib/vtx-device-modal/style/index.js +1 -0
  169. package/lib/vtx-device-modal/style/index.less +1 -0
  170. package/lib/vtx-df-modal/index.js +11 -11
  171. package/lib/vtx-housing-estate-modal/api.js +559 -0
  172. package/lib/vtx-housing-estate-modal/components/Alarm/Distribute.js +129 -0
  173. package/lib/vtx-housing-estate-modal/components/Alarm/FSCSFB.js +67 -0
  174. package/lib/vtx-housing-estate-modal/components/Alarm/FSSD.js +65 -0
  175. package/lib/vtx-housing-estate-modal/components/Alarm/FSYZQS.js +67 -0
  176. package/lib/vtx-housing-estate-modal/components/Alarm/GDCLXL.js +109 -0
  177. package/lib/vtx-housing-estate-modal/components/Alarm/index.js +99 -0
  178. package/lib/vtx-housing-estate-modal/components/Alarm/index.less +54 -0
  179. package/lib/vtx-housing-estate-modal/components/OverView/Hot.js +179 -0
  180. package/lib/vtx-housing-estate-modal/components/OverView/Left.js +85 -0
  181. package/lib/vtx-housing-estate-modal/components/OverView/Manage.js +172 -0
  182. package/lib/vtx-housing-estate-modal/components/OverView/RightBottom.js +177 -0
  183. package/lib/vtx-housing-estate-modal/components/OverView/index.js +56 -0
  184. package/lib/vtx-housing-estate-modal/components/OverView/index.less +163 -0
  185. package/lib/vtx-housing-estate-modal/components/TFRD/index.js +133 -0
  186. package/lib/vtx-housing-estate-modal/components/TFRD/index.less +12 -0
  187. package/lib/vtx-housing-estate-modal/components/WGGS/Content.js +66 -0
  188. package/lib/vtx-housing-estate-modal/components/WGGS/index.js +68 -0
  189. package/lib/vtx-housing-estate-modal/components/WGGS/index.less +49 -0
  190. package/lib/vtx-housing-estate-modal/components/WGXW/Content.js +119 -0
  191. package/lib/vtx-housing-estate-modal/components/WGXW/index.js +121 -0
  192. package/lib/vtx-housing-estate-modal/components/WGXW/index.less +97 -0
  193. package/lib/vtx-housing-estate-modal/components/index.js +5 -0
  194. package/lib/vtx-housing-estate-modal/config.js +77 -0
  195. package/lib/vtx-housing-estate-modal/imgs/avatar.png +0 -0
  196. package/lib/vtx-housing-estate-modal/imgs/avatar_light.png +0 -0
  197. package/lib/vtx-housing-estate-modal/imgs/ddypz.png +0 -0
  198. package/lib/vtx-housing-estate-modal/imgs/ddypz_light.png +0 -0
  199. package/lib/vtx-housing-estate-modal/imgs/gzxjcx.png +0 -0
  200. package/lib/vtx-housing-estate-modal/imgs/hjglcx.png +0 -0
  201. package/lib/vtx-housing-estate-modal/imgs/hmd.png +0 -0
  202. package/lib/vtx-housing-estate-modal/imgs/hmd_light.png +0 -0
  203. package/lib/vtx-housing-estate-modal/imgs/manage_bg.png +0 -0
  204. package/lib/vtx-housing-estate-modal/imgs/manage_bg_light.png +0 -0
  205. package/lib/vtx-housing-estate-modal/imgs/rank.png +0 -0
  206. package/lib/vtx-housing-estate-modal/imgs/rank_light.png +0 -0
  207. package/lib/vtx-housing-estate-modal/imgs/tfcs.png +0 -0
  208. package/lib/vtx-housing-estate-modal/imgs/tfcs_light.png +0 -0
  209. package/lib/vtx-housing-estate-modal/imgs/tfd.png +0 -0
  210. package/lib/vtx-housing-estate-modal/imgs/tfd_light.png +0 -0
  211. package/lib/vtx-housing-estate-modal/imgs/tfhs.png +0 -0
  212. package/lib/vtx-housing-estate-modal/imgs/tfhs_light.png +0 -0
  213. package/lib/vtx-housing-estate-modal/imgs/wgmsr.png +0 -0
  214. package/lib/vtx-housing-estate-modal/imgs/wgmsr_light.png +0 -0
  215. package/lib/vtx-housing-estate-modal/imgs/yyxj.png +0 -0
  216. package/lib/vtx-housing-estate-modal/imgs/yyxj_light.png +0 -0
  217. package/lib/vtx-housing-estate-modal/index.js +108 -0
  218. package/lib/vtx-housing-estate-modal/style/index.js +4 -0
  219. package/lib/vtx-housing-estate-modal/style/index.less +1 -0
  220. package/lib/vtx-kh-modal/api2.js +178 -0
  221. package/lib/vtx-kh-modal/components/BaseInfo/index.js +197 -0
  222. package/lib/vtx-kh-modal/components/BaseInfo/index.less +101 -0
  223. package/lib/vtx-kh-modal/components/Record/index.js +204 -0
  224. package/lib/vtx-kh-modal/components/Record/index.less +7 -0
  225. package/lib/vtx-kh-modal/components/index.js +3 -0
  226. package/lib/vtx-kh-modal/imgs/count.png +0 -0
  227. package/lib/vtx-kh-modal/imgs/count_light.png +0 -0
  228. package/lib/vtx-kh-modal/imgs/question_bg.png +0 -0
  229. package/lib/vtx-kh-modal/imgs/question_bg_light.png +0 -0
  230. package/lib/vtx-kh-modal/imgs/score.png +0 -0
  231. package/lib/vtx-kh-modal/imgs/score_light.png +0 -0
  232. package/lib/vtx-kh-modal/imgs/subtract.png +0 -0
  233. package/lib/vtx-kh-modal/imgs/subtract_light.png +0 -0
  234. package/lib/vtx-kh-modal/index.js +46 -0
  235. package/lib/vtx-kh-modal/style/index.js +4 -0
  236. package/lib/vtx-kh-modal/style/index.less +1 -0
  237. package/lib/vtx-restaurant-modal/api.js +297 -0
  238. package/lib/vtx-restaurant-modal/components/Alarm/AlarmRecord.js +47 -0
  239. package/lib/vtx-restaurant-modal/components/Alarm/AlarmTrend.js +31 -0
  240. package/lib/vtx-restaurant-modal/components/Alarm/AlarmTypeAnalysis.js +36 -0
  241. package/lib/vtx-restaurant-modal/components/Alarm/StaticInfo.js +41 -0
  242. package/lib/vtx-restaurant-modal/components/Alarm/index.js +69 -0
  243. package/lib/vtx-restaurant-modal/components/Basic/CollectRule.js +64 -0
  244. package/lib/vtx-restaurant-modal/components/Basic/DetailList.js +68 -0
  245. package/lib/vtx-restaurant-modal/components/Basic/Info.js +87 -0
  246. package/lib/vtx-restaurant-modal/components/Basic/Summary.js +61 -0
  247. package/lib/vtx-restaurant-modal/components/Basic/SummaryStatistics.js +60 -0
  248. package/lib/vtx-restaurant-modal/components/Basic/index.js +74 -0
  249. package/lib/vtx-restaurant-modal/components/Basic/index.less +16 -0
  250. package/lib/vtx-restaurant-modal/components/Calendar/index.js +171 -0
  251. package/lib/vtx-restaurant-modal/components/Calendar/index.less +93 -0
  252. package/lib/vtx-restaurant-modal/components/Collection/index.js +86 -0
  253. package/lib/vtx-restaurant-modal/components/DetailInfo/index.js +111 -0
  254. package/lib/vtx-restaurant-modal/components/SignAndContract/ContactDetail.js +299 -0
  255. package/lib/vtx-restaurant-modal/components/SignAndContract/index.js +198 -0
  256. package/lib/vtx-restaurant-modal/components/index.js +7 -0
  257. package/lib/vtx-restaurant-modal/config.js +283 -0
  258. package/lib/vtx-restaurant-modal/imgs/csl.png +0 -0
  259. package/lib/vtx-restaurant-modal/imgs/csl_dark.png +0 -0
  260. package/lib/vtx-restaurant-modal/imgs/sycs.png +0 -0
  261. package/lib/vtx-restaurant-modal/imgs/sycs_dark.png +0 -0
  262. package/lib/vtx-restaurant-modal/imgs/syts.png +0 -0
  263. package/lib/vtx-restaurant-modal/imgs/syts_dark.png +0 -0
  264. package/lib/vtx-restaurant-modal/index.js +168 -0
  265. package/lib/vtx-restaurant-modal/style/index.js +1 -0
  266. package/lib/vtx-restaurant-modal/style/index.less +13 -0
  267. package/lib/vtx-road-modal/components/BaseInfo/index.less +218 -218
  268. package/lib/vtx-road-modal/components/Calendar/index.js +1 -1
  269. package/lib/vtx-road-modal/components/Statistical/index.js +1 -1
  270. package/lib/vtx-road-modal/components/Statistical/index.less +32 -32
  271. package/lib/vtx-shxq-modal/components/AlarmRecord/index.js +4 -1
  272. package/lib/vtx-shxq-modal/components/Tfd/index.js +0 -1
  273. package/lib/vtx-shxq-modal/components/ThrowCalendar/index.js +0 -1
  274. package/lib/vtx-shxq-modal/components/ThrowRecord/index.js +4 -1
  275. package/lib/vtx-staff-modal/components/BaseInfo/ListZymx.js +20 -6
  276. package/lib/vtx-staff-modal/index.js +4 -1
  277. package/lib/vtx-tfd-modal/api.js +22 -27
  278. package/lib/vtx-tfd-modal/components/BaseInfo/index.js +100 -59
  279. package/lib/vtx-tfd-modal/components/BaseInfo/index.less +5 -0
  280. package/lib/vtx-zg-modal/api.js +107 -0
  281. package/lib/vtx-zg-modal/components/BaseInfo/index.js +286 -0
  282. package/lib/vtx-zg-modal/components/BaseInfo/index.less +124 -0
  283. package/lib/vtx-zg-modal/components/index.js +1 -0
  284. package/lib/vtx-zg-modal/imgs/dot.png +0 -0
  285. package/lib/vtx-zg-modal/imgs/dot_done.png +0 -0
  286. package/lib/vtx-zg-modal/index.js +42 -0
  287. package/lib/vtx-zg-modal/style/index.js +3 -0
  288. package/lib/vtx-zg-modal/style/index.less +1 -0
  289. package/lib/vtx-zzz-modal/index.js +10 -10
  290. package/package.json +1 -1
  291. package/lib/resources/jessibuca/decoder.js +0 -3839
  292. package/lib/resources/jessibuca/decoder.wasm +0 -0
  293. package/lib/resources/jessibuca/jessibuca.js +0 -5350
  294. package/lib/vtx-car-modal/imgs/calendar/fsdf/durationqq.png +0 -0
@@ -0,0 +1,531 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
8
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
9
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
10
+ import { parseTreeData, request } from '@vtx/utils';
11
+ import { useRequest } from 'ahooks';
12
+ import dayjs from 'dayjs';
13
+ import _, { isEmpty } from 'lodash';
14
+ var sortClass = function sortClass(sortData, key) {
15
+ var groupBy = function groupBy(array, f) {
16
+ var groups = {};
17
+ array.forEach(function (o) {
18
+ var group = JSON.stringify(f(o));
19
+ groups[group] = groups[group] || [];
20
+ groups[group].push(o);
21
+ });
22
+ return Object.keys(groups).map(function (group) {
23
+ return groups[group];
24
+ });
25
+ };
26
+ var sorted = groupBy(sortData, function (item) {
27
+ return item[key]; // 返回需要分组的对象
28
+ });
29
+ return sorted;
30
+ };
31
+
32
+ // 总览信息
33
+ var BaseService = {
34
+ useBaseInfo: function useBaseInfo(id) {
35
+ var _info$monitorItems, _info$projects;
36
+ // 基本信息
37
+ var _useRequest = useRequest(function () {
38
+ return request.get('/cloud/device/entity/getBasicInfo', {
39
+ body: {
40
+ deviceId: id,
41
+ coordinateType: 'wgs84'
42
+ }
43
+ });
44
+ }, {
45
+ refreshDeps: [id]
46
+ }),
47
+ baseInfoRes = _useRequest.data;
48
+ var info = (baseInfoRes === null || baseInfoRes === void 0 ? void 0 : baseInfoRes.data) || {};
49
+ if (info !== null && info !== void 0 && (_info$monitorItems = info.monitorItems) !== null && _info$monitorItems !== void 0 && _info$monitorItems.length) {
50
+ var _monitorItems = info.monitorItems.map(function (item) {
51
+ return item.value;
52
+ });
53
+ info.monitorItemsName = _monitorItems.join(',');
54
+ }
55
+ if (info !== null && info !== void 0 && (_info$projects = info.projects) !== null && _info$projects !== void 0 && _info$projects.length) {
56
+ var projectsNameItems = info.projects.map(function (item) {
57
+ return item.value;
58
+ });
59
+ info.projectsName = projectsNameItems.join(',');
60
+ }
61
+ var monitorItems = info.monitorItems;
62
+ var monitorItemsName = monitorItems !== null && monitorItems !== void 0 && monitorItems.length ? monitorItems.map(function (v) {
63
+ return v.value;
64
+ }).join(',') : '';
65
+ return {
66
+ info: info
67
+ };
68
+ },
69
+ useRealtimeList: function useRealtimeList(id) {
70
+ var _useRequest2 = useRequest( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
71
+ var res;
72
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
73
+ while (1) switch (_context.prev = _context.next) {
74
+ case 0:
75
+ _context.next = 2;
76
+ return request.get('/cloud/device/realtime/monitor/data/realtimeFactorValueList', {
77
+ data: {
78
+ deviceId: id
79
+ }
80
+ });
81
+ case 2:
82
+ res = _context.sent;
83
+ return _context.abrupt("return", (res === null || res === void 0 ? void 0 : res.data) || []);
84
+ case 4:
85
+ case "end":
86
+ return _context.stop();
87
+ }
88
+ }, _callee);
89
+ })), {
90
+ refreshDeps: [id],
91
+ ready: !!id
92
+ }),
93
+ _useRequest2$data = _useRequest2.data,
94
+ data = _useRequest2$data === void 0 ? [] : _useRequest2$data;
95
+ return {
96
+ data: data
97
+ };
98
+ },
99
+ useGetChartData: function useGetChartData(_ref2) {
100
+ var monitorItemIds = _ref2.monitorItemIds,
101
+ deviceId = _ref2.deviceId,
102
+ collectFrequency = _ref2.collectFrequency,
103
+ startTime = _ref2.startTime,
104
+ endTime = _ref2.endTime;
105
+ var _useRequest3 = useRequest( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
106
+ var res;
107
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
108
+ while (1) switch (_context2.prev = _context2.next) {
109
+ case 0:
110
+ if (!(isEmpty(monitorItemIds) || !startTime || !endTime || !collectFrequency)) {
111
+ _context2.next = 2;
112
+ break;
113
+ }
114
+ return _context2.abrupt("return", []);
115
+ case 2:
116
+ _context2.next = 4;
117
+ return request.get('/cloud/device/realtime/monitor/data/eCharts', {
118
+ data: {
119
+ monitorItemIds: monitorItemIds,
120
+ deviceId: deviceId,
121
+ collectFrequency: collectFrequency,
122
+ startTime: startTime,
123
+ endTime: endTime
124
+ }
125
+ });
126
+ case 4:
127
+ res = _context2.sent;
128
+ return _context2.abrupt("return", (res === null || res === void 0 ? void 0 : res.data) || []);
129
+ case 6:
130
+ case "end":
131
+ return _context2.stop();
132
+ }
133
+ }, _callee2);
134
+ })), {
135
+ refreshDeps: [JSON.stringify(monitorItemIds), collectFrequency, startTime, endTime]
136
+ }),
137
+ _useRequest3$data = _useRequest3.data,
138
+ data = _useRequest3$data === void 0 ? [] : _useRequest3$data,
139
+ loading = _useRequest3.loading;
140
+ return {
141
+ data: data,
142
+ loading: loading
143
+ };
144
+ },
145
+ useGetDeviceTree: function useGetDeviceTree(id) {
146
+ var _useRequest4 = useRequest( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
147
+ var res, treeData, _data;
148
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
149
+ while (1) switch (_context3.prev = _context3.next) {
150
+ case 0:
151
+ _context3.next = 2;
152
+ return request.get('/cloud/device/realtime/monitor/data/generateDeviceJsonTree', {
153
+ data: {
154
+ showDeviceFlag: true,
155
+ onlyDeviceFacilityFlag: true
156
+ }
157
+ });
158
+ case 2:
159
+ res = _context3.sent;
160
+ treeData = [];
161
+ if ((res === null || res === void 0 ? void 0 : res.result) === 0 && res !== null && res !== void 0 && res.data) {
162
+ _data = res.data || {};
163
+ treeData = parseTreeData(_data.children || [], {
164
+ renderNode: function renderNode(node) {
165
+ var _node$attributes;
166
+ return _objectSpread(_objectSpread({}, node), {}, {
167
+ title: node.type === 'device' ? "".concat(node !== null && node !== void 0 && (_node$attributes = node.attributes) !== null && _node$attributes !== void 0 && _node$attributes.deviceTypeName ? "".concat(node.attributes.deviceTypeName, "-") : '').concat(node.name) : node.name
168
+ });
169
+ },
170
+ filterNode: function filterNode(node) {
171
+ return node.key !== id;
172
+ },
173
+ filterEmptyNodes: function filterEmptyNodes() {
174
+ return null;
175
+ }
176
+ });
177
+ }
178
+ return _context3.abrupt("return", treeData);
179
+ case 6:
180
+ case "end":
181
+ return _context3.stop();
182
+ }
183
+ }, _callee3);
184
+ }))),
185
+ _useRequest4$data = _useRequest4.data,
186
+ data = _useRequest4$data === void 0 ? [] : _useRequest4$data;
187
+ return {
188
+ data: data
189
+ };
190
+ },
191
+ useGetMonitor: function useGetMonitor(_ref5) {
192
+ var deviceIds = _ref5.deviceIds;
193
+ var _useRequest5 = useRequest( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
194
+ var res, data;
195
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
196
+ while (1) switch (_context4.prev = _context4.next) {
197
+ case 0:
198
+ _context4.next = 2;
199
+ return request.get('/cloud/device/monitor/item/loadItemTree', {
200
+ data: {
201
+ deviceIds: deviceIds.join(',')
202
+ }
203
+ });
204
+ case 2:
205
+ res = _context4.sent;
206
+ data = (res === null || res === void 0 ? void 0 : res.data) || {};
207
+ return _context4.abrupt("return", parseTreeData(data.children || [], {
208
+ renderNode: function renderNode(node) {
209
+ var selectable = node.type === 'monitorItem';
210
+ return _objectSpread(_objectSpread({}, node), {}, {
211
+ selectable: selectable,
212
+ title: node.name
213
+ });
214
+ },
215
+ filterEmptyNodes: function filterEmptyNodes() {
216
+ return null;
217
+ }
218
+ }));
219
+ case 5:
220
+ case "end":
221
+ return _context4.stop();
222
+ }
223
+ }, _callee4);
224
+ })), {
225
+ refreshDeps: [deviceIds]
226
+ }),
227
+ _useRequest5$data = _useRequest5.data,
228
+ data = _useRequest5$data === void 0 ? [] : _useRequest5$data;
229
+ return {
230
+ data: data
231
+ };
232
+ },
233
+ useCollectList: function useCollectList(_ref7) {
234
+ var deviceIds = _ref7.deviceIds,
235
+ monitorItemIds = _ref7.monitorItemIds;
236
+ var _useRequest6 = useRequest( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
237
+ var res;
238
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
239
+ while (1) switch (_context5.prev = _context5.next) {
240
+ case 0:
241
+ if (!(isEmpty(deviceIds) || isEmpty(monitorItemIds))) {
242
+ _context5.next = 2;
243
+ break;
244
+ }
245
+ return _context5.abrupt("return", []);
246
+ case 2:
247
+ _context5.next = 4;
248
+ return request.get('/cloud/device/monitor/factor/listCollectFrequency', {
249
+ data: {
250
+ deviceIds: deviceIds,
251
+ monitorItemIds: monitorItemIds.join(',')
252
+ }
253
+ });
254
+ case 4:
255
+ res = _context5.sent;
256
+ return _context5.abrupt("return", (res === null || res === void 0 ? void 0 : res.data) || []);
257
+ case 6:
258
+ case "end":
259
+ return _context5.stop();
260
+ }
261
+ }, _callee5);
262
+ })), {
263
+ refreshDeps: [deviceIds, monitorItemIds],
264
+ ready: !isEmpty(deviceIds) && !isEmpty(monitorItemIds)
265
+ }),
266
+ _useRequest6$data = _useRequest6.data,
267
+ data = _useRequest6$data === void 0 ? [] : _useRequest6$data;
268
+ return {
269
+ data: data
270
+ };
271
+ },
272
+ useGetAnalysis: function useGetAnalysis(_ref9) {
273
+ var timeType = _ref9.timeType,
274
+ danTimeEndTime = _ref9.danTimeEndTime,
275
+ duoTimeType = _ref9.duoTimeType,
276
+ duoTimeList = _ref9.duoTimeList,
277
+ danTimeType = _ref9.danTimeType,
278
+ danTimeStartTime = _ref9.danTimeStartTime,
279
+ month = _ref9.month,
280
+ year = _ref9.year,
281
+ monitorItemIds = _ref9.monitorItemIds,
282
+ deviceIds = _ref9.deviceIds,
283
+ collectFrequency = _ref9.collectFrequency;
284
+ var _useRequest7 = useRequest( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
285
+ var chartDataList, format, startTime, endTime, res, dataList, newDataList;
286
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
287
+ while (1) switch (_context6.prev = _context6.next) {
288
+ case 0:
289
+ if (!(isEmpty(monitorItemIds) || isEmpty(deviceIds) || !collectFrequency)) {
290
+ _context6.next = 2;
291
+ break;
292
+ }
293
+ return _context6.abrupt("return", []);
294
+ case 2:
295
+ format = 'YYYY-MM-DD HH:mm:ss';
296
+ if (!(timeType === 'danTime')) {
297
+ _context6.next = 37;
298
+ break;
299
+ }
300
+ //单时段
301
+ startTime = '', endTime = '';
302
+ _context6.t0 = danTimeType;
303
+ _context6.next = _context6.t0 === '1h' ? 8 : _context6.t0 === '24h' ? 11 : _context6.t0 === '3days' ? 14 : _context6.t0 === '7days' ? 17 : _context6.t0 === 'self' ? 20 : _context6.t0 === 'month' ? 23 : _context6.t0 === 'year' ? 26 : 29;
304
+ break;
305
+ case 8:
306
+ startTime = dayjs().subtract(1, 'hours').format(format);
307
+ endTime = dayjs().format(format);
308
+ return _context6.abrupt("break", 31);
309
+ case 11:
310
+ startTime = dayjs().subtract(24, 'hours').format(format);
311
+ endTime = dayjs().format(format);
312
+ return _context6.abrupt("break", 31);
313
+ case 14:
314
+ startTime = dayjs().subtract(3, 'days').format(format);
315
+ endTime = dayjs().format(format);
316
+ return _context6.abrupt("break", 31);
317
+ case 17:
318
+ startTime = dayjs().subtract(7, 'days').format(format);
319
+ endTime = dayjs().format(format);
320
+ return _context6.abrupt("break", 31);
321
+ case 20:
322
+ startTime = dayjs(danTimeStartTime).startOf('day').format(format);
323
+ endTime = dayjs(danTimeEndTime).endOf('day').format(format);
324
+ return _context6.abrupt("break", 31);
325
+ case 23:
326
+ startTime = dayjs(month).startOf('month').startOf('day').format(format);
327
+ endTime = dayjs(month).endOf('month').endOf('day').format(format);
328
+ return _context6.abrupt("break", 31);
329
+ case 26:
330
+ startTime = dayjs(year).startOf('year').startOf('day').format(format);
331
+ endTime = dayjs(year).endOf('year').endOf('day').format(format);
332
+ return _context6.abrupt("break", 31);
333
+ case 29:
334
+ startTime = dayjs().subtract(1, 'hours').startOf('day').format(format);
335
+ endTime = dayjs().endOf('day').format(format);
336
+ case 31:
337
+ _context6.next = 33;
338
+ return request.get('/cloud/device/realtime/monitor/data/eCharts', {
339
+ data: {
340
+ deviceIds: deviceIds,
341
+ monitorItemIds: (monitorItemIds || []).join(','),
342
+ startTime: startTime,
343
+ endTime: endTime,
344
+ collectFrequency: collectFrequency
345
+ }
346
+ });
347
+ case 33:
348
+ res = _context6.sent;
349
+ if ((res === null || res === void 0 ? void 0 : res.result) === 0) {
350
+ dataList = (res === null || res === void 0 ? void 0 : res.data) || [];
351
+ chartDataList = dataList.map(function (item) {
352
+ var values = item.values;
353
+ var xData = [],
354
+ yData = [],
355
+ markLine = [],
356
+ dataList = [];
357
+ var type = (item === null || item === void 0 ? void 0 : item.monitorItemDefaultChartType) || 'line';
358
+ if (values.length) {
359
+ values.forEach(function (one) {
360
+ xData.push(one.x);
361
+ yData.push(one.y);
362
+ dataList.push({
363
+ date: one.x,
364
+ value: type === 'stack' ? one.yformat || one.y : Number(one.y) ? Number(one.y) : one.y,
365
+ originValue: one.y
366
+ });
367
+ if (!markLine.map(function (m) {
368
+ return dayjs(m).format('YYYY-MM-DD');
369
+ }).includes(dayjs(one.x).format('YYYY-MM-DD'))) {
370
+ markLine.push(one.x);
371
+ }
372
+ });
373
+ }
374
+ item.name = "".concat(item.typeChs ? "".concat(item.typeChs, "-") : '').concat(item.monitorItemName);
375
+ item.dataList = dataList;
376
+ item.markLine = markLine;
377
+ item.xData = xData;
378
+ item.yData = yData;
379
+ item.showMode = type;
380
+ var yDataList = yData.map(function (ele) {
381
+ return Number(ele);
382
+ });
383
+ item.maximumValue = _.max(yDataList);
384
+ item.minimumValue = _.min(yDataList);
385
+ return item;
386
+ });
387
+ }
388
+ _context6.next = 41;
389
+ break;
390
+ case 37:
391
+ newDataList = [];
392
+ _context6.next = 40;
393
+ return Promise.all(duoTimeList.map(function (item) {
394
+ return request.get('/cloud/device/realtime/monitor/data/eCharts', {
395
+ data: {
396
+ startTime: dayjs(item.time).startOf(duoTimeType).format(format),
397
+ endTime: dayjs(item.time).endOf(duoTimeType).format(format),
398
+ deviceIds: deviceIds,
399
+ monitorItemIds: monitorItemIds,
400
+ collectFrequency: collectFrequency
401
+ }
402
+ }).then(function (res) {
403
+ if ((res === null || res === void 0 ? void 0 : res.result) === 0) {
404
+ return {
405
+ time: item.time,
406
+ data: res.data || []
407
+ };
408
+ }
409
+ return [];
410
+ });
411
+ })).then(function (dataList) {
412
+ newDataList = dataList.map(function (list) {
413
+ return ((list === null || list === void 0 ? void 0 : list.data) || []).map(function (one) {
414
+ return _objectSpread(_objectSpread({}, one), {}, {
415
+ newName: "".concat(one.facilityName, "-").concat(one.name, "(").concat(list.time, ")")
416
+ });
417
+ }).map(function (item) {
418
+ var type = (item === null || item === void 0 ? void 0 : item.monitorItemDefaultChartType) || 'line';
419
+ var values = item.values;
420
+ var xData = [],
421
+ yData = [],
422
+ dataList = [];
423
+ if (values.length) {
424
+ values.forEach(function (one) {
425
+ xData.push(one.x);
426
+ yData.push(one.y);
427
+ dataList.push({
428
+ date: one.x,
429
+ value: type === 'stack' ? one.yformat || one.y : Number(one.y),
430
+ originValue: one.y
431
+ });
432
+ });
433
+ }
434
+ item.dataList = dataList;
435
+ item.showMode = type;
436
+ item.xData = xData;
437
+ item.yData = yData;
438
+ var yDataList = yData.map(function (ele) {
439
+ return Number(ele);
440
+ });
441
+ item.maximumValue = _.max(yDataList);
442
+ item.minimumValue = _.min(yDataList);
443
+ return item;
444
+ });
445
+ }).flat();
446
+ });
447
+ case 40:
448
+ chartDataList = sortClass(newDataList, 'name').map(function (item) {
449
+ return {
450
+ showMode: 'chart',
451
+ list: item
452
+ };
453
+ });
454
+ case 41:
455
+ return _context6.abrupt("return", chartDataList);
456
+ case 42:
457
+ case "end":
458
+ return _context6.stop();
459
+ }
460
+ }, _callee6);
461
+ })), {
462
+ refreshDeps: [timeType, danTimeEndTime, duoTimeType, duoTimeList, danTimeType, danTimeStartTime, month, year, monitorItemIds, deviceIds, collectFrequency]
463
+ }),
464
+ _useRequest7$data = _useRequest7.data,
465
+ data = _useRequest7$data === void 0 ? [] : _useRequest7$data,
466
+ loading = _useRequest7.loading;
467
+ return {
468
+ data: data,
469
+ loading: loading
470
+ };
471
+ },
472
+ useGetAlarmPage: function useGetAlarmPage(_ref11) {
473
+ var page = _ref11.page,
474
+ alarmStartTimeBegin = _ref11.alarmStartTimeBegin,
475
+ alarmStartTimeEnd = _ref11.alarmStartTimeEnd,
476
+ alarmStatuses = _ref11.alarmStatuses,
477
+ alarmTypes = _ref11.alarmTypes,
478
+ deviceIds = _ref11.deviceIds,
479
+ monitorItemId = _ref11.monitorItemId;
480
+ var _useRequest8 = useRequest(function () {
481
+ return request.post('/cloud/device/alarmInfo/page', {
482
+ body: JSON.stringify({
483
+ page: page,
484
+ size: 10,
485
+ alarmTypes: alarmTypes ? [alarmTypes] : [],
486
+ alarmStatuses: alarmStatuses ? [alarmStatuses] : [],
487
+ alarmStartTimeBegin: alarmStartTimeBegin,
488
+ alarmStartTimeEnd: alarmStartTimeEnd,
489
+ deviceIds: [deviceIds],
490
+ monitorItemIds: monitorItemId ? [monitorItemId] : []
491
+ })
492
+ });
493
+ }, {
494
+ refreshDeps: [alarmStatuses, alarmStartTimeBegin, alarmStartTimeEnd, deviceIds, page, monitorItemId]
495
+ }),
496
+ data = _useRequest8.data,
497
+ loading = _useRequest8.loading;
498
+ return {
499
+ alarmRecord: (data === null || data === void 0 ? void 0 : data.data) || {},
500
+ loading: loading
501
+ };
502
+ },
503
+ useGetAlarmSummary: function useGetAlarmSummary(_ref12) {
504
+ var alarmStartTimeBegin = _ref12.alarmStartTimeBegin,
505
+ alarmStartTimeEnd = _ref12.alarmStartTimeEnd,
506
+ alarmStatuses = _ref12.alarmStatuses,
507
+ alarmTypes = _ref12.alarmTypes,
508
+ deviceIds = _ref12.deviceIds;
509
+ var _useRequest9 = useRequest(function () {
510
+ return request.post('/cloud/device/alarmInfo/summary', {
511
+ body: JSON.stringify({
512
+ alarmTypes: alarmTypes ? [alarmTypes] : [],
513
+ alarmStartTimeBegin: alarmStartTimeBegin,
514
+ alarmStartTimeEnd: alarmStartTimeEnd,
515
+ deviceIds: [deviceIds],
516
+ dimension: 'monitorItemId',
517
+ showTabCodes: 'STATS'
518
+ })
519
+ });
520
+ }, {
521
+ refreshDeps: [alarmStatuses, alarmStartTimeBegin, alarmStartTimeEnd, deviceIds]
522
+ }),
523
+ data = _useRequest9.data,
524
+ loading = _useRequest9.loading;
525
+ return {
526
+ alarmSummary: (data === null || data === void 0 ? void 0 : data.data) || {},
527
+ loading: loading
528
+ };
529
+ }
530
+ };
531
+ export { BaseService };