@vtx/modals2 6.0.0-beta.2 → 6.0.0-beta.20
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.
- package/lib/_components/index.js +1 -0
- package/lib/_components/vm-appraisal-info/api.js +55 -0
- package/lib/_components/vm-appraisal-info/imgs/count.png +0 -0
- package/lib/_components/vm-appraisal-info/imgs/count_light.png +0 -0
- package/lib/_components/vm-appraisal-info/imgs/subtract.png +0 -0
- package/lib/_components/vm-appraisal-info/imgs/subtract_light.png +0 -0
- package/lib/_components/vm-appraisal-info/index.js +205 -0
- package/lib/_components/vm-appraisal-info/index.less +7 -0
- package/lib/_components/vm-bar-charts/index.js +4 -4
- package/lib/_components/vm-factor/index.js +2 -1
- package/lib/_components/vm-filter/style/index.less +7 -11
- package/lib/_components/vm-info-collection/index.js +3 -2
- package/lib/_components/vm-line-charts/index.js +4 -1
- package/lib/_components/vm-progress/index.js +2 -1
- package/lib/_components/vm-repair-maintain/index.js +34 -2
- package/lib/_components/vm-tag/index.js +2 -1
- package/lib/_components/vm-title/index.js +2 -1
- package/lib/_components/vm-video/HistoryGrid.js +53 -3
- package/lib/_components/vm-video/RealtimeGrid.js +24 -3
- package/lib/_components/vm-video/index.js +99 -37
- package/lib/_components/vm-video/index.less +18 -14
- package/lib/_components/vm-wrapper/index.js +1 -1
- package/lib/_components/vm-wrapper/style/index.less +4 -2
- package/lib/_hooks/useGetChannels.js +20 -6
- package/lib/_hooks/useUmsService.js +36 -0
- package/lib/_service/index.js +7 -33
- package/lib/_util/http.js +36 -8
- package/lib/_util/iconSvgHtml.js +15 -5
- package/lib/_util/index.js +6 -5
- package/lib/locales/en.json +141 -1
- package/lib/locales/zh-CN.json +143 -3
- package/lib/vtx-base-modal/Tabs/index.js +2 -1
- package/lib/vtx-base-modal/index.js +2 -1
- package/lib/vtx-car-modal/api.js +596 -114
- package/lib/vtx-car-modal/components/Info/index.js +1 -1
- package/lib/vtx-car-modal/content/Common/EleUse/index.js +218 -0
- package/lib/vtx-car-modal/content/Common/EleUse/index.less +19 -0
- package/lib/vtx-car-modal/content/Common/OilUse/index.js +230 -0
- package/lib/vtx-car-modal/content/Common/OilUse/index.less +19 -0
- package/lib/vtx-car-modal/content/Common/OperationAnalysis/index.js +376 -0
- package/lib/vtx-car-modal/content/Common/OperationAnalysis/index.less +169 -0
- package/lib/vtx-car-modal/content/Common/WaterUse/index.js +201 -0
- package/lib/vtx-car-modal/content/Common/WaterUse/index.less +19 -0
- package/lib/vtx-car-modal/content/Common/index.js +9 -1
- package/lib/vtx-car-modal/content/Ljsy/WorkRecord/Detail.js +2 -1
- package/lib/vtx-car-modal/content/Ljzy/BaseInfo/index.js +9 -8
- package/lib/vtx-car-modal/content/Ljzy/StaticInfo/index.js +11 -11
- package/lib/vtx-car-modal/content/Ljzy/WorkRecord/Detail.js +5 -4
- package/lib/vtx-car-modal/content/Ljzy/WorkRecord/Summary.js +8 -6
- package/lib/vtx-car-modal/content/Ljzy/WorkRecord/index.js +7 -4
- package/lib/vtx-car-modal/imgs/czb_bg.png +0 -0
- package/lib/vtx-car-modal/imgs/czb_bg_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/bglyh.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/bglyh_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/cdcs.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/cdcs_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/cdje.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/cdje_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/cdpc.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/cdpc_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/dccdje.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/dccdje_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/jscs.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/jscs_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/jsje.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/jsje_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/jsl.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/jsl_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/jspc.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/jspc_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/jycs.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/jycs_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/jyje.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/jyje_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/jyl.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/jyl_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/ljwbcs.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/ljwbcs_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/njzfy.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/njzfy_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/qzxze.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/qzxze_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/sgcs.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/sgcs_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/sgfy.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/sgfy_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/syxze.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/syxze_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/wbzfy.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/wbzfy_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/wzcs.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/wzcs_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/wzkf.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/wzkf_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/wzkfee.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/wzkfee_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/xslc.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/xslc_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/ydcb.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/ydcb_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/yhcb.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/yhcb_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/yscb.png +0 -0
- package/lib/vtx-car-modal/imgs/factor/yscb_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/zjl.png +0 -0
- package/lib/vtx-car-modal/imgs/zjl_dark.png +0 -0
- package/lib/vtx-car-modal/index.js +40 -9
- package/lib/vtx-cc-cp-modal/components/Calendar/index.js +3 -3
- package/lib/vtx-cp-modal/components/BaseInfo/CarWork.js +2 -5
- package/lib/vtx-cp-modal/components/BaseInfo/TodayWork.js +7 -1
- package/lib/vtx-cp-modal/components/ExeceptionInfo/AlarmRecord.js +8 -4
- package/lib/vtx-cp-modal/components/SyInfo/Ljcsl.js +2 -2
- package/lib/vtx-cp-modal/index.js +12 -12
- package/lib/vtx-default-modal/index.js +7 -6
- package/lib/vtx-df-modal/components/BaseInfo/Jczbqs.js +2 -2
- package/lib/vtx-df-modal/components/BaseInfo/Qyjcl.js +11 -5
- package/lib/vtx-df-modal/components/BaseInfoZdReborn/Jczbqs.js +2 -2
- package/lib/vtx-df-modal/components/Calendar/index.js +9 -2
- package/lib/vtx-df-modal/components/Calendar/zd-reborn.js +9 -2
- package/lib/vtx-df-modal/components/WorkCondition/Table.js +2 -2
- package/lib/vtx-df-modal/index.js +20 -25
- package/lib/vtx-kh-modal/components/Record/index.js +1 -205
- package/lib/vtx-qyry-modal/index.js +1 -1
- package/lib/vtx-restaurant-modal/components/Calendar/index.js +3 -3
- package/lib/vtx-restaurant-modal/components/DetailInfo/index.js +3 -0
- package/lib/vtx-restaurant-modal/components/SignAndContract/ContactDetail.js +50 -33
- package/lib/vtx-restaurant-modal/components/SignAndContract/index.js +3 -3
- package/lib/vtx-restaurant-modal/config.js +11 -3
- package/lib/vtx-road-modal/components/BaseInfo/Work.js +9 -1
- package/lib/vtx-road-modal/components/LaneBaseInfo/Work.js +8 -1
- package/lib/vtx-road-modal/components/LaneCalendar/index.js +3 -0
- package/lib/vtx-road-modal/index.js +21 -5
- package/lib/vtx-road-modal/utils/url.js +12 -0
- package/lib/vtx-shxq-modal/api.js +5 -5
- package/lib/vtx-shxq-modal/components/ThrowCalendar/List.js +2 -2
- package/lib/vtx-shxq-modal/components/ThrowRecord/List.js +19 -6
- package/lib/vtx-shxq-modal/index.js +21 -4
- package/lib/vtx-staff-modal/components/AlarmInfo/Charts.js +4 -1
- package/lib/vtx-tfd-modal/api.js +2 -2
- package/lib/vtx-tfd-modal/components/BaseInfo/Jczbqs.js +2 -2
- package/lib/vtx-wr-modal/index.js +34 -6
- package/lib/vtx-zf-modal/components/CkEditorCustom/view.js +4 -1
- package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/editableDiv/FormView.js +5 -4
- package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/editableDiv/index.js +10 -5
- package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/input/FormView.js +7 -6
- package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/input/date.js +10 -5
- package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/input/index.js +10 -5
- package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/radio/FormView.js +6 -5
- package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/radio/checkbox.js +10 -5
- package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/radio/index.js +10 -5
- package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/sign/FormView.js +7 -6
- package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/sign/index.js +12 -7
- package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/textarea/FormView.js +6 -5
- package/lib/vtx-zf-modal/components/CkEditorCustom/widgets/textarea/index.js +10 -5
- package/lib/vtx-zzz-modal/index.js +30 -23
- package/package.json +6 -6
|
@@ -0,0 +1,201 @@
|
|
|
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';
|
|
16
|
+
import { useContext } from 'react';
|
|
17
|
+
import { VmFactor, VmPieCharts, VmTable, 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 { translateLocaleText } from "./../../../../hooks/useTranslation.js";
|
|
23
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
|
+
var WaterUse = function WaterUse() {
|
|
25
|
+
var _useSettings = useSettings(),
|
|
26
|
+
isDark = _useSettings.isDark;
|
|
27
|
+
var _useContext = useContext(CarContext),
|
|
28
|
+
id = _useContext.id,
|
|
29
|
+
sDate = _useContext.startDate,
|
|
30
|
+
eDate = _useContext.endDate;
|
|
31
|
+
var _useSetState = useSetState({
|
|
32
|
+
startDate: sDate ? sDate : dayjs().subtract(6, 'day'),
|
|
33
|
+
endDate: eDate ? eDate : dayjs(),
|
|
34
|
+
sorter: 'waterTime,ASC'
|
|
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 filterChange = function filterChange(dateValue) {
|
|
42
|
+
setState({
|
|
43
|
+
startDate: dateValue[0],
|
|
44
|
+
endDate: dateValue[1]
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
var _MaintenanceService$u = MaintenanceService.useWaterSummary(id, startDate, endDate),
|
|
48
|
+
waterSummary = _MaintenanceService$u.waterSummary;
|
|
49
|
+
var _MaintenanceService$u2 = MaintenanceService.useWaterRecord(id, "".concat(startDate, " 00:00:00"), "".concat(endDate, " 23:59:59"), state.sorter),
|
|
50
|
+
recordRes = _MaintenanceService$u2.recordRes,
|
|
51
|
+
loading = _MaintenanceService$u2.loading;
|
|
52
|
+
var _MaintenanceService$u3 = MaintenanceService.useWaterTypeSummary(id, startDate, endDate),
|
|
53
|
+
waterTypeSummary = _MaintenanceService$u3.waterTypeSummary,
|
|
54
|
+
loadingType = _MaintenanceService$u3.loading;
|
|
55
|
+
var columns = [{
|
|
56
|
+
title: translateLocaleText("t('vtxcarmodal.waterRefuelTime')"),
|
|
57
|
+
dataIndex: 'waterTime',
|
|
58
|
+
key: 'waterTime',
|
|
59
|
+
sorter: true,
|
|
60
|
+
width: '20%'
|
|
61
|
+
}, {
|
|
62
|
+
title: translateLocaleText("t('vtxcarmodal.waterRefuelType')"),
|
|
63
|
+
dataIndex: 'waterTypeName',
|
|
64
|
+
key: 'waterTypeName',
|
|
65
|
+
width: '20%'
|
|
66
|
+
}, {
|
|
67
|
+
title: translateLocaleText("t('vtxcarmodal.waterRefuelPoint')"),
|
|
68
|
+
dataIndex: 'waterAddressName',
|
|
69
|
+
key: 'waterAddressName',
|
|
70
|
+
width: '20%',
|
|
71
|
+
render: function render(text) {
|
|
72
|
+
return /*#__PURE__*/_jsx("div", {
|
|
73
|
+
children: text || '--'
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
}, {
|
|
77
|
+
title: translateLocaleText("t('vtxcarmodal.waterRefuelAmountM3')"),
|
|
78
|
+
dataIndex: 'waterAmount',
|
|
79
|
+
key: 'waterAmount',
|
|
80
|
+
align: 'right',
|
|
81
|
+
width: '15%'
|
|
82
|
+
}, {
|
|
83
|
+
title: translateLocaleText("t('vtxcarmodal.waterRefuelMoneyYuan')"),
|
|
84
|
+
dataIndex: 'waterMoney',
|
|
85
|
+
key: 'waterMoney',
|
|
86
|
+
align: 'right',
|
|
87
|
+
width: '15%'
|
|
88
|
+
}];
|
|
89
|
+
var handleTableChange = function handleTableChange(sorter) {
|
|
90
|
+
setState({
|
|
91
|
+
sorter: "".concat(sorter.columnKey || 'waterTime', ",").concat(sorter.order === 'ascend' ? 'ASC' : 'DESC')
|
|
92
|
+
});
|
|
93
|
+
};
|
|
94
|
+
var tableProps = {
|
|
95
|
+
pagination: {
|
|
96
|
+
total: (recordRes === null || recordRes === void 0 ? void 0 : recordRes.total) || 0,
|
|
97
|
+
defaultPageSize: 10
|
|
98
|
+
},
|
|
99
|
+
height: 360,
|
|
100
|
+
dataSource: (recordRes === null || recordRes === void 0 ? void 0 : recordRes.rows) || [],
|
|
101
|
+
loading: loading,
|
|
102
|
+
handleTableChange: handleTableChange
|
|
103
|
+
};
|
|
104
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
105
|
+
className: 'vtx-car-water-use-wrap',
|
|
106
|
+
children: [/*#__PURE__*/_jsx(VmWrapper, {
|
|
107
|
+
title: translateLocaleText("t('vtxcarmodal.statisticalScope')"),
|
|
108
|
+
filterType: "rangePicker",
|
|
109
|
+
dateValue: [state.startDate, state.endDate],
|
|
110
|
+
filterChange: filterChange,
|
|
111
|
+
showContent: false,
|
|
112
|
+
style: {
|
|
113
|
+
height: 50
|
|
114
|
+
},
|
|
115
|
+
headerStyle: {
|
|
116
|
+
borderBottom: 'none'
|
|
117
|
+
},
|
|
118
|
+
extraStyle: {
|
|
119
|
+
left: 140,
|
|
120
|
+
right: 'unset'
|
|
121
|
+
}
|
|
122
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
123
|
+
className: "vtx-car-water-use-summary",
|
|
124
|
+
children: [/*#__PURE__*/_jsx(VmWrapper, {
|
|
125
|
+
title: translateLocaleText("t('vtxcarmodal.waterRefuelSummary')"),
|
|
126
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
127
|
+
className: "vtx-car-water-use-row",
|
|
128
|
+
children: [{
|
|
129
|
+
name: translateLocaleText("t('vtxcarmodal.waterRefuelCount')"),
|
|
130
|
+
unit: translateLocaleText("t('common.unit.times')"),
|
|
131
|
+
value: (waterSummary === null || waterSummary === void 0 ? void 0 : waterSummary.waterCount) || 0,
|
|
132
|
+
icon: 'jscs'
|
|
133
|
+
}, {
|
|
134
|
+
name: translateLocaleText("t('vtxcarmodal.waterRefuelAmount')"),
|
|
135
|
+
unit: 'm³',
|
|
136
|
+
value: (waterSummary === null || waterSummary === void 0 ? void 0 : waterSummary.waterAmount) || 0,
|
|
137
|
+
icon: 'jsl'
|
|
138
|
+
}, {
|
|
139
|
+
name: translateLocaleText("t('vtxcarmodal.waterRefuelMoney')"),
|
|
140
|
+
unit: translateLocaleText("t('common.unit.yuan')"),
|
|
141
|
+
value: (waterSummary === null || waterSummary === void 0 ? void 0 : waterSummary.waterMoney) || 0,
|
|
142
|
+
icon: 'jsje'
|
|
143
|
+
}, {
|
|
144
|
+
name: translateLocaleText("t('vtxcarmodal.waterRefuelFrequency')"),
|
|
145
|
+
unit: translateLocaleText("t('common.unit.dayPerTimes')"),
|
|
146
|
+
value: (waterSummary === null || waterSummary === void 0 ? void 0 : waterSummary.waterFrequency) || 0,
|
|
147
|
+
icon: 'jspc'
|
|
148
|
+
}, {
|
|
149
|
+
name: translateLocaleText("t('vtxcarmodal.day2')"),
|
|
150
|
+
unit: 'km',
|
|
151
|
+
value: (waterSummary === null || waterSummary === void 0 ? void 0 : waterSummary.distance) || 0,
|
|
152
|
+
icon: 'xslc'
|
|
153
|
+
}, {
|
|
154
|
+
name: translateLocaleText("t('vtxcarmodal.waterCost')"),
|
|
155
|
+
unit: translateLocaleText("t('common.unit.yuanPerKm')"),
|
|
156
|
+
value: (waterSummary === null || waterSummary === void 0 ? void 0 : waterSummary.waterCost) || 0,
|
|
157
|
+
icon: 'yscb'
|
|
158
|
+
}].map(function (ele) {
|
|
159
|
+
return /*#__PURE__*/_jsx(VmFactor, {
|
|
160
|
+
name: translateLocaleText(ele.name),
|
|
161
|
+
unit: ele.unit,
|
|
162
|
+
value: ele.value,
|
|
163
|
+
img: require("../../../imgs/factor/".concat(ele.icon).concat(isDark ? '_dark' : '', ".png"))
|
|
164
|
+
}, ele.name);
|
|
165
|
+
})
|
|
166
|
+
})
|
|
167
|
+
}), /*#__PURE__*/_jsx(VmWrapper, {
|
|
168
|
+
title: translateLocaleText("t('vtxcarmodal.waterRefuelTypeAnalysis')"),
|
|
169
|
+
children: /*#__PURE__*/_jsx(VmPieCharts, {
|
|
170
|
+
innerRadius: ['60%', '75%'],
|
|
171
|
+
outerRadius: ['75%', '80%'],
|
|
172
|
+
dataList: waterTypeSummary || []
|
|
173
|
+
// title={translateLocaleText("t('vtxcarmodal.waterRefuelTypeAnalysis')")}
|
|
174
|
+
,
|
|
175
|
+
name: translateLocaleText("t('vtxcarmodal.waterRefuelTypeAnalysis')"),
|
|
176
|
+
total: "".concat(sumBy(waterTypeSummary, 'value') || 0, "m\xB3"),
|
|
177
|
+
unit: 'm³',
|
|
178
|
+
loading: loadingType
|
|
179
|
+
})
|
|
180
|
+
})]
|
|
181
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
182
|
+
style: {
|
|
183
|
+
flex: 1,
|
|
184
|
+
minHeight: 0
|
|
185
|
+
},
|
|
186
|
+
children: /*#__PURE__*/_jsx(VmWrapper, {
|
|
187
|
+
title: translateLocaleText("t('vtxcarmodal.waterRefuelDetail')"),
|
|
188
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
189
|
+
style: {
|
|
190
|
+
height: '360px'
|
|
191
|
+
},
|
|
192
|
+
children: /*#__PURE__*/_jsx(VmTable, _objectSpread({
|
|
193
|
+
columns: columns,
|
|
194
|
+
rowKey: "id"
|
|
195
|
+
}, tableProps))
|
|
196
|
+
})
|
|
197
|
+
})
|
|
198
|
+
})]
|
|
199
|
+
});
|
|
200
|
+
};
|
|
201
|
+
export default WaterUse;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
.vtx-car-water-use-wrap {
|
|
2
|
+
height: 100%;
|
|
3
|
+
display: flex;
|
|
4
|
+
gap: 16px;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
|
|
7
|
+
.vtx-car-water-use-summary {
|
|
8
|
+
height: 240px;
|
|
9
|
+
display: flex;
|
|
10
|
+
gap: 16px;
|
|
11
|
+
flex-shrink: 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.vtx-car-water-use-row {
|
|
15
|
+
display: grid;
|
|
16
|
+
grid-template-columns: repeat(3, 1fr);
|
|
17
|
+
gap: 40px 0;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -2,10 +2,14 @@ import AlarmInfo from "./AlarmInfo";
|
|
|
2
2
|
import BaseInfo from "./BaseInfo";
|
|
3
3
|
import DetailInfo from "./DetailInfo";
|
|
4
4
|
import DeviceInfo from "./DeviceInfo";
|
|
5
|
+
import EleUse from "./EleUse";
|
|
5
6
|
import Maintenance from "./Maintenance";
|
|
6
7
|
import OilConsumption from "./OilConsumption";
|
|
8
|
+
import OilUse from "./OilUse";
|
|
9
|
+
import OperationAnalysis from "./OperationAnalysis";
|
|
7
10
|
import StaticInfo from "./StaticInfo";
|
|
8
11
|
import WaterConsumption from "./WaterConsumption";
|
|
12
|
+
import WaterUse from "./WaterUse";
|
|
9
13
|
export default {
|
|
10
14
|
BaseInfo: BaseInfo,
|
|
11
15
|
StaticInfo: StaticInfo,
|
|
@@ -14,5 +18,9 @@ export default {
|
|
|
14
18
|
WaterConsumption: WaterConsumption,
|
|
15
19
|
Maintenance: Maintenance,
|
|
16
20
|
DetailInfo: DetailInfo,
|
|
17
|
-
DeviceInfo: DeviceInfo
|
|
21
|
+
DeviceInfo: DeviceInfo,
|
|
22
|
+
WaterUse: WaterUse,
|
|
23
|
+
EleUse: EleUse,
|
|
24
|
+
OilUse: OilUse,
|
|
25
|
+
OperationAnalysis: OperationAnalysis
|
|
18
26
|
};
|
|
@@ -59,7 +59,8 @@ var Detail = function Detail(_ref) {
|
|
|
59
59
|
dataIndex: 'collectPointName',
|
|
60
60
|
key: 'collectPointName',
|
|
61
61
|
fixed: 'left',
|
|
62
|
-
width: 160
|
|
62
|
+
width: 160,
|
|
63
|
+
ellipsis: true
|
|
63
64
|
}, {
|
|
64
65
|
title: translateLocaleText("t('vtxcarmodal.hours10')"),
|
|
65
66
|
dataIndex: 'actualCollectTime',
|
|
@@ -21,9 +21,9 @@ import { CarContext } from "../../../index";
|
|
|
21
21
|
import "./index.less";
|
|
22
22
|
import { translateLocaleText } from "./../../../../hooks/useTranslation.js";
|
|
23
23
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
|
-
var BaseInfo = function BaseInfo() {
|
|
24
|
+
var BaseInfo = function BaseInfo(_ref) {
|
|
25
|
+
var zdReborn = _ref.zdReborn;
|
|
25
26
|
var _useContext = useContext(CarContext),
|
|
26
|
-
id = _useContext.id,
|
|
27
27
|
startDate = _useContext.startDate,
|
|
28
28
|
info = _useContext.info;
|
|
29
29
|
var _useSettings = useSettings(),
|
|
@@ -32,13 +32,14 @@ var BaseInfo = function BaseInfo() {
|
|
|
32
32
|
_useState2 = _slicedToArray(_useState, 2),
|
|
33
33
|
date = _useState2[0],
|
|
34
34
|
setDate = _useState2[1];
|
|
35
|
-
var _LjzyService
|
|
35
|
+
var _LjzyService = LjzyService[zdReborn ? 'useGetCarSumByDateZdReborn' : 'useGetCarSumByDate']({
|
|
36
36
|
carCode: info === null || info === void 0 ? void 0 : info.carCode,
|
|
37
37
|
startDate: dayjs(date).subtract(6, 'day').format('YYYY-MM-DD'),
|
|
38
38
|
endDate: dayjs(date).format('YYYY-MM-DD')
|
|
39
39
|
}),
|
|
40
|
-
taskDaySummary = _LjzyService
|
|
41
|
-
loading = _LjzyService
|
|
40
|
+
taskDaySummary = _LjzyService.taskDaySummary,
|
|
41
|
+
loading = _LjzyService.loading;
|
|
42
|
+
var fieldKey = zdReborn ? 'carNum' : 'carNums';
|
|
42
43
|
var xAxis = _.map(taskDaySummary, 'date');
|
|
43
44
|
var todayInfo = _.last(taskDaySummary) || {};
|
|
44
45
|
var blueColor = '#1677FF';
|
|
@@ -82,7 +83,7 @@ var BaseInfo = function BaseInfo() {
|
|
|
82
83
|
name: translateLocaleText("t('vtxdfmodal.times')"),
|
|
83
84
|
unit: translateLocaleText("t('common.timesUnit')"),
|
|
84
85
|
img: isDark ? darkCarNumIcon : carNumIcon,
|
|
85
|
-
value: (todayInfo === null || todayInfo === void 0 ? void 0 : todayInfo
|
|
86
|
+
value: (todayInfo === null || todayInfo === void 0 ? void 0 : todayInfo[fieldKey]) || 0
|
|
86
87
|
}), /*#__PURE__*/_jsx("div", {
|
|
87
88
|
style: {
|
|
88
89
|
height: 45,
|
|
@@ -92,7 +93,7 @@ var BaseInfo = function BaseInfo() {
|
|
|
92
93
|
showLegend: false,
|
|
93
94
|
dataList: [{
|
|
94
95
|
name: translateLocaleText("t('vtxdfmodal.times')"),
|
|
95
|
-
data: _.map(taskDaySummary,
|
|
96
|
+
data: _.map(taskDaySummary, fieldKey),
|
|
96
97
|
color: transformRgb(blueColor, colorOpacity),
|
|
97
98
|
smooth: true,
|
|
98
99
|
symbol: 'none',
|
|
@@ -203,7 +204,7 @@ var BaseInfo = function BaseInfo() {
|
|
|
203
204
|
lineList: [{
|
|
204
205
|
name: translateLocaleText("t('vtxdfmodal.times')"),
|
|
205
206
|
data: _.map(taskDaySummary, function (item) {
|
|
206
|
-
return "\u2000".concat(item
|
|
207
|
+
return "\u2000".concat(item[fieldKey]);
|
|
207
208
|
}),
|
|
208
209
|
color: isDark ? '#13F97A' : '#0FB964',
|
|
209
210
|
yAxisIndex: 1
|
|
@@ -23,7 +23,8 @@ import lightJclIcon from "../../../imgs/calendar/jcl.png";
|
|
|
23
23
|
import { CarContext } from "../../../index";
|
|
24
24
|
import { translateLocaleText } from "./../../../../hooks/useTranslation.js";
|
|
25
25
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
26
|
-
var StaticInfo = function StaticInfo() {
|
|
26
|
+
var StaticInfo = function StaticInfo(_ref) {
|
|
27
|
+
var zdReborn = _ref.zdReborn;
|
|
27
28
|
var _useSettings = useSettings(),
|
|
28
29
|
isDark = _useSettings.isDark;
|
|
29
30
|
var _useState = useState('calendar'),
|
|
@@ -31,19 +32,18 @@ var StaticInfo = function StaticInfo() {
|
|
|
31
32
|
type = _useState2[0],
|
|
32
33
|
setType = _useState2[1];
|
|
33
34
|
var _useContext = useContext(CarContext),
|
|
34
|
-
id = _useContext.id,
|
|
35
35
|
info = _useContext.info;
|
|
36
36
|
var _useState3 = useState(dayjs()),
|
|
37
37
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
38
38
|
month = _useState4[0],
|
|
39
39
|
setMonth = _useState4[1];
|
|
40
|
-
var _LjzyService
|
|
40
|
+
var _LjzyService = LjzyService[zdReborn ? 'useGetCarSumByDateAndDisposeUnitZdReborn' : 'useGetCarSumByDateAndDisposeUnit']({
|
|
41
41
|
carCode: info === null || info === void 0 ? void 0 : info.carCode,
|
|
42
42
|
startDate: month.startOf('M').format('YYYY-MM-DD'),
|
|
43
43
|
endDate: dayjs().isSame(month, 'month') ? dayjs().format('YYYY-MM-DD') : month.endOf('M').format('YYYY-MM-DD')
|
|
44
44
|
}),
|
|
45
|
-
taskDaySummary = _LjzyService
|
|
46
|
-
loading = _LjzyService
|
|
45
|
+
taskDaySummary = _LjzyService.taskDaySummary,
|
|
46
|
+
loading = _LjzyService.loading;
|
|
47
47
|
var keyByDate = keyBy(taskDaySummary || [], 'date');
|
|
48
48
|
var carNumIcon = lightCarNumIcon;
|
|
49
49
|
var jclIcon = lightJclIcon;
|
|
@@ -51,6 +51,7 @@ var StaticInfo = function StaticInfo() {
|
|
|
51
51
|
carNumIcon = darkCarNumIcon;
|
|
52
52
|
jclIcon = darkJclIcon;
|
|
53
53
|
}
|
|
54
|
+
var fieldKey = zdReborn ? 'carNum' : 'carNums';
|
|
54
55
|
var columns = [{
|
|
55
56
|
title: translateLocaleText("t('vtxareamodal.date')"),
|
|
56
57
|
dataIndex: 'date',
|
|
@@ -69,8 +70,8 @@ var StaticInfo = function StaticInfo() {
|
|
|
69
70
|
}
|
|
70
71
|
}, {
|
|
71
72
|
title: translateLocaleText("t('vtxcarmodal.timesTimes')"),
|
|
72
|
-
dataIndex:
|
|
73
|
-
key:
|
|
73
|
+
dataIndex: fieldKey,
|
|
74
|
+
key: fieldKey,
|
|
74
75
|
align: 'right',
|
|
75
76
|
render: function render(text) {
|
|
76
77
|
return /*#__PURE__*/_jsx("span", {
|
|
@@ -98,13 +99,12 @@ var StaticInfo = function StaticInfo() {
|
|
|
98
99
|
if (!item) {
|
|
99
100
|
return null;
|
|
100
101
|
}
|
|
101
|
-
var netWeight = item.netWeight
|
|
102
|
-
carNums = item.carNums;
|
|
102
|
+
var netWeight = item.netWeight;
|
|
103
103
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
104
104
|
children: [/*#__PURE__*/_jsx(VmCalendarInner, {
|
|
105
105
|
type: "blue",
|
|
106
106
|
img: jclIcon,
|
|
107
|
-
value:
|
|
107
|
+
value: item === null || item === void 0 ? void 0 : item[fieldKey],
|
|
108
108
|
style: {
|
|
109
109
|
width: '139px',
|
|
110
110
|
justifyContent: 'space-between',
|
|
@@ -182,7 +182,7 @@ var StaticInfo = function StaticInfo() {
|
|
|
182
182
|
lineList: [{
|
|
183
183
|
name: translateLocaleText("t('vtxdfmodal.times')"),
|
|
184
184
|
data: _.map(taskDaySummary, function (item) {
|
|
185
|
-
return "\u2000".concat(item
|
|
185
|
+
return "\u2000".concat(item === null || item === void 0 ? void 0 : item[fieldKey]);
|
|
186
186
|
}),
|
|
187
187
|
color: isDark ? '#13F97A' : '#0FB964',
|
|
188
188
|
yAxisIndex: 1
|
|
@@ -19,7 +19,8 @@ import { translateLocaleText } from "./../../../../hooks/useTranslation.js";
|
|
|
19
19
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
20
|
var Detail = function Detail(_ref) {
|
|
21
21
|
var startDate = _ref.startDate,
|
|
22
|
-
endDate = _ref.endDate
|
|
22
|
+
endDate = _ref.endDate,
|
|
23
|
+
zdReborn = _ref.zdReborn;
|
|
23
24
|
var _useContext = useContext(CarContext),
|
|
24
25
|
info = _useContext.info;
|
|
25
26
|
var _useSetState = useSetState({
|
|
@@ -37,7 +38,7 @@ var Detail = function Detail(_ref) {
|
|
|
37
38
|
var pagination = state.pagination,
|
|
38
39
|
sort = state.sort,
|
|
39
40
|
order = state.order;
|
|
40
|
-
var _LjzyService
|
|
41
|
+
var _LjzyService = LjzyService[zdReborn ? 'useGetWorkDetailZdReborn' : 'useGetWorkDetail']({
|
|
41
42
|
startTime: "".concat(startDate, " 00:00:00"),
|
|
42
43
|
endTime: "".concat(endDate, " 23:59:59"),
|
|
43
44
|
carNo: info === null || info === void 0 ? void 0 : info.carCode,
|
|
@@ -45,8 +46,8 @@ var Detail = function Detail(_ref) {
|
|
|
45
46
|
sort: sort,
|
|
46
47
|
order: order
|
|
47
48
|
}),
|
|
48
|
-
workDetailData = _LjzyService
|
|
49
|
-
loading = _LjzyService
|
|
49
|
+
workDetailData = _LjzyService.workDetailData,
|
|
50
|
+
loading = _LjzyService.loading;
|
|
50
51
|
var records = {
|
|
51
52
|
total: (workDetailData === null || workDetailData === void 0 ? void 0 : workDetailData.total) || 0,
|
|
52
53
|
rows: (workDetailData === null || workDetailData === void 0 ? void 0 : workDetailData.rows) || []
|
|
@@ -14,20 +14,22 @@ import { translateLocaleText } from "./../../../../hooks/useTranslation.js";
|
|
|
14
14
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
15
|
var Summary = function Summary(_ref) {
|
|
16
16
|
var startDate = _ref.startDate,
|
|
17
|
-
endDate = _ref.endDate
|
|
17
|
+
endDate = _ref.endDate,
|
|
18
|
+
zdReborn = _ref.zdReborn;
|
|
18
19
|
var _useSettings = useSettings(),
|
|
19
20
|
isDark = _useSettings.isDark;
|
|
20
21
|
var _useContext = useContext(CarContext),
|
|
21
22
|
id = _useContext.id,
|
|
22
23
|
info = _useContext.info;
|
|
23
|
-
var _LjzyService
|
|
24
|
+
var _LjzyService = LjzyService[zdReborn ? 'useGetCarSumByDateZdReborn' : 'useGetCarSumByDate']({
|
|
24
25
|
carCode: info === null || info === void 0 ? void 0 : info.carCode,
|
|
25
26
|
startDate: startDate,
|
|
26
27
|
endDate: endDate
|
|
27
28
|
}),
|
|
28
|
-
taskDaySummary = _LjzyService
|
|
29
|
-
loading = _LjzyService
|
|
30
|
-
var
|
|
29
|
+
taskDaySummary = _LjzyService.taskDaySummary,
|
|
30
|
+
loading = _LjzyService.loading;
|
|
31
|
+
var fieldKey = zdReborn ? 'carNum' : 'carNums';
|
|
32
|
+
var totalCarNums = _.sumBy(taskDaySummary, fieldKey);
|
|
31
33
|
var dailyCompletePercent = _.sumBy(taskDaySummary, 'netWeight').toFixed(2);
|
|
32
34
|
var xAxis = _.map(taskDaySummary, 'date');
|
|
33
35
|
return /*#__PURE__*/_jsx(VmWrapper, {
|
|
@@ -47,7 +49,7 @@ var Summary = function Summary(_ref) {
|
|
|
47
49
|
}), /*#__PURE__*/_jsx(VmBarCharts, {
|
|
48
50
|
dataList: [{
|
|
49
51
|
name: translateLocaleText("t('vtxdfmodal.times')"),
|
|
50
|
-
data: _.map(taskDaySummary,
|
|
52
|
+
data: _.map(taskDaySummary, fieldKey)
|
|
51
53
|
}],
|
|
52
54
|
unit: translateLocaleText("t('common.timesUnit')"),
|
|
53
55
|
xAxis: xAxis,
|
|
@@ -10,11 +10,12 @@ import dayjs from 'dayjs';
|
|
|
10
10
|
import { VmWrapper } from "../../../../_components";
|
|
11
11
|
import { VMRangePicker } from "../../../../_components/vm-filter";
|
|
12
12
|
import useSettings from "../../../../_hooks/useSettings";
|
|
13
|
+
import { translateLocaleText } from "./../../../../hooks/useTranslation.js";
|
|
13
14
|
import Detail from "./Detail";
|
|
14
15
|
import Summary from "./Summary";
|
|
15
|
-
import { translateLocaleText } from "./../../../../hooks/useTranslation.js";
|
|
16
16
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
|
-
var WorkRecord = function WorkRecord() {
|
|
17
|
+
var WorkRecord = function WorkRecord(_ref) {
|
|
18
|
+
var zdReborn = _ref.zdReborn;
|
|
18
19
|
var _useSettings = useSettings(),
|
|
19
20
|
sDate = _useSettings.startDate,
|
|
20
21
|
eDate = _useSettings.endDate;
|
|
@@ -56,13 +57,15 @@ var WorkRecord = function WorkRecord() {
|
|
|
56
57
|
span: 24,
|
|
57
58
|
children: /*#__PURE__*/_jsx(Summary, {
|
|
58
59
|
startDate: formatStartDate,
|
|
59
|
-
endDate: formatEndDate
|
|
60
|
+
endDate: formatEndDate,
|
|
61
|
+
zdReborn: zdReborn
|
|
60
62
|
})
|
|
61
63
|
}), /*#__PURE__*/_jsx(Col, {
|
|
62
64
|
span: 24,
|
|
63
65
|
children: /*#__PURE__*/_jsx(Detail, {
|
|
64
66
|
startDate: formatStartDate,
|
|
65
|
-
endDate: formatEndDate
|
|
67
|
+
endDate: formatEndDate,
|
|
68
|
+
zdReborn: zdReborn
|
|
66
69
|
})
|
|
67
70
|
})]
|
|
68
71
|
});
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|