@vtx/modals2 6.0.0-beta.1 → 6.0.0-beta.11

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 (152) hide show
  1. package/lib/_components/index.js +1 -0
  2. package/lib/_components/vm-appraisal-info/api.js +55 -0
  3. package/lib/_components/vm-appraisal-info/imgs/count.png +0 -0
  4. package/lib/_components/vm-appraisal-info/imgs/count_light.png +0 -0
  5. package/lib/_components/vm-appraisal-info/imgs/subtract.png +0 -0
  6. package/lib/_components/vm-appraisal-info/imgs/subtract_light.png +0 -0
  7. package/lib/_components/vm-appraisal-info/index.js +230 -0
  8. package/lib/_components/vm-appraisal-info/index.less +7 -0
  9. package/lib/_components/vm-bar-charts/index.js +1 -1
  10. package/lib/_components/vm-calendar/index.js +3 -4
  11. package/lib/_components/vm-card-statistics/index.less +27 -27
  12. package/lib/_components/vm-factor/index.js +2 -1
  13. package/lib/_components/vm-factor-list/index.less +11 -11
  14. package/lib/_components/vm-filter/index.js +8 -8
  15. package/lib/_components/vm-filter/style/index.less +7 -11
  16. package/lib/_components/vm-info-collection/index.js +3 -2
  17. package/lib/_components/vm-line-charts/index.js +4 -1
  18. package/lib/_components/vm-progress/index.js +2 -1
  19. package/lib/_components/vm-repair-maintain/index.js +34 -2
  20. package/lib/_components/vm-table/index.js +3 -3
  21. package/lib/_components/vm-tag/index.js +2 -1
  22. package/lib/_components/vm-title/index.js +2 -1
  23. package/lib/_components/vm-video/HistoryGrid.js +53 -3
  24. package/lib/_components/vm-video/RealtimeGrid.js +24 -3
  25. package/lib/_components/vm-video/index.js +99 -37
  26. package/lib/_components/vm-video/index.less +6 -2
  27. package/lib/_components/vm-wrapper/index.js +1 -1
  28. package/lib/_components/vm-wrapper/style/index.less +4 -2
  29. package/lib/_hooks/useGetChannels.js +20 -6
  30. package/lib/_service/index.js +7 -33
  31. package/lib/_util/http.js +32 -5
  32. package/lib/_util/index.js +6 -5
  33. package/lib/locales/en.json +140 -1
  34. package/lib/locales/zh-CN.json +142 -3
  35. package/lib/vtx-base-modal/Tabs/index.js +2 -1
  36. package/lib/vtx-base-modal/index.js +2 -1
  37. package/lib/vtx-car-modal/api.js +415 -25
  38. package/lib/vtx-car-modal/components/Info/index.js +1 -1
  39. package/lib/vtx-car-modal/components/Info/index.less +6 -6
  40. package/lib/vtx-car-modal/content/Common/EleUse/index.js +218 -0
  41. package/lib/vtx-car-modal/content/Common/EleUse/index.less +19 -0
  42. package/lib/vtx-car-modal/content/Common/OilConsumption/index.less +6 -6
  43. package/lib/vtx-car-modal/content/Common/OilUse/index.js +230 -0
  44. package/lib/vtx-car-modal/content/Common/OilUse/index.less +19 -0
  45. package/lib/vtx-car-modal/content/Common/OperationAnalysis/index.js +376 -0
  46. package/lib/vtx-car-modal/content/Common/OperationAnalysis/index.less +169 -0
  47. package/lib/vtx-car-modal/content/Common/WaterConsumption/index.less +6 -6
  48. package/lib/vtx-car-modal/content/Common/WaterUse/index.js +201 -0
  49. package/lib/vtx-car-modal/content/Common/WaterUse/index.less +19 -0
  50. package/lib/vtx-car-modal/content/Common/index.js +9 -1
  51. package/lib/vtx-car-modal/content/Ljsy/WorkRecord/Detail.js +2 -1
  52. package/lib/vtx-car-modal/imgs/czb_bg.png +0 -0
  53. package/lib/vtx-car-modal/imgs/czb_bg_dark.png +0 -0
  54. package/lib/vtx-car-modal/imgs/factor/bglyh.png +0 -0
  55. package/lib/vtx-car-modal/imgs/factor/bglyh_dark.png +0 -0
  56. package/lib/vtx-car-modal/imgs/factor/cdcs.png +0 -0
  57. package/lib/vtx-car-modal/imgs/factor/cdcs_dark.png +0 -0
  58. package/lib/vtx-car-modal/imgs/factor/cdje.png +0 -0
  59. package/lib/vtx-car-modal/imgs/factor/cdje_dark.png +0 -0
  60. package/lib/vtx-car-modal/imgs/factor/cdpc.png +0 -0
  61. package/lib/vtx-car-modal/imgs/factor/cdpc_dark.png +0 -0
  62. package/lib/vtx-car-modal/imgs/factor/dccdje.png +0 -0
  63. package/lib/vtx-car-modal/imgs/factor/dccdje_dark.png +0 -0
  64. package/lib/vtx-car-modal/imgs/factor/jscs.png +0 -0
  65. package/lib/vtx-car-modal/imgs/factor/jscs_dark.png +0 -0
  66. package/lib/vtx-car-modal/imgs/factor/jsje.png +0 -0
  67. package/lib/vtx-car-modal/imgs/factor/jsje_dark.png +0 -0
  68. package/lib/vtx-car-modal/imgs/factor/jsl.png +0 -0
  69. package/lib/vtx-car-modal/imgs/factor/jsl_dark.png +0 -0
  70. package/lib/vtx-car-modal/imgs/factor/jspc.png +0 -0
  71. package/lib/vtx-car-modal/imgs/factor/jspc_dark.png +0 -0
  72. package/lib/vtx-car-modal/imgs/factor/jycs.png +0 -0
  73. package/lib/vtx-car-modal/imgs/factor/jycs_dark.png +0 -0
  74. package/lib/vtx-car-modal/imgs/factor/jyje.png +0 -0
  75. package/lib/vtx-car-modal/imgs/factor/jyje_dark.png +0 -0
  76. package/lib/vtx-car-modal/imgs/factor/jyl.png +0 -0
  77. package/lib/vtx-car-modal/imgs/factor/jyl_dark.png +0 -0
  78. package/lib/vtx-car-modal/imgs/factor/ljwbcs.png +0 -0
  79. package/lib/vtx-car-modal/imgs/factor/ljwbcs_dark.png +0 -0
  80. package/lib/vtx-car-modal/imgs/factor/njzfy.png +0 -0
  81. package/lib/vtx-car-modal/imgs/factor/njzfy_dark.png +0 -0
  82. package/lib/vtx-car-modal/imgs/factor/qzxze.png +0 -0
  83. package/lib/vtx-car-modal/imgs/factor/qzxze_dark.png +0 -0
  84. package/lib/vtx-car-modal/imgs/factor/sgcs.png +0 -0
  85. package/lib/vtx-car-modal/imgs/factor/sgcs_dark.png +0 -0
  86. package/lib/vtx-car-modal/imgs/factor/sgfy.png +0 -0
  87. package/lib/vtx-car-modal/imgs/factor/sgfy_dark.png +0 -0
  88. package/lib/vtx-car-modal/imgs/factor/syxze.png +0 -0
  89. package/lib/vtx-car-modal/imgs/factor/syxze_dark.png +0 -0
  90. package/lib/vtx-car-modal/imgs/factor/wbzfy.png +0 -0
  91. package/lib/vtx-car-modal/imgs/factor/wbzfy_dark.png +0 -0
  92. package/lib/vtx-car-modal/imgs/factor/wzcs.png +0 -0
  93. package/lib/vtx-car-modal/imgs/factor/wzcs_dark.png +0 -0
  94. package/lib/vtx-car-modal/imgs/factor/wzkf.png +0 -0
  95. package/lib/vtx-car-modal/imgs/factor/wzkf_dark.png +0 -0
  96. package/lib/vtx-car-modal/imgs/factor/wzkfee.png +0 -0
  97. package/lib/vtx-car-modal/imgs/factor/wzkfee_dark.png +0 -0
  98. package/lib/vtx-car-modal/imgs/factor/xslc.png +0 -0
  99. package/lib/vtx-car-modal/imgs/factor/xslc_dark.png +0 -0
  100. package/lib/vtx-car-modal/imgs/factor/ydcb.png +0 -0
  101. package/lib/vtx-car-modal/imgs/factor/ydcb_dark.png +0 -0
  102. package/lib/vtx-car-modal/imgs/factor/yhcb.png +0 -0
  103. package/lib/vtx-car-modal/imgs/factor/yhcb_dark.png +0 -0
  104. package/lib/vtx-car-modal/imgs/factor/yscb.png +0 -0
  105. package/lib/vtx-car-modal/imgs/factor/yscb_dark.png +0 -0
  106. package/lib/vtx-car-modal/imgs/zjl.png +0 -0
  107. package/lib/vtx-car-modal/imgs/zjl_dark.png +0 -0
  108. package/lib/vtx-car-modal/index.js +31 -9
  109. package/lib/vtx-cc-cp-modal/components/Calendar/index.js +3 -3
  110. package/lib/vtx-cc-unit-modal/components/BaseInfo/index.less +6 -6
  111. package/lib/vtx-cp-modal/components/BaseInfo/CarWork.js +2 -5
  112. package/lib/vtx-cp-modal/components/BaseInfo/TodayWork.js +7 -1
  113. package/lib/vtx-cp-modal/components/ExeceptionInfo/AlarmRecord.js +8 -4
  114. package/lib/vtx-cp-modal/components/SyInfo/Ljcsl.js +2 -2
  115. package/lib/vtx-cp-modal/index.js +12 -12
  116. package/lib/vtx-default-modal/index.js +7 -6
  117. package/lib/vtx-device-modal/components/DataAnalysis/index.less +66 -66
  118. package/lib/vtx-df-modal/components/BaseInfo/Jczbqs.js +2 -2
  119. package/lib/vtx-df-modal/components/BaseInfoZdReborn/Jczbqs.js +2 -2
  120. package/lib/vtx-df-modal/components/WorkCondition/Table.js +2 -2
  121. package/lib/vtx-df-modal/index.js +7 -15
  122. package/lib/vtx-kh-modal/components/Record/index.js +1 -205
  123. package/lib/vtx-restaurant-modal/components/Basic/index.less +16 -16
  124. package/lib/vtx-restaurant-modal/components/Calendar/index.js +3 -3
  125. package/lib/vtx-restaurant-modal/components/SignAndContract/ContactDetail.js +50 -33
  126. package/lib/vtx-restaurant-modal/components/SignAndContract/index.js +3 -3
  127. package/lib/vtx-road-modal/components/BaseInfo/Work.js +9 -1
  128. package/lib/vtx-road-modal/components/LaneBaseInfo/Work.js +8 -1
  129. package/lib/vtx-road-modal/components/LaneCalendar/index.js +3 -0
  130. package/lib/vtx-road-modal/index.js +6 -3
  131. package/lib/vtx-road-modal/utils/url.js +12 -0
  132. package/lib/vtx-shxq-modal/api.js +2 -2
  133. package/lib/vtx-shxq-modal/components/ThrowCalendar/List.js +2 -2
  134. package/lib/vtx-shxq-modal/index.js +21 -4
  135. package/lib/vtx-staff-modal/components/AlarmInfo/Charts.js +4 -1
  136. package/lib/vtx-tfd-modal/components/BaseInfo/Jczbqs.js +2 -2
  137. package/lib/vtx-wr-modal/index.js +28 -7
  138. package/lib/vtx-zf-modal/components/CkEditorCustom/view.js +4 -1
  139. package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/editableDiv/FormView.js +5 -4
  140. package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/editableDiv/index.js +10 -5
  141. package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/input/FormView.js +7 -6
  142. package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/input/date.js +10 -5
  143. package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/input/index.js +10 -5
  144. package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/radio/FormView.js +6 -5
  145. package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/radio/checkbox.js +10 -5
  146. package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/radio/index.js +10 -5
  147. package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/sign/FormView.js +7 -6
  148. package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/sign/index.js +12 -7
  149. package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/textarea/FormView.js +6 -5
  150. package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/textarea/index.js +10 -5
  151. package/lib/vtx-zzz-modal/index.js +30 -24
  152. package/package.json +92 -92
@@ -0,0 +1,376 @@
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 { useSetState } from 'ahooks';
14
+ import dayjs from 'dayjs';
15
+ import sumby from 'lodash/sumBy';
16
+ import { useContext } from 'react';
17
+ import { VmFactor, VmPieCharts, VmTable, VmTag, VmWrapper } from "../../../../_components";
18
+ import useSettings from "../../../../_hooks/useSettings";
19
+ import { MaintenanceService } from "../../../api";
20
+ import { CarContext } from "../../../index";
21
+ import "./index.less";
22
+ import { sumBy } from 'lodash';
23
+ import { translateLocaleText } from "./../../../../hooks/useTranslation.js";
24
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
25
+ var WaterUse = function WaterUse() {
26
+ var _useSettings = useSettings(),
27
+ isDark = _useSettings.isDark;
28
+ var _useContext = useContext(CarContext),
29
+ id = _useContext.id,
30
+ sDate = _useContext.startDate,
31
+ eDate = _useContext.endDate;
32
+ var _useSetState = useSetState({
33
+ startDate: sDate ? sDate : dayjs().subtract(6, 'day'),
34
+ endDate: eDate ? eDate : dayjs()
35
+ }),
36
+ _useSetState2 = _slicedToArray(_useSetState, 2),
37
+ state = _useSetState2[0],
38
+ setState = _useSetState2[1];
39
+ var startDate = dayjs(state.startDate).format('YYYY-MM-DD');
40
+ var endDate = dayjs(state.endDate).format('YYYY-MM-DD');
41
+ var _MaintenanceService$u = MaintenanceService.useInsuranceSummary(id, startDate, endDate),
42
+ insuranceSummary = _MaintenanceService$u.insuranceSummary;
43
+ var _MaintenanceService$u2 = MaintenanceService.useCurrentInsurance(id, startDate, endDate),
44
+ currentInsurance = _MaintenanceService$u2.currentInsurance,
45
+ loading = _MaintenanceService$u2.loading;
46
+ var _MaintenanceService$u3 = MaintenanceService.useInspectSummary(id, startDate, endDate),
47
+ inspectSummary = _MaintenanceService$u3.inspectSummary;
48
+ var _MaintenanceService$u4 = MaintenanceService.useCurrentSummary(id, startDate, endDate),
49
+ currentInspect = _MaintenanceService$u4.currentInspect;
50
+ var _MaintenanceService$u5 = MaintenanceService.useMaintainTypeSummary(id, startDate, endDate),
51
+ maintainTypeSummary = _MaintenanceService$u5.maintainTypeSummary;
52
+ var _MaintenanceService$u6 = MaintenanceService.useDepreciationSummary(id, startDate, endDate),
53
+ depreciationSummary = _MaintenanceService$u6.depreciationSummary;
54
+ var _MaintenanceService$u7 = MaintenanceService.useAccidentSummary(id, startDate, endDate),
55
+ accidentSummary = _MaintenanceService$u7.accidentSummary;
56
+ var _MaintenanceService$u8 = MaintenanceService.useAccidentTypeSummary(id, startDate, endDate),
57
+ accidentTypeSummary = _MaintenanceService$u8.accidentTypeSummary;
58
+ var _MaintenanceService$u9 = MaintenanceService.useViolationSummary(id, startDate, endDate),
59
+ violationSummary = _MaintenanceService$u9.violationSummary;
60
+ var _MaintenanceService$u10 = MaintenanceService.useViolationTypeSummary(id, startDate, endDate),
61
+ violationTypeSummary = _MaintenanceService$u10.violationTypeSummary;
62
+ var columns = [{
63
+ title: translateLocaleText("t('vtxcarmodal.insuranceType')"),
64
+ dataIndex: 'insuranceTypeName',
65
+ key: 'insuranceTypeName',
66
+ width: '20%',
67
+ ellipsis: true
68
+ }, {
69
+ title: translateLocaleText("t('vtxcarmodal.insuredAmountYuan')"),
70
+ dataIndex: 'insuranceMoney',
71
+ key: 'insuranceMoney',
72
+ width: '20%',
73
+ align: 'right',
74
+ ellipsis: true
75
+ }, {
76
+ title: translateLocaleText("t('vtxcarmodal.expirationTime')"),
77
+ dataIndex: 'dueDate',
78
+ key: 'dueDate',
79
+ width: '20%',
80
+ ellipsis: true
81
+ }, {
82
+ title: translateLocaleText("t('vtxcarmodal.remainingDaysDays')"),
83
+ dataIndex: 'remainDays',
84
+ key: 'remainDays',
85
+ width: '20%',
86
+ ellipsis: true
87
+ }, {
88
+ title: translateLocaleText("t('common.status')"),
89
+ dataIndex: 'statusName',
90
+ key: 'statusName',
91
+ width: '15%',
92
+ render: function render(text, record) {
93
+ return /*#__PURE__*/_jsx(VmTag, {
94
+ type: record.status === 'normal' ? 'green' : record.status === 'soon' ? 'yellow' : 'red',
95
+ title: text
96
+ });
97
+ }
98
+ }];
99
+ var tableProps = {
100
+ pagination: false,
101
+ height: 150,
102
+ dataSource: currentInsurance,
103
+ loading: loading
104
+ };
105
+ var formatAmount = function formatAmount(value) {
106
+ var num = Number(value);
107
+ return Number.isFinite(num) ? num.toLocaleString('en-US', {
108
+ minimumFractionDigits: 2,
109
+ maximumFractionDigits: 2
110
+ }) : '0.00';
111
+ };
112
+ var depreciationRate = depreciationSummary !== null && depreciationSummary !== void 0 && depreciationSummary.procurementAmt ? ((depreciationSummary === null || depreciationSummary === void 0 ? void 0 : depreciationSummary.depreciationVal) / (depreciationSummary === null || depreciationSummary === void 0 ? void 0 : depreciationSummary.procurementAmt) * 100).toFixed(2) : '0';
113
+ var depreciationRows = [{
114
+ label: translateLocaleText("t('vtxcarmodal.purchaseAmount')"),
115
+ value: depreciationSummary === null || depreciationSummary === void 0 ? void 0 : depreciationSummary.procurementAmt
116
+ }, {
117
+ label: translateLocaleText("t('vtxcarmodal.depreciatedAmount')"),
118
+ value: depreciationSummary === null || depreciationSummary === void 0 ? void 0 : depreciationSummary.depreciationVal
119
+ }, {
120
+ label: translateLocaleText("t('vtxcarmodal.remainingDepreciationAmount')"),
121
+ value: depreciationSummary === null || depreciationSummary === void 0 ? void 0 : depreciationSummary.reDepreciationVal
122
+ }];
123
+ return /*#__PURE__*/_jsxs("div", {
124
+ className: "vtx-car-water-opt-wrap ".concat(isDark ? 'dark' : ''),
125
+ children: [/*#__PURE__*/_jsxs(VmWrapper, {
126
+ title: translateLocaleText("t('vtxcarmodal.insuranceInformation')"),
127
+ children: [/*#__PURE__*/_jsx("div", {
128
+ className: "vtx-car-water-opt-row2",
129
+ children: [{
130
+ name: translateLocaleText("t('vtxcarmodal.compulsoryInsuranceTotalAmount')"),
131
+ unit: translateLocaleText("t('common.unit.yuan')"),
132
+ value: (insuranceSummary === null || insuranceSummary === void 0 ? void 0 : insuranceSummary.compulsoryInsuranceMoney) || 0,
133
+ icon: 'qzxze'
134
+ }, {
135
+ name: translateLocaleText("t('vtxcarmodal.commercialInsuranceTotalAmount')"),
136
+ unit: translateLocaleText("t('common.unit.yuan')"),
137
+ value: (insuranceSummary === null || insuranceSummary === void 0 ? void 0 : insuranceSummary.commercialInsuranceMoney) || 0,
138
+ icon: 'syxze'
139
+ }].map(function (ele) {
140
+ return /*#__PURE__*/_jsx(VmFactor, {
141
+ name: translateLocaleText(ele.name),
142
+ unit: ele.unit,
143
+ value: ele.value,
144
+ img: require("../../../imgs/factor/".concat(ele.icon).concat(isDark ? '_dark' : '', ".png"))
145
+ }, ele.name);
146
+ })
147
+ }), /*#__PURE__*/_jsx(VmTable, _objectSpread(_objectSpread({
148
+ columns: columns,
149
+ rowKey: "id"
150
+ }, tableProps), {}, {
151
+ size: "small"
152
+ }))]
153
+ }), /*#__PURE__*/_jsxs(VmWrapper, {
154
+ title: translateLocaleText("t('vtxcarmodal.annualInspectionInformation')"),
155
+ children: [/*#__PURE__*/_jsx("div", {
156
+ className: "vtx-car-water-opt-row2",
157
+ children: [{
158
+ name: translateLocaleText("t('vtxcarmodal.annualInspectionTotalFee')"),
159
+ unit: translateLocaleText("t('common.unit.yuan')"),
160
+ value: (inspectSummary === null || inspectSummary === void 0 ? void 0 : inspectSummary.inspectMoney) || 0,
161
+ icon: 'njzfy'
162
+ }].map(function (ele) {
163
+ return /*#__PURE__*/_jsx(VmFactor, {
164
+ name: translateLocaleText(ele.name),
165
+ unit: ele.unit,
166
+ value: ele.value,
167
+ img: require("../../../imgs/factor/".concat(ele.icon).concat(isDark ? '_dark' : '', ".png"))
168
+ }, ele.name);
169
+ })
170
+ }), /*#__PURE__*/_jsx(VmWrapper, {
171
+ title: translateLocaleText("t('vtxcarmodal.currentAnnualInspection')"),
172
+ style: {
173
+ height: 134
174
+ },
175
+ headerStyle: {
176
+ fontSize: 14,
177
+ height: '40px',
178
+ lineHeight: '40px',
179
+ padding: '0 16px',
180
+ background: !isDark ? '#E8E8E8' : 'rgba(0,157,255,0.2)',
181
+ border: "1px solid ".concat(isDark ? 'rgba(0,157,255,0.2)' : '#E8E8E8')
182
+ },
183
+ extra: currentInspect !== null && currentInspect !== void 0 && currentInspect.status ? /*#__PURE__*/_jsx(VmTag, {
184
+ type: (currentInspect === null || currentInspect === void 0 ? void 0 : currentInspect.status) === 'normal' ? 'green' : (currentInspect === null || currentInspect === void 0 ? void 0 : currentInspect.statu) === 'soon' ? 'yellow' : 'red',
185
+ title: (currentInspect === null || currentInspect === void 0 ? void 0 : currentInspect.statusName) || ''
186
+ }) : null,
187
+ children: /*#__PURE__*/_jsx("div", {
188
+ className: "vtx-car-water-opt-row",
189
+ style: {
190
+ gridTemplateColumns: '1fr 1fr',
191
+ gap: 16
192
+ },
193
+ children: [{
194
+ name: translateLocaleText("t('vtxcarmodal.annualInspectionDate')"),
195
+ value: currentInspect === null || currentInspect === void 0 ? void 0 : currentInspect.inspectDate
196
+ }, {
197
+ name: translateLocaleText("t('vtxcarmodal.annualInspectionFeeYuan')"),
198
+ value: currentInspect === null || currentInspect === void 0 ? void 0 : currentInspect.inspectMoney
199
+ }, {
200
+ name: translateLocaleText("t('vtxcarmodal.date2')"),
201
+ value: currentInspect === null || currentInspect === void 0 ? void 0 : currentInspect.dueDate
202
+ }, {
203
+ name: translateLocaleText("t('vtxcarmodal.remainingDays')"),
204
+ value: currentInspect === null || currentInspect === void 0 ? void 0 : currentInspect.remainDays
205
+ }].map(function (ele) {
206
+ return /*#__PURE__*/_jsxs("div", {
207
+ children: [/*#__PURE__*/_jsx("label", {
208
+ children: ele.name
209
+ }), ": ", /*#__PURE__*/_jsx("span", {
210
+ children: ele.value || '-'
211
+ })]
212
+ }, ele.name);
213
+ })
214
+ })
215
+ })]
216
+ }), /*#__PURE__*/_jsx("div", {
217
+ className: "vtx-car-water-opt-summary2",
218
+ children: /*#__PURE__*/_jsxs(VmWrapper, {
219
+ title: translateLocaleText("t('vtxcarmodal.maintenanceInformation')"),
220
+ children: [/*#__PURE__*/_jsx("div", {
221
+ className: "vtx-car-water-opt-row2",
222
+ children: [{
223
+ name: translateLocaleText("t('vtxcarmodal.cumulativeMaintenanceCount')"),
224
+ unit: translateLocaleText("t('common.unit.times')"),
225
+ value: sumBy(maintainTypeSummary || [], 'maintainCount'),
226
+ icon: 'ljwbcs'
227
+ }, {
228
+ name: translateLocaleText("t('vtxcarmodal.maintenanceTotalFee')"),
229
+ unit: translateLocaleText("t('common.unit.yuan')"),
230
+ value: sumBy(maintainTypeSummary || [], 'maintainMoney'),
231
+ icon: 'wbzfy'
232
+ }].map(function (ele) {
233
+ return /*#__PURE__*/_jsx(VmFactor, {
234
+ name: translateLocaleText(ele.name),
235
+ unit: ele.unit,
236
+ value: ele.value,
237
+ img: require("../../../imgs/factor/".concat(ele.icon).concat(isDark ? '_dark' : '', ".png"))
238
+ }, ele.name);
239
+ })
240
+ }), /*#__PURE__*/_jsx(VmPieCharts, {
241
+ dataList: maintainTypeSummary || [],
242
+ name: translateLocaleText("t('vtxcarmodal.typeAnalysis')"),
243
+ total: sumBy(maintainTypeSummary || [], 'value'),
244
+ unit: translateLocaleText("t('common.unit.times')"),
245
+ loading: loading,
246
+ height: "150px"
247
+ })]
248
+ })
249
+ }), /*#__PURE__*/_jsx("div", {
250
+ className: "vtx-car-water-opt-summary2",
251
+ children: /*#__PURE__*/_jsx(VmWrapper, {
252
+ title: translateLocaleText("t('vtxcarmodal.depreciationInformation')"),
253
+ children: /*#__PURE__*/_jsxs("div", {
254
+ className: "vtx-car-depreciation-content",
255
+ children: [/*#__PURE__*/_jsxs("div", {
256
+ className: "vtx-car-depreciation-residual",
257
+ style: {
258
+ backgroundImage: "url(".concat(require("../../../imgs/czb_bg".concat(isDark ? '_dark' : '', ".png")), ")")
259
+ },
260
+ children: [/*#__PURE__*/_jsx("div", {
261
+ className: "vtx-car-depreciation-label",
262
+ children: translateLocaleText("t('vtxcarmodal.residualValueRatio')")
263
+ }), /*#__PURE__*/_jsxs("div", {
264
+ className: "vtx-car-depreciation-percent",
265
+ children: [(depreciationSummary === null || depreciationSummary === void 0 ? void 0 : depreciationSummary.residualValueRatio) || 0, /*#__PURE__*/_jsx("span", {
266
+ children: "%"
267
+ })]
268
+ })]
269
+ }), /*#__PURE__*/_jsx("div", {
270
+ className: "vtx-car-depreciation-bars",
271
+ children: depreciationRows.map(function (item) {
272
+ return /*#__PURE__*/_jsxs("div", {
273
+ className: "vtx-car-depreciation-bar",
274
+ children: [/*#__PURE__*/_jsx("span", {
275
+ children: item.label
276
+ }), /*#__PURE__*/_jsxs("strong", {
277
+ children: [formatAmount(item.value), /*#__PURE__*/_jsx("em", {
278
+ children: translateLocaleText("t('common.unit.yuan')")
279
+ })]
280
+ })]
281
+ }, item.label);
282
+ })
283
+ }), /*#__PURE__*/_jsxs("div", {
284
+ className: "vtx-car-depreciation-rate",
285
+ children: [/*#__PURE__*/_jsx("div", {
286
+ className: "vtx-car-depreciation-rate-img",
287
+ style: {
288
+ backgroundImage: "url(".concat(require("../../../imgs/zjl".concat(isDark ? '_dark' : '', ".png")), ")")
289
+ }
290
+ }), /*#__PURE__*/_jsxs("div", {
291
+ children: [/*#__PURE__*/_jsx("div", {
292
+ className: "vtx-car-depreciation-label",
293
+ children: translateLocaleText("t('vtxcarmodal.depreciationRate')")
294
+ }), /*#__PURE__*/_jsxs("div", {
295
+ className: "vtx-car-depreciation-rate-value",
296
+ children: [depreciationRate, "%"]
297
+ })]
298
+ })]
299
+ })]
300
+ })
301
+ })
302
+ }), /*#__PURE__*/_jsx("div", {
303
+ className: "vtx-car-water-opt-summary2",
304
+ children: /*#__PURE__*/_jsxs(VmWrapper, {
305
+ title: translateLocaleText("t('vtxcarmodal.accidentInformation')"),
306
+ children: [/*#__PURE__*/_jsx("div", {
307
+ className: "vtx-car-water-opt-row2",
308
+ children: [{
309
+ name: translateLocaleText("t('vtxcarmodal.accidentCount')"),
310
+ unit: translateLocaleText("t('common.unit.times')"),
311
+ value: (accidentSummary === null || accidentSummary === void 0 ? void 0 : accidentSummary.accidentCount) || 0,
312
+ icon: 'sgcs'
313
+ }, {
314
+ name: translateLocaleText("t('vtxcarmodal.accidentFee')"),
315
+ unit: translateLocaleText("t('common.unit.yuan')"),
316
+ value: (accidentSummary === null || accidentSummary === void 0 ? void 0 : accidentSummary.accidentFee) || 0,
317
+ icon: 'sgfy'
318
+ }].map(function (ele) {
319
+ return /*#__PURE__*/_jsx(VmFactor, {
320
+ name: translateLocaleText(ele.name),
321
+ unit: ele.unit,
322
+ value: ele.value,
323
+ img: require("../../../imgs/factor/".concat(ele.icon).concat(isDark ? '_dark' : '', ".png"))
324
+ }, ele.name);
325
+ })
326
+ }), /*#__PURE__*/_jsx(VmPieCharts, {
327
+ dataList: accidentTypeSummary || [],
328
+ name: translateLocaleText("t('vtxcarmodal.accidentTypeAnalysis')"),
329
+ total: sumby(accidentTypeSummary || [], 'value'),
330
+ unit: translateLocaleText("t('common.unit.times')"),
331
+ loading: loading,
332
+ height: "150px"
333
+ })]
334
+ })
335
+ }), /*#__PURE__*/_jsx("div", {
336
+ className: "vtx-car-water-opt-summary2",
337
+ children: /*#__PURE__*/_jsxs(VmWrapper, {
338
+ title: translateLocaleText("t('vtxcarmodal.violationInformation')"),
339
+ children: [/*#__PURE__*/_jsx("div", {
340
+ className: "vtx-car-water-opt-row2",
341
+ children: [{
342
+ name: translateLocaleText("t('vtxcarmodal.violationCount')"),
343
+ unit: translateLocaleText("t('common.unit.times')"),
344
+ value: (violationSummary === null || violationSummary === void 0 ? void 0 : violationSummary.violationCount) || 0,
345
+ icon: 'wzcs'
346
+ }, {
347
+ name: translateLocaleText("t('vtxcarmodal.violationDeduction')"),
348
+ unit: translateLocaleText("t('common.unit.score')"),
349
+ value: (violationSummary === null || violationSummary === void 0 ? void 0 : violationSummary.violationScore) || 0,
350
+ icon: 'wzkf'
351
+ }, {
352
+ name: translateLocaleText("t('vtxcarmodal.violationFee')"),
353
+ unit: translateLocaleText("t('common.unit.yuan')"),
354
+ value: (violationSummary === null || violationSummary === void 0 ? void 0 : violationSummary.violationFee) || 0,
355
+ icon: 'wzkfee'
356
+ }].map(function (ele) {
357
+ return /*#__PURE__*/_jsx(VmFactor, {
358
+ name: translateLocaleText(ele.name),
359
+ unit: ele.unit,
360
+ value: ele.value,
361
+ img: require("../../../imgs/factor/".concat(ele.icon).concat(isDark ? '_dark' : '', ".png"))
362
+ }, ele.name);
363
+ })
364
+ }), /*#__PURE__*/_jsx(VmPieCharts, {
365
+ dataList: violationTypeSummary || [],
366
+ name: translateLocaleText("t('vtxcarmodal.violationTypeAnalysis')"),
367
+ total: sumBy(violationTypeSummary || [], 'value'),
368
+ unit: translateLocaleText("t('common.unit.times')"),
369
+ loading: loading,
370
+ height: "150px"
371
+ })]
372
+ })
373
+ })]
374
+ });
375
+ };
376
+ export default WaterUse;
@@ -0,0 +1,169 @@
1
+ .vtx-car-water-opt-wrap {
2
+ height: 100%;
3
+ display: flex;
4
+ flex-flow: wrap;
5
+ gap: 16px;
6
+ .vtx-car-water-opt-summary {
7
+ height: 260px;
8
+ display: flex;
9
+ gap: 16px;
10
+ flex-shrink: 0;
11
+ }
12
+ .vtx-car-water-opt-summary2 {
13
+ width: calc((100% - 16px) / 2);
14
+ height: 300px;
15
+ }
16
+ > .div-wrapper {
17
+ width: calc((100% - 16px) / 2);
18
+ height: auto;
19
+ min-width: 0;
20
+ }
21
+ .ant-empty {
22
+ margin: 0 auto;
23
+ }
24
+
25
+ .vtx-car-water-opt-row {
26
+ display: grid;
27
+ grid-template-columns: repeat(3, 1fr);
28
+ margin-bottom: 16px;
29
+ }
30
+
31
+ .vtx-car-water-opt-row2 {
32
+ display: flex;
33
+ justify-content: space-evenly;
34
+ margin-bottom: 16px;
35
+ }
36
+
37
+ .vtx-car-depreciation-content {
38
+ height: 242px;
39
+ display: flex;
40
+ align-items: center;
41
+ box-sizing: border-box;
42
+ }
43
+
44
+ .vtx-car-depreciation-residual {
45
+ width: 132px;
46
+ height: 158px;
47
+ padding: 20px 19px;
48
+ display: flex;
49
+ flex-direction: column;
50
+ justify-content: flex-start;
51
+ box-sizing: border-box;
52
+ background-repeat: no-repeat;
53
+ background-size: 100% 100%;
54
+ }
55
+
56
+ .vtx-car-depreciation-label {
57
+ color: rgba(0, 0, 0, 55%);
58
+ font-size: 14px;
59
+ line-height: 20px;
60
+ white-space: wrap;
61
+ }
62
+
63
+ .vtx-car-depreciation-percent {
64
+ margin-top: 18px;
65
+ color: #111;
66
+ font-size: 28px;
67
+ font-weight: 700;
68
+ line-height: 40px;
69
+
70
+ span {
71
+ margin-left: 4px;
72
+ font-size: 17px;
73
+ font-weight: 700;
74
+ }
75
+ }
76
+
77
+ .vtx-car-depreciation-bars {
78
+ flex: 1;
79
+ min-width: 0;
80
+ margin: 0 16px;
81
+ display: flex;
82
+ flex-direction: column;
83
+ gap: 16px;
84
+ }
85
+
86
+ .vtx-car-depreciation-bar {
87
+ width: 283px;
88
+ position: relative;
89
+ height: 42px;
90
+ padding: 0 32px 0 13px;
91
+ display: flex;
92
+ align-items: center;
93
+ justify-content: space-between;
94
+ box-sizing: border-box;
95
+ color: #fff;
96
+ background: linear-gradient(90deg, #4f86f6 0%, #5a8ffb 100%);
97
+ border-radius: 4px;
98
+ box-shadow: 0 2px 6px rgba(67, 123, 229, 20%);
99
+ clip-path: polygon(0 0, 100% 0, calc(100% - 18px) 100%, 0 100%);
100
+
101
+ &:first-child {
102
+ width: 303px;
103
+ }
104
+
105
+ &:last-child {
106
+ width: 263px;
107
+ }
108
+
109
+ span {
110
+ font-size: 14px;
111
+ white-space: nowrap;
112
+ }
113
+
114
+ strong {
115
+ font-size: 20px;
116
+ font-weight: bold;
117
+ line-height: 1;
118
+ white-space: nowrap;
119
+ }
120
+
121
+ em {
122
+ margin-left: 10px;
123
+ font-size: 18px;
124
+ font-style: normal;
125
+ font-weight: bold;
126
+ }
127
+ }
128
+
129
+ .vtx-car-depreciation-rate {
130
+ width: 100px;
131
+ transform: translate3d(-18px, -24px, 0);
132
+ display: flex;
133
+ align-items: center;
134
+ gap: 10px;
135
+ flex-shrink: 0;
136
+ }
137
+
138
+ .vtx-car-depreciation-rate-img {
139
+ width: 51px;
140
+ height: 63px;
141
+ flex-shrink: 0;
142
+ background-repeat: no-repeat;
143
+ background-size: contain;
144
+ background-position: center;
145
+ }
146
+
147
+ .vtx-car-depreciation-rate-value {
148
+ margin-top: 10px;
149
+ color: #5e6169;
150
+ font-size: 14px;
151
+ line-height: 20px;
152
+ white-space: nowrap;
153
+ }
154
+
155
+ &.dark,
156
+ [data-theme='dark'] & {
157
+ .vtx-car-depreciation-label {
158
+ color: #fff;
159
+ }
160
+
161
+ .vtx-car-depreciation-percent {
162
+ color: #fff;
163
+ }
164
+
165
+ .vtx-car-depreciation-rate-value {
166
+ color: #fff;
167
+ }
168
+ }
169
+ }
@@ -1,6 +1,6 @@
1
- .vtx-car-water-wrap {
2
- height: 100%;
3
- display: flex;
4
- gap: 16px;
5
- flex-direction: column;
6
- }
1
+ .vtx-car-water-wrap {
2
+ height: 100%;
3
+ display: flex;
4
+ gap: 16px;
5
+ flex-direction: column;
6
+ }