@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,87 @@
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 { Image } from 'antd';
15
+ import { useContext } from 'react';
16
+ import { VmInfoCollection, VmMap } from "../../../_components";
17
+ import { BasicService } from "../../api";
18
+ import { getFormItem } from "../../config";
19
+ import { RestaurantContext } from "../../index";
20
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
21
+ var Info = function Info() {
22
+ var _data$location;
23
+ var _useContext = useContext(RestaurantContext),
24
+ data = _useContext.info;
25
+ var _ref = data !== null && data !== void 0 && (_data$location = data.location) !== null && _data$location !== void 0 && _data$location.lngLats ? data.location.lngLats.split(',') : [],
26
+ _ref2 = _slicedToArray(_ref, 2),
27
+ lng = _ref2[0],
28
+ lat = _ref2[1];
29
+ var mapPoints = lng && lat ? [{
30
+ lng: lng,
31
+ lat: lat,
32
+ icon: 'CC_CSDW',
33
+ name: data.name,
34
+ type: 'point',
35
+ id: data.name
36
+ }] : [];
37
+ var configData = BasicService.useGetConfigData();
38
+ var baseConfigList = (configData || []).filter(function (item) {
39
+ return item.groupKey === 'jbxx' && item.isVisible;
40
+ });
41
+ var dataSource = baseConfigList.filter(function (item) {
42
+ return item.dataKey !== 'location';
43
+ }).map(function (item) {
44
+ var formItem = getFormItem(item, data);
45
+ return _objectSpread(_objectSpread({
46
+ key: item.dataKey
47
+ }, formItem), formItem.type === 'img' ? {
48
+ render: function render() {
49
+ var photos = JSON.parse(formItem.value || '[]');
50
+ return /*#__PURE__*/_jsx("div", {
51
+ style: {
52
+ whiteSpace: 'break-spaces'
53
+ },
54
+ children: photos.map(function (item) {
55
+ return /*#__PURE__*/_jsx(Image, {
56
+ width: 80,
57
+ height: 80,
58
+ src: "/vortex/rest/cloud/np/file/downloadFileThumbnail?outputQuality=0.5&scale=0.2&id=".concat(item.id, "&token=").concat(getVtxToken('token')),
59
+ preview: {
60
+ src: "/cloudFile/common/downloadFile?id=".concat(item.id, "&token=").concat(getVtxToken('token'))
61
+ }
62
+ }, item.id);
63
+ })
64
+ });
65
+ }
66
+ } : {});
67
+ });
68
+ return /*#__PURE__*/_jsxs(_Fragment, {
69
+ children: [/*#__PURE__*/_jsx(VmInfoCollection, {
70
+ data: dataSource,
71
+ horizontal: true,
72
+ ellipsis: true
73
+ }), lng && lat ? /*#__PURE__*/_jsx("div", {
74
+ style: {
75
+ height: 230,
76
+ marginBottom: 16
77
+ },
78
+ children: /*#__PURE__*/_jsx(VmMap, {
79
+ mapPoints: mapPoints,
80
+ mapType: 'wgs84',
81
+ mapCenter: [lng, lat],
82
+ address: data === null || data === void 0 ? void 0 : data.address
83
+ })
84
+ }) : null]
85
+ });
86
+ };
87
+ export default Info;
@@ -0,0 +1,61 @@
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
+ import { Col, Row } from 'antd';
8
+ import { useContext } from 'react';
9
+ import { VmFactor } from "../../../_components";
10
+ import useSettings from "../../../_hooks/useSettings";
11
+ import { BasicService } from "../../api";
12
+ import { RestaurantContext } from "../../index";
13
+ import { jsx as _jsx } from "react/jsx-runtime";
14
+ var Summary = function Summary(_ref) {
15
+ var startDay = _ref.startDay,
16
+ endDay = _ref.endDay;
17
+ var _useSettings = useSettings(),
18
+ isDark = _useSettings.isDark;
19
+ var _useContext = useContext(RestaurantContext),
20
+ id = _useContext.id,
21
+ garbageType = _useContext.garbageType;
22
+ var data = BasicService.useSummary({
23
+ id: id,
24
+ startDay: startDay,
25
+ endDay: endDay,
26
+ garbageType: garbageType
27
+ });
28
+ var list = [{
29
+ name: '产生量',
30
+ unit: 'kg',
31
+ value: (data === null || data === void 0 ? void 0 : data.collectWeight) || 0,
32
+ img: require("../../imgs/csl".concat(isDark ? '_dark' : '', ".png")),
33
+ fontType: 'blue'
34
+ }, {
35
+ name: '垃圾桶数',
36
+ unit: '桶',
37
+ value: (data === null || data === void 0 ? void 0 : data.actCollectNum) || 0,
38
+ img: require("../../imgs/syts".concat(isDark ? '_dark' : '', ".png")),
39
+ fontType: 'green'
40
+ }, {
41
+ name: '收运次数',
42
+ unit: '次',
43
+ value: (data === null || data === void 0 ? void 0 : data.collectTimes) || 0,
44
+ img: require("../../imgs/sycs".concat(isDark ? '_dark' : '', ".png")),
45
+ fontType: 'cyan'
46
+ }];
47
+ return /*#__PURE__*/_jsx(Row, {
48
+ align: 'middle',
49
+ justify: 'center',
50
+ style: {
51
+ paddingLeft: 64
52
+ },
53
+ children: list.map(function (item) {
54
+ return /*#__PURE__*/_jsx(Col, {
55
+ span: 8,
56
+ children: /*#__PURE__*/_jsx(VmFactor, _objectSpread({}, item))
57
+ }, item.name);
58
+ })
59
+ });
60
+ };
61
+ export default Summary;
@@ -0,0 +1,60 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+ 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."); }
3
+ 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); }
4
+ 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; }
5
+ 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; } }
6
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
+ import { useSetState } from 'ahooks';
8
+ import dayjs from 'dayjs';
9
+ import { VmWrapper } from "../../../_components";
10
+ import DetailList from "./DetailList";
11
+ import Summary from "./Summary";
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ var SummaryStatistics = function SummaryStatistics() {
14
+ var _useSetState = useSetState({
15
+ startDate: dayjs().subtract(30, 'day'),
16
+ endDate: dayjs()
17
+ }),
18
+ _useSetState2 = _slicedToArray(_useSetState, 2),
19
+ state = _useSetState2[0],
20
+ setState = _useSetState2[1];
21
+ var startDay = dayjs(state.startDate).format('YYYY-MM-DD');
22
+ var endDay = dayjs(state.endDate).format('YYYY-MM-DD');
23
+ var filterChange = function filterChange(dateValue) {
24
+ setState({
25
+ startDate: dateValue[0],
26
+ endDate: dateValue[1]
27
+ });
28
+ };
29
+ return /*#__PURE__*/_jsxs("div", {
30
+ className: 'vtx-restaurant-info-right-wrap',
31
+ children: [/*#__PURE__*/_jsx("div", {
32
+ style: {
33
+ height: 138
34
+ },
35
+ children: /*#__PURE__*/_jsx(VmWrapper, {
36
+ title: '收运进厂统计',
37
+ filterType: "rangePicker",
38
+ dateValue: [state.startDate, state.endDate],
39
+ filterChange: filterChange,
40
+ disabledDate: function disabledDate(current) {
41
+ return current && current > dayjs().endOf('day');
42
+ },
43
+ children: /*#__PURE__*/_jsx(Summary, {
44
+ startDay: startDay,
45
+ endDay: endDay
46
+ })
47
+ })
48
+ }), /*#__PURE__*/_jsx("div", {
49
+ className: 'vtx-restaurant-info-right-wrap-bottom',
50
+ children: /*#__PURE__*/_jsx(VmWrapper, {
51
+ title: '收运记录明细',
52
+ children: /*#__PURE__*/_jsx(DetailList, {
53
+ startDay: startDay,
54
+ endDay: endDay
55
+ })
56
+ })
57
+ })]
58
+ });
59
+ };
60
+ export default SummaryStatistics;
@@ -0,0 +1,74 @@
1
+ import { Badge, Col, Row, Space } from 'antd';
2
+ import { useContext } from 'react';
3
+ import { VmInfoCollection, VmTitle, VmWrapper } from "../../../_components";
4
+ import { signColorMap } from "../../config";
5
+ import { RestaurantContext } from "../../index";
6
+ import CollectRule from "./CollectRule";
7
+ import Info from "./Info";
8
+ import SummaryStatistics from "./SummaryStatistics";
9
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
10
+ var Basic = function Basic() {
11
+ var _data$contract;
12
+ var _useContext = useContext(RestaurantContext),
13
+ data = _useContext.info,
14
+ openUnit = _useContext.openUnit;
15
+ var contractItem = (data === null || data === void 0 || (_data$contract = data.contract) === null || _data$contract === void 0 ? void 0 : _data$contract[0]) || {};
16
+ var dataSource = [{
17
+ key: '',
18
+ label: '服务状态',
19
+ value: /*#__PURE__*/_jsxs(Space, {
20
+ children: [contractItem.status && /*#__PURE__*/_jsx(Badge, {
21
+ color: signColorMap[contractItem.status]
22
+ }), contractItem.statusStr || '--']
23
+ })
24
+ }, {
25
+ key: '',
26
+ label: '签约企业',
27
+ value: contractItem.signTransUnitName,
28
+ render: function render() {
29
+ return /*#__PURE__*/_jsx("a", {
30
+ onClick: function onClick() {
31
+ return openUnit && openUnit({
32
+ id: contractItem.signTransUnitId,
33
+ title: contractItem.signTransUnitName
34
+ });
35
+ },
36
+ children: contractItem.signTransUnitName
37
+ });
38
+ }
39
+ }];
40
+ return /*#__PURE__*/_jsxs(Row, {
41
+ gutter: [16, 16],
42
+ style: {
43
+ height: '100%'
44
+ },
45
+ children: [/*#__PURE__*/_jsx(Col, {
46
+ flex: '400px',
47
+ style: {
48
+ height: '100%'
49
+ },
50
+ children: /*#__PURE__*/_jsx(VmWrapper, {
51
+ title: '基本信息',
52
+ children: /*#__PURE__*/_jsxs("div", {
53
+ children: [/*#__PURE__*/_jsx(Info, {}), /*#__PURE__*/_jsx(VmTitle, {
54
+ title: '签约与信息'
55
+ }), /*#__PURE__*/_jsx(VmInfoCollection, {
56
+ data: dataSource,
57
+ horizontal: true,
58
+ ellipsis: true
59
+ }), /*#__PURE__*/_jsx(VmTitle, {
60
+ title: '收运规则'
61
+ }), /*#__PURE__*/_jsx(CollectRule, {})]
62
+ })
63
+ })
64
+ }), /*#__PURE__*/_jsx(Col, {
65
+ flex: '1',
66
+ style: {
67
+ height: '100%',
68
+ minWidth: 0
69
+ },
70
+ children: /*#__PURE__*/_jsx(SummaryStatistics, {})
71
+ })]
72
+ });
73
+ };
74
+ export default Basic;
@@ -0,0 +1,16 @@
1
+ .vtx-restaurant-rule_item {
2
+ border-radius: 8px 8px 8px 8px;
3
+ border: 1px solid var(--gray-line-color);
4
+ padding: 16px 16px 8px;
5
+ margin-top: 12px;
6
+ position: relative;
7
+ .vtx-restaurant-border {
8
+ width: 100%;
9
+ position: absolute;
10
+ left: 0;
11
+ top: -2px;
12
+ height: 44px;
13
+ border-radius: 8px 8px 0px 0px;
14
+ border-top: 2px solid var(--blue-color);
15
+ }
16
+ }
@@ -0,0 +1,171 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+ 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."); }
3
+ 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); }
4
+ 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; }
5
+ 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; } }
6
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
+ import { LeftOutlined, RightOutlined } from '@ant-design/icons';
8
+ import { useMemoizedFn } from 'ahooks';
9
+ import { Row } from 'antd';
10
+ import classnames from 'classnames';
11
+ import dayjs from 'dayjs';
12
+ import { isEmpty } from 'lodash';
13
+ import groupBy from 'lodash/groupBy';
14
+ import { useContext, useState } from 'react';
15
+ import { VmCalendar, VmTag, VmWrapper } from "../../../_components";
16
+ import useSettings from "../../../_hooks/useSettings";
17
+ import { BasicService } from "../../api";
18
+ import { RestaurantContext } from "../../index";
19
+ import "./index.less";
20
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
21
+ var CalendarContent = function CalendarContent(_ref) {
22
+ var isCollect = _ref.isCollect,
23
+ date = _ref.date,
24
+ collectList = _ref.collectList;
25
+ var _useSettings = useSettings(),
26
+ isDark = _useSettings.isDark;
27
+ var isAfter = dayjs().isAfter(date);
28
+ var _useState = useState(0),
29
+ _useState2 = _slicedToArray(_useState, 2),
30
+ currentIndex = _useState2[0],
31
+ setCurrentIndex = _useState2[1];
32
+ var collectItem = collectList[currentIndex];
33
+ var iconStyle = {
34
+ cursor: 'pointer',
35
+ color: isDark ? '#fff' : '#bfbfbf',
36
+ fontSize: 14
37
+ };
38
+ return /*#__PURE__*/_jsxs(_Fragment, {
39
+ children: [/*#__PURE__*/_jsx("div", {
40
+ className: 'cc_restaurant_calendar-dot',
41
+ children: /*#__PURE__*/_jsx("div", {
42
+ className: classnames('cc_restaurant_calendar_dot', {
43
+ gray: !isCollect
44
+ })
45
+ })
46
+ }), isAfter && collectList.length > 1 ? /*#__PURE__*/_jsxs("div", {
47
+ className: 'cc_restaurant_calendar-index-wrap',
48
+ children: [/*#__PURE__*/_jsx(LeftOutlined, {
49
+ style: iconStyle,
50
+ onClick: function onClick() {
51
+ if (currentIndex !== 0) {
52
+ setCurrentIndex(currentIndex - 1);
53
+ }
54
+ }
55
+ }), /*#__PURE__*/_jsxs("span", {
56
+ children: [currentIndex + 1, "/", collectList.length]
57
+ }), /*#__PURE__*/_jsx(RightOutlined, {
58
+ style: iconStyle,
59
+ onClick: function onClick() {
60
+ if (currentIndex !== collectList.length - 1) {
61
+ setCurrentIndex(currentIndex + 1);
62
+ }
63
+ }
64
+ })]
65
+ }) : null, /*#__PURE__*/_jsxs("div", {
66
+ className: 'cc_restaurant_calendar',
67
+ children: [!isEmpty(collectList) ? /*#__PURE__*/_jsxs("div", {
68
+ className: 'cc_restaurant_calendar-content',
69
+ children: [/*#__PURE__*/_jsxs(Row, {
70
+ align: 'middle',
71
+ justify: 'space-between',
72
+ children: [/*#__PURE__*/_jsx("div", {
73
+ children: collectItem !== null && collectItem !== void 0 && collectItem.weighTime ? dayjs(collectItem.weighTime).format('HH:mm:ss') : '--' || '--'
74
+ }), /*#__PURE__*/_jsx(VmTag, {
75
+ title: '已收集',
76
+ type: 'green'
77
+ })]
78
+ }), /*#__PURE__*/_jsxs("div", {
79
+ className: 'cc_restaurant_calendar-content-value',
80
+ style: {
81
+ height: 14
82
+ },
83
+ children: [collectItem === null || collectItem === void 0 ? void 0 : collectItem.trashNum, "\u6876 / ", collectItem === null || collectItem === void 0 ? void 0 : collectItem.netWeight, "kg"]
84
+ }), /*#__PURE__*/_jsx("div", {
85
+ className: 'cc_restaurant_calendar-content-item',
86
+ children: collectItem === null || collectItem === void 0 ? void 0 : collectItem.carCode
87
+ })]
88
+ }) : null, isEmpty(collectList) && isAfter && isCollect ? /*#__PURE__*/_jsx(VmTag, {
89
+ title: '未收集',
90
+ type: 'yellow',
91
+ style: {
92
+ width: '100%'
93
+ }
94
+ }) : null]
95
+ })]
96
+ });
97
+ };
98
+ var CollectCalendar = function CollectCalendar() {
99
+ var _useSettings2 = useSettings(),
100
+ isDark = _useSettings2.isDark;
101
+ var _useContext = useContext(RestaurantContext),
102
+ info = _useContext.info;
103
+ var syPointName = info.syPointName,
104
+ syPointId = info.syPointId,
105
+ id = info.id;
106
+ var _useState3 = useState(dayjs()),
107
+ _useState4 = _slicedToArray(_useState3, 2),
108
+ date = _useState4[0],
109
+ setDate = _useState4[1];
110
+ var calendarList = BasicService.useGetSyPointMonthDetail(syPointId, dayjs(date).format('YYYY-MM-DD'), dayjs(date).format('YYYY-MM'));
111
+ var collectList = BasicService.useDetailList({
112
+ id: id,
113
+ startTime: dayjs(date).startOf('month').format('YYYY-MM-DD 00:00:00'),
114
+ endTime: dayjs(date).endOf('month').format('YYYY-MM-DD 23:59:59')
115
+ });
116
+ var groupByDate = groupBy(collectList, function (item) {
117
+ return dayjs(item.weighTime).format('YYYY-MM-DD');
118
+ });
119
+ var dateCellRender = useMemoizedFn(function (_date) {
120
+ var dateStr = dayjs(_date).format('YYYY-MM-DD');
121
+ var isCollect = calendarList.includes(dateStr);
122
+ return dayjs(_date).isSame(date, 'month') && /*#__PURE__*/_jsx(CalendarContent, {
123
+ isCollect: isCollect,
124
+ date: dateStr,
125
+ collectList: groupByDate[dateStr] || []
126
+ });
127
+ });
128
+ return /*#__PURE__*/_jsx("div", {
129
+ className: classnames('cc_restaurant_calendar_wrap', {
130
+ dark: isDark
131
+ }),
132
+ children: /*#__PURE__*/_jsxs(VmWrapper, {
133
+ title: syPointName,
134
+ filterType: "monthPicker",
135
+ dateValue: date,
136
+ filterChange: setDate,
137
+ disabledDate: function disabledDate(current) {
138
+ return current && current > dayjs().endOf('M');
139
+ },
140
+ children: [/*#__PURE__*/_jsxs("div", {
141
+ className: 'cc_restaurant_calendar_title_wrap',
142
+ children: [/*#__PURE__*/_jsxs("div", {
143
+ className: 'cc_restaurant_calendar_title_item blue',
144
+ children: [/*#__PURE__*/_jsx("div", {
145
+ className: 'cc_restaurant_calendar_dot'
146
+ }), /*#__PURE__*/_jsx("span", {
147
+ children: "\u6536\u96C6\u65E5"
148
+ })]
149
+ }), /*#__PURE__*/_jsxs("div", {
150
+ className: 'cc_restaurant_calendar_title_item',
151
+ children: [/*#__PURE__*/_jsx("div", {
152
+ className: 'cc_restaurant_calendar_dot gray'
153
+ }), /*#__PURE__*/_jsx("span", {
154
+ className: 'cc_restaurant_calendar_title_wrap-text',
155
+ children: "\u4E0D\u6536\u96C6\u65E5"
156
+ })]
157
+ })]
158
+ }), /*#__PURE__*/_jsx(VmCalendar, {
159
+ headerRender: function headerRender() {
160
+ return null;
161
+ },
162
+ disabledDate: function disabledDate() {
163
+ return true;
164
+ },
165
+ dateCellRender: dateCellRender,
166
+ value: date
167
+ })]
168
+ })
169
+ });
170
+ };
171
+ export default CollectCalendar;
@@ -0,0 +1,93 @@
1
+ @import "../../../style/index.less";
2
+
3
+ .cc_restaurant_calendar_wrap {
4
+ @blue-color: #1677ff;
5
+ @green-color: #0FB964;
6
+ @red-color: #f5222d;
7
+ &.dark {
8
+ @base-color: #009dff;
9
+ @green-color: #13f97a;
10
+ @red-color: #ff5861;
11
+ }
12
+ .cc_restaurant_calendar_title_wrap {
13
+ display: flex;
14
+ align-items: center;
15
+ justify-content: center;
16
+ gap:16px;
17
+ .cc_restaurant_calendar_title_item {
18
+ display: flex;
19
+ align-items: center;
20
+ justify-content: center;
21
+ gap: 8px;
22
+ height: 28px;
23
+ border-radius: 8px;
24
+ padding: 0 8px;
25
+ &.blue {
26
+ background: fade(@blue-color, 10);
27
+ }
28
+ }
29
+ }
30
+ .cc_restaurant_calendar_dot {
31
+ width: 8px;
32
+ height: 8px;
33
+ background: @blue-color;
34
+ border-radius: 50%;
35
+ &.gray {
36
+ background: #b9b9b9;
37
+ }
38
+ }
39
+ .cc_restaurant_calendar {
40
+ &-status-wrap {
41
+ display: flex;
42
+ align-items: center;
43
+ justify-content: center;
44
+ height: 28px;
45
+ border-radius: 4px;
46
+ background: fade(@green-color, 10);
47
+ font-size: 14px;
48
+ color: @green-color;
49
+ gap: 8px;
50
+
51
+ &-error {
52
+ background: fade(@red-color, 10);
53
+ color: @red-color;
54
+ }
55
+ }
56
+ &-content {
57
+ padding: 8px;
58
+ background: fade(@green-color, 10);
59
+ border-radius: 8px 8px 8px 8px;
60
+ color: var(--info-color);
61
+ display: flex;
62
+ gap: 8px;
63
+ flex-direction: column;
64
+ &-value {
65
+ color: var(--gray-color);
66
+ }
67
+ &-item, &-value {
68
+ height: 14px;
69
+ line-height: 14px;
70
+ }
71
+ }
72
+
73
+ &-dot {
74
+ position: absolute;
75
+ right: 32px;
76
+ top: 12px;
77
+ }
78
+
79
+ &-index-wrap {
80
+ display: flex;
81
+ align-items: center;
82
+ gap: 4px;
83
+ position: absolute;
84
+ left: 8px;
85
+ top: 4px;
86
+ color: var(--label-color);
87
+ pointer-events: auto;
88
+ }
89
+ }
90
+ }
91
+
92
+
93
+
@@ -0,0 +1,86 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+ 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."); }
3
+ 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); }
4
+ 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; }
5
+ 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; } }
6
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
+ import { useSetState } from 'ahooks';
8
+ import { Row } from 'antd';
9
+ import dayjs from 'dayjs';
10
+ import { useContext } from 'react';
11
+ import { VmTitle, VmWrapper } from "../../../_components";
12
+ import { RestaurantContext } from "../../index";
13
+ import DetailList from "../Basic/DetailList";
14
+ import Summary from "../Basic/Summary";
15
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
16
+ var Collection = function Collection() {
17
+ var _useSetState = useSetState({
18
+ startDate: dayjs().subtract(30, 'day'),
19
+ endDate: dayjs()
20
+ }),
21
+ _useSetState2 = _slicedToArray(_useSetState, 2),
22
+ state = _useSetState2[0],
23
+ setState = _useSetState2[1];
24
+ var startDay = dayjs(state.startDate).format('YYYY-MM-DD');
25
+ var endDay = dayjs(state.endDate).format('YYYY-MM-DD');
26
+ var filterChange = function filterChange(dateValue) {
27
+ setState({
28
+ startDate: dateValue[0],
29
+ endDate: dateValue[1]
30
+ });
31
+ };
32
+ var _useContext = useContext(RestaurantContext),
33
+ date = _useContext.date;
34
+ return /*#__PURE__*/_jsxs(Row, {
35
+ gutter: [10, 10],
36
+ style: {
37
+ height: '100%'
38
+ },
39
+ children: [/*#__PURE__*/_jsx("div", {
40
+ style: {
41
+ height: 138,
42
+ width: '100%'
43
+ },
44
+ children: /*#__PURE__*/_jsx(VmWrapper, {
45
+ title: "\u4ECA\u65E5\u6536\u8FD0\u6C47\u603B(".concat(date, ")"),
46
+ children: /*#__PURE__*/_jsx(Summary, {
47
+ startDay: date,
48
+ endDay: date
49
+ })
50
+ })
51
+ }), /*#__PURE__*/_jsx("div", {
52
+ style: {
53
+ height: 'calc(100% - 148px)',
54
+ width: '100%'
55
+ },
56
+ children: /*#__PURE__*/_jsxs(VmWrapper, {
57
+ title: '历史收运汇总',
58
+ filterType: "rangePicker",
59
+ dateValue: [state.startDate, state.endDate],
60
+ filterChange: filterChange,
61
+ disabledDate: function disabledDate(current) {
62
+ return current && current > dayjs().endOf('day');
63
+ },
64
+ children: [/*#__PURE__*/_jsx(VmTitle, {
65
+ title: '产生汇总',
66
+ border: false
67
+ }), /*#__PURE__*/_jsx(Summary, {
68
+ startDay: startDay,
69
+ endDay: endDay
70
+ }), /*#__PURE__*/_jsx(VmTitle, {
71
+ title: '收运记录明细',
72
+ border: false
73
+ }), /*#__PURE__*/_jsx("div", {
74
+ style: {
75
+ height: 'calc(100% - 150px)'
76
+ },
77
+ children: /*#__PURE__*/_jsx(DetailList, {
78
+ startDay: startDay,
79
+ endDay: endDay
80
+ })
81
+ })]
82
+ })
83
+ })]
84
+ });
85
+ };
86
+ export default Collection;