@vtx/modals2 5.0.4 → 5.0.5

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 (103) hide show
  1. package/lib/_components/vm-bar-charts/index.js +9 -5
  2. package/lib/_components/vm-extra-tab/style/index.less +6 -3
  3. package/lib/_components/vm-pie-charts/index.js +3 -1
  4. package/lib/_components/vm-tag/style/index.less +1 -0
  5. package/lib/_components/vm-video/HistoryGrid.js +52 -0
  6. package/lib/_components/vm-video/RealtimeGrid.js +8 -4
  7. package/lib/_components/vm-video/index.js +298 -112
  8. package/lib/_components/vm-video/index.less +10 -1
  9. package/lib/_service/index.js +5 -0
  10. package/lib/_util/index.js +0 -5
  11. package/lib/vtx-base-modal/Header/index.js +3 -1
  12. package/lib/vtx-base-modal/index.js +6 -3
  13. package/lib/vtx-car-modal/components/Info/index.js +2 -1
  14. package/lib/vtx-car-modal/content/Cc/AlarmInfo/StaticInfo.js +0 -1
  15. package/lib/vtx-car-modal/content/JXH/BaseInfo/index.js +131 -104
  16. package/lib/vtx-car-modal/content/JXH/StaticInfo/index.js +206 -158
  17. package/lib/vtx-car-modal/content/JXH/WorkRecord/index.js +19 -4
  18. package/lib/vtx-car-modal/content/Unmanned/Analysis/index.js +33 -0
  19. package/lib/vtx-car-modal/content/Unmanned/Calendar/index.js +255 -0
  20. package/lib/vtx-car-modal/content/Unmanned/Monitor/index.js +75 -0
  21. package/lib/vtx-car-modal/content/Unmanned/Monitor/index.less +22 -0
  22. package/lib/vtx-car-modal/content/Unmanned/WorkInfo/index.js +87 -0
  23. package/lib/vtx-car-modal/content/Unmanned/WorkInfo/index.less +0 -0
  24. package/lib/vtx-car-modal/content/Unmanned/index.js +10 -0
  25. package/lib/vtx-car-modal/content/index.js +2 -1
  26. package/lib/vtx-car-modal/imgs/butter.png +0 -0
  27. package/lib/vtx-car-modal/imgs/butter_dark.png +0 -0
  28. package/lib/vtx-car-modal/imgs/clock.png +0 -0
  29. package/lib/vtx-car-modal/imgs/clock_dark.png +0 -0
  30. package/lib/vtx-car-modal/imgs/clock_green.png +0 -0
  31. package/lib/vtx-car-modal/imgs/clock_green_dark.png +0 -0
  32. package/lib/vtx-car-modal/imgs/factor_bg.png +0 -0
  33. package/lib/vtx-car-modal/imgs/track.png +0 -0
  34. package/lib/vtx-car-modal/imgs/track_dark.png +0 -0
  35. package/lib/vtx-car-modal/imgs/track_green.png +0 -0
  36. package/lib/vtx-car-modal/imgs/track_green_dark.png +0 -0
  37. package/lib/vtx-car-modal/imgs/water.png +0 -0
  38. package/lib/vtx-car-modal/imgs/water_dark.png +0 -0
  39. package/lib/vtx-car-modal/index.js +9 -3
  40. package/lib/vtx-default-modal/components/BaseInfo/index.js +3 -2
  41. package/lib/vtx-default-modal/index.js +0 -1
  42. package/lib/vtx-device-modal/components/DataAnalysis/MonitorAnalysis.js +0 -1
  43. package/lib/vtx-df-modal/index.js +0 -2
  44. package/lib/vtx-housing-estate-modal/api.js +559 -0
  45. package/lib/vtx-housing-estate-modal/components/Alarm/Distribute.js +129 -0
  46. package/lib/vtx-housing-estate-modal/components/Alarm/FSCSFB.js +67 -0
  47. package/lib/vtx-housing-estate-modal/components/Alarm/FSSD.js +65 -0
  48. package/lib/vtx-housing-estate-modal/components/Alarm/FSYZQS.js +67 -0
  49. package/lib/vtx-housing-estate-modal/components/Alarm/GDCLXL.js +109 -0
  50. package/lib/vtx-housing-estate-modal/components/Alarm/index.js +99 -0
  51. package/lib/vtx-housing-estate-modal/components/Alarm/index.less +54 -0
  52. package/lib/vtx-housing-estate-modal/components/OverView/Hot.js +179 -0
  53. package/lib/vtx-housing-estate-modal/components/OverView/Left.js +85 -0
  54. package/lib/vtx-housing-estate-modal/components/OverView/Manage.js +172 -0
  55. package/lib/vtx-housing-estate-modal/components/OverView/RightBottom.js +177 -0
  56. package/lib/vtx-housing-estate-modal/components/OverView/index.js +56 -0
  57. package/lib/vtx-housing-estate-modal/components/OverView/index.less +163 -0
  58. package/lib/vtx-housing-estate-modal/components/TFRD/index.js +133 -0
  59. package/lib/vtx-housing-estate-modal/components/TFRD/index.less +12 -0
  60. package/lib/vtx-housing-estate-modal/components/WGGS/Content.js +66 -0
  61. package/lib/vtx-housing-estate-modal/components/WGGS/index.js +68 -0
  62. package/lib/vtx-housing-estate-modal/components/WGGS/index.less +49 -0
  63. package/lib/vtx-housing-estate-modal/components/WGXW/Content.js +119 -0
  64. package/lib/vtx-housing-estate-modal/components/WGXW/index.js +121 -0
  65. package/lib/vtx-housing-estate-modal/components/WGXW/index.less +97 -0
  66. package/lib/vtx-housing-estate-modal/components/index.js +5 -0
  67. package/lib/vtx-housing-estate-modal/config.js +77 -0
  68. package/lib/vtx-housing-estate-modal/imgs/avatar.png +0 -0
  69. package/lib/vtx-housing-estate-modal/imgs/avatar_light.png +0 -0
  70. package/lib/vtx-housing-estate-modal/imgs/ddypz.png +0 -0
  71. package/lib/vtx-housing-estate-modal/imgs/ddypz_light.png +0 -0
  72. package/lib/vtx-housing-estate-modal/imgs/gzxjcx.png +0 -0
  73. package/lib/vtx-housing-estate-modal/imgs/hjglcx.png +0 -0
  74. package/lib/vtx-housing-estate-modal/imgs/hmd.png +0 -0
  75. package/lib/vtx-housing-estate-modal/imgs/hmd_light.png +0 -0
  76. package/lib/vtx-housing-estate-modal/imgs/manage_bg.png +0 -0
  77. package/lib/vtx-housing-estate-modal/imgs/manage_bg_light.png +0 -0
  78. package/lib/vtx-housing-estate-modal/imgs/rank.png +0 -0
  79. package/lib/vtx-housing-estate-modal/imgs/rank_light.png +0 -0
  80. package/lib/vtx-housing-estate-modal/imgs/tfcs.png +0 -0
  81. package/lib/vtx-housing-estate-modal/imgs/tfcs_light.png +0 -0
  82. package/lib/vtx-housing-estate-modal/imgs/tfd.png +0 -0
  83. package/lib/vtx-housing-estate-modal/imgs/tfd_light.png +0 -0
  84. package/lib/vtx-housing-estate-modal/imgs/tfhs.png +0 -0
  85. package/lib/vtx-housing-estate-modal/imgs/tfhs_light.png +0 -0
  86. package/lib/vtx-housing-estate-modal/imgs/wgmsr.png +0 -0
  87. package/lib/vtx-housing-estate-modal/imgs/wgmsr_light.png +0 -0
  88. package/lib/vtx-housing-estate-modal/imgs/yyxj.png +0 -0
  89. package/lib/vtx-housing-estate-modal/imgs/yyxj_light.png +0 -0
  90. package/lib/vtx-housing-estate-modal/index.js +108 -0
  91. package/lib/vtx-housing-estate-modal/style/index.js +4 -0
  92. package/lib/vtx-housing-estate-modal/style/index.less +1 -0
  93. package/lib/vtx-road-modal/components/Calendar/index.js +1 -1
  94. package/lib/vtx-road-modal/components/Statistical/index.js +1 -1
  95. package/lib/vtx-shxq-modal/components/ThrowCalendar/index.js +0 -1
  96. package/lib/vtx-staff-modal/components/BaseInfo/ListZymx.js +15 -5
  97. package/lib/vtx-staff-modal/index.js +4 -1
  98. package/lib/vtx-tfd-modal/components/BaseInfo/index.js +1 -8
  99. package/lib/vtx-zg-modal/components/BaseInfo/index.js +0 -1
  100. package/package.json +1 -1
  101. package/lib/resources/jessibuca/decoder.js +0 -3839
  102. package/lib/resources/jessibuca/decoder.wasm +0 -0
  103. package/lib/resources/jessibuca/jessibuca.js +0 -5350
@@ -16,7 +16,13 @@
16
16
  --wborder-color: #1064a7;
17
17
  --check-bg: #009dff;
18
18
  }
19
- .vm-video-left,
19
+ .vm-video-history .ant-radio-wrapper {
20
+ color: var(--modal-title-color);
21
+ }
22
+ .vm-video-history .ant-form-item-label > label {
23
+ color: var(--modal-title-color);
24
+ }
25
+
20
26
  .vm-video-right {
21
27
  background: var(--wbg-color);
22
28
  border-radius: 8px;
@@ -161,6 +167,9 @@
161
167
  }
162
168
 
163
169
  .close {
170
+ color: white;
171
+ cursor: pointer;
172
+ font-size: 16px;
164
173
  margin-left: auto;
165
174
  }
166
175
  }
@@ -89,6 +89,11 @@ export var getPreviewUrl = function getPreviewUrl(params) {
89
89
  data: params
90
90
  });
91
91
  };
92
+ export var getBackUrl = function getBackUrl(params) {
93
+ return request.get('/cloud/vis/base/cp/artemis/playbackUrl.smvc', {
94
+ data: params
95
+ });
96
+ };
92
97
  export var execute = function execute(code, parameters) {
93
98
  return request.post('/cloud/sjzt-reborn/api/v101/dataSet/execute', {
94
99
  data: JSON.stringify({
@@ -1,5 +1,3 @@
1
- import { getVtxToken } from '@vtx/utils';
2
-
3
1
  // 秒转化为时间的格式化字符串
4
2
  export function secondToFormatTime(times) {
5
3
  if (times <= 0) return '--';
@@ -66,9 +64,6 @@ export function secondToFormatTimeArray(times) {
66
64
  });
67
65
  return timeList;
68
66
  }
69
- export var getUrlPara = function getUrlPara(key) {
70
- return getVtxToken(key);
71
- };
72
67
  export var getFieldRender = function getFieldRender(fields, info) {
73
68
  var list = [];
74
69
  fields.forEach(function (item) {
@@ -101,7 +101,9 @@ var Header = function Header(props) {
101
101
  children: [/*#__PURE__*/_jsx("div", {
102
102
  className: 'vm-modal-header-wrap-left-title',
103
103
  children: title
104
- }), tagList.map(function (item) {
104
+ }), tagList === null || tagList === void 0 ? void 0 : tagList.filter(function (item) {
105
+ return !!item.value;
106
+ }).map(function (item) {
105
107
  var color = tagColorMap[item.color];
106
108
  return /*#__PURE__*/_jsx("div", {
107
109
  className: 'vm-modal-header-wrap-left-tag',
@@ -43,7 +43,9 @@ var VmBaseModal = function VmBaseModal(props) {
43
43
  tagList = _props$tagList === void 0 ? [] : _props$tagList,
44
44
  frameParams = props.frameParams,
45
45
  modalHeight = props.modalHeight,
46
- width = props.width;
46
+ width = props.width,
47
+ _props$iframeUrl = props.iframeUrl,
48
+ iframeUrl = _props$iframeUrl === void 0 ? '' : _props$iframeUrl;
47
49
  var _useState = useState(''),
48
50
  _useState2 = _slicedToArray(_useState, 2),
49
51
  currentTabKey = _useState2[0],
@@ -125,16 +127,17 @@ var VmBaseModal = function VmBaseModal(props) {
125
127
  var _theme = theme === 'blue' ? 'dark' : theme;
126
128
  if (type === 'car') {
127
129
  var path = 'index';
128
- src = "".concat(prefix, "/carHistory/#/").concat(path, "?carId=").concat(id, "&theme=").concat(_theme, "&startTime=").concat(startDate ? dayjs(startDate).format('YYYY-MM-DD 00:00:00') : '', "&endTime=").concat(endDate ? dayjs(endDate).format('YYYY-MM-DD 23:59:59') : '');
130
+ src = iframeUrl || "".concat(prefix, "/carHistory/#/").concat(path, "?carId=").concat(id, "&theme=").concat(_theme, "&startTime=").concat(startDate ? dayjs(startDate).format('YYYY-MM-DD 00:00:00') : '', "&endTime=").concat(endDate ? dayjs(endDate).format('YYYY-MM-DD 23:59:59') : '');
129
131
  }
130
132
  if (type === 'staff') {
131
- src = "".concat(prefix, "/carHistory/#/staffIndex?staffId=").concat(id, "&theme=").concat(_theme);
133
+ src = iframeUrl || "".concat(prefix, "/carHistory/#/staffIndex?staffId=").concat(id, "&theme=").concat(_theme);
132
134
  }
133
135
  if (type === 'qyry') {
134
136
  src = "".concat(prefix, "/carHistory/#/qyryHistory?staffId=").concat(id, "&theme=").concat(_theme);
135
137
  }
136
138
  if (frameParams) {
137
139
  var param = [];
140
+ // eslint-disable-next-line guard-for-in
138
141
  for (var key in frameParams) {
139
142
  param.push("".concat(key, "=").concat(frameParams[key] || ''));
140
143
  }
@@ -16,6 +16,7 @@ import { useContext } from 'react';
16
16
  import { VmInfoCollection, VmMap, VmTitle, VmWrapper } from "../../../_components";
17
17
  import VmFactorList from "../../../_components/vm-factor-list";
18
18
  import useSettings from "../../../_hooks/useSettings";
19
+ import { Unmanned } from "../../content";
19
20
  import darkRunIcon from "../../imgs/factor/dark_run.png";
20
21
  import darkSpeedIcon from "../../imgs/factor/dark_speed.png";
21
22
  import runIcon from "../../imgs/factor/run.png";
@@ -93,7 +94,7 @@ var Info = function Info() {
93
94
  }), /*#__PURE__*/_jsx(VmTitle, {
94
95
  title: '实时信息',
95
96
  time: info === null || info === void 0 ? void 0 : info.equipmentTime
96
- }), /*#__PURE__*/_jsx(VmFactorList, {
97
+ }), (info === null || info === void 0 ? void 0 : info.driveMode) === 'unmanned' ? /*#__PURE__*/_jsx(Unmanned.Monitor, {}) : /*#__PURE__*/_jsx(VmFactorList, {
97
98
  list: list
98
99
  }), /*#__PURE__*/_jsx("div", {
99
100
  className: 'vm-car-map-wrap',
@@ -35,7 +35,6 @@ var StaticInfo = function StaticInfo(_ref) {
35
35
  var xAxis = _.sortBy(_.uniqBy(summaryData, 'reportDate'), 'reportDate').map(function (item) {
36
36
  return item.reportDate;
37
37
  });
38
- console.log(xAxis, 'xAxis');
39
38
  return /*#__PURE__*/_jsxs(Row, {
40
39
  gutter: [16, 16],
41
40
  style: {
@@ -13,26 +13,17 @@ import { secondToFormatTimeArray } from "../../../../_util";
13
13
  import { JxhService } from "../../../api";
14
14
  import Info from "../../../components/Info";
15
15
  import { CarContext } from "../../../index";
16
+ import Unmanned from "../../Unmanned";
16
17
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
17
18
  var BaseInfo = function BaseInfo() {
18
19
  var _useContext = useContext(CarContext),
19
20
  id = _useContext.id,
20
- startDate = _useContext.startDate;
21
- var _useSettings = useSettings(),
22
- isDark = _useSettings.isDark;
21
+ startDate = _useContext.startDate,
22
+ info = _useContext.info;
23
23
  var _useState = useState(dayjs(startDate)),
24
24
  _useState2 = _slicedToArray(_useState, 2),
25
25
  date = _useState2[0],
26
26
  setDate = _useState2[1];
27
- var _JxhService$useWorkSu = JxhService.useWorkSummaryJxh(id, dayjs(date).format('YYYY-MM-DD'), dayjs(date).format('YYYY-MM-DD')),
28
- workSummaryJxhRes = _JxhService$useWorkSu.workSummaryJxhRes,
29
- loading = _JxhService$useWorkSu.loading;
30
- var _JxhService$useWorkAn = JxhService.useWorkAnaJxh(id, dayjs(date).subtract(6, 'day').format('YYYY-MM-DD'), dayjs(date).format('YYYY-MM-DD')),
31
- workAnaJxhRes = _JxhService$useWorkAn.workAnaJxhRes,
32
- loadingJxh = _JxhService$useWorkAn.loading;
33
- var xAxis = (workAnaJxhRes === null || workAnaJxhRes === void 0 ? void 0 : workAnaJxhRes.names) || [];
34
- var extraData = workAnaJxhRes === null || workAnaJxhRes === void 0 ? void 0 : workAnaJxhRes.extraData;
35
- var averageSpeed = ((workSummaryJxhRes === null || workSummaryJxhRes === void 0 ? void 0 : workSummaryJxhRes.workMileage) || 0) / (workSummaryJxhRes !== null && workSummaryJxhRes !== void 0 && workSummaryJxhRes.workDuration ? workSummaryJxhRes.workDuration % (24 * 60 * 60) / 60 / 60 : 1);
36
27
  return /*#__PURE__*/_jsxs(Row, {
37
28
  gutter: [16, 16],
38
29
  style: {
@@ -57,104 +48,23 @@ var BaseInfo = function BaseInfo() {
57
48
  disabledDate: function disabledDate(current) {
58
49
  return current && current > dayjs().endOf('day');
59
50
  },
60
- children: /*#__PURE__*/_jsxs(Row, {
61
- gutter: [47, 47],
62
- align: 'middle',
63
- style: {
64
- height: '100%',
65
- marginLeft: 30
66
- },
67
- children: [/*#__PURE__*/_jsx(Col, {
68
- flex: '1',
69
- children: /*#__PURE__*/_jsxs(Row, {
70
- gutter: [34, 34],
71
- children: [/*#__PURE__*/_jsx(Col, {
72
- flex: '108px',
73
- children: /*#__PURE__*/_jsx(VmProgress.Circle, {
74
- rate: (workSummaryJxhRes === null || workSummaryJxhRes === void 0 ? void 0 : workSummaryJxhRes.workRate) || 0,
75
- name: '有效作业率'
76
- })
77
- }), /*#__PURE__*/_jsxs(Col, {
78
- flex: '1',
79
- children: [/*#__PURE__*/_jsx(VmFactor, {
80
- name: '行驶里程',
81
- unit: 'km',
82
- type: 'sm',
83
- value: (workSummaryJxhRes === null || workSummaryJxhRes === void 0 ? void 0 : workSummaryJxhRes.driveMileage) || 0,
84
- fontType: 'blue',
85
- img: isDark ? require("../../../imgs/calendar/dark_mileage.png") : require("../../../imgs/calendar/blue_mileage.png")
86
- }), /*#__PURE__*/_jsx(VmFactor, {
87
- name: '核算作业里程',
88
- unit: 'km',
89
- type: 'sm',
90
- fontType: 'green',
91
- value: (workSummaryJxhRes === null || workSummaryJxhRes === void 0 ? void 0 : workSummaryJxhRes.workMileage) || 0,
92
- img: isDark ? require("../../../imgs/calendar/dark_green_mileage.png") : require("../../../imgs/calendar/mileage.png")
93
- })]
94
- })]
95
- })
96
- }), /*#__PURE__*/_jsx(Col, {
97
- flex: '1',
98
- children: /*#__PURE__*/_jsxs(Row, {
99
- gutter: [34, 34],
100
- children: [/*#__PURE__*/_jsx(Col, {
101
- flex: '108px',
102
- children: /*#__PURE__*/_jsx(VmProgress.Circle, {
103
- type: 'dashboard',
104
- rate: averageSpeed / 200 * 100,
105
- name: '作业均速',
106
- unit: 'km/h',
107
- info: averageSpeed.toFixed(2)
108
- })
109
- }), /*#__PURE__*/_jsxs(Col, {
110
- flex: '1',
111
- children: [/*#__PURE__*/_jsx(VmFactor, {
112
- name: '作业时长',
113
- type: 'sm',
114
- value: secondToFormatTimeArray((workSummaryJxhRes === null || workSummaryJxhRes === void 0 ? void 0 : workSummaryJxhRes.workDuration) || 0),
115
- fontType: 'cyan',
116
- img: isDark ? require("../../../imgs/calendar/cyan_duration.png") : require("../../../imgs/calendar/blue_duration.png")
117
- }), /*#__PURE__*/_jsx(VmFactor, {
118
- name: '作业超速时长',
119
- type: 'sm',
120
- isError: true,
121
- value: secondToFormatTimeArray((workSummaryJxhRes === null || workSummaryJxhRes === void 0 ? void 0 : workSummaryJxhRes.overSpeedDuration) || 0),
122
- fontType: 'red',
123
- img: isDark ? require("../../../imgs/calendar/dark_alarm.png") : require("../../../imgs/calendar/alarm.png")
124
- })]
125
- })]
126
- })
127
- })]
51
+ children: (info === null || info === void 0 ? void 0 : info.driveMode) === 'unmanned' ? /*#__PURE__*/_jsx(Unmanned.WorkInfo, {
52
+ info: info
53
+ }) : /*#__PURE__*/_jsx(BaseWork, {
54
+ id: id,
55
+ date: date
128
56
  })
129
57
  })
130
58
  }), /*#__PURE__*/_jsx("div", {
131
59
  className: 'vtx-car-info-right-wrap-bottom',
132
60
  children: /*#__PURE__*/_jsx(VmWrapper, {
133
61
  title: '近7天运行分析',
134
- children: /*#__PURE__*/_jsx(VmBarCharts, {
135
- dataList: [{
136
- name: '核算作业里程',
137
- data: ((workAnaJxhRes === null || workAnaJxhRes === void 0 ? void 0 : workAnaJxhRes.values.length) > 0 ? workAnaJxhRes === null || workAnaJxhRes === void 0 ? void 0 : workAnaJxhRes.values[0] : []).map(function (item) {
138
- return "\u2000".concat(item);
139
- })
140
- }],
141
- xAxis: xAxis,
142
- unit: '%',
143
- yAxisList: [{
144
- key: "\u2000",
145
- unit: 'km',
146
- name: '(km)'
147
- }].concat([extraData !== null && extraData > 0 ? {
148
- key: '',
149
- unit: '%',
150
- name: '(%)'
151
- } : {}]),
152
- lineList: extraData !== null && extraData > 0 ? [{
153
- name: '有效完成率',
154
- data: (workAnaJxhRes === null || workAnaJxhRes === void 0 ? void 0 : workAnaJxhRes.values.length) > 0 ? workAnaJxhRes === null || workAnaJxhRes === void 0 ? void 0 : workAnaJxhRes.values[1] : [],
155
- yAxisIndex: 1
156
- }] : [],
157
- loading: loadingJxh
62
+ children: (info === null || info === void 0 ? void 0 : info.driveMode) === 'unmanned' ? /*#__PURE__*/_jsx(Unmanned.Analysis, {
63
+ id: id,
64
+ date: date
65
+ }) : /*#__PURE__*/_jsx(BaseAnalysis, {
66
+ id: id,
67
+ date: date
158
68
  })
159
69
  })
160
70
  })]
@@ -162,4 +72,121 @@ var BaseInfo = function BaseInfo() {
162
72
  })]
163
73
  });
164
74
  };
75
+
76
+ // 机械化运行信息-默认
77
+ function BaseWork(_ref) {
78
+ var id = _ref.id,
79
+ date = _ref.date;
80
+ var _useSettings = useSettings(),
81
+ isDark = _useSettings.isDark;
82
+ var _JxhService$useWorkSu = JxhService.useWorkSummaryJxh(id, dayjs(date).format('YYYY-MM-DD'), dayjs(date).format('YYYY-MM-DD')),
83
+ workSummaryJxhRes = _JxhService$useWorkSu.workSummaryJxhRes,
84
+ loading = _JxhService$useWorkSu.loading;
85
+ var averageSpeed = ((workSummaryJxhRes === null || workSummaryJxhRes === void 0 ? void 0 : workSummaryJxhRes.workMileage) || 0) / (workSummaryJxhRes !== null && workSummaryJxhRes !== void 0 && workSummaryJxhRes.workDuration ? workSummaryJxhRes.workDuration % (24 * 60 * 60) / 60 / 60 : 1);
86
+ return /*#__PURE__*/_jsxs(Row, {
87
+ gutter: [47, 47],
88
+ align: 'middle',
89
+ style: {
90
+ height: '100%',
91
+ marginLeft: 30
92
+ },
93
+ children: [/*#__PURE__*/_jsx(Col, {
94
+ flex: '1',
95
+ children: /*#__PURE__*/_jsxs(Row, {
96
+ gutter: [34, 34],
97
+ children: [/*#__PURE__*/_jsx(Col, {
98
+ flex: '108px',
99
+ children: /*#__PURE__*/_jsx(VmProgress.Circle, {
100
+ rate: (workSummaryJxhRes === null || workSummaryJxhRes === void 0 ? void 0 : workSummaryJxhRes.workRate) || 0,
101
+ name: '有效作业率'
102
+ })
103
+ }), /*#__PURE__*/_jsxs(Col, {
104
+ flex: '1',
105
+ children: [/*#__PURE__*/_jsx(VmFactor, {
106
+ name: '行驶里程',
107
+ unit: 'km',
108
+ type: 'sm',
109
+ value: (workSummaryJxhRes === null || workSummaryJxhRes === void 0 ? void 0 : workSummaryJxhRes.driveMileage) || 0,
110
+ fontType: 'blue',
111
+ img: isDark ? require("../../../imgs/calendar/dark_mileage.png") : require("../../../imgs/calendar/blue_mileage.png")
112
+ }), /*#__PURE__*/_jsx(VmFactor, {
113
+ name: '核算作业里程',
114
+ unit: 'km',
115
+ type: 'sm',
116
+ fontType: 'green',
117
+ value: (workSummaryJxhRes === null || workSummaryJxhRes === void 0 ? void 0 : workSummaryJxhRes.workMileage) || 0,
118
+ img: isDark ? require("../../../imgs/calendar/dark_green_mileage.png") : require("../../../imgs/calendar/mileage.png")
119
+ })]
120
+ })]
121
+ })
122
+ }), /*#__PURE__*/_jsx(Col, {
123
+ flex: '1',
124
+ children: /*#__PURE__*/_jsxs(Row, {
125
+ gutter: [34, 34],
126
+ children: [/*#__PURE__*/_jsx(Col, {
127
+ flex: '108px',
128
+ children: /*#__PURE__*/_jsx(VmProgress.Circle, {
129
+ type: 'dashboard',
130
+ rate: averageSpeed / 200 * 100,
131
+ name: '作业均速',
132
+ unit: 'km/h',
133
+ info: averageSpeed.toFixed(2)
134
+ })
135
+ }), /*#__PURE__*/_jsxs(Col, {
136
+ flex: '1',
137
+ children: [/*#__PURE__*/_jsx(VmFactor, {
138
+ name: '作业时长',
139
+ type: 'sm',
140
+ value: secondToFormatTimeArray((workSummaryJxhRes === null || workSummaryJxhRes === void 0 ? void 0 : workSummaryJxhRes.workDuration) || 0),
141
+ fontType: 'cyan',
142
+ img: isDark ? require("../../../imgs/calendar/cyan_duration.png") : require("../../../imgs/calendar/blue_duration.png")
143
+ }), /*#__PURE__*/_jsx(VmFactor, {
144
+ name: '作业超速时长',
145
+ type: 'sm',
146
+ isError: true,
147
+ value: secondToFormatTimeArray((workSummaryJxhRes === null || workSummaryJxhRes === void 0 ? void 0 : workSummaryJxhRes.overSpeedDuration) || 0),
148
+ fontType: 'red',
149
+ img: isDark ? require("../../../imgs/calendar/dark_alarm.png") : require("../../../imgs/calendar/alarm.png")
150
+ })]
151
+ })]
152
+ })
153
+ })]
154
+ });
155
+ }
156
+
157
+ // 机械化近7天运行分析-默认
158
+ function BaseAnalysis(_ref2) {
159
+ var id = _ref2.id,
160
+ date = _ref2.date;
161
+ var _JxhService$useWorkAn = JxhService.useWorkAnaJxh(id, dayjs(date).subtract(6, 'day').format('YYYY-MM-DD'), dayjs(date).format('YYYY-MM-DD')),
162
+ workAnaJxhRes = _JxhService$useWorkAn.workAnaJxhRes,
163
+ loadingJxh = _JxhService$useWorkAn.loading;
164
+ var xAxis = (workAnaJxhRes === null || workAnaJxhRes === void 0 ? void 0 : workAnaJxhRes.names) || [];
165
+ var extraData = workAnaJxhRes === null || workAnaJxhRes === void 0 ? void 0 : workAnaJxhRes.extraData;
166
+ return /*#__PURE__*/_jsx(VmBarCharts, {
167
+ dataList: [{
168
+ name: '核算作业里程',
169
+ data: ((workAnaJxhRes === null || workAnaJxhRes === void 0 ? void 0 : workAnaJxhRes.values.length) > 0 ? workAnaJxhRes === null || workAnaJxhRes === void 0 ? void 0 : workAnaJxhRes.values[0] : []).map(function (item) {
170
+ return "\u2000".concat(item);
171
+ })
172
+ }],
173
+ xAxis: xAxis,
174
+ unit: '%',
175
+ yAxisList: [{
176
+ key: "\u2000",
177
+ unit: 'km',
178
+ name: '(km)'
179
+ }].concat([extraData !== null && extraData > 0 ? {
180
+ key: '',
181
+ unit: '%',
182
+ name: '(%)'
183
+ } : {}]),
184
+ lineList: extraData !== null && extraData > 0 ? [{
185
+ name: '有效完成率',
186
+ data: (workAnaJxhRes === null || workAnaJxhRes === void 0 ? void 0 : workAnaJxhRes.values.length) > 0 ? workAnaJxhRes === null || workAnaJxhRes === void 0 ? void 0 : workAnaJxhRes.values[1] : [],
187
+ yAxisIndex: 1
188
+ }] : [],
189
+ loading: loadingJxh
190
+ });
191
+ }
165
192
  export default BaseInfo;