@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,361 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
8
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
9
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
10
+ import { useAntdTable, useRequest } from 'ahooks';
11
+ import http from "../_util/http";
12
+ var query = /*#__PURE__*/function () {
13
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(url, params) {
14
+ var method,
15
+ extraHeader,
16
+ res,
17
+ _args = arguments;
18
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
19
+ while (1) switch (_context.prev = _context.next) {
20
+ case 0:
21
+ method = _args.length > 2 && _args[2] !== undefined ? _args[2] : 'get';
22
+ extraHeader = _args.length > 3 ? _args[3] : undefined;
23
+ _context.next = 4;
24
+ return http[method](url, {
25
+ body: params,
26
+ extraHeader: extraHeader
27
+ });
28
+ case 4:
29
+ res = _context.sent;
30
+ return _context.abrupt("return", res === null || res === void 0 ? void 0 : res.data);
31
+ case 6:
32
+ case "end":
33
+ return _context.stop();
34
+ }
35
+ }, _callee);
36
+ }));
37
+ return function query(_x, _x2) {
38
+ return _ref.apply(this, arguments);
39
+ };
40
+ }();
41
+ export var BasicService = {
42
+ useInfo: function useInfo(_ref2) {
43
+ var id = _ref2.id;
44
+ var _useRequest = useRequest(function () {
45
+ return query('/cloud/cc-reborn/api/v101/collectUnit/get', {
46
+ id: id,
47
+ coordinateType: 'wgs84'
48
+ }, 'get', {
49
+ desensitized: true
50
+ });
51
+ }, {
52
+ refreshDeps: [id],
53
+ ready: !!id
54
+ }),
55
+ data = _useRequest.data;
56
+ return {
57
+ basicInfo: data || {}
58
+ };
59
+ },
60
+ useStatistics: function useStatistics(_ref3) {
61
+ var id = _ref3.id,
62
+ garbageType = _ref3.garbageType,
63
+ startTime = _ref3.startTime,
64
+ endTime = _ref3.endTime;
65
+ var _useRequest2 = useRequest( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
66
+ var res;
67
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
68
+ while (1) switch (_context2.prev = _context2.next) {
69
+ case 0:
70
+ _context2.next = 2;
71
+ return Promise.all([query(garbageType === 'fqyz' ? '/cloud/cc-reborn/api/v101/oilWeight/summaryQuery' : '/cloud/cc-reborn/api/v101/rtCarDataDetail/getPageSummary', _objectSpread({
72
+ collectUnitId: id
73
+ }, garbageType === 'fqyz' ? {
74
+ weightTimeStart: startTime,
75
+ weightTimeEnd: endTime
76
+ } : {
77
+ queryStartTime: startTime,
78
+ queryEndTime: endTime
79
+ })), query('/cloud/cc-reborn/api/v101/weighbridge/getSum', {
80
+ collectUnitId: id,
81
+ queryStartTime: startTime,
82
+ queryEndTime: endTime
83
+ })]);
84
+ case 2:
85
+ res = _context2.sent;
86
+ return _context2.abrupt("return", _objectSpread(_objectSpread({}, res[0]), res[1]));
87
+ case 4:
88
+ case "end":
89
+ return _context2.stop();
90
+ }
91
+ }, _callee2);
92
+ })), {
93
+ refreshDeps: [id, startTime, endTime],
94
+ ready: !!id
95
+ }),
96
+ data = _useRequest2.data;
97
+ return data || {};
98
+ },
99
+ useFactoryList: function useFactoryList(_ref5) {
100
+ var id = _ref5.id,
101
+ startTime = _ref5.startTime,
102
+ endTime = _ref5.endTime;
103
+ var _useRequest3 = useRequest(function () {
104
+ return query('/cloud/cc-reborn/api/v101/weighbridge/list', {
105
+ collectUnitId: id,
106
+ queryStartTime: startTime,
107
+ queryEndTime: endTime
108
+ });
109
+ }, {
110
+ refreshDeps: [id, startTime, endTime]
111
+ }),
112
+ _useRequest3$data = _useRequest3.data,
113
+ data = _useRequest3$data === void 0 ? [] : _useRequest3$data;
114
+ return data || [];
115
+ },
116
+ useFactoryPage: function useFactoryPage(_ref6) {
117
+ var id = _ref6.id,
118
+ startTime = _ref6.startTime,
119
+ endTime = _ref6.endTime;
120
+ var _useAntdTable = useAntdTable( /*#__PURE__*/function () {
121
+ var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(_ref7) {
122
+ var current, pageSize, sorter, sort, order, field, data, dataSource, total;
123
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
124
+ while (1) switch (_context3.prev = _context3.next) {
125
+ case 0:
126
+ current = _ref7.current, pageSize = _ref7.pageSize, sorter = _ref7.sorter;
127
+ if (sorter && sorter.order) {
128
+ order = sorter.order, field = sorter.field;
129
+ sort = "".concat(field, ",").concat(order === 'descend' ? 'DESC' : 'ASC');
130
+ }
131
+ _context3.next = 4;
132
+ return query('/cloud/cc-reborn/api/v101/weighbridge/page', {
133
+ collectUnitId: id,
134
+ queryStartTime: startTime,
135
+ queryEndTime: endTime,
136
+ page: current - 1,
137
+ size: pageSize,
138
+ sort: sort
139
+ });
140
+ case 4:
141
+ data = _context3.sent;
142
+ dataSource = [], total = 0;
143
+ if (Array.isArray(data === null || data === void 0 ? void 0 : data.rows)) {
144
+ dataSource = data.rows.map(function (item) {
145
+ return _objectSpread(_objectSpread({}, item), {}, {
146
+ key: item.id
147
+ });
148
+ });
149
+ total = data.total;
150
+ }
151
+ return _context3.abrupt("return", {
152
+ total: total,
153
+ list: dataSource
154
+ });
155
+ case 8:
156
+ case "end":
157
+ return _context3.stop();
158
+ }
159
+ }, _callee3);
160
+ }));
161
+ return function (_x3) {
162
+ return _ref8.apply(this, arguments);
163
+ };
164
+ }(), {
165
+ refreshDeps: [id, startTime, endTime],
166
+ ready: !!id
167
+ }),
168
+ tableProps = _useAntdTable.tableProps;
169
+ return tableProps;
170
+ },
171
+ useRestaurantList: function useRestaurantList(_ref9) {
172
+ var fqyzSignUnitId = _ref9.fqyzSignUnitId,
173
+ fqyzSignStatus = _ref9.fqyzSignStatus,
174
+ ccSignStatus = _ref9.ccSignStatus,
175
+ name = _ref9.name,
176
+ ccSignUnitId = _ref9.ccSignUnitId;
177
+ var _useAntdTable2 = useAntdTable( /*#__PURE__*/function () {
178
+ var _ref11 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(_ref10) {
179
+ var current, pageSize, sorter, sort, order, field, data, dataSource, total;
180
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
181
+ while (1) switch (_context4.prev = _context4.next) {
182
+ case 0:
183
+ current = _ref10.current, pageSize = _ref10.pageSize, sorter = _ref10.sorter;
184
+ if (sorter && sorter.order) {
185
+ order = sorter.order, field = sorter.field;
186
+ sort = "".concat(field, ",").concat(order === 'descend' ? 'DESC' : 'ASC');
187
+ }
188
+ _context4.next = 4;
189
+ return query('/cloud/cc-reborn/api/v101/restaurant/page', {
190
+ fqyzSignUnitId: fqyzSignUnitId,
191
+ ccSignUnitId: ccSignUnitId,
192
+ fqyzSignStatus: fqyzSignStatus,
193
+ ccSignStatus: ccSignStatus,
194
+ name: name,
195
+ page: current - 1,
196
+ size: pageSize,
197
+ sort: sort
198
+ });
199
+ case 4:
200
+ data = _context4.sent;
201
+ dataSource = [], total = 0;
202
+ if (Array.isArray(data === null || data === void 0 ? void 0 : data.rows)) {
203
+ dataSource = data.rows.map(function (item) {
204
+ return _objectSpread(_objectSpread({}, item), {}, {
205
+ key: item.id
206
+ });
207
+ });
208
+ total = data.total;
209
+ }
210
+ return _context4.abrupt("return", {
211
+ total: total,
212
+ list: dataSource
213
+ });
214
+ case 8:
215
+ case "end":
216
+ return _context4.stop();
217
+ }
218
+ }, _callee4);
219
+ }));
220
+ return function (_x4) {
221
+ return _ref11.apply(this, arguments);
222
+ };
223
+ }(), {
224
+ refreshDeps: [ccSignUnitId, fqyzSignUnitId, name, fqyzSignStatus, ccSignStatus],
225
+ ready: !!(ccSignUnitId || fqyzSignUnitId),
226
+ throttleWait: 300
227
+ }),
228
+ tableProps = _useAntdTable2.tableProps;
229
+ return tableProps;
230
+ },
231
+ useCarList: function useCarList(_ref12) {
232
+ var id = _ref12.id,
233
+ carCode = _ref12.carCode;
234
+ var _useAntdTable3 = useAntdTable( /*#__PURE__*/function () {
235
+ var _ref14 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(_ref13) {
236
+ var current, pageSize, sorter, sort, order, field, data, dataSource, total;
237
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
238
+ while (1) switch (_context5.prev = _context5.next) {
239
+ case 0:
240
+ current = _ref13.current, pageSize = _ref13.pageSize, sorter = _ref13.sorter;
241
+ if (sorter && sorter.order) {
242
+ order = sorter.order, field = sorter.field;
243
+ sort = "".concat(field, ",").concat(order === 'descend' ? 'DESC' : 'ASC');
244
+ }
245
+ _context5.next = 4;
246
+ return query('/cloud/cc-reborn/api/v101/carDeviceInfo/page', {
247
+ manageUnitId: id,
248
+ carCode: carCode,
249
+ page: current - 1,
250
+ size: pageSize,
251
+ sort: sort
252
+ });
253
+ case 4:
254
+ data = _context5.sent;
255
+ dataSource = [], total = 0;
256
+ if (Array.isArray(data === null || data === void 0 ? void 0 : data.rows)) {
257
+ dataSource = data.rows.map(function (item) {
258
+ return _objectSpread(_objectSpread({}, item), {}, {
259
+ key: item.id
260
+ });
261
+ });
262
+ total = data.total;
263
+ }
264
+ return _context5.abrupt("return", {
265
+ total: total,
266
+ list: dataSource
267
+ });
268
+ case 8:
269
+ case "end":
270
+ return _context5.stop();
271
+ }
272
+ }, _callee5);
273
+ }));
274
+ return function (_x5) {
275
+ return _ref14.apply(this, arguments);
276
+ };
277
+ }(), {
278
+ refreshDeps: [carCode],
279
+ ready: !!id,
280
+ throttleWait: 300
281
+ }),
282
+ tableProps = _useAntdTable3.tableProps;
283
+ return tableProps;
284
+ },
285
+ useCollectList: function useCollectList(_ref15) {
286
+ var id = _ref15.id,
287
+ startTime = _ref15.startTime,
288
+ endTime = _ref15.endTime,
289
+ garbageType = _ref15.garbageType;
290
+ var _useAntdTable4 = useAntdTable( /*#__PURE__*/function () {
291
+ var _ref17 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(_ref16) {
292
+ var current, pageSize, sorter, sort, order, field, data, dataSource, total;
293
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
294
+ while (1) switch (_context6.prev = _context6.next) {
295
+ case 0:
296
+ current = _ref16.current, pageSize = _ref16.pageSize, sorter = _ref16.sorter;
297
+ if (sorter && sorter.order) {
298
+ order = sorter.order, field = sorter.field;
299
+ sort = "".concat(field, ",").concat(order === 'descend' ? 'DESC' : 'ASC');
300
+ }
301
+ _context6.next = 4;
302
+ return query(garbageType === 'fqyz' ? '/cloud/cc-reborn/api/v101/api/v101/oilWeight/page' : '/cloud/cc-reborn/api/v101/rtCarDataDetail/page', _objectSpread(_objectSpread({
303
+ collectUnitId: id
304
+ }, garbageType === 'fqyz' ? {
305
+ weightTimeStart: startTime,
306
+ weightTimeEnd: endTime
307
+ } : {
308
+ queryStartTime: startTime,
309
+ queryEndTime: endTime
310
+ }), {}, {
311
+ page: current - 1,
312
+ size: pageSize,
313
+ sort: sort
314
+ }));
315
+ case 4:
316
+ data = _context6.sent;
317
+ dataSource = [], total = 0;
318
+ if (Array.isArray(data === null || data === void 0 ? void 0 : data.rows)) {
319
+ dataSource = data.rows.map(function (item) {
320
+ return _objectSpread(_objectSpread({}, item), {}, {
321
+ key: item.id
322
+ });
323
+ });
324
+ total = data.total;
325
+ }
326
+ return _context6.abrupt("return", {
327
+ total: total,
328
+ list: dataSource
329
+ });
330
+ case 8:
331
+ case "end":
332
+ return _context6.stop();
333
+ }
334
+ }, _callee6);
335
+ }));
336
+ return function (_x6) {
337
+ return _ref17.apply(this, arguments);
338
+ };
339
+ }(), {
340
+ refreshDeps: [id, startTime, endTime],
341
+ ready: !!id
342
+ }),
343
+ tableProps = _useAntdTable4.tableProps;
344
+ return tableProps;
345
+ },
346
+ useSignEnum: function useSignEnum() {
347
+ var _useRequest4 = useRequest(function () {
348
+ return query('/cloud/cc-reborn/common/param/loadEnumValue?', {
349
+ enumName: 'CcRestaurantIsSignEnum'
350
+ });
351
+ }),
352
+ _useRequest4$data = _useRequest4.data,
353
+ data = _useRequest4$data === void 0 ? [] : _useRequest4$data;
354
+ return (data || []).map(function (item) {
355
+ return _objectSpread(_objectSpread({}, item), {}, {
356
+ label: item.name,
357
+ value: item.id
358
+ });
359
+ });
360
+ }
361
+ };
@@ -0,0 +1,69 @@
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 { useContext } from 'react';
8
+ import { VmTable } from "../../../_components";
9
+ import { BasicService } from "../../api";
10
+ import { CcUnitContext } from "../../index";
11
+ import { jsx as _jsx } from "react/jsx-runtime";
12
+ var CollectRecord = function CollectRecord(_ref) {
13
+ var id = _ref.id,
14
+ startTime = _ref.startTime,
15
+ endTime = _ref.endTime,
16
+ garbageType = _ref.garbageType;
17
+ var _useContext = useContext(CcUnitContext),
18
+ openRestaurant = _useContext.openRestaurant,
19
+ openCar = _useContext.openCar;
20
+ var tableProps = BasicService.useCollectList({
21
+ startTime: startTime,
22
+ endTime: endTime,
23
+ id: id,
24
+ garbageType: garbageType
25
+ });
26
+ var columns = [{
27
+ title: '产生单位',
28
+ dataIndex: 'restaurantName',
29
+ width: 100,
30
+ ellipsis: true,
31
+ render: function render(text, record) {
32
+ return text ? /*#__PURE__*/_jsx("a", {
33
+ onClick: function onClick() {
34
+ return openRestaurant && openRestaurant({
35
+ id: record.restaurantId,
36
+ title: record.restaurantName
37
+ });
38
+ },
39
+ children: text
40
+ }) : '-';
41
+ }
42
+ }, {
43
+ title: '垃圾净重(kg)',
44
+ dataIndex: 'netWeight',
45
+ width: 180,
46
+ align: 'right',
47
+ sorter: true
48
+ }, {
49
+ title: '车牌号',
50
+ dataIndex: 'carCode',
51
+ width: 100,
52
+ ellipsis: true,
53
+ render: function render(text, record) {
54
+ return /*#__PURE__*/_jsx("a", {
55
+ onClick: function onClick() {
56
+ return openCar && openCar({
57
+ id: record.carId,
58
+ title: record.carCode
59
+ });
60
+ },
61
+ children: text
62
+ });
63
+ }
64
+ }];
65
+ return /*#__PURE__*/_jsx(VmTable, _objectSpread(_objectSpread({}, tableProps), {}, {
66
+ columns: columns
67
+ }));
68
+ };
69
+ export default CollectRecord;
@@ -0,0 +1,66 @@
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 { useState } from 'react';
10
+ import { VmWrapper } from "../../../_components";
11
+ import CollectRecord from "./CollectRecord";
12
+ import Factory from "./Factory";
13
+ import { jsx as _jsx } from "react/jsx-runtime";
14
+ var DetailList = function DetailList(_ref) {
15
+ var id = _ref.id,
16
+ garbageType = _ref.garbageType;
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 filterChange = function filterChange(dateValue) {
25
+ setState({
26
+ startDate: dateValue[0],
27
+ endDate: dateValue[1]
28
+ });
29
+ };
30
+ var startTime = dayjs(state.startDate).format('YYYY-MM-DD 00:00:00');
31
+ var endTime = dayjs(state.endDate).format('YYYY-MM-DD 23:59:59');
32
+ var _useState = useState('collect'),
33
+ _useState2 = _slicedToArray(_useState, 2),
34
+ activeKey = _useState2[0],
35
+ setActiveKey = _useState2[1];
36
+ return /*#__PURE__*/_jsx(VmWrapper, {
37
+ tabList: [{
38
+ label: '收运明细',
39
+ key: 'collect'
40
+ }, {
41
+ label: '进厂明细',
42
+ key: 'factory'
43
+ }],
44
+ filterType: "rangePicker",
45
+ dateValue: [state.startDate, state.endDate],
46
+ filterChange: filterChange,
47
+ disabledDate: function disabledDate(current) {
48
+ return current && current > dayjs().endOf('day');
49
+ },
50
+ activeKey: activeKey,
51
+ onChangeTab: function onChangeTab(key) {
52
+ return setActiveKey(key);
53
+ },
54
+ children: activeKey === 'collect' ? /*#__PURE__*/_jsx(CollectRecord, {
55
+ id: id,
56
+ startTime: startTime,
57
+ endTime: endTime,
58
+ garbageType: garbageType
59
+ }) : /*#__PURE__*/_jsx(Factory, {
60
+ id: id,
61
+ startTime: startTime,
62
+ endTime: endTime
63
+ })
64
+ });
65
+ };
66
+ export default DetailList;
@@ -0,0 +1,60 @@
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 { useContext } from 'react';
8
+ import { VmTable } from "../../../_components";
9
+ import { BasicService } from "../../api";
10
+ import { CcUnitContext } from "../../index";
11
+ import { jsx as _jsx } from "react/jsx-runtime";
12
+ var Factory = function Factory(_ref) {
13
+ var id = _ref.id,
14
+ startTime = _ref.startTime,
15
+ endTime = _ref.endTime;
16
+ var _useContext = useContext(CcUnitContext),
17
+ openCar = _useContext.openCar;
18
+ var tableProps = BasicService.useFactoryPage({
19
+ startTime: startTime,
20
+ endTime: endTime,
21
+ id: id
22
+ });
23
+ var columns = [{
24
+ title: '车牌号',
25
+ dataIndex: 'carCode',
26
+ width: 100,
27
+ ellipsis: true,
28
+ render: function render(text, record) {
29
+ return /*#__PURE__*/_jsx("a", {
30
+ onClick: function onClick() {
31
+ return openCar && openCar({
32
+ id: record.carId,
33
+ title: record.carCode
34
+ });
35
+ },
36
+ children: text
37
+ });
38
+ }
39
+ }, {
40
+ title: '处置单位',
41
+ dataIndex: 'handleUnit',
42
+ width: 150,
43
+ ellipsis: true
44
+ }, {
45
+ title: '进厂时间',
46
+ dataIndex: 'grossDateTime',
47
+ width: 150,
48
+ sorter: true
49
+ }, {
50
+ title: '净重(kg)',
51
+ dataIndex: 'netWeight',
52
+ width: 120,
53
+ align: 'right',
54
+ sorter: true
55
+ }];
56
+ return /*#__PURE__*/_jsx(VmTable, _objectSpread(_objectSpread({}, tableProps), {}, {
57
+ columns: columns
58
+ }));
59
+ };
60
+ export default Factory;