@vtx/modals2 5.0.56 → 5.0.58

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 (64) 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-filter/index.js +25 -0
  4. package/lib/_components/vm-pie-charts/index.js +13 -3
  5. package/lib/_components/vm-progress/index.js +6 -0
  6. package/lib/_components/vm-table/index.js +3 -3
  7. package/lib/_components/vm-table/style/index.less +12 -7
  8. package/lib/_components/vm-video/HistoryGrid.js +4 -2
  9. package/lib/_components/vm-video/index.js +10 -4
  10. package/lib/style/index.less +5 -0
  11. package/lib/vtx-area-modal/api.js +2 -0
  12. package/lib/vtx-base-modal/index.js +5 -0
  13. package/lib/vtx-car-modal/api.js +179 -74
  14. package/lib/vtx-car-modal/content/JXH/Hw2AlarmInfo/List.js +133 -0
  15. package/lib/vtx-car-modal/content/JXH/Hw2AlarmInfo/StaticInfo.js +84 -0
  16. package/lib/vtx-car-modal/content/JXH/Hw2AlarmInfo/index.js +71 -0
  17. package/lib/vtx-car-modal/content/JXH/Hw2BaseInfo/index.js +223 -0
  18. package/lib/vtx-car-modal/content/JXH/Hw2StaticInfo/index.js +549 -0
  19. package/lib/vtx-car-modal/content/JXH/Hw2StaticInfo/index.less +6 -0
  20. package/lib/vtx-car-modal/content/JXH/Hw2WorkRecord/index.js +291 -0
  21. package/lib/vtx-car-modal/content/JXH/WorkRecord/index.js +1 -1
  22. package/lib/vtx-car-modal/content/JXH/index.js +9 -1
  23. package/lib/vtx-car-modal/imgs/calendar/auto.png +0 -0
  24. package/lib/vtx-car-modal/imgs/calendar/dark_auto.png +0 -0
  25. package/lib/vtx-car-modal/imgs/calendar/dark_electricity.png +0 -0
  26. package/lib/vtx-car-modal/imgs/calendar/dark_oil.png +0 -0
  27. package/lib/vtx-car-modal/imgs/calendar/dark_transition.png +0 -0
  28. package/lib/vtx-car-modal/imgs/calendar/dark_water.png +0 -0
  29. package/lib/vtx-car-modal/imgs/calendar/dark_yy_mileage.png +0 -0
  30. package/lib/vtx-car-modal/imgs/calendar/electricity.png +0 -0
  31. package/lib/vtx-car-modal/imgs/calendar/oil.png +0 -0
  32. package/lib/vtx-car-modal/imgs/calendar/transition.png +0 -0
  33. package/lib/vtx-car-modal/imgs/calendar/water.png +0 -0
  34. package/lib/vtx-car-modal/imgs/calendar/yy_mileage.png +0 -0
  35. package/lib/vtx-car-modal/index.js +9 -1
  36. package/lib/vtx-cp-modal/components/BaseInfo/TodayWork.js +1 -0
  37. package/lib/vtx-housing-estate-modal/components/Alarm/GDCLXL.js +2 -0
  38. package/lib/vtx-housing-estate-modal/components/Alarm/MYFX_GD.js +2 -0
  39. package/lib/vtx-housing-estate-modal/components/OverView/RightBottom.js +2 -0
  40. package/lib/vtx-road-modal/api.js +348 -11
  41. package/lib/vtx-road-modal/components/BaseInfo/Work.js +11 -5
  42. package/lib/vtx-road-modal/components/BaseInfo/index.js +6 -5
  43. package/lib/vtx-road-modal/components/LaneBaseInfo/Rules.js +63 -0
  44. package/lib/vtx-road-modal/components/LaneBaseInfo/Work.js +434 -0
  45. package/lib/vtx-road-modal/components/LaneBaseInfo/index.js +80 -0
  46. package/lib/vtx-road-modal/components/LaneBaseInfo/index.less +127 -0
  47. package/lib/vtx-road-modal/components/LaneCalendar/index.js +194 -0
  48. package/lib/vtx-road-modal/components/LaneStatistical/index.js +312 -0
  49. package/lib/vtx-road-modal/components/LaneStatistical/index.less +32 -0
  50. package/lib/vtx-road-modal/components/index.js +4 -1
  51. package/lib/vtx-road-modal/imgs/car.png +0 -0
  52. package/lib/vtx-road-modal/imgs/dark_car.png +0 -0
  53. package/lib/vtx-road-modal/imgs/dark_person.png +0 -0
  54. package/lib/vtx-road-modal/imgs/person.png +0 -0
  55. package/lib/vtx-road-modal/imgs/schedule.png +0 -0
  56. package/lib/vtx-road-modal/imgs/work.png +0 -0
  57. package/lib/vtx-road-modal/imgs//344/274/230.png +0 -0
  58. package/lib/vtx-road-modal/imgs//345/267/256.png +0 -0
  59. package/lib/vtx-road-modal/imgs//350/211/257.png +0 -0
  60. package/lib/vtx-road-modal/index.js +18 -13
  61. package/lib/vtx-sdyd-tfd-modal/components/Alarm/GDCLXL.js +2 -0
  62. package/lib/vtx-sdyd-tfd-modal/components/Alarm/MYFX_GD.js +2 -0
  63. package/lib/vtx-sdyd-tfd-modal/components/OverView/RightBottom.js +2 -0
  64. package/package.json +1 -1
@@ -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;
@@ -0,0 +1,127 @@
1
+ @import '../../../style/index';
2
+
3
+ .vtx-road-lane-rule-wrap {
4
+ --bg-color: rgba(155, 155, 155, 0.08);
5
+ --line-bg-color: #bfc3cb;
6
+ display: flex;
7
+ flex-direction: column;
8
+ gap: 8px;
9
+ &.vtx-road-lane-rule-wrap-dark {
10
+ --bg-color: rgba(11,88,142,0.3);
11
+ --line-bg-color: #BFC3CB;
12
+ }
13
+ .vtx-road-lane-rule-item {
14
+ display: flex;
15
+ align-items: center;
16
+ gap: 12px;
17
+ height: 64px;
18
+ padding: 12px;
19
+ border-radius: 8px;
20
+ background: var(--bg-color);
21
+ color: var(--info-color);
22
+ &-left {
23
+ border: 2px dashed;
24
+ height: 25px;
25
+ &.blue {
26
+ border-color: var(--blue-color);
27
+ }
28
+ &.green {
29
+ border-color: var(--green-color);
30
+ }
31
+ &.purple {
32
+ border-color: #b894f9;
33
+ }
34
+ &.orange {
35
+ border-color: #ff8746;
36
+ }
37
+ &.yellow {
38
+ border-color: #ffaa00;
39
+ }
40
+ }
41
+ &-right {
42
+ flex: 1;
43
+ min-width: 0;
44
+ }
45
+ &-top {
46
+ display: flex;
47
+ align-items: center;
48
+ justify-content: space-between;
49
+ }
50
+ &-bottom {
51
+ display: flex;
52
+ align-items: center;
53
+ gap: 8px;
54
+ &-line {
55
+ width: 2px;
56
+ height: 8px;
57
+ margin: 0 4px;
58
+ background: var(--line-bg-color);
59
+ }
60
+ }
61
+ }
62
+ }
63
+
64
+ .vtx-road-lane-mileage-item {
65
+ color: var(--info-color);
66
+ &-value,
67
+ &-unit {
68
+ font-weight: bold;
69
+ font-size: 24px;
70
+ color: var(--blue-color);
71
+ }
72
+ &-unit {
73
+ font-size: 12px;
74
+ margin-left: 4px;
75
+ }
76
+ &-img {
77
+ width: 16px;
78
+ height: 16px;
79
+ margin-right: 2px;
80
+ }
81
+ }
82
+
83
+ .vtx-road-work-type-item {
84
+ display: flex;
85
+ align-items: center;
86
+ gap: 12px;
87
+ color: var(--info-color);
88
+ margin-left: 20px;
89
+ &-value {
90
+ font-weight: bold;
91
+ font-size: 16px;
92
+ }
93
+ &-unit {
94
+ font-weight: bold;
95
+ font-size: 12px;
96
+ }
97
+ &-green-text {
98
+ background: linear-gradient(180deg, #23ea51, #00b129);
99
+ -webkit-background-clip: text;
100
+ background-clip: text;
101
+ -webkit-text-fill-color: transparent;
102
+ }
103
+ &-blue-text {
104
+ background: linear-gradient(180deg, #00a6ff, #3a6dff);
105
+ -webkit-background-clip: text;
106
+ background-clip: text;
107
+ -webkit-text-fill-color: transparent;
108
+ }
109
+ &-orange-text {
110
+ background: linear-gradient(180deg, #faad14, #fa8314);
111
+ -webkit-background-clip: text;
112
+ background-clip: text;
113
+ -webkit-text-fill-color: transparent;
114
+ }
115
+ &-red-text {
116
+ background: linear-gradient(180deg, #ff6464, #ff3b3b);
117
+ -webkit-background-clip: text;
118
+ background-clip: text;
119
+ -webkit-text-fill-color: transparent;
120
+ }
121
+ &-gray-text {
122
+ background: linear-gradient(180deg, #bec4cb, #9599a3);
123
+ -webkit-background-clip: text;
124
+ background-clip: text;
125
+ -webkit-text-fill-color: transparent;
126
+ }
127
+ }