@vtx/modals2 5.0.25 → 5.0.27
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/vm-card-statistics/index.less +27 -27
- package/lib/_components/vm-factor-list/index.less +11 -11
- package/lib/_components/vm-table/index.js +4 -4
- package/lib/index.js +2 -1
- package/lib/vtx-base-modal/Header/index.less +98 -98
- package/lib/vtx-base-modal/Tabs/index.less +54 -54
- package/lib/vtx-car-modal/api.js +241 -1
- package/lib/vtx-car-modal/components/Info/index.js +34 -9
- package/lib/vtx-car-modal/components/Info/index.less +6 -6
- package/lib/vtx-car-modal/content/Common/OilConsumption/index.less +6 -6
- package/lib/vtx-car-modal/content/Common/WaterConsumption/index.less +6 -6
- package/lib/vtx-car-modal/content/Jzlj/Alarm/Bottom.js +276 -0
- package/lib/vtx-car-modal/content/Jzlj/Alarm/index.js +155 -0
- package/lib/vtx-car-modal/content/Jzlj/Alarm/index.less +34 -0
- package/lib/vtx-car-modal/content/Jzlj/BaseInfo/index.js +256 -0
- package/lib/vtx-car-modal/content/Jzlj/BaseInfo/index.less +20 -0
- package/lib/vtx-car-modal/content/Jzlj/Collection/Chart.js +99 -0
- package/lib/vtx-car-modal/content/Jzlj/Collection/index.js +357 -0
- package/lib/vtx-car-modal/content/Jzlj/Collection/index.less +57 -0
- package/lib/vtx-car-modal/content/Jzlj/Dispose/Pies.js +77 -0
- package/lib/vtx-car-modal/content/Jzlj/Dispose/index.js +282 -0
- package/lib/vtx-car-modal/content/Jzlj/Dispose/index.less +53 -0
- package/lib/vtx-car-modal/content/Jzlj/RunCalendar/index.js +175 -0
- package/lib/vtx-car-modal/content/Jzlj/RunCalendar/index.less +12 -0
- package/lib/vtx-car-modal/content/Jzlj/index.js +12 -0
- package/lib/vtx-car-modal/content/index.js +2 -1
- package/lib/vtx-car-modal/imgs/jzlj/pjrcc_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/jzlj/pjrcc_light.png +0 -0
- package/lib/vtx-car-modal/imgs/jzlj/pjryl_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/jzlj/pjryl_light.png +0 -0
- package/lib/vtx-car-modal/imgs/jzlj/rl_lds_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/jzlj/rl_lds_light.png +0 -0
- package/lib/vtx-car-modal/imgs/jzlj/rl_yl_dark.png +0 -0
- package/lib/vtx-car-modal/imgs/jzlj/rl_yl_light.png +0 -0
- package/lib/vtx-car-modal/index.js +65 -9
- package/lib/vtx-cc-unit-modal/components/BaseInfo/index.less +6 -6
- package/lib/vtx-device-modal/components/DataAnalysis/index.less +66 -66
- package/lib/vtx-jzlj-df-tpd-modal/components/Collection/index.js +1 -1
- package/lib/vtx-jzlj-gcxm-modal/components/Collection/index.js +1 -1
- package/lib/vtx-jzlj-xnc-modal/components/Collection/index.js +1 -1
- package/lib/vtx-jzlj-ysqy-modal/api.js +37 -0
- package/lib/vtx-jzlj-ysqy-modal/components/Overview/index.js +79 -0
- package/lib/vtx-jzlj-ysqy-modal/components/Overview/index.less +17 -0
- package/lib/vtx-jzlj-ysqy-modal/components/index.js +2 -0
- package/lib/vtx-jzlj-ysqy-modal/imgs/dispose_czz_dark.png +0 -0
- package/lib/vtx-jzlj-ysqy-modal/imgs/dispose_czz_light.png +0 -0
- package/lib/vtx-jzlj-ysqy-modal/imgs/dispose_syl_dark.png +0 -0
- package/lib/vtx-jzlj-ysqy-modal/imgs/dispose_syl_light.png +0 -0
- package/lib/vtx-jzlj-ysqy-modal/imgs/dispose_zsbl_dark.png +0 -0
- package/lib/vtx-jzlj-ysqy-modal/imgs/dispose_zsbl_light.png +0 -0
- package/lib/vtx-jzlj-ysqy-modal/imgs/dispose_zyyl_dark.png +0 -0
- package/lib/vtx-jzlj-ysqy-modal/imgs/dispose_zyyl_light.png +0 -0
- package/lib/vtx-jzlj-ysqy-modal/imgs/overview_ctyl_pjrcc_dark.png +0 -0
- package/lib/vtx-jzlj-ysqy-modal/imgs/overview_ctyl_pjrcc_light.png +0 -0
- package/lib/vtx-jzlj-ysqy-modal/imgs/overview_ctyl_pjryl_dark.png +0 -0
- package/lib/vtx-jzlj-ysqy-modal/imgs/overview_ctyl_pjryl_light.png +0 -0
- package/lib/vtx-jzlj-ysqy-modal/imgs/overview_czz_zl_dark.png +0 -0
- package/lib/vtx-jzlj-ysqy-modal/imgs/overview_czz_zl_light.png +0 -0
- package/lib/vtx-jzlj-ysqy-modal/imgs/overview_czz_zs_dark.png +0 -0
- package/lib/vtx-jzlj-ysqy-modal/imgs/overview_czz_zs_light.png +0 -0
- package/lib/vtx-jzlj-ysqy-modal/index.js +72 -0
- package/lib/vtx-jzlj-ysqy-modal/style/index.js +1 -0
- package/lib/vtx-jzlj-ysqy-modal/style/index.less +1 -0
- package/lib/vtx-restaurant-modal/components/Basic/index.less +16 -16
- package/lib/vtx-restaurant-modal/config.js +52 -52
- package/lib/vtx-road-modal/components/Statistical/index.less +32 -32
- package/lib/vtx-shxq-modal/api.js +5 -3
- package/package.json +78 -78
|
@@ -0,0 +1,256 @@
|
|
|
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 { Col, Row } from 'antd';
|
|
8
|
+
import dayjs from 'dayjs';
|
|
9
|
+
import { mean } from 'lodash';
|
|
10
|
+
import { useContext, useState } from 'react';
|
|
11
|
+
import { VmBarCharts, VmEmpty, VmFactorList, VmWrapper } from "../../../../_components";
|
|
12
|
+
import useSettings from "../../../../_hooks/useSettings";
|
|
13
|
+
import { JzljService } from "../../../api";
|
|
14
|
+
import Info from "../../../components/Info";
|
|
15
|
+
import { CarContext } from "../../../index";
|
|
16
|
+
import "./index.less";
|
|
17
|
+
import pjrcc_dark from "../../../imgs/jzlj/pjrcc_dark.png";
|
|
18
|
+
import pjrcc_light from "../../../imgs/jzlj/pjrcc_light.png";
|
|
19
|
+
import pjryl_dark from "../../../imgs/jzlj/pjryl_dark.png";
|
|
20
|
+
import pjryl_light from "../../../imgs/jzlj/pjryl_light.png";
|
|
21
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
|
+
var BaseInfo = function BaseInfo() {
|
|
23
|
+
var _dailyCarRunData$driv;
|
|
24
|
+
var _useContext = useContext(CarContext),
|
|
25
|
+
id = _useContext.id,
|
|
26
|
+
startDate = _useContext.startDate,
|
|
27
|
+
info = _useContext.info;
|
|
28
|
+
var _useSettings = useSettings(),
|
|
29
|
+
isDark = _useSettings.isDark;
|
|
30
|
+
var _useState = useState(dayjs(startDate)),
|
|
31
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
32
|
+
date = _useState2[0],
|
|
33
|
+
setDate = _useState2[1];
|
|
34
|
+
var _JzljService$useZlOth = JzljService.useZlOtherInfo({
|
|
35
|
+
id: id,
|
|
36
|
+
startDate: dayjs(date).format('YYYY-MM-DD'),
|
|
37
|
+
endDate: dayjs(date).format('YYYY-MM-DD')
|
|
38
|
+
}),
|
|
39
|
+
zlOtherInfoData = _JzljService$useZlOth.zlOtherInfoData;
|
|
40
|
+
var _JzljService$useDaily = JzljService.useDailyCarRun({
|
|
41
|
+
id: id,
|
|
42
|
+
startDate: dayjs(date).format('YYYY-MM-DD'),
|
|
43
|
+
endDate: dayjs(date).format('YYYY-MM-DD')
|
|
44
|
+
}),
|
|
45
|
+
dailyCarRunData = _JzljService$useDaily.dailyCarRunData;
|
|
46
|
+
var extraList = [{
|
|
47
|
+
name: '生效中处置证',
|
|
48
|
+
unit: '张',
|
|
49
|
+
value: (zlOtherInfoData === null || zlOtherInfoData === void 0 ? void 0 : zlOtherInfoData.sxzczzCount) || 0,
|
|
50
|
+
fontType: 'blue',
|
|
51
|
+
unitStyle: {
|
|
52
|
+
fontSize: 14
|
|
53
|
+
}
|
|
54
|
+
}];
|
|
55
|
+
var itemStyle = {
|
|
56
|
+
flex: 1,
|
|
57
|
+
justifyContent: 'center',
|
|
58
|
+
textAlign: 'center'
|
|
59
|
+
};
|
|
60
|
+
var yxxxList_top = [{
|
|
61
|
+
name: '核算行驶里程',
|
|
62
|
+
unit: 'km',
|
|
63
|
+
value: (dailyCarRunData === null || dailyCarRunData === void 0 ? void 0 : dailyCarRunData.sumMileage) || 0,
|
|
64
|
+
fontType: 'blue',
|
|
65
|
+
style: itemStyle
|
|
66
|
+
}, {
|
|
67
|
+
name: '完成联单数',
|
|
68
|
+
unit: '单',
|
|
69
|
+
value: (zlOtherInfoData === null || zlOtherInfoData === void 0 ? void 0 : zlOtherInfoData.orderCount) || 0,
|
|
70
|
+
style: itemStyle
|
|
71
|
+
}, {
|
|
72
|
+
name: '路线偏移报警数',
|
|
73
|
+
unit: '条',
|
|
74
|
+
value: (zlOtherInfoData === null || zlOtherInfoData === void 0 ? void 0 : zlOtherInfoData.lxplAlarmCount) || 0,
|
|
75
|
+
fontType: 'red',
|
|
76
|
+
style: itemStyle,
|
|
77
|
+
unitStyle: {
|
|
78
|
+
fontSize: 14
|
|
79
|
+
}
|
|
80
|
+
}];
|
|
81
|
+
var yxxxList_bottom = [{
|
|
82
|
+
name: '作业时长',
|
|
83
|
+
unit: '',
|
|
84
|
+
value: secondToFormatTime(((_dailyCarRunData$driv = dailyCarRunData === null || dailyCarRunData === void 0 ? void 0 : dailyCarRunData.driveDuration) !== null && _dailyCarRunData$driv !== void 0 ? _dailyCarRunData$driv : 0) / 1000 || 0),
|
|
85
|
+
fontType: 'blue',
|
|
86
|
+
style: itemStyle
|
|
87
|
+
}, {
|
|
88
|
+
name: '已运输量',
|
|
89
|
+
unit: '吨',
|
|
90
|
+
value: (zlOtherInfoData === null || zlOtherInfoData === void 0 ? void 0 : zlOtherInfoData.yysWeight) || 0,
|
|
91
|
+
style: itemStyle
|
|
92
|
+
}, {
|
|
93
|
+
name: '停车超时报警数',
|
|
94
|
+
unit: '条',
|
|
95
|
+
value: (zlOtherInfoData === null || zlOtherInfoData === void 0 ? void 0 : zlOtherInfoData.tccsAlarmCount) || 0,
|
|
96
|
+
fontType: 'red',
|
|
97
|
+
style: itemStyle,
|
|
98
|
+
unitStyle: {
|
|
99
|
+
fontSize: 14
|
|
100
|
+
}
|
|
101
|
+
}];
|
|
102
|
+
var _JzljService$useYxfx = JzljService.useYxfx({
|
|
103
|
+
id: id,
|
|
104
|
+
startDate: dayjs().subtract(6, 'days').format('YYYY-MM-DD'),
|
|
105
|
+
endDate: dayjs().format('YYYY-MM-DD')
|
|
106
|
+
}),
|
|
107
|
+
_JzljService$useYxfx$ = _JzljService$useYxfx.yxfxData,
|
|
108
|
+
yxfxData = _JzljService$useYxfx$ === void 0 ? [] : _JzljService$useYxfx$;
|
|
109
|
+
var ylData = yxfxData.map(function (item) {
|
|
110
|
+
return item.weight;
|
|
111
|
+
});
|
|
112
|
+
var ylDataAvg = ylData !== null && ylData !== void 0 && ylData.length ? mean(ylData).toFixed(2) : '0';
|
|
113
|
+
var ccData = yxfxData.map(function (item) {
|
|
114
|
+
return item.count;
|
|
115
|
+
});
|
|
116
|
+
var ccDataAvg = ccData !== null && ccData !== void 0 && ccData.length ? mean(ccData).toFixed(2) : '0';
|
|
117
|
+
var yxfxList = [{
|
|
118
|
+
name: '平均日运量',
|
|
119
|
+
unit: '吨',
|
|
120
|
+
value: ylDataAvg,
|
|
121
|
+
img: isDark ? pjryl_dark : pjryl_light,
|
|
122
|
+
fontType: 'blue',
|
|
123
|
+
unitStyle: {
|
|
124
|
+
fontSize: 14
|
|
125
|
+
},
|
|
126
|
+
style: {
|
|
127
|
+
flex: 1,
|
|
128
|
+
justifyContent: 'center'
|
|
129
|
+
}
|
|
130
|
+
}, {
|
|
131
|
+
name: '平均日车次',
|
|
132
|
+
unit: '次',
|
|
133
|
+
value: ccDataAvg,
|
|
134
|
+
img: isDark ? pjrcc_dark : pjrcc_light,
|
|
135
|
+
fontType: 'blue',
|
|
136
|
+
unitStyle: {
|
|
137
|
+
fontSize: 14
|
|
138
|
+
},
|
|
139
|
+
style: {
|
|
140
|
+
flex: 1,
|
|
141
|
+
justifyContent: 'center'
|
|
142
|
+
}
|
|
143
|
+
}];
|
|
144
|
+
return /*#__PURE__*/_jsxs(Row, {
|
|
145
|
+
gutter: [16, 16],
|
|
146
|
+
style: {
|
|
147
|
+
height: '100%'
|
|
148
|
+
},
|
|
149
|
+
className: "vtx-jzlj-car-base",
|
|
150
|
+
children: [/*#__PURE__*/_jsx(Info, {
|
|
151
|
+
showQrCode: true,
|
|
152
|
+
extraList: extraList,
|
|
153
|
+
showListImg: false
|
|
154
|
+
}), /*#__PURE__*/_jsx(Col, {
|
|
155
|
+
flex: '1',
|
|
156
|
+
style: {
|
|
157
|
+
height: '100%'
|
|
158
|
+
},
|
|
159
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
160
|
+
className: "vtx-jzlj-car-base-right",
|
|
161
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
162
|
+
className: "vtx-jzlj-car-base-right-top",
|
|
163
|
+
children: /*#__PURE__*/_jsxs(VmWrapper, {
|
|
164
|
+
title: '运行信息',
|
|
165
|
+
filterType: "datePicker",
|
|
166
|
+
dateValue: date,
|
|
167
|
+
filterChange: setDate,
|
|
168
|
+
disabledDate: function disabledDate(current) {
|
|
169
|
+
return current && current > dayjs().endOf('day');
|
|
170
|
+
},
|
|
171
|
+
children: [/*#__PURE__*/_jsx(VmFactorList, {
|
|
172
|
+
list: yxxxList_top,
|
|
173
|
+
style: {
|
|
174
|
+
backgroundColor: 'unset'
|
|
175
|
+
}
|
|
176
|
+
}), /*#__PURE__*/_jsx(VmFactorList, {
|
|
177
|
+
list: yxxxList_bottom,
|
|
178
|
+
style: {
|
|
179
|
+
backgroundColor: 'unset'
|
|
180
|
+
}
|
|
181
|
+
})]
|
|
182
|
+
})
|
|
183
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
184
|
+
className: "vtx-jzlj-car-base-right-bottom",
|
|
185
|
+
children: /*#__PURE__*/_jsxs(VmWrapper, {
|
|
186
|
+
title: '近7天运行分析',
|
|
187
|
+
children: [/*#__PURE__*/_jsx(VmFactorList, {
|
|
188
|
+
list: yxfxList,
|
|
189
|
+
style: {
|
|
190
|
+
background: 'unset'
|
|
191
|
+
}
|
|
192
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
193
|
+
className: "vtx-jzlj-car-base-right-bottom-chart",
|
|
194
|
+
children: yxfxData !== null && yxfxData !== void 0 && yxfxData.length ? /*#__PURE__*/_jsx(VmBarCharts, {
|
|
195
|
+
dataList: [{
|
|
196
|
+
name: '运量',
|
|
197
|
+
data: yxfxData.map(function (item) {
|
|
198
|
+
return "\u2000".concat(item.weight);
|
|
199
|
+
}),
|
|
200
|
+
color: 'geekblue',
|
|
201
|
+
yAxisIndex: 1
|
|
202
|
+
}],
|
|
203
|
+
xAxis: yxfxData.map(function (item) {
|
|
204
|
+
return item.date;
|
|
205
|
+
}),
|
|
206
|
+
yAxisList: [{
|
|
207
|
+
key: "\u2001",
|
|
208
|
+
unit: '次',
|
|
209
|
+
name: '(次)'
|
|
210
|
+
}, {
|
|
211
|
+
key: "\u2000",
|
|
212
|
+
unit: '吨',
|
|
213
|
+
name: '(吨)'
|
|
214
|
+
}],
|
|
215
|
+
lineList: [{
|
|
216
|
+
name: '车次',
|
|
217
|
+
data: yxfxData.map(function (item) {
|
|
218
|
+
return "\u2001".concat(item.count);
|
|
219
|
+
}),
|
|
220
|
+
color: '#0FB964',
|
|
221
|
+
yAxisIndex: 0
|
|
222
|
+
}],
|
|
223
|
+
barBorderRadius: [4, 4, 0, 0],
|
|
224
|
+
gridOptions: {
|
|
225
|
+
top: 30
|
|
226
|
+
}
|
|
227
|
+
}) : /*#__PURE__*/_jsx(VmEmpty, {
|
|
228
|
+
type: "NO_CHART"
|
|
229
|
+
})
|
|
230
|
+
})]
|
|
231
|
+
})
|
|
232
|
+
})]
|
|
233
|
+
})
|
|
234
|
+
})]
|
|
235
|
+
});
|
|
236
|
+
};
|
|
237
|
+
export default BaseInfo;
|
|
238
|
+
|
|
239
|
+
// 秒转化为时间的格式化字符串
|
|
240
|
+
export function secondToFormatTime(times) {
|
|
241
|
+
if (times <= 0) return '0';
|
|
242
|
+
var timeStr = '';
|
|
243
|
+
var remain = times;
|
|
244
|
+
var days = Math.floor(remain / (24 * 60 * 60));
|
|
245
|
+
if (days) timeStr += "".concat(days, "\u5929");
|
|
246
|
+
remain = remain % (24 * 60 * 60);
|
|
247
|
+
var hours = Math.floor(remain / (60 * 60));
|
|
248
|
+
if (hours) timeStr += "".concat(hours, "h");
|
|
249
|
+
remain = remain % (60 * 60);
|
|
250
|
+
var minutes = Math.floor(remain / 60);
|
|
251
|
+
if (minutes) timeStr += "".concat(minutes, "min");
|
|
252
|
+
remain = remain % 60;
|
|
253
|
+
var seconds = Math.floor(remain);
|
|
254
|
+
if (seconds) timeStr += "".concat(seconds, "s");
|
|
255
|
+
return timeStr;
|
|
256
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
.vtx-jzlj-car-base {
|
|
2
|
+
.vtx-jzlj-car-base-right {
|
|
3
|
+
height: 100%;
|
|
4
|
+
gap: 16px;
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.vtx-jzlj-car-base-right-top {
|
|
10
|
+
height: 220px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.vtx-jzlj-car-base-right-bottom {
|
|
14
|
+
height: calc(100% - 220px - 16px);
|
|
15
|
+
|
|
16
|
+
&-chart {
|
|
17
|
+
height: calc(100% - 70px);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { VmBarCharts, VmEmpty, VmFactorList, VmWrapper } from "../../../../_components";
|
|
2
|
+
import useSettings from "../../../../_hooks/useSettings";
|
|
3
|
+
import "./index.less";
|
|
4
|
+
import { mean } from 'lodash';
|
|
5
|
+
import pjrcc_dark from "../../../imgs/jzlj/pjrcc_dark.png";
|
|
6
|
+
import pjrcc_light from "../../../imgs/jzlj/pjrcc_light.png";
|
|
7
|
+
import pjryl_dark from "../../../imgs/jzlj/pjryl_dark.png";
|
|
8
|
+
import pjryl_light from "../../../imgs/jzlj/pjryl_light.png";
|
|
9
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
+
export default function Chart(_ref) {
|
|
11
|
+
var _ref$dataList = _ref.dataList,
|
|
12
|
+
dataList = _ref$dataList === void 0 ? [] : _ref$dataList;
|
|
13
|
+
var _useSettings = useSettings(),
|
|
14
|
+
isDark = _useSettings.isDark;
|
|
15
|
+
var ylData = dataList.map(function (item) {
|
|
16
|
+
return item.weight;
|
|
17
|
+
});
|
|
18
|
+
var ylDataAvg = ylData !== null && ylData !== void 0 && ylData.length ? mean(ylData).toFixed(2) : '0';
|
|
19
|
+
var ccData = dataList.map(function (item) {
|
|
20
|
+
return item.count;
|
|
21
|
+
});
|
|
22
|
+
var ccDataAvg = ccData !== null && ccData !== void 0 && ccData.length ? mean(ccData).toFixed(2) : '0';
|
|
23
|
+
var dataList_top = [{
|
|
24
|
+
name: '平均日运量',
|
|
25
|
+
unit: '吨',
|
|
26
|
+
value: ylDataAvg,
|
|
27
|
+
img: isDark ? pjryl_dark : pjryl_light,
|
|
28
|
+
fontType: 'blue',
|
|
29
|
+
unitStyle: {
|
|
30
|
+
fontSize: 14
|
|
31
|
+
},
|
|
32
|
+
style: {
|
|
33
|
+
flex: 1,
|
|
34
|
+
justifyContent: 'center'
|
|
35
|
+
}
|
|
36
|
+
}, {
|
|
37
|
+
name: '平均日车次',
|
|
38
|
+
unit: '次',
|
|
39
|
+
value: ccDataAvg,
|
|
40
|
+
img: isDark ? pjrcc_dark : pjrcc_light,
|
|
41
|
+
fontType: 'blue',
|
|
42
|
+
unitStyle: {
|
|
43
|
+
fontSize: 14
|
|
44
|
+
},
|
|
45
|
+
style: {
|
|
46
|
+
flex: 1,
|
|
47
|
+
justifyContent: 'center'
|
|
48
|
+
}
|
|
49
|
+
}];
|
|
50
|
+
return /*#__PURE__*/_jsxs(VmWrapper, {
|
|
51
|
+
showTitle: false,
|
|
52
|
+
style: {
|
|
53
|
+
border: 0
|
|
54
|
+
},
|
|
55
|
+
children: [/*#__PURE__*/_jsx(VmFactorList, {
|
|
56
|
+
list: dataList_top,
|
|
57
|
+
style: {
|
|
58
|
+
background: 'unset'
|
|
59
|
+
}
|
|
60
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
61
|
+
style: {
|
|
62
|
+
height: 'calc(100% - 70px)'
|
|
63
|
+
},
|
|
64
|
+
children: dataList !== null && dataList !== void 0 && dataList.length ? /*#__PURE__*/_jsx(VmBarCharts, {
|
|
65
|
+
dataList: [{
|
|
66
|
+
name: '运量',
|
|
67
|
+
data: dataList.map(function (item) {
|
|
68
|
+
return "\u2000".concat(item.weight);
|
|
69
|
+
}),
|
|
70
|
+
color: 'geekblue',
|
|
71
|
+
yAxisIndex: 1
|
|
72
|
+
}],
|
|
73
|
+
xAxis: dataList.map(function (item) {
|
|
74
|
+
return item.date;
|
|
75
|
+
}),
|
|
76
|
+
yAxisList: [{
|
|
77
|
+
key: "\u2001",
|
|
78
|
+
unit: '次',
|
|
79
|
+
name: '(次)'
|
|
80
|
+
}, {
|
|
81
|
+
key: "\u2000",
|
|
82
|
+
unit: '吨',
|
|
83
|
+
name: '(吨)'
|
|
84
|
+
}],
|
|
85
|
+
lineList: [{
|
|
86
|
+
name: '车次',
|
|
87
|
+
data: dataList.map(function (item) {
|
|
88
|
+
return "\u2001".concat(item.count);
|
|
89
|
+
}),
|
|
90
|
+
color: '#0FB964',
|
|
91
|
+
yAxisIndex: 0
|
|
92
|
+
}],
|
|
93
|
+
barBorderRadius: [4, 4, 0, 0]
|
|
94
|
+
}) : /*#__PURE__*/_jsx(VmEmpty, {
|
|
95
|
+
type: "NO_CHART"
|
|
96
|
+
})
|
|
97
|
+
})]
|
|
98
|
+
});
|
|
99
|
+
}
|