@vtx/modals2 5.0.59 → 6.0.0-beta.1

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 (363) hide show
  1. package/README.md +18 -2
  2. package/lib/_components/vm-calendar/index.js +12 -7
  3. package/lib/_components/vm-calendar/style/index.js +0 -1
  4. package/lib/_components/vm-calendar/style/index.less +1 -0
  5. package/lib/_components/vm-empty/index.js +13 -11
  6. package/lib/_components/vm-factor/index.js +1 -0
  7. package/lib/_components/vm-factor/style/index.less +4 -0
  8. package/lib/_components/vm-filter/index.js +9 -12
  9. package/lib/_components/vm-info-collection/style/index.js +0 -1
  10. package/lib/_components/vm-map/index.js +18 -0
  11. package/lib/_components/vm-popover/index.js +11 -3
  12. package/lib/_components/vm-popover/index.less +4 -1
  13. package/lib/_components/vm-repair-maintain/RmInfoSummary.js +7 -6
  14. package/lib/_components/vm-repair-maintain/RmMonthTrend.js +3 -2
  15. package/lib/_components/vm-repair-maintain/RmRecord.js +9 -8
  16. package/lib/_components/vm-repair-maintain/RmType.js +5 -4
  17. package/lib/_components/vm-repair-maintain/index.js +4 -3
  18. package/lib/_components/vm-table/index.js +31 -24
  19. package/lib/_components/vm-tabs/index.js +26 -10
  20. package/lib/_components/vm-video/index.js +21 -21
  21. package/lib/_components/vm-wrapper/index.js +8 -4
  22. package/lib/_components/vm-wrapper/resource/ICON_CONFIG.js +1 -1
  23. package/lib/_util/http.js +4 -2
  24. package/lib/_util/setupDayjs.js +16 -0
  25. package/lib/hooks/useTranslation.js +217 -0
  26. package/lib/index.js +3 -0
  27. package/lib/locales/en.json +1377 -0
  28. package/lib/locales/zh-CN.json +1377 -0
  29. package/lib/style/index.less +0 -2
  30. package/lib/vtx-area-modal/api.js +5 -4
  31. package/lib/vtx-area-modal/components/BaseInfo/Lcfx.js +2 -1
  32. package/lib/vtx-area-modal/components/BaseInfo/ListZymx.js +10 -9
  33. package/lib/vtx-area-modal/components/BaseInfo/index.js +14 -13
  34. package/lib/vtx-area-modal/index.js +1 -1
  35. package/lib/vtx-base-modal/Header/index.less +1 -0
  36. package/lib/vtx-base-modal/index.js +34 -3
  37. package/lib/vtx-base-modal/style/index.less +14 -1
  38. package/lib/vtx-car-modal/components/Info/index.js +37 -7
  39. package/lib/vtx-car-modal/content/Cc/AlarmInfo/List.js +7 -6
  40. package/lib/vtx-car-modal/content/Cc/AlarmInfo/StaticInfo.js +7 -6
  41. package/lib/vtx-car-modal/content/Cc/AlarmInfo/index.js +2 -1
  42. package/lib/vtx-car-modal/content/Cc/BaseInfo/index.js +22 -21
  43. package/lib/vtx-car-modal/content/Cc/OrderInfo/Detail.js +26 -25
  44. package/lib/vtx-car-modal/content/Cc/OrderInfo/index.js +15 -14
  45. package/lib/vtx-car-modal/content/Cc/StaticInfo/index.js +22 -21
  46. package/lib/vtx-car-modal/content/Cc/WorkRecord/Detail.js +13 -12
  47. package/lib/vtx-car-modal/content/Cc/WorkRecord/Summary.js +13 -12
  48. package/lib/vtx-car-modal/content/Cc/WorkRecord/index.js +2 -1
  49. package/lib/vtx-car-modal/content/Common/AlarmInfo/List.js +16 -11
  50. package/lib/vtx-car-modal/content/Common/AlarmInfo/StaticInfo.js +7 -6
  51. package/lib/vtx-car-modal/content/Common/AlarmInfo/index.js +2 -1
  52. package/lib/vtx-car-modal/content/Common/BaseInfo/index.js +10 -7
  53. package/lib/vtx-car-modal/content/Common/DetailInfo/index.js +13 -12
  54. package/lib/vtx-car-modal/content/Common/DeviceInfo/index.js +16 -15
  55. package/lib/vtx-car-modal/content/Common/Maintenance/index.js +23 -18
  56. package/lib/vtx-car-modal/content/Common/OilConsumption/List.js +5 -4
  57. package/lib/vtx-car-modal/content/Common/OilConsumption/index.js +7 -6
  58. package/lib/vtx-car-modal/content/Common/StaticInfo/index.js +17 -15
  59. package/lib/vtx-car-modal/content/Common/WaterConsumption/index.js +10 -9
  60. package/lib/vtx-car-modal/content/JXH/AlarmInfo/List.js +8 -7
  61. package/lib/vtx-car-modal/content/JXH/AlarmInfo/StaticInfo.js +9 -8
  62. package/lib/vtx-car-modal/content/JXH/AlarmInfo/index.js +2 -1
  63. package/lib/vtx-car-modal/content/JXH/BaseInfo/index.js +11 -10
  64. package/lib/vtx-car-modal/content/JXH/Hw2AlarmInfo/List.js +8 -7
  65. package/lib/vtx-car-modal/content/JXH/Hw2AlarmInfo/StaticInfo.js +7 -6
  66. package/lib/vtx-car-modal/content/JXH/Hw2AlarmInfo/index.js +2 -1
  67. package/lib/vtx-car-modal/content/JXH/Hw2BaseInfo/index.js +13 -12
  68. package/lib/vtx-car-modal/content/JXH/Hw2StaticInfo/index.js +44 -41
  69. package/lib/vtx-car-modal/content/JXH/Hw2WorkRecord/index.js +26 -20
  70. package/lib/vtx-car-modal/content/JXH/StaticInfo/index.js +18 -17
  71. package/lib/vtx-car-modal/content/JXH/WorkRecord/index.js +23 -22
  72. package/lib/vtx-car-modal/content/Jzlj/Alarm/Bottom.js +41 -40
  73. package/lib/vtx-car-modal/content/Jzlj/Alarm/index.js +13 -12
  74. package/lib/vtx-car-modal/content/Jzlj/BaseInfo/index.js +21 -20
  75. package/lib/vtx-car-modal/content/Jzlj/Collection/Chart.js +8 -7
  76. package/lib/vtx-car-modal/content/Jzlj/Collection/index.js +26 -25
  77. package/lib/vtx-car-modal/content/Jzlj/Dispose/Pies.js +15 -9
  78. package/lib/vtx-car-modal/content/Jzlj/Dispose/index.js +20 -19
  79. package/lib/vtx-car-modal/content/Jzlj/RunCalendar/index.js +13 -12
  80. package/lib/vtx-car-modal/content/Ljsy/AlarmInfo/List.js +6 -5
  81. package/lib/vtx-car-modal/content/Ljsy/AlarmInfo/StaticInfo.js +7 -6
  82. package/lib/vtx-car-modal/content/Ljsy/AlarmInfo/index.js +2 -1
  83. package/lib/vtx-car-modal/content/Ljsy/BaseInfo/index.js +28 -27
  84. package/lib/vtx-car-modal/content/Ljsy/StaticInfo/index.js +23 -22
  85. package/lib/vtx-car-modal/content/Ljsy/WorkRecord/Detail.js +10 -9
  86. package/lib/vtx-car-modal/content/Ljsy/WorkRecord/Summary.js +13 -12
  87. package/lib/vtx-car-modal/content/Ljsy/WorkRecord/index.js +2 -1
  88. package/lib/vtx-car-modal/content/Ljzy/BaseInfo/index.js +18 -17
  89. package/lib/vtx-car-modal/content/Ljzy/StaticInfo/index.js +15 -14
  90. package/lib/vtx-car-modal/content/Ljzy/WorkRecord/Detail.js +8 -7
  91. package/lib/vtx-car-modal/content/Ljzy/WorkRecord/Summary.js +12 -11
  92. package/lib/vtx-car-modal/content/Ljzy/WorkRecord/index.js +2 -1
  93. package/lib/vtx-car-modal/content/Unmanned/Analysis/index.js +4 -3
  94. package/lib/vtx-car-modal/content/Unmanned/Calendar/index.js +18 -17
  95. package/lib/vtx-car-modal/content/Unmanned/Monitor/index.js +2 -1
  96. package/lib/vtx-car-modal/content/Unmanned/WorkInfo/index.js +8 -7
  97. package/lib/vtx-car-modal/index.js +25 -24
  98. package/lib/vtx-car-modal/style/index.js +1 -3
  99. package/lib/vtx-cc-cp-modal/components/AlarmInfo/AlarmRecord.js +28 -16
  100. package/lib/vtx-cc-cp-modal/components/AlarmInfo/AlarmTrend.js +7 -2
  101. package/lib/vtx-cc-cp-modal/components/AlarmInfo/AlarmTypeAnalysis.js +4 -3
  102. package/lib/vtx-cc-cp-modal/components/AlarmInfo/StaticInfo.js +3 -2
  103. package/lib/vtx-cc-cp-modal/components/AlarmInfo/index.js +2 -1
  104. package/lib/vtx-cc-cp-modal/components/BaseInfo/AllWork.js +29 -34
  105. package/lib/vtx-cc-cp-modal/components/BaseInfo/Info.js +25 -19
  106. package/lib/vtx-cc-cp-modal/components/BaseInfo/Rules.js +4 -3
  107. package/lib/vtx-cc-cp-modal/components/BaseInfo/SyRecord.js +21 -17
  108. package/lib/vtx-cc-cp-modal/components/BaseInfo/index.js +8 -7
  109. package/lib/vtx-cc-cp-modal/components/BaseInfo/index.less +34 -0
  110. package/lib/vtx-cc-cp-modal/components/Calendar/index.js +4 -3
  111. package/lib/vtx-cc-cp-modal/components/ExceptionInfo/ExceptionTrend.js +7 -2
  112. package/lib/vtx-cc-cp-modal/components/ExceptionInfo/ExceptionTypeAnalysis.js +4 -3
  113. package/lib/vtx-cc-cp-modal/components/ExceptionInfo/ExeceptionRecord.js +33 -35
  114. package/lib/vtx-cc-cp-modal/components/ExceptionInfo/StaticInfo.js +3 -2
  115. package/lib/vtx-cc-cp-modal/components/ExceptionInfo/index.js +2 -1
  116. package/lib/vtx-cc-cp-modal/components/Restaurant/index.js +23 -13
  117. package/lib/vtx-cc-cp-modal/components/SyInfo/Ljcsl.js +2 -1
  118. package/lib/vtx-cc-cp-modal/components/SyInfo/SummaryInfo.js +25 -17
  119. package/lib/vtx-cc-cp-modal/components/SyInfo/index.js +3 -2
  120. package/lib/vtx-cc-cp-modal/index.js +2 -1
  121. package/lib/vtx-cc-unit-modal/components/BaseInfo/CollectRecord.js +11 -7
  122. package/lib/vtx-cc-unit-modal/components/BaseInfo/DetailList.js +3 -2
  123. package/lib/vtx-cc-unit-modal/components/BaseInfo/Factory.js +13 -9
  124. package/lib/vtx-cc-unit-modal/components/BaseInfo/Statistics.js +13 -9
  125. package/lib/vtx-cc-unit-modal/components/BaseInfo/index.js +7 -6
  126. package/lib/vtx-cc-unit-modal/components/CarList/index.js +13 -9
  127. package/lib/vtx-cc-unit-modal/components/Collection/index.js +11 -7
  128. package/lib/vtx-cc-unit-modal/components/DetailInfo/index.js +14 -13
  129. package/lib/vtx-cc-unit-modal/components/Factory/index.js +13 -9
  130. package/lib/vtx-cc-unit-modal/components/RestaurantList/index.js +15 -11
  131. package/lib/vtx-cc-unit-modal/index.js +17 -10
  132. package/lib/vtx-cp-modal/api.js +6 -5
  133. package/lib/vtx-cp-modal/components/AlarmInfo/AlarmRecord.js +11 -10
  134. package/lib/vtx-cp-modal/components/AlarmInfo/MonthTrend.js +4 -3
  135. package/lib/vtx-cp-modal/components/AlarmInfo/Summary.js +6 -5
  136. package/lib/vtx-cp-modal/components/BaseInfo/CarWork.js +9 -8
  137. package/lib/vtx-cp-modal/components/BaseInfo/Rules.js +3 -2
  138. package/lib/vtx-cp-modal/components/BaseInfo/TodayWork.js +10 -9
  139. package/lib/vtx-cp-modal/components/BaseInfo/index.js +5 -4
  140. package/lib/vtx-cp-modal/components/ExeceptionInfo/AlarmRecord.js +10 -9
  141. package/lib/vtx-cp-modal/components/ExeceptionInfo/MonthTrend.js +4 -3
  142. package/lib/vtx-cp-modal/components/ExeceptionInfo/Summary.js +6 -5
  143. package/lib/vtx-cp-modal/components/SyInfo/Ljcsl.js +5 -4
  144. package/lib/vtx-cp-modal/components/SyInfo/index.js +20 -19
  145. package/lib/vtx-cp-modal/index.js +5 -4
  146. package/lib/vtx-default-modal/components/BaseInfo/index.js +2 -1
  147. package/lib/vtx-default-modal/index.js +4 -3
  148. package/lib/vtx-default-modal/style/index.js +0 -1
  149. package/lib/vtx-device-modal/components/BaseInfo/PreviewAndDownload.js +4 -3
  150. package/lib/vtx-device-modal/components/BaseInfo/index.js +13 -12
  151. package/lib/vtx-device-modal/components/DataAnalysis/AlarmAnalysis.js +15 -14
  152. package/lib/vtx-device-modal/components/DataAnalysis/MonitorAnalysis.js +21 -20
  153. package/lib/vtx-device-modal/components/DataAnalysis/index.js +15 -0
  154. package/lib/vtx-device-modal/index.js +6 -3
  155. package/lib/vtx-device-modal/style/index.less +32 -0
  156. package/lib/vtx-df-modal/components/BaseInfo/Jcqsfx.js +5 -4
  157. package/lib/vtx-df-modal/components/BaseInfo/Jczbqs.js +6 -5
  158. package/lib/vtx-df-modal/components/BaseInfo/Qyjcl.js +4 -3
  159. package/lib/vtx-df-modal/components/BaseInfo/RealtimeMonitor.js +12 -7
  160. package/lib/vtx-df-modal/components/BaseInfo/Situation.js +5 -4
  161. package/lib/vtx-df-modal/components/BaseInfo/index.js +4 -3
  162. package/lib/vtx-df-modal/components/BaseInfoZdReborn/Jcqsfx.js +6 -5
  163. package/lib/vtx-df-modal/components/BaseInfoZdReborn/Jczbqs.js +6 -5
  164. package/lib/vtx-df-modal/components/BaseInfoZdReborn/Qyjcl.js +4 -3
  165. package/lib/vtx-df-modal/components/BaseInfoZdReborn/RealtimeMonitor.js +12 -7
  166. package/lib/vtx-df-modal/components/BaseInfoZdReborn/Situation.js +5 -4
  167. package/lib/vtx-df-modal/components/BaseInfoZdReborn/index.js +4 -3
  168. package/lib/vtx-df-modal/components/Calendar/index.js +7 -6
  169. package/lib/vtx-df-modal/components/Calendar/zd-reborn.js +7 -6
  170. package/lib/vtx-df-modal/components/Metering/ChartJccc.js +10 -8
  171. package/lib/vtx-df-modal/components/Metering/ChartJcqs.js +6 -5
  172. package/lib/vtx-df-modal/components/Metering/List.js +12 -10
  173. package/lib/vtx-df-modal/components/Metering/index.js +11 -10
  174. package/lib/vtx-df-modal/components/MeteringZdReborn/ChartJccc.js +10 -8
  175. package/lib/vtx-df-modal/components/MeteringZdReborn/ChartJcqs.js +6 -6
  176. package/lib/vtx-df-modal/components/MeteringZdReborn/List.js +12 -10
  177. package/lib/vtx-df-modal/components/MeteringZdReborn/index.js +11 -10
  178. package/lib/vtx-df-modal/components/WorkCondition/Monitor.js +2 -1
  179. package/lib/vtx-df-modal/components/WorkCondition/Table.js +4 -3
  180. package/lib/vtx-df-modal/components/WorkCondition/index.js +9 -4
  181. package/lib/vtx-df-modal/index.js +4 -3
  182. package/lib/vtx-housing-estate-modal/components/Alarm/CYLJTF.js +7 -6
  183. package/lib/vtx-housing-estate-modal/components/Alarm/Distribute.js +3 -2
  184. package/lib/vtx-housing-estate-modal/components/Alarm/FLZL_TREND.js +3 -2
  185. package/lib/vtx-housing-estate-modal/components/Alarm/FSCSFB.js +3 -2
  186. package/lib/vtx-housing-estate-modal/components/Alarm/FSSD.js +5 -4
  187. package/lib/vtx-housing-estate-modal/components/Alarm/FSYZQS.js +4 -3
  188. package/lib/vtx-housing-estate-modal/components/Alarm/GDCLXL.js +8 -7
  189. package/lib/vtx-housing-estate-modal/components/Alarm/HTLJPH.js +6 -5
  190. package/lib/vtx-housing-estate-modal/components/Alarm/MYFX_FB.js +9 -8
  191. package/lib/vtx-housing-estate-modal/components/Alarm/MYFX_GD.js +4 -3
  192. package/lib/vtx-housing-estate-modal/components/Alarm/MYFX_PIE.js +5 -4
  193. package/lib/vtx-housing-estate-modal/components/Alarm/MYFX_TREND.js +3 -2
  194. package/lib/vtx-housing-estate-modal/components/Alarm/index.js +5 -4
  195. package/lib/vtx-housing-estate-modal/components/OverView/Hot.js +13 -12
  196. package/lib/vtx-housing-estate-modal/components/OverView/Left.js +7 -5
  197. package/lib/vtx-housing-estate-modal/components/OverView/Manage.js +14 -13
  198. package/lib/vtx-housing-estate-modal/components/OverView/RightBottom.js +12 -11
  199. package/lib/vtx-housing-estate-modal/components/Sbzj/index.js +20 -17
  200. package/lib/vtx-housing-estate-modal/components/TFRD/index.js +55 -52
  201. package/lib/vtx-housing-estate-modal/components/WGGS/index.js +3 -2
  202. package/lib/vtx-housing-estate-modal/components/WGXW/Content.js +2 -1
  203. package/lib/vtx-housing-estate-modal/components/WGXW/index.js +6 -5
  204. package/lib/vtx-housing-estate-modal/config.js +10 -10
  205. package/lib/vtx-housing-estate-modal/index.js +6 -5
  206. package/lib/vtx-jzlj-df-tpd-modal/components/Collection/Chart.js +15 -9
  207. package/lib/vtx-jzlj-df-tpd-modal/components/Collection/index.js +31 -25
  208. package/lib/vtx-jzlj-df-tpd-modal/components/Dispose/FlowMap.js +4 -3
  209. package/lib/vtx-jzlj-df-tpd-modal/components/Dispose/index.js +32 -24
  210. package/lib/vtx-jzlj-df-tpd-modal/components/FactorList.js +38 -0
  211. package/lib/vtx-jzlj-df-tpd-modal/components/Overview/CTL.js +4 -3
  212. package/lib/vtx-jzlj-df-tpd-modal/components/Overview/CTYL.js +16 -10
  213. package/lib/vtx-jzlj-df-tpd-modal/components/Overview/CZZ.js +16 -8
  214. package/lib/vtx-jzlj-df-tpd-modal/components/Overview/index.js +5 -4
  215. package/lib/vtx-jzlj-df-tpd-modal/index.js +8 -5
  216. package/lib/vtx-jzlj-df-tpd-modal/style/index.less +22 -0
  217. package/lib/vtx-jzlj-gcxm-modal/components/Alarm/Bottom.js +41 -40
  218. package/lib/vtx-jzlj-gcxm-modal/components/Alarm/index.js +16 -15
  219. package/lib/vtx-jzlj-gcxm-modal/components/Collection/Chart.js +10 -8
  220. package/lib/vtx-jzlj-gcxm-modal/components/Collection/index.js +26 -24
  221. package/lib/vtx-jzlj-gcxm-modal/components/Dispose/FlowMap.js +4 -3
  222. package/lib/vtx-jzlj-gcxm-modal/components/Dispose/index.js +26 -24
  223. package/lib/vtx-jzlj-gcxm-modal/components/FactorList.js +41 -0
  224. package/lib/vtx-jzlj-gcxm-modal/components/Overview/CTL.js +4 -3
  225. package/lib/vtx-jzlj-gcxm-modal/components/Overview/CTYL.js +11 -9
  226. package/lib/vtx-jzlj-gcxm-modal/components/Overview/CZZ.js +11 -9
  227. package/lib/vtx-jzlj-gcxm-modal/components/Overview/index.js +11 -9
  228. package/lib/vtx-jzlj-gcxm-modal/index.js +10 -6
  229. package/lib/vtx-jzlj-gcxm-modal/style/index.less +45 -0
  230. package/lib/vtx-jzlj-xnc-modal/components/Collection/Chart.js +11 -9
  231. package/lib/vtx-jzlj-xnc-modal/components/Collection/index.js +27 -25
  232. package/lib/vtx-jzlj-xnc-modal/components/Dispose/FlowMap.js +4 -3
  233. package/lib/vtx-jzlj-xnc-modal/components/Dispose/index.js +26 -24
  234. package/lib/vtx-jzlj-xnc-modal/components/FactorList.js +41 -0
  235. package/lib/vtx-jzlj-xnc-modal/components/Overview/CTL.js +4 -3
  236. package/lib/vtx-jzlj-xnc-modal/components/Overview/CTYL.js +12 -10
  237. package/lib/vtx-jzlj-xnc-modal/components/Overview/CZZ.js +13 -11
  238. package/lib/vtx-jzlj-xnc-modal/components/Overview/index.js +24 -13
  239. package/lib/vtx-jzlj-xnc-modal/index.js +9 -5
  240. package/lib/vtx-jzlj-xnc-modal/style/index.less +46 -0
  241. package/lib/vtx-jzlj-ysqy-modal/components/Overview/index.js +29 -12
  242. package/lib/vtx-jzlj-ysqy-modal/components/Overview/index.less +21 -0
  243. package/lib/vtx-jzlj-ysqy-modal/index.js +6 -2
  244. package/lib/vtx-kh-modal/api2.js +10 -9
  245. package/lib/vtx-kh-modal/components/BaseInfo/index.js +21 -23
  246. package/lib/vtx-kh-modal/components/Record/index.js +18 -17
  247. package/lib/vtx-kh-modal/index.js +3 -2
  248. package/lib/vtx-kh-modal/style/index.js +0 -1
  249. package/lib/vtx-qyry-modal/api.js +8 -7
  250. package/lib/vtx-qyry-modal/index.js +17 -16
  251. package/lib/vtx-restaurant-modal/components/Alarm/AlarmRecord.js +18 -9
  252. package/lib/vtx-restaurant-modal/components/Alarm/AlarmTrend.js +7 -2
  253. package/lib/vtx-restaurant-modal/components/Alarm/AlarmTypeAnalysis.js +4 -3
  254. package/lib/vtx-restaurant-modal/components/Alarm/StaticInfo.js +3 -2
  255. package/lib/vtx-restaurant-modal/components/Alarm/index.js +2 -1
  256. package/lib/vtx-restaurant-modal/components/Basic/CollectRule.js +6 -5
  257. package/lib/vtx-restaurant-modal/components/Basic/DetailList.js +11 -7
  258. package/lib/vtx-restaurant-modal/components/Basic/Info.js +4 -1
  259. package/lib/vtx-restaurant-modal/components/Basic/Summary.js +6 -5
  260. package/lib/vtx-restaurant-modal/components/Basic/SummaryStatistics.js +3 -2
  261. package/lib/vtx-restaurant-modal/components/Basic/index.js +6 -5
  262. package/lib/vtx-restaurant-modal/components/Calendar/index.js +3 -2
  263. package/lib/vtx-restaurant-modal/components/Collection/index.js +5 -4
  264. package/lib/vtx-restaurant-modal/components/SignAndContract/ContactDetail.js +24 -23
  265. package/lib/vtx-restaurant-modal/components/SignAndContract/index.js +11 -10
  266. package/lib/vtx-restaurant-modal/config.js +42 -43
  267. package/lib/vtx-restaurant-modal/index.js +16 -7
  268. package/lib/vtx-road-modal/api.js +14 -13
  269. package/lib/vtx-road-modal/components/BaseInfo/Rules.js +6 -2
  270. package/lib/vtx-road-modal/components/BaseInfo/Work.js +26 -21
  271. package/lib/vtx-road-modal/components/BaseInfo/index.js +7 -5
  272. package/lib/vtx-road-modal/components/BaseInfo/index.less +37 -0
  273. package/lib/vtx-road-modal/components/Calendar/index.js +5 -4
  274. package/lib/vtx-road-modal/components/LaneBaseInfo/Rules.js +6 -3
  275. package/lib/vtx-road-modal/components/LaneBaseInfo/Work.js +25 -20
  276. package/lib/vtx-road-modal/components/LaneBaseInfo/index.js +5 -3
  277. package/lib/vtx-road-modal/components/LaneBaseInfo/index.less +42 -0
  278. package/lib/vtx-road-modal/components/LaneCalendar/index.js +7 -6
  279. package/lib/vtx-road-modal/components/LaneStatistical/index.js +37 -24
  280. package/lib/vtx-road-modal/components/LaneStatistical/index.less +8 -0
  281. package/lib/vtx-road-modal/components/Statistical/index.js +36 -23
  282. package/lib/vtx-road-modal/components/Statistical/index.less +8 -0
  283. package/lib/vtx-road-modal/index.js +30 -21
  284. package/lib/vtx-road-modal/style/index.js +1 -3
  285. package/lib/vtx-sdyd-tfd-modal/components/Alarm/CYLJTF.js +7 -6
  286. package/lib/vtx-sdyd-tfd-modal/components/Alarm/Distribute.js +3 -2
  287. package/lib/vtx-sdyd-tfd-modal/components/Alarm/FLZL_TREND.js +3 -2
  288. package/lib/vtx-sdyd-tfd-modal/components/Alarm/FSCSFB.js +3 -2
  289. package/lib/vtx-sdyd-tfd-modal/components/Alarm/FSSD.js +5 -4
  290. package/lib/vtx-sdyd-tfd-modal/components/Alarm/FSYZQS.js +4 -3
  291. package/lib/vtx-sdyd-tfd-modal/components/Alarm/GDCLXL.js +8 -7
  292. package/lib/vtx-sdyd-tfd-modal/components/Alarm/HTLJPH.js +6 -5
  293. package/lib/vtx-sdyd-tfd-modal/components/Alarm/MYFX_FB.js +9 -8
  294. package/lib/vtx-sdyd-tfd-modal/components/Alarm/MYFX_GD.js +4 -3
  295. package/lib/vtx-sdyd-tfd-modal/components/Alarm/MYFX_PIE.js +5 -4
  296. package/lib/vtx-sdyd-tfd-modal/components/Alarm/MYFX_TREND.js +3 -2
  297. package/lib/vtx-sdyd-tfd-modal/components/Alarm/index.js +5 -4
  298. package/lib/vtx-sdyd-tfd-modal/components/OverView/Hot.js +13 -12
  299. package/lib/vtx-sdyd-tfd-modal/components/OverView/Left.js +14 -12
  300. package/lib/vtx-sdyd-tfd-modal/components/OverView/Manage.js +14 -13
  301. package/lib/vtx-sdyd-tfd-modal/components/OverView/RightBottom.js +12 -11
  302. package/lib/vtx-sdyd-tfd-modal/components/Sbzj/index.js +11 -10
  303. package/lib/vtx-sdyd-tfd-modal/components/TFRD/index.js +13 -12
  304. package/lib/vtx-sdyd-tfd-modal/components/WGGS/index.js +2 -1
  305. package/lib/vtx-sdyd-tfd-modal/components/WGXW/Content.js +2 -1
  306. package/lib/vtx-sdyd-tfd-modal/config.js +6 -6
  307. package/lib/vtx-sdyd-tfd-modal/index.js +7 -6
  308. package/lib/vtx-shxq-modal/api.js +9 -8
  309. package/lib/vtx-shxq-modal/components/AlarmRecord/List.js +8 -7
  310. package/lib/vtx-shxq-modal/components/AlarmRecord/index.js +12 -11
  311. package/lib/vtx-shxq-modal/components/BaseInfo/index.js +11 -10
  312. package/lib/vtx-shxq-modal/components/Tfd/index.js +7 -6
  313. package/lib/vtx-shxq-modal/components/ThrowCalendar/Chart.js +2 -1
  314. package/lib/vtx-shxq-modal/components/ThrowCalendar/List.js +4 -3
  315. package/lib/vtx-shxq-modal/components/ThrowCalendar/index.js +6 -5
  316. package/lib/vtx-shxq-modal/components/ThrowRecord/List.js +15 -14
  317. package/lib/vtx-shxq-modal/components/ThrowRecord/index.js +10 -9
  318. package/lib/vtx-shxq-modal/index.js +6 -5
  319. package/lib/vtx-staff-modal/api.js +8 -7
  320. package/lib/vtx-staff-modal/components/AlarmInfo/Charts.js +6 -5
  321. package/lib/vtx-staff-modal/components/AlarmInfo/List.js +8 -7
  322. package/lib/vtx-staff-modal/components/AlarmInfo/index.js +3 -2
  323. package/lib/vtx-staff-modal/components/Attendance/Exeception.js +5 -4
  324. package/lib/vtx-staff-modal/components/Attendance/Record.js +22 -20
  325. package/lib/vtx-staff-modal/components/Attendance/WorkingHours.js +8 -7
  326. package/lib/vtx-staff-modal/components/BaseInfo/ListZymx.js +13 -11
  327. package/lib/vtx-staff-modal/components/BaseInfo/WorkStatic.js +9 -8
  328. package/lib/vtx-staff-modal/components/BaseInfo/index.js +7 -6
  329. package/lib/vtx-staff-modal/components/Calendar/index.js +8 -7
  330. package/lib/vtx-staff-modal/components/Equipment/index.js +23 -22
  331. package/lib/vtx-staff-modal/index.js +6 -5
  332. package/lib/vtx-tfd-modal/api.js +7 -6
  333. package/lib/vtx-tfd-modal/components/BaseInfo/Jczbqs.js +6 -5
  334. package/lib/vtx-tfd-modal/components/BaseInfo/Qyjcl.js +4 -3
  335. package/lib/vtx-tfd-modal/components/BaseInfo/index.js +17 -17
  336. package/lib/vtx-tfd-modal/index.js +4 -4
  337. package/lib/vtx-wr-modal/components/Appraise/index.js +18 -18
  338. package/lib/vtx-wr-modal/components/Base/Jbxx.js +15 -16
  339. package/lib/vtx-wr-modal/components/Base/Ptss.js +17 -16
  340. package/lib/vtx-wr-modal/components/Base/Sjjg.js +12 -9
  341. package/lib/vtx-wr-modal/components/Base/index.js +14 -14
  342. package/lib/vtx-wr-modal/components/Build/index.js +6 -5
  343. package/lib/vtx-wr-modal/components/File/index.js +12 -15
  344. package/lib/vtx-wr-modal/components/File/index.less +8 -3
  345. package/lib/vtx-wr-modal/components/Score/index.js +20 -27
  346. package/lib/vtx-wr-modal/components/Score/index.less +49 -26
  347. package/lib/vtx-wr-modal/index.js +5 -2
  348. package/lib/vtx-wr-modal/style/index.js +0 -1
  349. package/lib/vtx-zf-modal/components/Base/index.js +37 -36
  350. package/lib/vtx-zf-modal/components/CkEditorCustom/index.js +22 -21
  351. package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/CKModal.js +9 -7
  352. package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/config.js +27 -27
  353. package/lib/vtx-zf-modal/components/File/index.js +15 -14
  354. package/lib/vtx-zf-modal/components/Process/index.js +17 -17
  355. package/lib/vtx-zf-modal/components/Record/index.js +9 -8
  356. package/lib/vtx-zf-modal/components/Right/index.js +7 -7
  357. package/lib/vtx-zf-modal/style/index.js +0 -1
  358. package/lib/vtx-zg-modal/api.js +13 -12
  359. package/lib/vtx-zg-modal/components/BaseInfo/index.js +52 -35
  360. package/lib/vtx-zg-modal/components/BaseInfo/index.less +48 -1
  361. package/lib/vtx-zg-modal/index.js +2 -1
  362. package/lib/vtx-zzz-modal/index.js +2 -1
  363. package/package.json +30 -19
@@ -20,11 +20,13 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
20
20
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
21
21
  import { DownOutlined, ExportOutlined } from '@ant-design/icons';
22
22
  import { useMemoizedFn, useSetState } from 'ahooks';
23
- import { Button, ConfigProvider, Dropdown, Menu, Table } from 'antd';
23
+ import { Button, ConfigProvider, Dropdown, Table } from 'antd';
24
24
  import zhCN from 'antd/es/locale/zh_CN';
25
+ import enUS from 'antd/es/locale/en_US';
25
26
  import { useEffect, useMemo, useRef, useState } from 'react';
26
27
  import useSettings from "../../_hooks/useSettings";
27
28
  import "./style";
29
+ import { getRuntimeLocale, translateLocaleText } from "./../../hooks/useTranslation.js";
28
30
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
29
31
  var VMTable = function VMTable(props) {
30
32
  var _props$rowKey = props.rowKey,
@@ -90,7 +92,7 @@ var VMTable = function VMTable(props) {
90
92
  setState = _useSetState2[1];
91
93
  var newColumns = useMemo(function () {
92
94
  var result = isIndex ? columns ? [{
93
- title: '序号',
95
+ title: translateLocaleText("t('common.serialNumber')"),
94
96
  render: function render(_, __, index) {
95
97
  if (pagination && typeof (pagination === null || pagination === void 0 ? void 0 : pagination.current) === 'number' && typeof (pagination === null || pagination === void 0 ? void 0 : pagination.pageSize) === 'number') {
96
98
  return ((pagination === null || pagination === void 0 ? void 0 : pagination.current) - 1) * (pagination === null || pagination === void 0 ? void 0 : pagination.pageSize) + index + 1;
@@ -134,12 +136,15 @@ var VMTable = function VMTable(props) {
134
136
  }
135
137
  }, [JSON.stringify(dataSource), JSON.stringify(currentLayer)]);
136
138
  return /*#__PURE__*/_jsx(ConfigProvider, {
137
- locale: zhCN,
139
+ locale: getRuntimeLocale() === 'zh-CN' ? zhCN : enUS,
138
140
  children: /*#__PURE__*/_jsx(Table, _objectSpread({
139
141
  className: "vm-table ".concat(isDark ? 'dark' : ''),
140
142
  ref: tableRef,
141
143
  rowKey: rowKey,
142
- scroll: scroll || {
144
+ scroll: scroll ? _objectSpread({
145
+ y: scrollY,
146
+ scrollToFirstRowOnChange: true
147
+ }, scroll) : {
143
148
  y: scrollY,
144
149
  scrollToFirstRowOnChange: true
145
150
  },
@@ -148,7 +153,7 @@ var VMTable = function VMTable(props) {
148
153
  size: 'default',
149
154
  showSizeChanger: false,
150
155
  showTotal: function showTotal(total) {
151
- return "\u5171".concat(total, "\u6761");
156
+ return "".concat(translateLocaleText("t('_components.totalPrefix')")).concat(total).concat(translateLocaleText("t('_components.totalSuffix')"));
152
157
  }
153
158
  }, pagination) : false,
154
159
  dataSource: dataSource,
@@ -183,33 +188,35 @@ export var ExportBtn = function ExportBtn(props) {
183
188
  var _onClick = props.onClick,
184
189
  items = props.items;
185
190
  var _useSettings2 = useSettings(),
186
- theme = _useSettings2.theme;
187
- var menu = /*#__PURE__*/_jsx(Menu, {
188
- onClick: function onClick(menuItem) {
189
- return _onClick && _onClick(menuItem.key);
190
- },
191
- items: items || [{
192
- label: '导出选中行',
193
- key: 'select-rows'
194
- }, {
195
- label: '导出当前页',
196
- key: 'current-page'
197
- }, {
198
- label: '导出全部',
199
- key: 'all'
200
- }]
201
- });
191
+ isDark = _useSettings2.isDark;
192
+ var menuItems = items || [{
193
+ label: translateLocaleText("t('_components.exportSelectedRows')"),
194
+ key: 'select-rows'
195
+ }, {
196
+ label: translateLocaleText("t('_components.exportCurrentPage')"),
197
+ key: 'current-page'
198
+ }, {
199
+ label: translateLocaleText("t('_components.export')"),
200
+ key: 'all'
201
+ }];
202
202
  return /*#__PURE__*/_jsx(Dropdown, {
203
- overlay: menu,
203
+ menu: {
204
+ items: menuItems,
205
+ onClick: function onClick(menuItem) {
206
+ return _onClick && _onClick(menuItem.key);
207
+ }
208
+ },
204
209
  trigger: ['click'],
205
210
  className: "vtx-export-btn ".concat(isDark ? 'dark' : ''),
206
- overlayClassName: "vtx-export-dropdown ".concat(isDark ? 'dark' : ''),
211
+ classNames: {
212
+ root: "vtx-export-dropdown ".concat(isDark ? 'dark' : '')
213
+ },
207
214
  children: /*#__PURE__*/_jsxs(Button, {
208
215
  type: "primary",
209
216
  style: {
210
217
  padding: '0 10px'
211
218
  },
212
- children: [/*#__PURE__*/_jsx(ExportOutlined, {}), "\u5BFC\u51FA", /*#__PURE__*/_jsx(DownOutlined, {})]
219
+ children: [/*#__PURE__*/_jsx(ExportOutlined, {}), translateLocaleText("t('_components.export2')"), /*#__PURE__*/_jsx(DownOutlined, {})]
213
220
  })
214
221
  });
215
222
  };
@@ -1,27 +1,43 @@
1
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
+ var _excluded = ["tab", "children"],
3
+ _excluded2 = ["children", "items"];
2
4
  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
5
  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
6
  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
7
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
8
  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); }
9
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
10
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
7
11
  import { Tabs } from 'antd';
12
+ import React from 'react';
8
13
  import useSettings from "../../_hooks/useSettings";
9
14
  import "./style";
10
15
  import { jsx as _jsx } from "react/jsx-runtime";
11
- var TabPane = Tabs.TabPane;
16
+ var childrenToItems = function childrenToItems(children) {
17
+ return React.Children.toArray(children).filter(Boolean).map(function (child) {
18
+ var _ref = child.props || {},
19
+ tab = _ref.tab,
20
+ itemChildren = _ref.children,
21
+ restProps = _objectWithoutProperties(_ref, _excluded);
22
+ return _objectSpread(_objectSpread({}, restProps), {}, {
23
+ label: tab || restProps.label,
24
+ children: itemChildren
25
+ });
26
+ });
27
+ };
12
28
  export var VmTabs = function VmTabs(props) {
13
29
  var _useSettings = useSettings(),
14
30
  isDark = _useSettings.isDark;
15
- return /*#__PURE__*/_jsx(Tabs, _objectSpread(_objectSpread({}, props), {}, {
16
- className: "vtx-tabs ".concat(isDark ? 'dark' : ''),
17
- children: props.children
31
+ var children = props.children,
32
+ items = props.items,
33
+ restProps = _objectWithoutProperties(props, _excluded2);
34
+ var tabItems = items || childrenToItems(children);
35
+ return /*#__PURE__*/_jsx(Tabs, _objectSpread(_objectSpread({}, restProps), {}, {
36
+ items: tabItems,
37
+ className: "vtx-tabs ".concat(isDark ? 'dark' : '')
18
38
  }));
19
39
  };
20
- export var VmTabsPane = function VmTabsPane(props) {
21
- return /*#__PURE__*/_jsx(TabPane, _objectSpread(_objectSpread({}, props), {}, {
22
- style: {
23
- display: 'none'
24
- }
25
- }));
40
+ export var VmTabsPane = function VmTabsPane() {
41
+ return null;
26
42
  };
27
43
  export default VmTabs;
@@ -24,6 +24,7 @@ import { VmTabs } from "../vm-tabs";
24
24
  import HistoryGrid from "./HistoryGrid";
25
25
  import "./index.less";
26
26
  import RealtimeGrid from "./RealtimeGrid";
27
+ import { translateLocaleText } from "./../../hooks/useTranslation.js";
27
28
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
28
29
  var VmVideo = function VmVideo(_ref) {
29
30
  var _ref$channels = _ref.channels,
@@ -98,8 +99,8 @@ var VmVideo = function VmVideo(_ref) {
98
99
  deviceId: ele.videoDeviceId
99
100
  });
100
101
  })).then(function (res) {
101
- setCheckedChannels(res.map(function (ele, index) {
102
- return _objectSpread(_objectSpread({}, ele.data), {}, {
102
+ setCheckedChannels(res === null || res === void 0 ? void 0 : res.map(function (ele, index) {
103
+ return _objectSpread(_objectSpread({}, ele === null || ele === void 0 ? void 0 : ele.data), {}, {
103
104
  checked: index < 4
104
105
  });
105
106
  }));
@@ -131,7 +132,7 @@ var VmVideo = function VmVideo(_ref) {
131
132
  var _data$list;
132
133
  var data = (res === null || res === void 0 ? void 0 : res.data) || {};
133
134
  if (!(data !== null && data !== void 0 && data.totalTimeUrl) && !((_data$list = data.list) !== null && _data$list !== void 0 && (_data$list = _data$list[0]) !== null && _data$list !== void 0 && _data$list.playbackUrl)) {
134
- message.info('未查询到视频!');
135
+ message.info(translateLocaleText("t('_components.searchVideo2')"));
135
136
  return;
136
137
  }
137
138
  setState({
@@ -145,7 +146,7 @@ var VmVideo = function VmVideo(_ref) {
145
146
  children: /*#__PURE__*/_jsx("div", {
146
147
  className: "vm-video-left",
147
148
  children: /*#__PURE__*/_jsxs(VmWrapper, {
148
- title: "\u67E5\u8BE2\u89C6\u9891",
149
+ title: translateLocaleText("t('_components.searchVideo')"),
149
150
  children: [tabKey === '1' && /*#__PURE__*/_jsx("div", {
150
151
  className: "vm-video-left-channels",
151
152
  children: checkedChannels === null || checkedChannels === void 0 ? void 0 : checkedChannels.map(function (ele, index) {
@@ -222,24 +223,24 @@ var VmVideo = function VmVideo(_ref) {
222
223
  },
223
224
  children: [/*#__PURE__*/_jsx(Radio, {
224
225
  value: "dayBeforeYesterday",
225
- children: "\u524D\u65E5"
226
+ children: translateLocaleText("t('_components.day')")
226
227
  }), /*#__PURE__*/_jsx(Radio, {
227
228
  value: "yesterday",
228
- children: "\u6628\u65E5"
229
+ children: translateLocaleText("t('_components.day2')")
229
230
  }), /*#__PURE__*/_jsx(Radio, {
230
231
  value: "today",
231
- children: "\u4ECA\u65E5"
232
+ children: translateLocaleText("t('_components.today')")
232
233
  }), /*#__PURE__*/_jsx(Radio, {
233
234
  value: "custom",
234
- children: "\u81EA\u5B9A\u4E49"
235
+ children: translateLocaleText("t('_components.custom')")
235
236
  })]
236
237
  })
237
238
  }), /*#__PURE__*/_jsx(Form.Item, {
238
- label: "\u5F00\u59CB\u65F6\u95F4",
239
+ label: translateLocaleText("t('common.startTime')"),
239
240
  name: "beginTime",
240
241
  rules: [{
241
242
  required: true,
242
- message: '请输入开始时间'
243
+ message: translateLocaleText("t('_components.pleaseEnterStartTime')")
243
244
  }],
244
245
  children: /*#__PURE__*/_jsx(VMDatePicker, {
245
246
  style: {
@@ -247,7 +248,6 @@ var VmVideo = function VmVideo(_ref) {
247
248
  },
248
249
  showTime: true,
249
250
  disabled: datePickerDisabled,
250
- dropdownClassName: "date-dark",
251
251
  classNames: {
252
252
  popup: {
253
253
  root: "date-dark"
@@ -255,11 +255,11 @@ var VmVideo = function VmVideo(_ref) {
255
255
  }
256
256
  })
257
257
  }), /*#__PURE__*/_jsx(Form.Item, {
258
- label: "\u7ED3\u675F\u65F6\u95F4",
258
+ label: translateLocaleText("t('common.endTime')"),
259
259
  name: "endTime",
260
260
  rules: [{
261
261
  required: true,
262
- message: '请输入结束时间'
262
+ message: translateLocaleText("t('_components.pleaseEnterEndTime')")
263
263
  }],
264
264
  children: /*#__PURE__*/_jsx(VMDatePicker, {
265
265
  style: {
@@ -269,11 +269,11 @@ var VmVideo = function VmVideo(_ref) {
269
269
  disabled: datePickerDisabled
270
270
  })
271
271
  }), /*#__PURE__*/_jsx(Form.Item, {
272
- label: "\u89C6\u9891\u901A\u9053",
272
+ label: translateLocaleText("t('_components.video')"),
273
273
  name: "channelNum",
274
274
  rules: [{
275
275
  required: true,
276
- message: '请选择视频通道'
276
+ message: translateLocaleText("t('_components.pleaseSelectVideo')")
277
277
  }],
278
278
  children: /*#__PURE__*/_jsx(VmFilter.VMSelect, {
279
279
  options: checkedChannels === null || checkedChannels === void 0 ? void 0 : checkedChannels.map(function (ele) {
@@ -297,7 +297,7 @@ var VmVideo = function VmVideo(_ref) {
297
297
  type: "primary",
298
298
  htmlType: "submit",
299
299
  className: "submit-button",
300
- children: "\u67E5\u8BE2"
300
+ children: translateLocaleText("t('_components.search')")
301
301
  })
302
302
  })]
303
303
  })
@@ -322,10 +322,10 @@ var VmVideo = function VmVideo(_ref) {
322
322
  }
323
323
  },
324
324
  items: [{
325
- label: "\u5B9E\u65F6\u89C6\u9891",
325
+ label: translateLocaleText("t('_components.hoursVideo')"),
326
326
  key: '1'
327
327
  }, {
328
- label: "\u5386\u53F2\u89C6\u9891",
328
+ label: translateLocaleText("t('_components.video2')"),
329
329
  key: '2'
330
330
  }],
331
331
  tabBarExtraContent: tabKey === '1' ? /*#__PURE__*/_jsx(VmExtraTab, {
@@ -337,19 +337,19 @@ var VmVideo = function VmVideo(_ref) {
337
337
  title: /*#__PURE__*/_jsx(Rect1Icon, {
338
338
  fill: getActiveModeFill('1')
339
339
  }),
340
- name: '1分屏',
340
+ name: translateLocaleText("t('_components.1')"),
341
341
  key: '1'
342
342
  }, {
343
343
  title: /*#__PURE__*/_jsx(Rect4Icon, {
344
344
  fill: getActiveModeFill('4')
345
345
  }),
346
- name: '4分屏',
346
+ name: translateLocaleText("t('_components.4')"),
347
347
  key: '4'
348
348
  }, {
349
349
  title: /*#__PURE__*/_jsx(Rect9Icon, {
350
350
  fill: getActiveModeFill('9')
351
351
  }),
352
- name: '9分屏',
352
+ name: translateLocaleText("t('_components.9')"),
353
353
  key: '9'
354
354
  }],
355
355
  onChange: function onChange(key) {
@@ -18,6 +18,7 @@ import useSettings from "../../_hooks/useSettings";
18
18
  import { ChartIcon, DateIcon, ListIcon } from "../../_util/iconSvgHtml";
19
19
  import VmFilter from "../vm-filter";
20
20
  import "./style";
21
+ import { translateLocaleText } from "./../../hooks/useTranslation.js";
21
22
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
22
23
  var VMDatePicker = VmFilter.VMDatePicker,
23
24
  VMMonthPicker = VmFilter.VMMonthPicker,
@@ -63,7 +64,8 @@ export default function VmWrapper(props) {
63
64
  activeKey = _props$activeKey === void 0 ? '' : _props$activeKey,
64
65
  onChangeTab = props.onChangeTab,
65
66
  _props$pickerProps = props.pickerProps,
66
- pickerProps = _props$pickerProps === void 0 ? {} : _props$pickerProps;
67
+ pickerProps = _props$pickerProps === void 0 ? {} : _props$pickerProps,
68
+ className = props.className;
67
69
  var _useState = useState([]),
68
70
  _useState2 = _slicedToArray(_useState, 2),
69
71
  changeList = _useState2[0],
@@ -81,7 +83,7 @@ export default function VmWrapper(props) {
81
83
  changeList.push({
82
84
  key: 'calendar',
83
85
  icon: DateIcon,
84
- name: '日历'
86
+ name: translateLocaleText("t('_components.day3')")
85
87
  });
86
88
  }
87
89
  if (showChart) {
@@ -95,7 +97,7 @@ export default function VmWrapper(props) {
95
97
  changeList.push({
96
98
  key: 'list',
97
99
  icon: ChartIcon,
98
- name: '列表'
100
+ name: translateLocaleText("t('_components.list')")
99
101
  });
100
102
  }
101
103
  setChangeList(changeList);
@@ -112,7 +114,9 @@ export default function VmWrapper(props) {
112
114
  false: '#ffffff'
113
115
  };
114
116
  return /*#__PURE__*/_jsxs("div", {
115
- className: "div-wrapper ".concat(isDark ? 'dark' : ''),
117
+ className: classnames('div-wrapper', className, {
118
+ dark: isDark
119
+ }),
116
120
  style: style,
117
121
  children: [showTitle && /*#__PURE__*/_jsxs("div", {
118
122
  className: "div-wrapper-head",
@@ -1,6 +1,6 @@
1
1
  export var ICON_CONFIG = {
2
2
  list: {
3
- title: '列表',
3
+ title: "t('_components.list')",
4
4
  draw: function draw(ctx) {
5
5
  ctx.save();
6
6
  ctx.strokeStyle = 'rgba(0,0,0,0)';
package/lib/_util/http.js CHANGED
@@ -229,7 +229,8 @@ var Http = /*#__PURE__*/function () {
229
229
  if (data.result === 0) {
230
230
  return data;
231
231
  } else {
232
- if (config.url.indexOf('zdjg/jg/data/getJgDataStatistics') > -1 || config.url.indexOf('/cloud/zd/base/api/cp/commonFactory') > -1) {
232
+ var _config, _config2;
233
+ if (((_config = config) === null || _config === void 0 || (_config = _config.url) === null || _config === void 0 ? void 0 : _config.indexOf('zdjg/jg/data/getJgDataStatistics')) > -1 || ((_config2 = config) === null || _config2 === void 0 || (_config2 = _config2.url) === null || _config2 === void 0 ? void 0 : _config2.indexOf('/cloud/zd/base/api/cp/commonFactory')) > -1) {
233
234
  return;
234
235
  }
235
236
  message.error(data.msg || '请求信息错误');
@@ -249,7 +250,8 @@ var Http = /*#__PURE__*/function () {
249
250
  key: "_errorHandler",
250
251
  value: function _errorHandler(error) {
251
252
  if (error.response) {
252
- if (error.response.data.path.indexOf('zdjg/jg/data/getJgDataStatistics') > -1 || error.response.data.path.indexOf('/cloud/zd/base/api/cp/commonFactory') > -1) {
253
+ var _error$response$data$, _error$response$data$2;
254
+ if (((_error$response$data$ = error.response.data.path) === null || _error$response$data$ === void 0 ? void 0 : _error$response$data$.indexOf('zdjg/jg/data/getJgDataStatistics')) > -1 || ((_error$response$data$2 = error.response.data.path) === null || _error$response$data$2 === void 0 ? void 0 : _error$response$data$2.indexOf('/cloud/zd/base/api/cp/commonFactory')) > -1) {
253
255
  return;
254
256
  }
255
257
  var msg;
@@ -0,0 +1,16 @@
1
+ import dayjs from 'dayjs';
2
+ import advancedFormat from 'dayjs/plugin/advancedFormat';
3
+ import isMoment from 'dayjs/plugin/isMoment';
4
+ import localeData from 'dayjs/plugin/localeData';
5
+ import weekOfYear from 'dayjs/plugin/weekOfYear';
6
+ import weekYear from 'dayjs/plugin/weekYear';
7
+ import weekday from 'dayjs/plugin/weekday';
8
+ import 'dayjs/locale/zh-cn';
9
+ dayjs.extend(localeData);
10
+ dayjs.extend(weekday);
11
+ dayjs.extend(isMoment);
12
+ dayjs.extend(weekOfYear);
13
+ dayjs.extend(weekYear);
14
+ dayjs.extend(advancedFormat);
15
+ dayjs.locale('zh-cn');
16
+ export default dayjs;
@@ -0,0 +1,217 @@
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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
3
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
5
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
6
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
7
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
8
+ 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; }
9
+ 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; }
10
+ 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; }
11
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
12
+ 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); }
13
+ import zhCN from "../locales/zh-CN.json";
14
+ import enUS from "../locales/en.json";
15
+ var keyFieldMap = {
16
+ titleKey: 'title',
17
+ labelKey: 'label',
18
+ textKey: 'text',
19
+ placeholderKey: 'placeholder',
20
+ subtitleKey: 'subtitle',
21
+ contentKey: 'content',
22
+ tooltipKey: 'tooltip',
23
+ messageKey: 'message',
24
+ descriptionKey: 'description',
25
+ unitKey: 'unit',
26
+ fileNameKey: 'fileName',
27
+ modalTitleKey: 'modalTitle',
28
+ yAxisNameKey: 'yAxisName',
29
+ yAxisName2Key: 'yAxisName2',
30
+ emptyTextKey: 'emptyText',
31
+ emptyDescriptionKey: 'emptyDescription',
32
+ emptyDescriptionTextKey: 'emptyDescriptionText',
33
+ headSubTitleTextKey: 'headSubTitleText',
34
+ btnCloseTextKey: 'btnCloseText',
35
+ btnUploadTextKey: 'btnUploadText',
36
+ btnReUploadTextKey: 'btnReUploadText',
37
+ btnImportTextKey: 'btnImportText',
38
+ msgUploadWarningTextKey: 'msgUploadWarningText',
39
+ resultSuccessTextKey: 'resultSuccessText',
40
+ resultFailTextKey: 'resultFailText'
41
+ };
42
+ function _translationText(text, t) {
43
+ if (typeof text !== 'string') {
44
+ return text;
45
+ }
46
+ var re = /^t\('([^']+)'\)$/;
47
+ var match = text.match(re);
48
+ if (match) {
49
+ return t(match[1]);
50
+ }
51
+ return text;
52
+ }
53
+ export { _translationText as translationText };
54
+ export function getTranslationKey(text) {
55
+ if (typeof text !== 'string') {
56
+ return undefined;
57
+ }
58
+ var match = text.match(/^t\('([^']+)'\)$/);
59
+ return match === null || match === void 0 ? void 0 : match[1];
60
+ }
61
+ function getHashLanguage() {
62
+ if (typeof window === 'undefined') {
63
+ return undefined;
64
+ }
65
+ var hash = window.location.hash || '';
66
+ var queryIndex = hash.indexOf('?');
67
+ if (queryIndex < 0) {
68
+ return undefined;
69
+ }
70
+ return new URLSearchParams(hash.slice(queryIndex + 1)).get('vtxLanguage') || undefined;
71
+ }
72
+ export function getRuntimeLanguage() {
73
+ var _window$localStorage;
74
+ var searchLanguage = typeof window !== 'undefined' ? new URLSearchParams(window.location.search).get('vtxLanguage') : undefined;
75
+ var hashLanguage = getHashLanguage();
76
+ var storedLanguage = typeof window !== 'undefined' ? (_window$localStorage = window.localStorage) === null || _window$localStorage === void 0 ? void 0 : _window$localStorage.getItem('vtxLanguage') : undefined;
77
+ var language = searchLanguage || hashLanguage || storedLanguage;
78
+ return language === 'en-US' || language === 'en_US' || language === 'en-us' || language === 'en' ? 'en-US' : 'zh-CN';
79
+ }
80
+ function formatMessage(template, values) {
81
+ if (!values) {
82
+ return template;
83
+ }
84
+ return template.replace(/\{(\w+)\}/g, function (_, key) {
85
+ var _values$key;
86
+ return ((_values$key = values[key]) !== null && _values$key !== void 0 ? _values$key : "{".concat(key, "}")).toString();
87
+ });
88
+ }
89
+ function translationByKey(key, t, values) {
90
+ if (typeof key !== 'string' || !key) {
91
+ return key;
92
+ }
93
+ return formatMessage(t(key, values), values);
94
+ }
95
+ export function translateLocaleText(text, values) {
96
+ var key = getTranslationKey(text);
97
+ if (!key) {
98
+ return text;
99
+ }
100
+ var language = getRuntimeLanguage();
101
+ var localeData = language === 'en-US' ? enUS : zhCN;
102
+ return formatMessage(localeData[key] || zhCN[key] || key, values);
103
+ }
104
+ function applyKeyFields(source, t) {
105
+ var next = _objectSpread({}, source);
106
+ for (var _i = 0, _Object$entries = Object.entries(keyFieldMap); _i < _Object$entries.length; _i++) {
107
+ var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
108
+ keyField = _Object$entries$_i[0],
109
+ targetField = _Object$entries$_i[1];
110
+ if (typeof source[keyField] === 'string' && source[keyField]) {
111
+ next[targetField] = translationByKey(source[keyField], t);
112
+ }
113
+ }
114
+ return next;
115
+ }
116
+ function _translationConst(lists, t) {
117
+ function loopOptions(options) {
118
+ return (options === null || options === void 0 ? void 0 : options.map(function (opt) {
119
+ if (_typeof(opt) === 'object' && opt !== null) {
120
+ var translated = applyKeyFields(opt, t);
121
+ return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, translated), translated.label ? {
122
+ label: _translationText(translated.label, t)
123
+ } : {}), translated.title ? {
124
+ title: _translationText(translated.title, t)
125
+ } : {}), translated.name ? {
126
+ name: _translationText(translated.name, t)
127
+ } : {}), translated.unit ? {
128
+ unit: _translationText(translated.unit, t)
129
+ } : {}), translated.text ? {
130
+ text: _translationText(translated.text, t)
131
+ } : {}), translated.placeholder ? {
132
+ placeholder: _translationText(translated.placeholder, t)
133
+ } : {}), translated.subtitle ? {
134
+ subtitle: _translationText(translated.subtitle, t)
135
+ } : {}), translated.content ? {
136
+ content: _translationText(translated.content, t)
137
+ } : {}), translated.tooltip ? {
138
+ tooltip: _translationText(translated.tooltip, t)
139
+ } : {}), translated.message ? {
140
+ message: _translationText(translated.message, t)
141
+ } : {}), translated.description ? {
142
+ description: _translationText(translated.description, t)
143
+ } : {}), translated.fileName ? {
144
+ fileName: _translationText(translated.fileName, t)
145
+ } : {}), translated.modalTitle ? {
146
+ modalTitle: _translationText(translated.modalTitle, t)
147
+ } : {}), translated.yAxisName ? {
148
+ yAxisName: _translationText(translated.yAxisName, t)
149
+ } : {}), translated.yAxisName2 ? {
150
+ yAxisName2: _translationText(translated.yAxisName2, t)
151
+ } : {}), translated.emptyText ? {
152
+ emptyText: _translationText(translated.emptyText, t)
153
+ } : {}), translated.emptyDescription ? {
154
+ emptyDescription: _translationText(translated.emptyDescription, t)
155
+ } : {}), translated.emptyDescriptionText ? {
156
+ emptyDescriptionText: _translationText(translated.emptyDescriptionText, t)
157
+ } : {}), translated.headSubTitleText ? {
158
+ headSubTitleText: _translationText(translated.headSubTitleText, t)
159
+ } : {}), translated.btnCloseText ? {
160
+ btnCloseText: _translationText(translated.btnCloseText, t)
161
+ } : {}), translated.btnUploadText ? {
162
+ btnUploadText: _translationText(translated.btnUploadText, t)
163
+ } : {}), translated.btnReUploadText ? {
164
+ btnReUploadText: _translationText(translated.btnReUploadText, t)
165
+ } : {}), translated.btnImportText ? {
166
+ btnImportText: _translationText(translated.btnImportText, t)
167
+ } : {}), translated.msgUploadWarningText ? {
168
+ msgUploadWarningText: _translationText(translated.msgUploadWarningText, t)
169
+ } : {}), translated.resultSuccessText ? {
170
+ resultSuccessText: _translationText(translated.resultSuccessText, t)
171
+ } : {}), translated.resultFailText ? {
172
+ resultFailText: _translationText(translated.resultFailText, t)
173
+ } : {}), Array.isArray(translated.options) ? {
174
+ options: loopOptions(translated.options)
175
+ } : {}), Array.isArray(translated.items) ? {
176
+ items: loopOptions(translated.items)
177
+ } : {}), Array.isArray(translated.children) ? {
178
+ children: loopOptions(translated.children)
179
+ } : {}), Array.isArray(translated.columns) ? {
180
+ columns: loopOptions(translated.columns)
181
+ } : {}), Array.isArray(translated.tabs) ? {
182
+ tabs: loopOptions(translated.tabs)
183
+ } : {}), Array.isArray(translated.actions) ? {
184
+ actions: loopOptions(translated.actions)
185
+ } : {}), Array.isArray(translated.buttons) ? {
186
+ buttons: loopOptions(translated.buttons)
187
+ } : {});
188
+ }
189
+ return opt;
190
+ })) || [];
191
+ }
192
+ return loopOptions(lists);
193
+ }
194
+ export { _translationConst as translationConst };
195
+ export function getT() {
196
+ var t = function t(id, values) {
197
+ var language = getRuntimeLanguage();
198
+ var localeData = language === 'en-US' ? enUS : zhCN;
199
+ return formatMessage(localeData[id] || zhCN[id] || id, values);
200
+ };
201
+ return {
202
+ t: t
203
+ };
204
+ }
205
+ export function useTranslation() {
206
+ var _getT = getT(),
207
+ t = _getT.t;
208
+ return {
209
+ t: t,
210
+ translationText: function translationText(text) {
211
+ return _translationText(text, t);
212
+ },
213
+ translationConst: function translationConst(lists) {
214
+ return _translationConst(lists, t);
215
+ }
216
+ };
217
+ }
package/lib/index.js CHANGED
@@ -1,7 +1,10 @@
1
+ import "./_util/setupDayjs";
2
+
1
3
  // export { default as VtxBaseModal } from './vtx-base-modal';
2
4
  export { default as VtxStaffModal } from "./vtx-staff-modal";
3
5
  export { default as VtxCarModal } from "./vtx-car-modal";
4
6
  export { default as VtxDefaultModal } from "./vtx-default-modal";
7
+ export { default as VtxDeviceModal } from "./vtx-device-modal";
5
8
  export { default as VtxDfModal } from "./vtx-df-modal";
6
9
  export { default as VtxQyryModal } from "./vtx-qyry-modal";
7
10
  export { default as VtxAreaModal } from "./vtx-area-modal";