@vtx/modals2 5.0.3 → 5.0.4

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 (206) hide show
  1. package/lib/_components/index.js +4 -3
  2. package/lib/_components/vm-bar-charts/index.js +1 -1
  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-factor/index.js +10 -5
  6. package/lib/_components/vm-factor/style/index.less +5 -1
  7. package/lib/_components/vm-factor-list/index.less +11 -11
  8. package/lib/_components/vm-filter/style/index.less +2 -1
  9. package/lib/_components/vm-info-collection/index.js +2 -2
  10. package/lib/_components/vm-line-charts/index.js +1 -1
  11. package/lib/_components/vm-map/index.js +5 -5
  12. package/lib/_components/vm-pie-charts/index.js +7 -5
  13. package/lib/_components/vm-repair-maintain/RmInfoSummary.js +46 -0
  14. package/lib/_components/vm-repair-maintain/RmMonthTrend.js +44 -0
  15. package/lib/_components/vm-repair-maintain/RmRecord.js +157 -0
  16. package/lib/_components/vm-repair-maintain/RmType.js +32 -0
  17. package/lib/_components/vm-repair-maintain/api.js +92 -0
  18. package/lib/_components/vm-repair-maintain/imgs/amount.png +0 -0
  19. package/lib/_components/vm-repair-maintain/imgs/amount_light.png +0 -0
  20. package/lib/_components/vm-repair-maintain/imgs/count.png +0 -0
  21. package/lib/_components/vm-repair-maintain/imgs/count_light.png +0 -0
  22. package/lib/_components/vm-repair-maintain/index.js +56 -0
  23. package/lib/_components/vm-repair-maintain/style/index.js +1 -0
  24. package/lib/_components/vm-repair-maintain/style/index.less +25 -0
  25. package/lib/_components/vm-table/index.js +7 -4
  26. package/lib/_components/vm-table/style/index.less +3 -2
  27. package/lib/_components/vm-tag/style/index.less +9 -0
  28. package/lib/_components/vm-title/index.js +3 -2
  29. package/lib/_components/vm-wrapper/index.js +32 -10
  30. package/lib/_components/vm-wrapper/style/index.less +28 -0
  31. package/lib/index.js +7 -2
  32. package/lib/style/index.less +2 -6
  33. package/lib/vtx-area-modal/components/BaseInfo/ListZymx.js +2 -1
  34. package/lib/vtx-base-modal/Header/index.less +98 -98
  35. package/lib/vtx-base-modal/Tabs/index.less +31 -31
  36. package/lib/vtx-base-modal/index.js +5 -2
  37. package/lib/vtx-car-modal/api.js +4 -3
  38. package/lib/vtx-car-modal/components/Info/index.less +6 -6
  39. package/lib/vtx-car-modal/content/Cc/BaseInfo/index.js +3 -0
  40. package/lib/vtx-car-modal/content/Cc/WorkRecord/Summary.js +1 -0
  41. package/lib/vtx-car-modal/content/Common/BaseInfo/index.js +5 -1
  42. package/lib/vtx-car-modal/content/Common/OilConsumption/index.less +6 -6
  43. package/lib/vtx-car-modal/content/Common/StaticInfo/index.js +1 -0
  44. package/lib/vtx-car-modal/content/Common/WaterConsumption/index.js +1 -0
  45. package/lib/vtx-car-modal/content/Common/WaterConsumption/index.less +6 -6
  46. package/lib/vtx-car-modal/content/JXH/AlarmInfo/List.js +9 -3
  47. package/lib/vtx-car-modal/content/JXH/BaseInfo/index.js +5 -1
  48. package/lib/vtx-car-modal/content/JXH/StaticInfo/index.js +7 -6
  49. package/lib/vtx-car-modal/content/JXH/WorkRecord/index.js +20 -12
  50. package/lib/vtx-car-modal/content/Ljsy/BaseInfo/index.js +3 -0
  51. package/lib/vtx-car-modal/content/Ljsy/WorkRecord/Summary.js +1 -0
  52. package/lib/vtx-car-modal/content/Ljzy/BaseInfo/index.js +3 -0
  53. package/lib/vtx-car-modal/content/Ljzy/WorkRecord/Summary.js +1 -0
  54. package/lib/vtx-car-modal/index.js +16 -2
  55. package/lib/vtx-cc-cp-modal/api.js +381 -0
  56. package/lib/vtx-cc-cp-modal/components/AlarmInfo/AlarmRecord.js +120 -0
  57. package/lib/vtx-cc-cp-modal/components/AlarmInfo/AlarmTrend.js +27 -0
  58. package/lib/vtx-cc-cp-modal/components/AlarmInfo/AlarmTypeAnalysis.js +32 -0
  59. package/lib/vtx-cc-cp-modal/components/AlarmInfo/StaticInfo.js +41 -0
  60. package/lib/vtx-cc-cp-modal/components/AlarmInfo/index.js +69 -0
  61. package/lib/vtx-cc-cp-modal/components/BaseInfo/AllWork.js +103 -0
  62. package/lib/vtx-cc-cp-modal/components/BaseInfo/Info.js +75 -0
  63. package/lib/vtx-cc-cp-modal/components/BaseInfo/Rules.js +58 -0
  64. package/lib/vtx-cc-cp-modal/components/BaseInfo/SyRecord.js +142 -0
  65. package/lib/vtx-cc-cp-modal/components/BaseInfo/index.js +63 -0
  66. package/lib/vtx-cc-cp-modal/components/BaseInfo/index.less +16 -0
  67. package/lib/vtx-cc-cp-modal/components/Calendar/index.js +168 -0
  68. package/lib/vtx-cc-cp-modal/components/Calendar/index.less +93 -0
  69. package/lib/vtx-cc-cp-modal/components/ExceptionInfo/ExceptionTrend.js +27 -0
  70. package/lib/vtx-cc-cp-modal/components/ExceptionInfo/ExceptionTypeAnalysis.js +32 -0
  71. package/lib/vtx-cc-cp-modal/components/ExceptionInfo/ExeceptionRecord.js +118 -0
  72. package/lib/vtx-cc-cp-modal/components/ExceptionInfo/StaticInfo.js +41 -0
  73. package/lib/vtx-cc-cp-modal/components/ExceptionInfo/index.js +69 -0
  74. package/lib/vtx-cc-cp-modal/components/Restaurant/index.js +111 -0
  75. package/lib/vtx-cc-cp-modal/components/Restaurant/index.less +3 -0
  76. package/lib/vtx-cc-cp-modal/components/SyInfo/Ljcsl.js +46 -0
  77. package/lib/vtx-cc-cp-modal/components/SyInfo/SummaryInfo.js +81 -0
  78. package/lib/vtx-cc-cp-modal/components/SyInfo/index.js +78 -0
  79. package/lib/vtx-cc-cp-modal/components/index.js +7 -0
  80. package/lib/vtx-cc-cp-modal/imgs/rwnsjts.png +0 -0
  81. package/lib/vtx-cc-cp-modal/imgs/rwnsjts_dark.png +0 -0
  82. package/lib/vtx-cc-cp-modal/imgs/rwnsjzl.png +0 -0
  83. package/lib/vtx-cc-cp-modal/imgs/rwnsjzl_dark.png +0 -0
  84. package/lib/vtx-cc-cp-modal/imgs/rwnsscs.png +0 -0
  85. package/lib/vtx-cc-cp-modal/imgs/rwnsscs_dark.png +0 -0
  86. package/lib/vtx-cc-cp-modal/imgs/zsjts.png +0 -0
  87. package/lib/vtx-cc-cp-modal/imgs/zsjts_dark.png +0 -0
  88. package/lib/vtx-cc-cp-modal/imgs/zsjzl.png +0 -0
  89. package/lib/vtx-cc-cp-modal/imgs/zsjzl_dark.png +0 -0
  90. package/lib/vtx-cc-cp-modal/imgs/zsscs.png +0 -0
  91. package/lib/vtx-cc-cp-modal/imgs/zsscs_dark.png +0 -0
  92. package/lib/vtx-cc-cp-modal/index.js +119 -0
  93. package/lib/vtx-cc-cp-modal/style/index.js +1 -0
  94. package/lib/vtx-cc-cp-modal/style/index.less +13 -0
  95. package/lib/vtx-cc-unit-modal/api.js +361 -0
  96. package/lib/vtx-cc-unit-modal/components/BaseInfo/CollectRecord.js +69 -0
  97. package/lib/vtx-cc-unit-modal/components/BaseInfo/DetailList.js +66 -0
  98. package/lib/vtx-cc-unit-modal/components/BaseInfo/Factory.js +60 -0
  99. package/lib/vtx-cc-unit-modal/components/BaseInfo/Statistics.js +91 -0
  100. package/lib/vtx-cc-unit-modal/components/BaseInfo/index.js +118 -0
  101. package/lib/vtx-cc-unit-modal/components/BaseInfo/index.less +6 -0
  102. package/lib/vtx-cc-unit-modal/components/CarList/index.js +129 -0
  103. package/lib/vtx-cc-unit-modal/components/Collection/index.js +95 -0
  104. package/lib/vtx-cc-unit-modal/components/DetailInfo/index.js +126 -0
  105. package/lib/vtx-cc-unit-modal/components/Factory/index.js +149 -0
  106. package/lib/vtx-cc-unit-modal/components/RestaurantList/index.js +127 -0
  107. package/lib/vtx-cc-unit-modal/components/index.js +7 -0
  108. package/lib/vtx-cc-unit-modal/imgs/jccc.png +0 -0
  109. package/lib/vtx-cc-unit-modal/imgs/jccc_dark.png +0 -0
  110. package/lib/vtx-cc-unit-modal/imgs/jcl.png +0 -0
  111. package/lib/vtx-cc-unit-modal/imgs/jcl_dark.png +0 -0
  112. package/lib/vtx-cc-unit-modal/imgs/syts.png +0 -0
  113. package/lib/vtx-cc-unit-modal/imgs/syts_dark.png +0 -0
  114. package/lib/vtx-cc-unit-modal/imgs/syzl.png +0 -0
  115. package/lib/vtx-cc-unit-modal/imgs/syzl_dark.png +0 -0
  116. package/lib/vtx-cc-unit-modal/index.js +137 -0
  117. package/lib/vtx-cc-unit-modal/style/index.js +1 -0
  118. package/lib/vtx-cc-unit-modal/style/index.less +14 -0
  119. package/lib/vtx-cp-modal/api.js +3 -3
  120. package/lib/vtx-cp-modal/index.js +4 -1
  121. package/lib/vtx-default-modal/index.js +10 -7
  122. package/lib/vtx-device-modal/api.js +531 -0
  123. package/lib/vtx-device-modal/components/BaseInfo/index.js +140 -0
  124. package/lib/vtx-device-modal/components/DataAnalysis/AlarmAnalysis.js +279 -0
  125. package/lib/vtx-device-modal/components/DataAnalysis/MonitorAnalysis.js +611 -0
  126. package/lib/vtx-device-modal/components/DataAnalysis/TabsList.js +23 -0
  127. package/lib/vtx-device-modal/components/DataAnalysis/index.js +24 -0
  128. package/lib/vtx-device-modal/components/DataAnalysis/index.less +66 -0
  129. package/lib/vtx-device-modal/components/index.js +3 -0
  130. package/lib/vtx-device-modal/config.js +21 -0
  131. package/lib/vtx-device-modal/imgs/current.png +0 -0
  132. package/lib/vtx-device-modal/imgs/current_dark.png +0 -0
  133. package/lib/vtx-device-modal/imgs/history.png +0 -0
  134. package/lib/vtx-device-modal/imgs/history_dark.png +0 -0
  135. package/lib/vtx-device-modal/index.js +96 -0
  136. package/lib/vtx-device-modal/style/index.js +1 -0
  137. package/lib/vtx-device-modal/style/index.less +1 -0
  138. package/lib/vtx-df-modal/index.js +11 -9
  139. package/lib/vtx-kh-modal/api2.js +178 -0
  140. package/lib/vtx-kh-modal/components/BaseInfo/index.js +197 -0
  141. package/lib/vtx-kh-modal/components/BaseInfo/index.less +101 -0
  142. package/lib/vtx-kh-modal/components/Record/index.js +204 -0
  143. package/lib/vtx-kh-modal/components/Record/index.less +7 -0
  144. package/lib/vtx-kh-modal/components/index.js +3 -0
  145. package/lib/vtx-kh-modal/imgs/count.png +0 -0
  146. package/lib/vtx-kh-modal/imgs/count_light.png +0 -0
  147. package/lib/vtx-kh-modal/imgs/question_bg.png +0 -0
  148. package/lib/vtx-kh-modal/imgs/question_bg_light.png +0 -0
  149. package/lib/vtx-kh-modal/imgs/score.png +0 -0
  150. package/lib/vtx-kh-modal/imgs/score_light.png +0 -0
  151. package/lib/vtx-kh-modal/imgs/subtract.png +0 -0
  152. package/lib/vtx-kh-modal/imgs/subtract_light.png +0 -0
  153. package/lib/vtx-kh-modal/index.js +46 -0
  154. package/lib/vtx-kh-modal/style/index.js +4 -0
  155. package/lib/vtx-kh-modal/style/index.less +1 -0
  156. package/lib/vtx-restaurant-modal/api.js +297 -0
  157. package/lib/vtx-restaurant-modal/components/Alarm/AlarmRecord.js +47 -0
  158. package/lib/vtx-restaurant-modal/components/Alarm/AlarmTrend.js +31 -0
  159. package/lib/vtx-restaurant-modal/components/Alarm/AlarmTypeAnalysis.js +36 -0
  160. package/lib/vtx-restaurant-modal/components/Alarm/StaticInfo.js +41 -0
  161. package/lib/vtx-restaurant-modal/components/Alarm/index.js +69 -0
  162. package/lib/vtx-restaurant-modal/components/Basic/CollectRule.js +64 -0
  163. package/lib/vtx-restaurant-modal/components/Basic/DetailList.js +68 -0
  164. package/lib/vtx-restaurant-modal/components/Basic/Info.js +87 -0
  165. package/lib/vtx-restaurant-modal/components/Basic/Summary.js +61 -0
  166. package/lib/vtx-restaurant-modal/components/Basic/SummaryStatistics.js +60 -0
  167. package/lib/vtx-restaurant-modal/components/Basic/index.js +74 -0
  168. package/lib/vtx-restaurant-modal/components/Basic/index.less +16 -0
  169. package/lib/vtx-restaurant-modal/components/Calendar/index.js +171 -0
  170. package/lib/vtx-restaurant-modal/components/Calendar/index.less +93 -0
  171. package/lib/vtx-restaurant-modal/components/Collection/index.js +86 -0
  172. package/lib/vtx-restaurant-modal/components/DetailInfo/index.js +111 -0
  173. package/lib/vtx-restaurant-modal/components/SignAndContract/ContactDetail.js +299 -0
  174. package/lib/vtx-restaurant-modal/components/SignAndContract/index.js +198 -0
  175. package/lib/vtx-restaurant-modal/components/index.js +7 -0
  176. package/lib/vtx-restaurant-modal/config.js +283 -0
  177. package/lib/vtx-restaurant-modal/imgs/csl.png +0 -0
  178. package/lib/vtx-restaurant-modal/imgs/csl_dark.png +0 -0
  179. package/lib/vtx-restaurant-modal/imgs/sycs.png +0 -0
  180. package/lib/vtx-restaurant-modal/imgs/sycs_dark.png +0 -0
  181. package/lib/vtx-restaurant-modal/imgs/syts.png +0 -0
  182. package/lib/vtx-restaurant-modal/imgs/syts_dark.png +0 -0
  183. package/lib/vtx-restaurant-modal/index.js +168 -0
  184. package/lib/vtx-restaurant-modal/style/index.js +1 -0
  185. package/lib/vtx-restaurant-modal/style/index.less +13 -0
  186. package/lib/vtx-road-modal/components/BaseInfo/index.less +218 -218
  187. package/lib/vtx-road-modal/components/Statistical/index.less +32 -32
  188. package/lib/vtx-shxq-modal/components/AlarmRecord/index.js +4 -1
  189. package/lib/vtx-shxq-modal/components/Tfd/index.js +0 -1
  190. package/lib/vtx-shxq-modal/components/ThrowRecord/index.js +4 -1
  191. package/lib/vtx-staff-modal/components/BaseInfo/ListZymx.js +6 -2
  192. package/lib/vtx-tfd-modal/api.js +22 -27
  193. package/lib/vtx-tfd-modal/components/BaseInfo/index.js +107 -59
  194. package/lib/vtx-tfd-modal/components/BaseInfo/index.less +5 -0
  195. package/lib/vtx-zg-modal/api.js +107 -0
  196. package/lib/vtx-zg-modal/components/BaseInfo/index.js +287 -0
  197. package/lib/vtx-zg-modal/components/BaseInfo/index.less +124 -0
  198. package/lib/vtx-zg-modal/components/index.js +1 -0
  199. package/lib/vtx-zg-modal/imgs/dot.png +0 -0
  200. package/lib/vtx-zg-modal/imgs/dot_done.png +0 -0
  201. package/lib/vtx-zg-modal/index.js +42 -0
  202. package/lib/vtx-zg-modal/style/index.js +3 -0
  203. package/lib/vtx-zg-modal/style/index.less +1 -0
  204. package/lib/vtx-zzz-modal/index.js +10 -10
  205. package/package.json +1 -1
  206. package/lib/vtx-car-modal/imgs/calendar/fsdf/durationqq.png +0 -0
@@ -0,0 +1,140 @@
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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
8
+ 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."); }
9
+ 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); }
10
+ 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; }
11
+ 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; } }
12
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
+ import { getVtxToken } from '@vtx/utils';
14
+ import { Col, Row } from 'antd';
15
+ import { useMemo } from 'react';
16
+ import { VmInfoCollection, VmMap, VmWrapper } from "../../../_components";
17
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
18
+ var BaseInfo = function BaseInfo(_ref) {
19
+ var info = _ref.info;
20
+ var data = [{
21
+ label: '设备编码',
22
+ key: 'code',
23
+ value: info === null || info === void 0 ? void 0 : info.code
24
+ }, {
25
+ label: '设备厂家',
26
+ key: 'factoryName',
27
+ value: info === null || info === void 0 ? void 0 : info.factoryName
28
+ }, {
29
+ label: '设备型号',
30
+ key: 'modelName',
31
+ value: info === null || info === void 0 ? void 0 : info.modelName
32
+ }, {
33
+ label: '性能参数',
34
+ key: 'performanceParameter',
35
+ value: info === null || info === void 0 ? void 0 : info.performanceParameter
36
+ }, {
37
+ label: '管理单位',
38
+ key: 'manageUnitName',
39
+ value: info === null || info === void 0 ? void 0 : info.manageUnitName
40
+ }, {
41
+ label: '责任人',
42
+ key: 'responsiblePersonName',
43
+ value: info === null || info === void 0 ? void 0 : info.responsiblePersonName
44
+ }, {
45
+ label: '联系方式',
46
+ key: 'phone',
47
+ value: info === null || info === void 0 ? void 0 : info.phone
48
+ }];
49
+ var url = '';
50
+ if (info.photoIds) {
51
+ var _JSON$parse;
52
+ var id = (_JSON$parse = JSON.parse(info.photoIds)) === null || _JSON$parse === void 0 || (_JSON$parse = _JSON$parse[0]) === null || _JSON$parse === void 0 ? void 0 : _JSON$parse.id;
53
+ url = id ? "/cloudFile/common/downloadFile?id=".concat(id, "&token=").concat(getVtxToken('token') || '') : '';
54
+ }
55
+ var installLocationDTO = info.installLocationDTO;
56
+ var _ref2 = installLocationDTO !== null && installLocationDTO !== void 0 && installLocationDTO.lngLats ? installLocationDTO.lngLats.split(',') : [],
57
+ _ref3 = _slicedToArray(_ref2, 2),
58
+ lng = _ref3[0],
59
+ lat = _ref3[1];
60
+ var mapStyle = useMemo(function () {
61
+ var icon = 'TYSB';
62
+ var color = '#119FFB';
63
+ if (info.realStatusIcons) {
64
+ var _iconList$find;
65
+ var iconList = JSON.parse(info.realStatusIcons) || [];
66
+ var photos = (_iconList$find = iconList.find(function (icon) {
67
+ return icon.businessType === 'kanban';
68
+ })) === null || _iconList$find === void 0 ? void 0 : _iconList$find.photos;
69
+ if (photos) {
70
+ var iconInfo = JSON.parse(photos).find(function (item) {
71
+ return item.iconCode === 'online';
72
+ });
73
+ var iconId = iconInfo.iconId,
74
+ iconColor = iconInfo.iconColor;
75
+ icon = iconId || icon;
76
+ color = iconColor || color;
77
+ }
78
+ }
79
+ return {
80
+ icon: icon,
81
+ color: color
82
+ };
83
+ }, [info.realStatusIcons]);
84
+ var mapPoints = lng && lat ? [_objectSpread(_objectSpread({
85
+ lng: lng,
86
+ lat: lat
87
+ }, mapStyle), {}, {
88
+ name: info.name,
89
+ type: 'point',
90
+ id: info.name
91
+ })] : [];
92
+ return /*#__PURE__*/_jsxs(Row, {
93
+ gutter: [16, 16],
94
+ style: {
95
+ height: '100%'
96
+ },
97
+ children: [/*#__PURE__*/_jsx(Col, {
98
+ flex: '400px',
99
+ style: {
100
+ height: '100%'
101
+ },
102
+ children: /*#__PURE__*/_jsxs(VmWrapper, {
103
+ title: '基本信息',
104
+ children: [url && /*#__PURE__*/_jsx("img", {
105
+ src: url,
106
+ style: {
107
+ height: 207,
108
+ borderRadius: 8,
109
+ marginBottom: 16
110
+ }
111
+ }), /*#__PURE__*/_jsx(VmInfoCollection, {
112
+ data: data,
113
+ horizontal: true,
114
+ ellipsis: true
115
+ })]
116
+ })
117
+ }), /*#__PURE__*/_jsx(Col, {
118
+ flex: '1',
119
+ style: {
120
+ minWidth: 0,
121
+ height: '100%'
122
+ },
123
+ children: /*#__PURE__*/_jsx(VmWrapper, {
124
+ showTitle: false,
125
+ children: lng && lat ? /*#__PURE__*/_jsx("div", {
126
+ style: {
127
+ height: '100%'
128
+ },
129
+ children: /*#__PURE__*/_jsx(VmMap, {
130
+ mapPoints: mapPoints,
131
+ mapType: 'wgs84',
132
+ mapCenter: [lng, lat],
133
+ address: info === null || info === void 0 ? void 0 : info.address
134
+ })
135
+ }) : null
136
+ })
137
+ })]
138
+ });
139
+ };
140
+ export default BaseInfo;
@@ -0,0 +1,279 @@
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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
8
+ 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."); }
9
+ 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); }
10
+ 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; }
11
+ 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; } }
12
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
+ import TabsList from "./TabsList";
14
+ import { useSetState } from 'ahooks';
15
+ import { Checkbox, Col, Row, Space } from 'antd';
16
+ import classnames from 'classnames';
17
+ import dayjs from 'dayjs';
18
+ import { keyBy } from 'lodash';
19
+ import { useState } from 'react';
20
+ import { VmTable, VmTag, VmWrapper } from "../../../_components";
21
+ import useSettings from "../../../_hooks/useSettings";
22
+ import { BaseService } from "../../api";
23
+ import "./index.less";
24
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
25
+ var tabList = [{
26
+ label: '日',
27
+ value: 'day'
28
+ }, {
29
+ label: '月',
30
+ value: 'month'
31
+ }, {
32
+ label: '年',
33
+ value: 'year'
34
+ }, {
35
+ label: '自定义',
36
+ value: 'self'
37
+ }];
38
+ var filterTypeMap = {
39
+ day: 'datePicker',
40
+ month: 'monthPicker',
41
+ year: 'yearPicker',
42
+ self: 'rangePicker'
43
+ };
44
+ var AlarmAnalysis = function AlarmAnalysis(_ref) {
45
+ var id = _ref.id,
46
+ info = _ref.info;
47
+ var _useSettings = useSettings(),
48
+ isDark = _useSettings.isDark;
49
+ var _useSetState = useSetState({
50
+ startDate: dayjs().startOf('date'),
51
+ endDate: dayjs().endOf('date'),
52
+ dateType: 'day',
53
+ checkCurrent: false,
54
+ summaryType: '',
55
+ pagination: {
56
+ current: 1,
57
+ pageSize: 10,
58
+ total: 0
59
+ }
60
+ }),
61
+ _useSetState2 = _slicedToArray(_useSetState, 2),
62
+ state = _useSetState2[0],
63
+ setState = _useSetState2[1];
64
+ var startDate = state.startDate,
65
+ endDate = state.endDate,
66
+ pagination = state.pagination,
67
+ dateType = state.dateType,
68
+ checkCurrent = state.checkCurrent,
69
+ summaryType = state.summaryType;
70
+ var _useState = useState(''),
71
+ _useState2 = _slicedToArray(_useState, 2),
72
+ monitorItemId = _useState2[0],
73
+ setMonitorItemId = _useState2[1];
74
+ var pageChange = function pageChange(page) {
75
+ setState({
76
+ pagination: _objectSpread(_objectSpread({}, pagination), {}, {
77
+ current: page
78
+ })
79
+ });
80
+ };
81
+ var alarmStartTimeBegin = dayjs(startDate).format('YYYY-MM-DD 00:00:00');
82
+ var alarmStartTimeEnd = dayjs(endDate).format('YYYY-MM-DD 23:59:59');
83
+ var _BaseService$useGetAl = BaseService.useGetAlarmPage({
84
+ page: pagination.current - 1,
85
+ alarmTypes: 'FACTOR',
86
+ alarmStartTimeBegin: alarmStartTimeBegin,
87
+ alarmStartTimeEnd: alarmStartTimeEnd,
88
+ alarmStatuses: checkCurrent ? 'OCCURRING' : '',
89
+ deviceIds: id,
90
+ monitorItemId: monitorItemId
91
+ }),
92
+ alarmRecord = _BaseService$useGetAl.alarmRecord,
93
+ loading = _BaseService$useGetAl.loading;
94
+ var _BaseService$useGetAl2 = BaseService.useGetAlarmPage({
95
+ alarmTypes: 'FACTOR',
96
+ alarmStartTimeBegin: alarmStartTimeBegin,
97
+ alarmStartTimeEnd: alarmStartTimeEnd,
98
+ alarmStatuses: 'OCCURRING',
99
+ deviceIds: id
100
+ }),
101
+ currentAlarmRecord = _BaseService$useGetAl2.alarmRecord;
102
+ var _BaseService$useGetAl3 = BaseService.useGetAlarmPage({
103
+ alarmTypes: 'FACTOR',
104
+ alarmStartTimeBegin: alarmStartTimeBegin,
105
+ alarmStartTimeEnd: alarmStartTimeEnd,
106
+ deviceIds: id
107
+ }),
108
+ historyAlarmRecord = _BaseService$useGetAl3.alarmRecord;
109
+ var _BaseService$useGetAl4 = BaseService.useGetAlarmSummary({
110
+ alarmStartTimeBegin: alarmStartTimeBegin,
111
+ alarmStartTimeEnd: alarmStartTimeEnd,
112
+ deviceIds: id,
113
+ alarmTypes: 'FACTOR'
114
+ }),
115
+ _BaseService$useGetAl5 = _BaseService$useGetAl4.alarmSummary,
116
+ alarmSummary = _BaseService$useGetAl5 === void 0 ? [] : _BaseService$useGetAl5;
117
+ var alarmSummaryMap = keyBy(alarmSummary, 'key');
118
+ var tableProps = {
119
+ pagination: _objectSpread(_objectSpread({}, pagination), {}, {
120
+ total: alarmRecord.total || 0,
121
+ defaultPageSize: 10,
122
+ onChange: pageChange
123
+ }),
124
+ height: '100%',
125
+ dataSource: alarmRecord.rows || [],
126
+ loading: loading,
127
+ onChange: function onChange(_pagination, _filters, sorter) {
128
+ if (sorter.order) {
129
+ var order = sorter.order === 'ascend' ? 'asc' : 'desc';
130
+ setState({
131
+ sort: "".concat(sorter.field, ",").concat(order)
132
+ });
133
+ } else {
134
+ setState({
135
+ sort: ''
136
+ });
137
+ }
138
+ }
139
+ };
140
+ var columns = [{
141
+ title: '报警名称',
142
+ dataIndex: 'alarmName',
143
+ key: 'alarmName'
144
+ }, {
145
+ title: '报警等级',
146
+ dataIndex: 'alarmLevelName',
147
+ key: 'alarmLevelName'
148
+ }, {
149
+ title: '报警状态',
150
+ dataIndex: 'alarmStatusName',
151
+ key: 'alarmStatusName'
152
+ }, {
153
+ title: '报警开始时间',
154
+ dataIndex: 'alarmStartTime',
155
+ key: 'alarmStartTime'
156
+ }, {
157
+ title: '报警处理状态',
158
+ dataIndex: 'alarmHandleStatusName',
159
+ key: 'alarmHandleStatusName'
160
+ }];
161
+ var summaryList = [{
162
+ label: '当前报警',
163
+ value: (currentAlarmRecord === null || currentAlarmRecord === void 0 ? void 0 : currentAlarmRecord.total) || 0,
164
+ key: 'current'
165
+ }, {
166
+ label: '历史报警',
167
+ value: (historyAlarmRecord === null || historyAlarmRecord === void 0 ? void 0 : historyAlarmRecord.total) || 0,
168
+ key: 'history'
169
+ }];
170
+ return /*#__PURE__*/_jsx(VmWrapper, {
171
+ title: '报警分析',
172
+ filterType: filterTypeMap[dateType],
173
+ filterChange: function filterChange(date) {
174
+ setState({
175
+ startDate: date[0],
176
+ endDate: date[1]
177
+ });
178
+ },
179
+ dateValue: dateType === 'self' ? [state.startDate, state.endDate] : startDate,
180
+ extraLeft: /*#__PURE__*/_jsxs(Space, {
181
+ children: [/*#__PURE__*/_jsx(Checkbox, {
182
+ style: {
183
+ color: 'var(--modal-title-color)'
184
+ },
185
+ checked: checkCurrent,
186
+ onChange: function onChange(e) {
187
+ setState({
188
+ checkCurrent: e.target.checked
189
+ });
190
+ },
191
+ children: "\u4EC5\u770B\u5F53\u524D\u62A5\u8B66"
192
+ }), /*#__PURE__*/_jsx(TabsList, {
193
+ list: tabList,
194
+ activeKey: dateType,
195
+ setActiveKey: function setActiveKey(key) {
196
+ setState({
197
+ dateType: key
198
+ });
199
+ if (key !== 'self') {
200
+ var _endDate = dayjs().endOf(key);
201
+ setState({
202
+ startDate: dayjs().startOf(key),
203
+ endDate: _endDate
204
+ });
205
+ }
206
+ }
207
+ })]
208
+ }),
209
+ children: /*#__PURE__*/_jsxs(Row, {
210
+ gutter: [30, 30],
211
+ children: [/*#__PURE__*/_jsx(Col, {
212
+ flex: '368px',
213
+ children: summaryList.map(function (item) {
214
+ return /*#__PURE__*/_jsxs("div", {
215
+ className: classnames('vtx-device-alarm-summary', {
216
+ dark: isDark,
217
+ active: item.key === summaryType
218
+ }),
219
+ onClick: function onClick() {
220
+ var newSummaryType = item.key === summaryType ? '' : item.key;
221
+ setState({
222
+ summaryType: newSummaryType,
223
+ checkCurrent: newSummaryType === 'current'
224
+ });
225
+ },
226
+ children: [/*#__PURE__*/_jsx("div", {
227
+ className: 'vtx-device-alarm-summary-label',
228
+ children: item.label
229
+ }), /*#__PURE__*/_jsx("div", {
230
+ className: 'vtx-device-alarm-summary-value',
231
+ children: item.value
232
+ })]
233
+ }, item.label);
234
+ })
235
+ }), /*#__PURE__*/_jsxs(Col, {
236
+ flex: '1',
237
+ style: {
238
+ minWidth: 0
239
+ },
240
+ children: [/*#__PURE__*/_jsxs(Space, {
241
+ style: {
242
+ marginBottom: 16
243
+ },
244
+ size: 12,
245
+ children: [/*#__PURE__*/_jsx("div", {
246
+ style: {
247
+ cursor: 'pointer'
248
+ },
249
+ onClick: function onClick() {
250
+ return setMonitorItemId('');
251
+ },
252
+ children: /*#__PURE__*/_jsx(VmTag, {
253
+ title: "\u5168\u90E8(".concat(alarmRecord.total || 0, ")"),
254
+ type: monitorItemId === '' ? 'blue' : 'black'
255
+ })
256
+ }), (info.monitorItems || []).map(function (item) {
257
+ var _alarmSummaryMap$item;
258
+ return /*#__PURE__*/_jsx("div", {
259
+ style: {
260
+ cursor: 'pointer'
261
+ },
262
+ onClick: function onClick() {
263
+ return setMonitorItemId(item.key);
264
+ },
265
+ children: /*#__PURE__*/_jsx(VmTag, {
266
+ title: "".concat(item.value, "(").concat(((_alarmSummaryMap$item = alarmSummaryMap[item.key]) === null || _alarmSummaryMap$item === void 0 ? void 0 : _alarmSummaryMap$item.value) || 0, ")"),
267
+ type: item.key === monitorItemId ? 'blue' : 'black'
268
+ })
269
+ }, item.key);
270
+ })]
271
+ }), /*#__PURE__*/_jsx(VmTable, _objectSpread({
272
+ columns: columns,
273
+ rowKey: "id"
274
+ }, tableProps))]
275
+ })]
276
+ })
277
+ });
278
+ };
279
+ export default AlarmAnalysis;