@vtx/modals2 5.0.57 → 5.0.59

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 (77) hide show
  1. package/lib/_components/vm-calendar/index.js +14 -4
  2. package/lib/_components/vm-calendar/style/index.less +4 -1
  3. package/lib/_components/vm-card-statistics/index.less +27 -27
  4. package/lib/_components/vm-custom/index.js +1 -1
  5. package/lib/_components/vm-factor-list/index.less +11 -11
  6. package/lib/_components/vm-filter/index.js +25 -0
  7. package/lib/_components/vm-pie-charts/index.js +14 -4
  8. package/lib/_components/vm-popover/index.less +7 -7
  9. package/lib/_components/vm-progress/index.js +6 -0
  10. package/lib/_components/vm-table/index.js +3 -3
  11. package/lib/_components/vm-table/style/index.less +12 -7
  12. package/lib/_components/vm-video/index.js +6 -1
  13. package/lib/style/index.less +5 -0
  14. package/lib/vtx-area-modal/api.js +2 -0
  15. package/lib/vtx-base-modal/Header/index.less +98 -98
  16. package/lib/vtx-base-modal/index.js +5 -0
  17. package/lib/vtx-car-modal/api.js +179 -74
  18. package/lib/vtx-car-modal/components/Info/index.less +6 -6
  19. package/lib/vtx-car-modal/content/Common/OilConsumption/index.less +6 -6
  20. package/lib/vtx-car-modal/content/Common/WaterConsumption/index.less +6 -6
  21. package/lib/vtx-car-modal/content/JXH/Hw2AlarmInfo/List.js +133 -0
  22. package/lib/vtx-car-modal/content/JXH/Hw2AlarmInfo/StaticInfo.js +84 -0
  23. package/lib/vtx-car-modal/content/JXH/Hw2AlarmInfo/index.js +71 -0
  24. package/lib/vtx-car-modal/content/JXH/Hw2BaseInfo/index.js +223 -0
  25. package/lib/vtx-car-modal/content/JXH/Hw2StaticInfo/index.js +549 -0
  26. package/lib/vtx-car-modal/content/JXH/Hw2StaticInfo/index.less +6 -0
  27. package/lib/vtx-car-modal/content/JXH/Hw2WorkRecord/index.js +291 -0
  28. package/lib/vtx-car-modal/content/JXH/WorkRecord/index.js +1 -1
  29. package/lib/vtx-car-modal/content/JXH/index.js +9 -1
  30. package/lib/vtx-car-modal/imgs/calendar/auto.png +0 -0
  31. package/lib/vtx-car-modal/imgs/calendar/dark_auto.png +0 -0
  32. package/lib/vtx-car-modal/imgs/calendar/dark_electricity.png +0 -0
  33. package/lib/vtx-car-modal/imgs/calendar/dark_oil.png +0 -0
  34. package/lib/vtx-car-modal/imgs/calendar/dark_transition.png +0 -0
  35. package/lib/vtx-car-modal/imgs/calendar/dark_water.png +0 -0
  36. package/lib/vtx-car-modal/imgs/calendar/dark_yy_mileage.png +0 -0
  37. package/lib/vtx-car-modal/imgs/calendar/electricity.png +0 -0
  38. package/lib/vtx-car-modal/imgs/calendar/oil.png +0 -0
  39. package/lib/vtx-car-modal/imgs/calendar/transition.png +0 -0
  40. package/lib/vtx-car-modal/imgs/calendar/water.png +0 -0
  41. package/lib/vtx-car-modal/imgs/calendar/yy_mileage.png +0 -0
  42. package/lib/vtx-car-modal/index.js +9 -1
  43. package/lib/vtx-cc-unit-modal/components/BaseInfo/index.less +6 -6
  44. package/lib/vtx-cp-modal/components/BaseInfo/TodayWork.js +1 -0
  45. package/lib/vtx-device-modal/components/DataAnalysis/index.less +66 -66
  46. package/lib/vtx-housing-estate-modal/components/Alarm/GDCLXL.js +2 -0
  47. package/lib/vtx-housing-estate-modal/components/Alarm/MYFX_GD.js +2 -0
  48. package/lib/vtx-housing-estate-modal/components/OverView/RightBottom.js +2 -0
  49. package/lib/vtx-restaurant-modal/components/Basic/index.less +16 -16
  50. package/lib/vtx-restaurant-modal/config.js +52 -52
  51. package/lib/vtx-road-modal/api.js +348 -11
  52. package/lib/vtx-road-modal/components/BaseInfo/Work.js +11 -5
  53. package/lib/vtx-road-modal/components/BaseInfo/index.js +6 -5
  54. package/lib/vtx-road-modal/components/LaneBaseInfo/Rules.js +63 -0
  55. package/lib/vtx-road-modal/components/LaneBaseInfo/Work.js +434 -0
  56. package/lib/vtx-road-modal/components/LaneBaseInfo/index.js +80 -0
  57. package/lib/vtx-road-modal/components/LaneBaseInfo/index.less +127 -0
  58. package/lib/vtx-road-modal/components/LaneCalendar/index.js +194 -0
  59. package/lib/vtx-road-modal/components/LaneStatistical/index.js +312 -0
  60. package/lib/vtx-road-modal/components/LaneStatistical/index.less +32 -0
  61. package/lib/vtx-road-modal/components/Statistical/index.less +32 -32
  62. package/lib/vtx-road-modal/components/index.js +4 -1
  63. package/lib/vtx-road-modal/imgs/car.png +0 -0
  64. package/lib/vtx-road-modal/imgs/dark_car.png +0 -0
  65. package/lib/vtx-road-modal/imgs/dark_person.png +0 -0
  66. package/lib/vtx-road-modal/imgs/person.png +0 -0
  67. package/lib/vtx-road-modal/imgs/schedule.png +0 -0
  68. package/lib/vtx-road-modal/imgs/work.png +0 -0
  69. package/lib/vtx-road-modal/imgs//344/274/230.png +0 -0
  70. package/lib/vtx-road-modal/imgs//345/267/256.png +0 -0
  71. package/lib/vtx-road-modal/imgs//350/211/257.png +0 -0
  72. package/lib/vtx-road-modal/index.js +18 -13
  73. package/lib/vtx-sdyd-tfd-modal/components/Alarm/GDCLXL.js +2 -0
  74. package/lib/vtx-sdyd-tfd-modal/components/Alarm/MYFX_GD.js +2 -0
  75. package/lib/vtx-sdyd-tfd-modal/components/OverView/RightBottom.js +2 -0
  76. package/lib/vtx-staff-modal/components/BaseInfo/WorkStatic.js +2 -2
  77. package/package.json +81 -81
@@ -0,0 +1,63 @@
1
+ import { default as classnames, default as classNames } from 'classnames';
2
+ import { isEmpty } from 'lodash';
3
+ import { VmEmpty, VmTag } from "../../../_components";
4
+ import useSettings from "../../../_hooks/useSettings";
5
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
+ var Rules = function Rules(_ref) {
7
+ var rules = _ref.rules,
8
+ workTypeColorMap = _ref.workTypeColorMap;
9
+ var _useSettings = useSettings(),
10
+ isDark = _useSettings.isDark;
11
+ return /*#__PURE__*/_jsx("div", {
12
+ className: classnames('vtx-road-lane-rule-wrap', {
13
+ 'vtx-road-lane-rule-wrap-dark': isDark
14
+ }),
15
+ children: Array.isArray(rules) && !isEmpty(rules) ? rules.map(function (item, index) {
16
+ return /*#__PURE__*/_jsxs("div", {
17
+ className: "vtx-road-lane-rule-item",
18
+ children: [/*#__PURE__*/_jsx("div", {
19
+ className: classNames('vtx-road-lane-rule-item-left', workTypeColorMap[item.workTypeName])
20
+ }), /*#__PURE__*/_jsxs("div", {
21
+ className: "vtx-road-lane-rule-item-right",
22
+ children: [/*#__PURE__*/_jsxs("div", {
23
+ className: "vtx-road-lane-rule-item-top",
24
+ children: [/*#__PURE__*/_jsx("div", {
25
+ style: {
26
+ fontWeight: 600
27
+ },
28
+ children: item.facilityTypeName
29
+ }), /*#__PURE__*/_jsx(VmTag, {
30
+ color: workTypeColorMap[item.workTypeName],
31
+ title: item.workTypeName
32
+ })]
33
+ }), /*#__PURE__*/_jsxs("div", {
34
+ className: "vtx-road-lane-rule-item-bottom",
35
+ children: [/*#__PURE__*/_jsx("img", {
36
+ src: isDark ? require("../../imgs/dark_car.png") : require("../../imgs/car.png"),
37
+ alt: "",
38
+ width: 16,
39
+ height: 16
40
+ }), /*#__PURE__*/_jsx("div", {
41
+ children: item.workCarCode
42
+ }), /*#__PURE__*/_jsx("div", {
43
+ className: "vtx-road-lane-rule-item-bottom-line"
44
+ }), /*#__PURE__*/_jsx("img", {
45
+ src: isDark ? require("../../imgs/dark_person.png") : require("../../imgs/person.png"),
46
+ alt: "",
47
+ width: 16,
48
+ height: 16
49
+ }), /*#__PURE__*/_jsx("div", {
50
+ children: item.driverName
51
+ })]
52
+ })]
53
+ })]
54
+ }, index);
55
+ }) : /*#__PURE__*/_jsx(VmEmpty, {
56
+ imgStyle: {
57
+ marginLeft: 0,
58
+ transform: 'translateX(0%)'
59
+ }
60
+ })
61
+ });
62
+ };
63
+ export default Rules;
@@ -0,0 +1,434 @@
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 { Col, Row, Space, Spin } from 'antd';
15
+ import dayjs from 'dayjs';
16
+ import { isEmpty } from 'lodash';
17
+ import { useMemo, useState } from 'react';
18
+ import { VmBarCharts, VmEmpty, VmProgress, VmTable, VmTag, VmWrapper } from "../../../_components";
19
+ import useSettings from "../../../_hooks/useSettings";
20
+ import { LaneService } from "../../api";
21
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
22
+ export var getPercentInfo = function getPercentInfo(percent) {
23
+ var colorList = ['#D9D9D9', '#D9D9D9'];
24
+ var color = '#CCCCCC';
25
+ var className = 'gray-text';
26
+ if (percent >= 100) {
27
+ colorList = ['#00B129', '#23EA51'];
28
+ className = 'green-text';
29
+ color = '#00EC47';
30
+ } else if (percent > 80 && percent < 100) {
31
+ colorList = ['#3A6DFF', '#00AEFF'];
32
+ className = 'blue-text';
33
+ color = '#09B9FF';
34
+ } else if (percent > 50 && percent <= 80) {
35
+ colorList = ['#FA8314', '#FAAD14'];
36
+ className = 'orange-text';
37
+ color = '#FFE100';
38
+ } else if (percent > 0 && percent <= 50) {
39
+ colorList = ['#FF3B3B', '#FF6464'];
40
+ className = 'red-text';
41
+ color = '#FF3E49';
42
+ }
43
+ return {
44
+ colorList: colorList,
45
+ className: className,
46
+ color: color
47
+ };
48
+ };
49
+ var Work = function Work(props) {
50
+ var _workInfo$workInfo, _workInfo$workInfo2, _workInfo$workInfo3;
51
+ var id = props.id,
52
+ setIframeModalInfo = props.setIframeModalInfo,
53
+ workTypeColorMap = props.workTypeColorMap,
54
+ jcssInfo = props.jcssInfo;
55
+ var _useSettings = useSettings(),
56
+ date = _useSettings.date,
57
+ theme = _useSettings.theme,
58
+ isDark = _useSettings.isDark;
59
+ var _useState = useState(date ? dayjs(date) : dayjs()),
60
+ _useState2 = _slicedToArray(_useState, 2),
61
+ day = _useState2[0],
62
+ setDay = _useState2[1];
63
+ var _useSetState = useSetState({
64
+ pagination: {
65
+ current: 1,
66
+ pageSize: 10,
67
+ total: 0
68
+ }
69
+ }),
70
+ _useSetState2 = _slicedToArray(_useSetState, 2),
71
+ state = _useSetState2[0],
72
+ setState = _useSetState2[1];
73
+ var pagination = state.pagination;
74
+ var _LaneService$useTaskL = LaneService.useTaskList(id, dayjs(day).format('YYYY-MM-DD'), pagination.current, jcssInfo.originTypeName === jcssInfo.typeName),
75
+ taskPage = _LaneService$useTaskL.taskPage,
76
+ taskLoading = _LaneService$useTaskL.loading;
77
+ var _LaneService$useWorkI = LaneService.useWorkInfo(id, dayjs(day).format('YYYY-MM-DD')),
78
+ workInfo = _LaneService$useWorkI.workInfo,
79
+ loading = _LaneService$useWorkI.loading;
80
+ var colorMap = {
81
+ blue: '#1677FF',
82
+ green: '#0FB964',
83
+ yellow: '#FFAA00',
84
+ purple: '#B894F9',
85
+ orange: '#FF8746'
86
+ };
87
+ if (isDark) {
88
+ colorMap.blue = '#009DFF';
89
+ }
90
+ var records = {
91
+ total: (taskPage === null || taskPage === void 0 ? void 0 : taskPage.total) || 0,
92
+ rows: (taskPage === null || taskPage === void 0 ? void 0 : taskPage.rows) || []
93
+ };
94
+ var pageChange = function pageChange(page) {
95
+ setState({
96
+ pagination: _objectSpread(_objectSpread({}, pagination), {}, {
97
+ current: page
98
+ })
99
+ });
100
+ };
101
+ var columns = [{
102
+ title: '车牌号',
103
+ dataIndex: 'workCarCode',
104
+ key: 'workCarCode',
105
+ ellipsis: true,
106
+ width: 90,
107
+ fixed: 'left'
108
+ }, {
109
+ title: '车辆类型',
110
+ dataIndex: 'carClassesName',
111
+ key: 'carClassesName',
112
+ width: 80,
113
+ ellipsis: true
114
+ }, {
115
+ title: '车道类型',
116
+ dataIndex: 'facilityTypeName',
117
+ key: 'facilityTypeName',
118
+ width: 100,
119
+ ellipsis: true
120
+ }, {
121
+ title: '作业司机',
122
+ dataIndex: 'driverName',
123
+ key: 'driverName',
124
+ width: 100,
125
+ ellipsis: true
126
+ }, {
127
+ title: '作业时段',
128
+ dataIndex: 'startTime',
129
+ key: 'startTime',
130
+ width: 120,
131
+ ellipsis: true,
132
+ render: function render(text, record) {
133
+ return "".concat(text.slice(0, 5), " ~ ").concat(record.endTime.slice(0, 5));
134
+ }
135
+ }, {
136
+ title: '作业类型',
137
+ dataIndex: 'workTypeName',
138
+ key: 'workTypeName',
139
+ width: 80,
140
+ ellipsis: true,
141
+ render: function render(text) {
142
+ return /*#__PURE__*/_jsx(VmTag, {
143
+ title: text,
144
+ type: workTypeColorMap[text]
145
+ });
146
+ }
147
+ }, {
148
+ title: '作业趟数',
149
+ dataIndex: 'workCount',
150
+ key: 'workCount',
151
+ width: 90,
152
+ ellipsis: true,
153
+ align: 'right'
154
+ }, {
155
+ title: '作业里程(km)',
156
+ dataIndex: 'workMileage',
157
+ key: 'workMileage',
158
+ width: 130,
159
+ ellipsis: true,
160
+ align: 'right'
161
+ }, {
162
+ title: '完成率',
163
+ dataIndex: 'completeRate',
164
+ key: 'completeRate',
165
+ width: 90,
166
+ ellipsis: true,
167
+ align: 'right',
168
+ render: function render(text) {
169
+ return "".concat(text, "%");
170
+ }
171
+ }, {
172
+ title: '作业质量',
173
+ dataIndex: 'workQuality',
174
+ key: 'workQuality',
175
+ width: 90,
176
+ ellipsis: true,
177
+ render: function render(text) {
178
+ var colorMap = {
179
+ 优: '--green-color',
180
+ 良: '--yellow-color',
181
+ 差: '--red-color'
182
+ };
183
+ var imgMap = {
184
+ 优: require("../../imgs/\u4F18.png"),
185
+ 良: require("../../imgs/\u826F.png"),
186
+ 差: require("../../imgs/\u5DEE.png")
187
+ };
188
+ return text ? /*#__PURE__*/_jsxs(Row, {
189
+ align: 'middle',
190
+ children: [/*#__PURE__*/_jsx("img", {
191
+ src: imgMap[text],
192
+ alt: "",
193
+ width: 16,
194
+ height: 16,
195
+ style: {
196
+ marginRight: 4
197
+ }
198
+ }), /*#__PURE__*/_jsx("span", {
199
+ style: {
200
+ color: "var(".concat(colorMap[text], ")")
201
+ },
202
+ children: text
203
+ })]
204
+ }) : '-';
205
+ }
206
+ }, {
207
+ title: '操作',
208
+ dataIndex: 'track',
209
+ key: 'track',
210
+ width: 100,
211
+ fixed: 'right',
212
+ render: function render(_text, record) {
213
+ return /*#__PURE__*/_jsx("a", {
214
+ onClick: function onClick() {
215
+ var prefix = '';
216
+ var prefixList = location.pathname.split('/').filter(function (item) {
217
+ return item;
218
+ });
219
+ if (prefixList.length === 2) {
220
+ prefix = "/".concat(prefixList[0]);
221
+ }
222
+ var src = "".concat(prefix, "/carHistory/#/zyqsLaneHistory?carId=").concat(record.workCarId, "&theme=").concat(theme === 'blue' ? 'dark' : theme, "&startTime=").concat(dayjs(date).format('YYYY-MM-DD 00:00:00'), "&endTime=").concat(dayjs(date).format('YYYY-MM-DD 23:59:59'), "&").concat(location.href.split('?')[1]);
223
+ setIframeModalInfo({
224
+ title: '车辆轨迹',
225
+ visible: true,
226
+ src: src
227
+ });
228
+ },
229
+ children: "\u67E5\u770B\u8F68\u8FF9"
230
+ });
231
+ }
232
+ }];
233
+ var tableProps = {
234
+ pagination: _objectSpread(_objectSpread({}, pagination), {}, {
235
+ total: records.total,
236
+ defaultPageSize: 10,
237
+ onChange: pageChange
238
+ }),
239
+ columns: columns,
240
+ indexFixed: true,
241
+ rowKey: 'id',
242
+ dataSource: records.rows,
243
+ loading: taskLoading
244
+ };
245
+ var _useMemo = useMemo(function () {
246
+ var planMileageList = [];
247
+ var workMileageList = [];
248
+ var xAxis = [];
249
+ var completeRateList = [];
250
+ (workInfo.workTypeSummary || []).forEach(function (item) {
251
+ var name = item.name,
252
+ workInfo = item.workInfo;
253
+ var _ref = workInfo || {},
254
+ planMileage = _ref.planMileage,
255
+ workMileage = _ref.workMileage,
256
+ completeRate = _ref.completeRate;
257
+ xAxis.push(name);
258
+ planMileageList.push(planMileage);
259
+ workMileageList.push(workMileage);
260
+ completeRateList.push({
261
+ name: name,
262
+ completeRate: completeRate
263
+ });
264
+ });
265
+ return {
266
+ dataList: [{
267
+ name: '排班里程',
268
+ data: planMileageList,
269
+ color: 'geekblue'
270
+ }, {
271
+ name: '作业里程',
272
+ data: workMileageList,
273
+ color: 'green'
274
+ }],
275
+ xAxis: xAxis,
276
+ completeRateList: completeRateList
277
+ };
278
+ }, [JSON.stringify(workInfo.workTypeSummary)]),
279
+ dataList = _useMemo.dataList,
280
+ xAxis = _useMemo.xAxis,
281
+ completeRateList = _useMemo.completeRateList;
282
+ var mileageList = [{
283
+ name: '排班里程',
284
+ value: workInfo === null || workInfo === void 0 || (_workInfo$workInfo = workInfo.workInfo) === null || _workInfo$workInfo === void 0 ? void 0 : _workInfo$workInfo.planMileage,
285
+ icon: require("../../imgs/schedule.png")
286
+ }, {
287
+ name: '作业里程',
288
+ value: workInfo === null || workInfo === void 0 || (_workInfo$workInfo2 = workInfo.workInfo) === null || _workInfo$workInfo2 === void 0 ? void 0 : _workInfo$workInfo2.workMileage,
289
+ icon: require("../../imgs/work.png")
290
+ }];
291
+ return /*#__PURE__*/_jsxs("div", {
292
+ className: 'vtx-road-info-right-wrap',
293
+ children: [/*#__PURE__*/_jsx("div", {
294
+ className: 'vtx-car-info-right-wrap-top',
295
+ children: /*#__PURE__*/_jsx(VmWrapper, {
296
+ filterType: "datePicker",
297
+ dateValue: day,
298
+ title: "\u4F5C\u4E1A\u6C47\u603B",
299
+ filterChange: setDay,
300
+ disabledDate: function disabledDate(current) {
301
+ return current && current > dayjs().endOf('day');
302
+ },
303
+ children: loading ? /*#__PURE__*/_jsx(Row, {
304
+ align: 'middle',
305
+ justify: 'center',
306
+ children: /*#__PURE__*/_jsx(Spin, {})
307
+ }) : isEmpty(workInfo === null || workInfo === void 0 ? void 0 : workInfo.workInfo) && isEmpty(workInfo === null || workInfo === void 0 ? void 0 : workInfo.workTypeSummary) ? /*#__PURE__*/_jsx("div", {
308
+ style: {
309
+ height: 200
310
+ },
311
+ children: /*#__PURE__*/_jsx(VmEmpty, {
312
+ imgStyle: {
313
+ marginLeft: 0,
314
+ transform: 'translateX(0%)'
315
+ }
316
+ })
317
+ }) : /*#__PURE__*/_jsxs(Row, {
318
+ gutter: [16, 16],
319
+ children: [/*#__PURE__*/_jsx(Col, {
320
+ span: 12,
321
+ children: /*#__PURE__*/_jsxs(Row, {
322
+ align: 'middle',
323
+ justify: 'flex-start',
324
+ style: {
325
+ marginLeft: 40
326
+ },
327
+ children: [/*#__PURE__*/_jsxs(Space, {
328
+ size: 40,
329
+ align: "center",
330
+ children: [/*#__PURE__*/_jsx(VmProgress.Circle, {
331
+ rate: workInfo === null || workInfo === void 0 || (_workInfo$workInfo3 = workInfo.workInfo) === null || _workInfo$workInfo3 === void 0 ? void 0 : _workInfo$workInfo3.completeRate,
332
+ name: '完成率',
333
+ width: 80
334
+ }), mileageList.map(function (item) {
335
+ return /*#__PURE__*/_jsxs("div", {
336
+ className: 'vtx-road-lane-mileage-item',
337
+ children: [/*#__PURE__*/_jsxs("div", {
338
+ children: [/*#__PURE__*/_jsx("span", {
339
+ className: 'vtx-road-lane-mileage-item-value',
340
+ children: item.value
341
+ }), /*#__PURE__*/_jsx("span", {
342
+ className: 'vtx-road-lane-mileage-item-unit',
343
+ children: "km"
344
+ })]
345
+ }), /*#__PURE__*/_jsxs(Row, {
346
+ align: "middle",
347
+ children: [/*#__PURE__*/_jsx("img", {
348
+ src: item.icon,
349
+ className: 'vtx-road-lane-mileage-item-img'
350
+ }), /*#__PURE__*/_jsx("span", {
351
+ children: item.name
352
+ })]
353
+ })]
354
+ }, item.name);
355
+ })]
356
+ }), completeRateList.map(function (item) {
357
+ var _getPercentInfo = getPercentInfo(item.completeRate),
358
+ className = _getPercentInfo.className,
359
+ colorList = _getPercentInfo.colorList;
360
+ return /*#__PURE__*/_jsxs("div", {
361
+ className: 'vtx-road-work-type-item',
362
+ children: [/*#__PURE__*/_jsx("div", {
363
+ children: item.name
364
+ }), /*#__PURE__*/_jsx("div", {
365
+ style: {
366
+ width: 200
367
+ },
368
+ children: /*#__PURE__*/_jsx(VmProgress.Line, {
369
+ width: '100%',
370
+ rate: item.completeRate,
371
+ name: item.name,
372
+ strokeColor: {
373
+ '0%': colorList[0],
374
+ '100%': colorList[1]
375
+ }
376
+ })
377
+ }), /*#__PURE__*/_jsxs("div", {
378
+ children: [/*#__PURE__*/_jsx("span", {
379
+ className: "vtx-road-work-type-item-value vtx-road-work-type-item-".concat(className),
380
+ children: item.completeRate
381
+ }), /*#__PURE__*/_jsx("span", {
382
+ className: "vtx-road-work-type-item-unit vtx-road-work-type-item-".concat(className),
383
+ children: "%"
384
+ })]
385
+ })]
386
+ }, item.name);
387
+ })]
388
+ })
389
+ }), /*#__PURE__*/_jsx(Col, {
390
+ span: 12,
391
+ children: !loading && isEmpty(workInfo === null || workInfo === void 0 ? void 0 : workInfo.workTypeSummary) ? /*#__PURE__*/_jsx("div", {
392
+ style: {
393
+ height: 200
394
+ },
395
+ children: /*#__PURE__*/_jsx(VmEmpty, {
396
+ imgStyle: {
397
+ marginLeft: 0,
398
+ transform: 'translateX(0%)'
399
+ }
400
+ })
401
+ }) : /*#__PURE__*/_jsx(VmBarCharts, {
402
+ height: 216,
403
+ loading: loading,
404
+ dataList: dataList,
405
+ xAxis: xAxis,
406
+ unit: "km",
407
+ yAxisList: [{
408
+ key: '',
409
+ unit: 'km',
410
+ name: '(km)'
411
+ }]
412
+ })
413
+ })]
414
+ })
415
+ })
416
+ }), /*#__PURE__*/_jsx("div", {
417
+ style: {
418
+ flex: 1,
419
+ minHeight: 0
420
+ },
421
+ children: /*#__PURE__*/_jsx(VmWrapper, {
422
+ title: "\u4F5C\u4E1A\u660E\u7EC6",
423
+ children: /*#__PURE__*/_jsx("div", {
424
+ style: {
425
+ width: '100%',
426
+ height: '100%'
427
+ },
428
+ children: /*#__PURE__*/_jsx(VmTable, _objectSpread({}, tableProps))
429
+ })
430
+ })
431
+ })]
432
+ });
433
+ };
434
+ export default Work;
@@ -0,0 +1,80 @@
1
+ import { Col, Row } from 'antd';
2
+ import _ from 'lodash';
3
+ import { VmInfoCollection, VmMap, VmTitle, VmWrapper } from "../../../_components";
4
+ import { BaseInfo as DefaultBaseInfo } from "../../../vtx-default-modal/components";
5
+ import { LaneService } from "../../api";
6
+ import "./index.less";
7
+ import Rules from "./Rules";
8
+ import Work from "./Work";
9
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
10
+ var BaseInfo = function BaseInfo(_ref) {
11
+ var _info$lngLats, _jcssInfo$geometryInf;
12
+ var id = _ref.id,
13
+ jcssInfo = _ref.jcssInfo,
14
+ _ref$hasRule = _ref.hasRule,
15
+ hasRule = _ref$hasRule === void 0 ? false : _ref$hasRule,
16
+ setIframeModalInfo = _ref.setIframeModalInfo;
17
+ var _LaneService$useBaseI = LaneService.useBaseInfo(jcssInfo === null || jcssInfo === void 0 ? void 0 : jcssInfo.id, hasRule),
18
+ baseInfo = _LaneService$useBaseI.baseInfo,
19
+ info = _LaneService$useBaseI.info;
20
+ var _LaneService$useGetRu = LaneService.useGetRuleInfo(jcssInfo === null || jcssInfo === void 0 ? void 0 : jcssInfo.id, hasRule),
21
+ _LaneService$useGetRu2 = _LaneService$useGetRu.rules,
22
+ rules = _LaneService$useGetRu2 === void 0 ? [] : _LaneService$useGetRu2,
23
+ workTypeColorMap = _LaneService$useGetRu.workTypeColorMap;
24
+ var rings = (info === null || info === void 0 || (_info$lngLats = info.lngLats) === null || _info$lngLats === void 0 ? void 0 : _info$lngLats.wgs84) || (jcssInfo === null || jcssInfo === void 0 || (_jcssInfo$geometryInf = jcssInfo.geometryInfo) === null || _jcssInfo$geometryInf === void 0 ? void 0 : _jcssInfo$geometryInf.lngLats) || '';
25
+ var mapPolygons = _.isEmpty(rings) ? [] : [{
26
+ rings: rings
27
+ }];
28
+ return hasRule ? /*#__PURE__*/_jsxs(Row, {
29
+ gutter: [16, 16],
30
+ style: {
31
+ height: '100%'
32
+ },
33
+ children: [/*#__PURE__*/_jsx(Col, {
34
+ flex: '400px',
35
+ children: /*#__PURE__*/_jsxs(VmWrapper, {
36
+ title: '基本信息',
37
+ children: [/*#__PURE__*/_jsx(VmInfoCollection, {
38
+ data: baseInfo
39
+ }), /*#__PURE__*/_jsx("div", {
40
+ style: {
41
+ height: 194
42
+ },
43
+ children: /*#__PURE__*/_jsx(VmMap, {
44
+ mapPolygons: mapPolygons,
45
+ mapType: 'wgs84',
46
+ geometryType: 'polyline'
47
+ })
48
+ }), /*#__PURE__*/_jsx(VmTitle, {
49
+ title: '作业规则',
50
+ border: false
51
+ }), /*#__PURE__*/_jsx(Rules, {
52
+ rules: rules,
53
+ workTypeColorMap: workTypeColorMap
54
+ })]
55
+ })
56
+ }), /*#__PURE__*/_jsx(Col, {
57
+ flex: '1',
58
+ style: {
59
+ minWidth: 0
60
+ },
61
+ children: /*#__PURE__*/_jsx(Work, {
62
+ id: id,
63
+ setIframeModalInfo: setIframeModalInfo,
64
+ workTypeColorMap: workTypeColorMap,
65
+ jcssInfo: jcssInfo
66
+ })
67
+ })]
68
+ }) : /*#__PURE__*/_jsx(DefaultBaseInfo, {
69
+ id: id,
70
+ info: jcssInfo,
71
+ data: [],
72
+ geometryType: 'polyline',
73
+ lineLayer: {
74
+ id: 'roadLine',
75
+ rings: rings,
76
+ config: {}
77
+ }
78
+ });
79
+ };
80
+ export default BaseInfo;