@vtx/modals2 5.0.45 → 5.0.47
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-popover/index.less +7 -7
- package/lib/_components/vm-tooltip/index.js +13 -3
- package/lib/_service/index.js +16 -0
- package/lib/vtx-base-modal/Header/index.less +98 -98
- package/lib/vtx-base-modal/Tabs/index.js +62 -22
- package/lib/vtx-base-modal/Tabs/index.less +68 -54
- 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-cc-unit-modal/components/BaseInfo/index.less +6 -6
- package/lib/vtx-device-modal/components/DataAnalysis/index.less +66 -66
- package/lib/vtx-df-modal/api-zd-reborn.js +246 -0
- package/lib/vtx-df-modal/components/BaseInfoZdReborn/Jcqsfx.js +71 -0
- package/lib/vtx-df-modal/components/BaseInfoZdReborn/Jczbqs.js +96 -0
- package/lib/vtx-df-modal/components/BaseInfoZdReborn/Qyjcl.js +41 -0
- package/lib/vtx-df-modal/components/BaseInfoZdReborn/RealtimeMonitor.js +149 -0
- package/lib/vtx-df-modal/components/BaseInfoZdReborn/Situation.js +47 -0
- package/lib/vtx-df-modal/components/BaseInfoZdReborn/index.js +140 -0
- package/lib/vtx-df-modal/components/BaseInfoZdReborn/index.less +161 -0
- package/lib/vtx-df-modal/components/Calendar/zd-reborn.js +142 -0
- package/lib/vtx-df-modal/components/MeteringZdReborn/ChartJccc.js +62 -0
- package/lib/vtx-df-modal/components/MeteringZdReborn/ChartJcqs.js +83 -0
- package/lib/vtx-df-modal/components/MeteringZdReborn/List.js +125 -0
- package/lib/vtx-df-modal/components/MeteringZdReborn/index.js +185 -0
- package/lib/vtx-df-modal/components/MeteringZdReborn/index.less +68 -0
- package/lib/vtx-df-modal/components/index.js +4 -1
- package/lib/vtx-df-modal/index.js +19 -7
- 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-staff-modal/components/BaseInfo/WorkStatic.js +2 -2
- package/package.json +78 -78
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
.vtx-device-analysis-dot {
|
|
2
|
-
width: 6px;
|
|
3
|
-
height: 6px;
|
|
4
|
-
background: var(--green-color);
|
|
5
|
-
border-radius: 50%;
|
|
6
|
-
&.error {
|
|
7
|
-
background: var(--red-color);
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.vtx-device-analysis-tabs {
|
|
12
|
-
display: flex;
|
|
13
|
-
gap: 16px;
|
|
14
|
-
color: var(--modal-title-color);
|
|
15
|
-
font-size: 14px;
|
|
16
|
-
&-item {
|
|
17
|
-
cursor: pointer;
|
|
18
|
-
&.active {
|
|
19
|
-
color: var(--blue-color);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.vtx-device-alarm-summary {
|
|
25
|
-
width: 368px;
|
|
26
|
-
height: 104px;
|
|
27
|
-
padding: 20px;
|
|
28
|
-
margin-bottom: 20px;
|
|
29
|
-
color: var(--modal-title-color);
|
|
30
|
-
display: flex;
|
|
31
|
-
justify-content: space-between;
|
|
32
|
-
flex-direction: column;
|
|
33
|
-
cursor: pointer;
|
|
34
|
-
background-image: url("../../imgs/current.png");
|
|
35
|
-
background-size: 100% 100%;
|
|
36
|
-
border-radius: 8px;
|
|
37
|
-
border: 1px solid transparent;
|
|
38
|
-
&-lable {
|
|
39
|
-
font-size: 16px;
|
|
40
|
-
font-weight: 600;
|
|
41
|
-
}
|
|
42
|
-
&-value {
|
|
43
|
-
font-weight: 600;
|
|
44
|
-
font-size: 24px;
|
|
45
|
-
color: var(--red-color);
|
|
46
|
-
}
|
|
47
|
-
&.dark {
|
|
48
|
-
background-image: url("../../imgs/current_dark.png");
|
|
49
|
-
&:last-child {
|
|
50
|
-
background-image: url("../../imgs/history_dark.png");
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
&.active {
|
|
54
|
-
border:1px solid var(--red-color);
|
|
55
|
-
}
|
|
56
|
-
&:last-child {
|
|
57
|
-
margin-bottom: 0;
|
|
58
|
-
background-image: url("../../imgs/history.png");
|
|
59
|
-
.vtx-device-alarm-summary-value {
|
|
60
|
-
color: var(--yellow-color);
|
|
61
|
-
}
|
|
62
|
-
&.active {
|
|
63
|
-
border:1px solid var(--yellow-color);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
1
|
+
.vtx-device-analysis-dot {
|
|
2
|
+
width: 6px;
|
|
3
|
+
height: 6px;
|
|
4
|
+
background: var(--green-color);
|
|
5
|
+
border-radius: 50%;
|
|
6
|
+
&.error {
|
|
7
|
+
background: var(--red-color);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.vtx-device-analysis-tabs {
|
|
12
|
+
display: flex;
|
|
13
|
+
gap: 16px;
|
|
14
|
+
color: var(--modal-title-color);
|
|
15
|
+
font-size: 14px;
|
|
16
|
+
&-item {
|
|
17
|
+
cursor: pointer;
|
|
18
|
+
&.active {
|
|
19
|
+
color: var(--blue-color);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.vtx-device-alarm-summary {
|
|
25
|
+
width: 368px;
|
|
26
|
+
height: 104px;
|
|
27
|
+
padding: 20px;
|
|
28
|
+
margin-bottom: 20px;
|
|
29
|
+
color: var(--modal-title-color);
|
|
30
|
+
display: flex;
|
|
31
|
+
justify-content: space-between;
|
|
32
|
+
flex-direction: column;
|
|
33
|
+
cursor: pointer;
|
|
34
|
+
background-image: url("../../imgs/current.png");
|
|
35
|
+
background-size: 100% 100%;
|
|
36
|
+
border-radius: 8px;
|
|
37
|
+
border: 1px solid transparent;
|
|
38
|
+
&-lable {
|
|
39
|
+
font-size: 16px;
|
|
40
|
+
font-weight: 600;
|
|
41
|
+
}
|
|
42
|
+
&-value {
|
|
43
|
+
font-weight: 600;
|
|
44
|
+
font-size: 24px;
|
|
45
|
+
color: var(--red-color);
|
|
46
|
+
}
|
|
47
|
+
&.dark {
|
|
48
|
+
background-image: url("../../imgs/current_dark.png");
|
|
49
|
+
&:last-child {
|
|
50
|
+
background-image: url("../../imgs/history_dark.png");
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
&.active {
|
|
54
|
+
border:1px solid var(--red-color);
|
|
55
|
+
}
|
|
56
|
+
&:last-child {
|
|
57
|
+
margin-bottom: 0;
|
|
58
|
+
background-image: url("../../imgs/history.png");
|
|
59
|
+
.vtx-device-alarm-summary-value {
|
|
60
|
+
color: var(--yellow-color);
|
|
61
|
+
}
|
|
62
|
+
&.active {
|
|
63
|
+
border:1px solid var(--yellow-color);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
import { request } from '@vtx/utils';
|
|
2
|
+
import { useRequest } from 'ahooks';
|
|
3
|
+
import http from "../_util/http";
|
|
4
|
+
var BaseService = {
|
|
5
|
+
// 实时运行(进场)情况
|
|
6
|
+
useSituation: function useSituation(deviceIds, date) {
|
|
7
|
+
var _useRequest = useRequest(function () {
|
|
8
|
+
return request.get('/cloud/zd-reborn/api/dataBoard/getSumYesterday', {
|
|
9
|
+
data: {
|
|
10
|
+
deviceIds: deviceIds,
|
|
11
|
+
date: date
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
}, {
|
|
15
|
+
ready: !!deviceIds,
|
|
16
|
+
refreshDeps: [date]
|
|
17
|
+
}),
|
|
18
|
+
situationRes = _useRequest.data;
|
|
19
|
+
return {
|
|
20
|
+
situationRes: situationRes === null || situationRes === void 0 ? void 0 : situationRes.data
|
|
21
|
+
};
|
|
22
|
+
},
|
|
23
|
+
useSituationSummary: function useSituationSummary(deviceIds, startDate, endDate) {
|
|
24
|
+
// 汇总
|
|
25
|
+
var _useRequest2 = useRequest(function () {
|
|
26
|
+
return request.get('/cloud/zd-reborn/api/dataBoard/getSumOperationData', {
|
|
27
|
+
data: {
|
|
28
|
+
deviceIds: deviceIds,
|
|
29
|
+
startDate: startDate,
|
|
30
|
+
endDate: endDate
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
}, {
|
|
34
|
+
ready: !!deviceIds,
|
|
35
|
+
refreshDeps: [startDate, endDate]
|
|
36
|
+
}),
|
|
37
|
+
situationRes = _useRequest2.data;
|
|
38
|
+
return {
|
|
39
|
+
situationRes: (situationRes === null || situationRes === void 0 ? void 0 : situationRes.data) || []
|
|
40
|
+
};
|
|
41
|
+
},
|
|
42
|
+
useQyjcl: function useQyjcl(deviceId, startDate, endDate) {
|
|
43
|
+
var _useRequest3 = useRequest(function () {
|
|
44
|
+
return request.get('/cloud/zd-reborn/api/dataBoard/getSumGroup', {
|
|
45
|
+
data: {
|
|
46
|
+
deviceId: deviceId,
|
|
47
|
+
startDate: startDate,
|
|
48
|
+
endDate: endDate,
|
|
49
|
+
groupType: 'byArea'
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
}, {
|
|
53
|
+
ready: !!deviceId,
|
|
54
|
+
refreshDeps: [deviceId, startDate, endDate]
|
|
55
|
+
}),
|
|
56
|
+
res = _useRequest3.data;
|
|
57
|
+
return {
|
|
58
|
+
areaSumData: res === null || res === void 0 ? void 0 : res.data
|
|
59
|
+
};
|
|
60
|
+
},
|
|
61
|
+
useRealtimeMonitor: function useRealtimeMonitor(factoryCode) {
|
|
62
|
+
var _res$data;
|
|
63
|
+
// 实时监测
|
|
64
|
+
var _useRequest4 = useRequest(function () {
|
|
65
|
+
return request.get('/cloud/sjzt-reborn/api/v101/zdjg/jg/data/getJgDataStatistics', {
|
|
66
|
+
data: {
|
|
67
|
+
factoryCode: factoryCode
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
}, {
|
|
71
|
+
ready: !!factoryCode,
|
|
72
|
+
refreshDeps: [factoryCode]
|
|
73
|
+
}),
|
|
74
|
+
res = _useRequest4.data;
|
|
75
|
+
return {
|
|
76
|
+
realtimeMonitor: (res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.deviceList) || []
|
|
77
|
+
};
|
|
78
|
+
},
|
|
79
|
+
useRealtime: function useRealtime(deviceId) {
|
|
80
|
+
// 实时监测情况
|
|
81
|
+
var _useRequest5 = useRequest(function () {
|
|
82
|
+
return http.getForTenantId('/cloud/sjzt-reborn/api/v101/zdjg/jg/data/getJgDataDeviceRealTime', {
|
|
83
|
+
body: {
|
|
84
|
+
deviceId: deviceId
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
}, {
|
|
88
|
+
ready: !!deviceId,
|
|
89
|
+
refreshDeps: [deviceId]
|
|
90
|
+
}),
|
|
91
|
+
res = _useRequest5.data;
|
|
92
|
+
return {
|
|
93
|
+
realtimeRes: (res === null || res === void 0 ? void 0 : res.data) || []
|
|
94
|
+
};
|
|
95
|
+
},
|
|
96
|
+
useJczbqsfx: function useJczbqsfx(code, deviceId, startTime, endTime) {
|
|
97
|
+
var _useRequest6 = useRequest(function () {
|
|
98
|
+
return request.get('/cloud/sjzt-reborn/api/v101/zdjg/jg/data/getJgDataChart', {
|
|
99
|
+
data: {
|
|
100
|
+
monitorItemCode: code,
|
|
101
|
+
deviceId: deviceId,
|
|
102
|
+
startTime: startTime,
|
|
103
|
+
endTime: endTime
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
}, {
|
|
107
|
+
ready: !!code,
|
|
108
|
+
refreshDeps: [code, deviceId, startTime, endTime]
|
|
109
|
+
}),
|
|
110
|
+
res = _useRequest6.data;
|
|
111
|
+
return {
|
|
112
|
+
timeSumData: code ? res === null || res === void 0 ? void 0 : res.data : {}
|
|
113
|
+
};
|
|
114
|
+
},
|
|
115
|
+
useJcccsjfb: function useJcccsjfb(deviceIds, startDate, endDate) {
|
|
116
|
+
// 实时运行情况
|
|
117
|
+
var _useRequest7 = useRequest(function () {
|
|
118
|
+
return http.get('/cloud/zd-reborn/api/dataBoard/getSumCarNumHourLine', {
|
|
119
|
+
body: {
|
|
120
|
+
deviceIds: deviceIds,
|
|
121
|
+
startDate: startDate,
|
|
122
|
+
endDate: endDate
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
}, {
|
|
126
|
+
ready: !!deviceIds,
|
|
127
|
+
refreshDeps: [startDate, endDate]
|
|
128
|
+
}),
|
|
129
|
+
jcccsjfbRes = _useRequest7.data;
|
|
130
|
+
return {
|
|
131
|
+
jcccsjfbRes: (jcccsjfbRes === null || jcccsjfbRes === void 0 ? void 0 : jcccsjfbRes.data) || []
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
var MeteringService = {
|
|
136
|
+
useRecord: function useRecord(deviceId, startTime, endTime, page) {
|
|
137
|
+
var _useRequest8 = useRequest(function () {
|
|
138
|
+
return request.get('/cloud/zd-reborn/api/weightData/pageList', {
|
|
139
|
+
data: {
|
|
140
|
+
deviceId: deviceId,
|
|
141
|
+
startTime: startTime,
|
|
142
|
+
endTime: endTime,
|
|
143
|
+
page: page,
|
|
144
|
+
rows: 10
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
}, {
|
|
148
|
+
ready: !!deviceId,
|
|
149
|
+
refreshDeps: [startTime, endTime, page]
|
|
150
|
+
}),
|
|
151
|
+
recordRes = _useRequest8.data;
|
|
152
|
+
var records = (recordRes === null || recordRes === void 0 ? void 0 : recordRes.data) || {
|
|
153
|
+
total: 0,
|
|
154
|
+
rows: []
|
|
155
|
+
};
|
|
156
|
+
return {
|
|
157
|
+
records: records
|
|
158
|
+
};
|
|
159
|
+
},
|
|
160
|
+
useSummary: function useSummary(deviceId, startTime, endTime) {
|
|
161
|
+
var _useRequest9 = useRequest(function () {
|
|
162
|
+
return request.get('/cloud/zd-reborn/api/weightData/summary', {
|
|
163
|
+
data: {
|
|
164
|
+
deviceId: deviceId,
|
|
165
|
+
startTime: startTime,
|
|
166
|
+
endTime: endTime,
|
|
167
|
+
page: 1,
|
|
168
|
+
rows: 10000
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
}, {
|
|
172
|
+
ready: !!deviceId,
|
|
173
|
+
refreshDeps: [startTime, endTime]
|
|
174
|
+
}),
|
|
175
|
+
summaryRes = _useRequest9.data;
|
|
176
|
+
var summary = (summaryRes === null || summaryRes === void 0 ? void 0 : summaryRes.data) || {};
|
|
177
|
+
return {
|
|
178
|
+
summary: summary
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
// 工况
|
|
184
|
+
var WorkConditionService = {
|
|
185
|
+
useFetchData: function useFetchData(code, startDateTime, endDateTime) {
|
|
186
|
+
var _useRequest10 = useRequest(function () {
|
|
187
|
+
return request.get('/cloud/zd/jg/api/cp/historyValue/getMonitorItemSum.smvc', {
|
|
188
|
+
data: {
|
|
189
|
+
factoryCode: code,
|
|
190
|
+
startDateTime: startDateTime,
|
|
191
|
+
endDateTime: endDateTime,
|
|
192
|
+
monitorItemCodes: 'MI_TRW_LJ_RL,MI_CW_FDL,MI_CW_SLY,MI_CW_FH,MI_CW_LZH'
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
}, {
|
|
196
|
+
ready: !!code,
|
|
197
|
+
refreshDeps: [startDateTime, endDateTime]
|
|
198
|
+
}),
|
|
199
|
+
res = _useRequest10.data;
|
|
200
|
+
var situationData = (res === null || res === void 0 ? void 0 : res.data) || [];
|
|
201
|
+
return {
|
|
202
|
+
situationData: situationData
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
// 日历
|
|
208
|
+
var CalendarService = {
|
|
209
|
+
useFetchData: function useFetchData(deviceIds, startDate, endDate) {
|
|
210
|
+
var _useRequest11 = useRequest(function () {
|
|
211
|
+
return request.get('/cloud/zd-reborn/api/dataBoard/getSumLoad', {
|
|
212
|
+
data: {
|
|
213
|
+
deviceIds: deviceIds,
|
|
214
|
+
startDate: startDate,
|
|
215
|
+
endDate: endDate
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
}, {
|
|
219
|
+
ready: !!deviceIds,
|
|
220
|
+
refreshDeps: [startDate, endDate]
|
|
221
|
+
}),
|
|
222
|
+
res = _useRequest11.data;
|
|
223
|
+
return {
|
|
224
|
+
data1: (res === null || res === void 0 ? void 0 : res.data) || []
|
|
225
|
+
};
|
|
226
|
+
},
|
|
227
|
+
useFetchData2: function useFetchData2(code, startTime, endTime) {
|
|
228
|
+
var _useRequest12 = useRequest(function () {
|
|
229
|
+
return request.get('/cloud/sjzt-reborn/api/v101/zdjg/jg/data/getJgDataAlarmNumByDate', {
|
|
230
|
+
data: {
|
|
231
|
+
factoryCode: code,
|
|
232
|
+
startTime: startTime,
|
|
233
|
+
endTime: endTime
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
}, {
|
|
237
|
+
ready: !!code,
|
|
238
|
+
refreshDeps: [startTime, endTime]
|
|
239
|
+
}),
|
|
240
|
+
res2 = _useRequest12.data;
|
|
241
|
+
return {
|
|
242
|
+
data2: (res2 === null || res2 === void 0 ? void 0 : res2.data) || []
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
};
|
|
246
|
+
export { BaseService, CalendarService, MeteringService, WorkConditionService };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
2
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread 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 _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
5
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
6
|
+
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; }
|
|
7
|
+
import { max } from 'lodash';
|
|
8
|
+
import { VmLineCharts, VmWrapper } from "../../../_components";
|
|
9
|
+
import useSettings from "../../../_hooks/useSettings";
|
|
10
|
+
import { CalendarService } from "../../api-zd-reborn";
|
|
11
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
+
export default function Jcqsfx(props) {
|
|
13
|
+
var _useSettings = useSettings(),
|
|
14
|
+
isDark = _useSettings.isDark,
|
|
15
|
+
chartFontColor = _useSettings.chartFontColor;
|
|
16
|
+
var deviceId = props.deviceId,
|
|
17
|
+
startDate = props.startDate,
|
|
18
|
+
endDate = props.endDate,
|
|
19
|
+
handleAbility = props.handleAbility;
|
|
20
|
+
var _CalendarService$useF = CalendarService.useFetchData(deviceId, startDate, endDate),
|
|
21
|
+
data1 = _CalendarService$useF.data1;
|
|
22
|
+
var maxNum = max([handleAbility].concat(_toConsumableArray((data1 === null || data1 === void 0 ? void 0 : data1.map(function (ele) {
|
|
23
|
+
return ele.todayTotalInWeight;
|
|
24
|
+
})) || []))) || 0;
|
|
25
|
+
return /*#__PURE__*/_jsx("div", {
|
|
26
|
+
className: "base-top--jcqsfx",
|
|
27
|
+
children: /*#__PURE__*/_jsx(VmWrapper, {
|
|
28
|
+
title: "\u8FDB\u573A\u8D8B\u52BF\u5206\u6790",
|
|
29
|
+
needChange: false,
|
|
30
|
+
children: /*#__PURE__*/_jsx(VmLineCharts, {
|
|
31
|
+
unit: "\u5428",
|
|
32
|
+
height: 240,
|
|
33
|
+
showLegend: false,
|
|
34
|
+
yMax: maxNum,
|
|
35
|
+
xAxis: (data1 === null || data1 === void 0 ? void 0 : data1.map(function (ele) {
|
|
36
|
+
return ele.date;
|
|
37
|
+
})) || [],
|
|
38
|
+
legendOption: {
|
|
39
|
+
data: ['进场量']
|
|
40
|
+
},
|
|
41
|
+
dataList: [{
|
|
42
|
+
data: (data1 === null || data1 === void 0 ? void 0 : data1.map(function (ele) {
|
|
43
|
+
return ele.todayTotalInWeight;
|
|
44
|
+
})) || [],
|
|
45
|
+
name: '进场量',
|
|
46
|
+
markLine: {
|
|
47
|
+
data: [{
|
|
48
|
+
yAxis: handleAbility,
|
|
49
|
+
lineStyle: {
|
|
50
|
+
normal: {
|
|
51
|
+
color: '#FFE25D'
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
name: '设计能力(吨/日)'
|
|
55
|
+
}],
|
|
56
|
+
lineStyle: {
|
|
57
|
+
color: '#52C41A'
|
|
58
|
+
},
|
|
59
|
+
label: {
|
|
60
|
+
show: true,
|
|
61
|
+
position: 'insideEndTop',
|
|
62
|
+
formatter: '{b}: {c}',
|
|
63
|
+
color: isDark ? '#fff' : chartFontColor,
|
|
64
|
+
fontWeight: 'normal'
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}]
|
|
68
|
+
})
|
|
69
|
+
})
|
|
70
|
+
});
|
|
71
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
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
|
+
/**
|
|
8
|
+
* 监测指标趋势分析
|
|
9
|
+
*/
|
|
10
|
+
import { useSetState } from 'ahooks';
|
|
11
|
+
import dayjs from 'dayjs';
|
|
12
|
+
import * as echarts from 'echarts';
|
|
13
|
+
import { useEffect } from 'react';
|
|
14
|
+
import { VmEmpty, VmFilter, VmLineCharts, VmWrapper } from "../../../_components";
|
|
15
|
+
import useSettings from "../../../_hooks/useSettings";
|
|
16
|
+
import { BaseService } from "../../api";
|
|
17
|
+
import "./index.less";
|
|
18
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
19
|
+
function Jczbqs(props) {
|
|
20
|
+
var _timeSumData$extraDat, _timeSumData$values;
|
|
21
|
+
var _useSettings = useSettings(),
|
|
22
|
+
chartFontColor = _useSettings.chartFontColor,
|
|
23
|
+
theme = _useSettings.theme;
|
|
24
|
+
var deviceId = props.deviceId,
|
|
25
|
+
realtimeRes = props.realtimeRes;
|
|
26
|
+
var _useSetState = useSetState({
|
|
27
|
+
value: ''
|
|
28
|
+
}),
|
|
29
|
+
_useSetState2 = _slicedToArray(_useSetState, 2),
|
|
30
|
+
state = _useSetState2[0],
|
|
31
|
+
setState = _useSetState2[1];
|
|
32
|
+
var value = state.value;
|
|
33
|
+
useEffect(function () {
|
|
34
|
+
var _realtimeRes$;
|
|
35
|
+
setState({
|
|
36
|
+
value: realtimeRes === null || realtimeRes === void 0 || (_realtimeRes$ = realtimeRes[0]) === null || _realtimeRes$ === void 0 ? void 0 : _realtimeRes$.monitorItemCode
|
|
37
|
+
});
|
|
38
|
+
}, [realtimeRes]);
|
|
39
|
+
var _BaseService$useJczbq = BaseService.useJczbqsfx(value, deviceId, dayjs().subtract(24, 'hours').format('YYYY-MM-DD HH:mm:ss'), dayjs().format('YYYY-MM-DD HH:mm:ss')),
|
|
40
|
+
timeSumData = _BaseService$useJczbq.timeSumData;
|
|
41
|
+
return /*#__PURE__*/_jsx("div", {
|
|
42
|
+
className: "df-overview-trend",
|
|
43
|
+
children: /*#__PURE__*/_jsx(VmWrapper, {
|
|
44
|
+
title: "\u76D1\u6D4B\u6307\u6807\u8D8B\u52BF\u5206\u6790\uFF0824\u5C0F\u65F6\uFF09",
|
|
45
|
+
extra: /*#__PURE__*/_jsx(VmFilter.VMSelect, {
|
|
46
|
+
value: value,
|
|
47
|
+
onChange: function onChange(val) {
|
|
48
|
+
setState({
|
|
49
|
+
value: val
|
|
50
|
+
});
|
|
51
|
+
},
|
|
52
|
+
options: realtimeRes === null || realtimeRes === void 0 ? void 0 : realtimeRes.map(function (item) {
|
|
53
|
+
return {
|
|
54
|
+
value: item.monitorItemCode,
|
|
55
|
+
label: item.monitorItemName
|
|
56
|
+
};
|
|
57
|
+
}),
|
|
58
|
+
style: {
|
|
59
|
+
width: 150
|
|
60
|
+
},
|
|
61
|
+
placeholder: "\u8BF7\u9009\u62E9",
|
|
62
|
+
allowClear: false
|
|
63
|
+
}),
|
|
64
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
65
|
+
className: "df-overview-trend-content",
|
|
66
|
+
children: timeSumData ? /*#__PURE__*/_jsx(VmLineCharts, {
|
|
67
|
+
title: '总数',
|
|
68
|
+
height: 191,
|
|
69
|
+
unit: (timeSumData === null || timeSumData === void 0 || (_timeSumData$extraDat = timeSumData.extraData) === null || _timeSumData$extraDat === void 0 || (_timeSumData$extraDat = _timeSumData$extraDat[0]) === null || _timeSumData$extraDat === void 0 ? void 0 : _timeSumData$extraDat.unit) || '',
|
|
70
|
+
xAxis: (timeSumData === null || timeSumData === void 0 ? void 0 : timeSumData.names) || [],
|
|
71
|
+
dataList: timeSumData === null || timeSumData === void 0 || (_timeSumData$values = timeSumData.values) === null || _timeSumData$values === void 0 ? void 0 : _timeSumData$values.map(function (ele, index) {
|
|
72
|
+
var _timeSumData$extraDat2;
|
|
73
|
+
return {
|
|
74
|
+
data: ele,
|
|
75
|
+
name: (timeSumData === null || timeSumData === void 0 || (_timeSumData$extraDat2 = timeSumData.extraData[index]) === null || _timeSumData$extraDat2 === void 0 ? void 0 : _timeSumData$extraDat2.monitorItemName) || '',
|
|
76
|
+
smooth: true,
|
|
77
|
+
areaStyle: {
|
|
78
|
+
color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
|
|
79
|
+
offset: 0,
|
|
80
|
+
color: theme === 'blue' ? 'rgba(0,157,255,0.1)' : 'rgba(22, 119, 255, 0.10)'
|
|
81
|
+
}, {
|
|
82
|
+
offset: 0.5,
|
|
83
|
+
color: theme === 'blue' ? 'rgba(0,157,255,0.3)' : 'rgba(22, 119, 255, 0.30)'
|
|
84
|
+
}, {
|
|
85
|
+
offset: 1,
|
|
86
|
+
color: theme === 'blue' ? 'rgba(0,157,255,0.75)' : 'rgba(22, 119, 255, 0.75)'
|
|
87
|
+
}])
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
})
|
|
91
|
+
}) : /*#__PURE__*/_jsx(VmEmpty, {})
|
|
92
|
+
})
|
|
93
|
+
})
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
export default Jczbqs;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 区域进场量分析
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { sumBy } from 'lodash';
|
|
6
|
+
import { VmEmpty, VmPieCharts } from "../../../_components";
|
|
7
|
+
import { BaseService } from "../../api-zd-reborn";
|
|
8
|
+
import "./index.less";
|
|
9
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
+
function Qyjcl(props) {
|
|
11
|
+
var deviceId = props.deviceId,
|
|
12
|
+
startDate = props.startDate,
|
|
13
|
+
endDate = props.endDate;
|
|
14
|
+
var _BaseService$useQyjcl = BaseService.useQyjcl(deviceId, startDate, endDate),
|
|
15
|
+
areaSumData = _BaseService$useQyjcl.areaSumData;
|
|
16
|
+
var total = sumBy(areaSumData || [], 'netWeight') || 0;
|
|
17
|
+
return /*#__PURE__*/_jsx("div", {
|
|
18
|
+
className: "df-qyjcl",
|
|
19
|
+
children: areaSumData !== null && areaSumData !== void 0 && areaSumData.length ? /*#__PURE__*/_jsx(VmPieCharts, {
|
|
20
|
+
height: 216,
|
|
21
|
+
total: total === null || total === void 0 ? void 0 : total.toFixed(2),
|
|
22
|
+
title: "\u5428",
|
|
23
|
+
unit: "\u5428",
|
|
24
|
+
name: "\u533A\u57DF\u8FDB\u573A\u91CF",
|
|
25
|
+
innerRadius: ['50%', '65%'],
|
|
26
|
+
outerRadius: ['65%', '70%'],
|
|
27
|
+
dataList: (areaSumData === null || areaSumData === void 0 ? void 0 : areaSumData.map(function (ele) {
|
|
28
|
+
return {
|
|
29
|
+
name: ele.groupName,
|
|
30
|
+
value: ele.netWeight
|
|
31
|
+
};
|
|
32
|
+
})) || [],
|
|
33
|
+
legendConfig: {
|
|
34
|
+
right: 16
|
|
35
|
+
}
|
|
36
|
+
}) : /*#__PURE__*/_jsx(VmEmpty, {
|
|
37
|
+
type: "NO_CHART"
|
|
38
|
+
})
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
export default Qyjcl;
|