coolcare-lite-scada-component 1.0.35 → 1.0.37
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.
|
@@ -17,7 +17,7 @@ var directionClassNameMap = {
|
|
|
17
17
|
bottom: 'flex-col-reverse'
|
|
18
18
|
};
|
|
19
19
|
var ElePointValueComponent = function ElePointValueComponent(_ref) {
|
|
20
|
-
var _payload$pointList, _payload$label, _payload$unit, _payload$unit2, _payload$value, _payload$value2, _payload$mittMeta$nam, _payload$mittMeta, _payload$mittMeta2, _pointData$
|
|
20
|
+
var _payload$pointList, _payload$label, _payload$unit, _payload$unit2, _payload$value, _payload$value2, _payload$mittMeta$nam, _payload$mittMeta, _payload$mittMeta2, _pointData$aggregateD, _pointData$aggregateD2, _payload$label2, _pointValue, _payload$unit3;
|
|
21
21
|
var node = _ref.node;
|
|
22
22
|
var payload = node === null || node === void 0 ? void 0 : node.getData();
|
|
23
23
|
var configPoint = payload === null || payload === void 0 ? void 0 : (_payload$pointList = payload.pointList) === null || _payload$pointList === void 0 ? void 0 : _payload$pointList[0];
|
|
@@ -36,7 +36,7 @@ var ElePointValueComponent = function ElePointValueComponent(_ref) {
|
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
38
|
var pointData = usePointWatch(configPoint, payload === null || payload === void 0 ? void 0 : (_payload$mittMeta2 = payload.mittMeta) === null || _payload$mittMeta2 === void 0 ? void 0 : _payload$mittMeta2.namespace);
|
|
39
|
-
var value = (pointData === null || pointData === void 0 ? void 0 : pointData.value) || (pointData === null || pointData === void 0 ? void 0 : (_pointData$
|
|
39
|
+
var value = (pointData === null || pointData === void 0 ? void 0 : pointData.value) || (pointData === null || pointData === void 0 ? void 0 : (_pointData$aggregateD = pointData.aggregateDataList) === null || _pointData$aggregateD === void 0 ? void 0 : (_pointData$aggregateD2 = _pointData$aggregateD[0]) === null || _pointData$aggregateD2 === void 0 ? void 0 : _pointData$aggregateD2.val) || '-';
|
|
40
40
|
var tooltipTitle = null;
|
|
41
41
|
if (!configPoint) {
|
|
42
42
|
tooltipTitle = '未绑定点位';
|
|
@@ -24,6 +24,7 @@ var StatisticsPropsSet = function StatisticsPropsSet() {
|
|
|
24
24
|
var _Form$useForm = Form.useForm(),
|
|
25
25
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
26
26
|
StatisticsForm = _Form$useForm2[0];
|
|
27
|
+
var valueTypeV = Form.useWatch('valueType', StatisticsForm);
|
|
27
28
|
useEffect(function () {
|
|
28
29
|
if (!activeNode) {
|
|
29
30
|
return;
|
|
@@ -62,6 +63,7 @@ var StatisticsPropsSet = function StatisticsPropsSet() {
|
|
|
62
63
|
name: "valueDate",
|
|
63
64
|
label: "\u7EDF\u8BA1\u65F6\u95F4"
|
|
64
65
|
}, /*#__PURE__*/React.createElement(Select, {
|
|
66
|
+
disabled: valueTypeV === 0,
|
|
65
67
|
defaultValue: 0,
|
|
66
68
|
options: [{
|
|
67
69
|
label: '本月',
|
|
@@ -26,7 +26,7 @@ import ModalFanDevicePoint from "../../../components/ModalFanDevicePoint";
|
|
|
26
26
|
import emitter from "../../../utils/events";
|
|
27
27
|
import { GetDevicePoint } from "../../../services/gateway/Device";
|
|
28
28
|
import "./index.css";
|
|
29
|
-
import {
|
|
29
|
+
import { GetTdIndicatorAggregateData } from "../../../services/gateway/Point";
|
|
30
30
|
import dayjs from 'dayjs';
|
|
31
31
|
var Player = function Player(_ref) {
|
|
32
32
|
var _jsonConfig$pageConfi;
|
|
@@ -439,18 +439,17 @@ var Player = function Player(_ref) {
|
|
|
439
439
|
while (1) switch (_context7.prev = _context7.next) {
|
|
440
440
|
case 0:
|
|
441
441
|
_context7.next = 2;
|
|
442
|
-
return
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
});
|
|
442
|
+
return GetTdIndicatorAggregateData(ids.map(function (v) {
|
|
443
|
+
var str = v.split('_');
|
|
444
|
+
return {
|
|
445
|
+
indicatorNo: "".concat(str[0], "_").concat(str[1], "_energy"),
|
|
446
|
+
aggregateType: 3,
|
|
447
|
+
timeQuantumList: [{
|
|
448
|
+
startDate: dayjs().startOf(dateType == 0 ? "month" : "year").format('YYYY-MM-DD HH:mm:ss'),
|
|
449
|
+
endDate: dayjs().endOf(dateType == 0 ? "month" : "year").format('YYYY-MM-DD HH:mm:ss')
|
|
450
|
+
}]
|
|
451
|
+
};
|
|
452
|
+
}));
|
|
454
453
|
case 2:
|
|
455
454
|
res = _context7.sent;
|
|
456
455
|
if (res.success) {
|
|
@@ -462,7 +461,10 @@ var Player = function Player(_ref) {
|
|
|
462
461
|
case 6:
|
|
463
462
|
pointList = res.data || [];
|
|
464
463
|
pointList.forEach(function (v) {
|
|
465
|
-
|
|
464
|
+
var pointId = ids.find(function (id) {
|
|
465
|
+
return id.includes(v.deviceNo);
|
|
466
|
+
});
|
|
467
|
+
emitter.emit("point-update-".concat(pointId, "-").concat(mittMeta.namespace), v);
|
|
466
468
|
});
|
|
467
469
|
case 8:
|
|
468
470
|
case "end":
|
|
@@ -115,7 +115,7 @@ export function GetPointAggregationData(_x9, _x10) {
|
|
|
115
115
|
return _GetPointAggregationData.apply(this, arguments);
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
-
/**
|
|
118
|
+
/** 获取点位历史数据 POST /api/GatewayMicro/Point/GetPointHistoryData */
|
|
119
119
|
function _GetPointAggregationData() {
|
|
120
120
|
_GetPointAggregationData = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(body, options) {
|
|
121
121
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
@@ -136,15 +136,17 @@ function _GetPointAggregationData() {
|
|
|
136
136
|
}));
|
|
137
137
|
return _GetPointAggregationData.apply(this, arguments);
|
|
138
138
|
}
|
|
139
|
-
export function
|
|
140
|
-
return
|
|
139
|
+
export function GetTdIndicatorAggregateData(_x11, _x12) {
|
|
140
|
+
return _GetTdIndicatorAggregateData.apply(this, arguments);
|
|
141
141
|
}
|
|
142
|
-
|
|
143
|
-
|
|
142
|
+
|
|
143
|
+
/** 历史数据导出xlsx货pdf(支持进度条) POST /api/GatewayMicro/Point/DownHistoryDataToExcelOrPdf */
|
|
144
|
+
function _GetTdIndicatorAggregateData() {
|
|
145
|
+
_GetTdIndicatorAggregateData = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(body, options) {
|
|
144
146
|
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
145
147
|
while (1) switch (_context6.prev = _context6.next) {
|
|
146
148
|
case 0:
|
|
147
|
-
return _context6.abrupt("return", request('/api/GatewayMicro/
|
|
149
|
+
return _context6.abrupt("return", request('/api/GatewayMicro/DeviceIndicator/GetTdIndicatorAggregateData', _objectSpread({
|
|
148
150
|
method: 'POST',
|
|
149
151
|
headers: {
|
|
150
152
|
'Content-Type': 'application/json-patch+json'
|
|
@@ -157,5 +159,28 @@ function _DownHistoryDataToExcelOrPdf() {
|
|
|
157
159
|
}
|
|
158
160
|
}, _callee6);
|
|
159
161
|
}));
|
|
162
|
+
return _GetTdIndicatorAggregateData.apply(this, arguments);
|
|
163
|
+
}
|
|
164
|
+
export function DownHistoryDataToExcelOrPdf(_x13, _x14) {
|
|
165
|
+
return _DownHistoryDataToExcelOrPdf.apply(this, arguments);
|
|
166
|
+
}
|
|
167
|
+
function _DownHistoryDataToExcelOrPdf() {
|
|
168
|
+
_DownHistoryDataToExcelOrPdf = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(body, options) {
|
|
169
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
170
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
171
|
+
case 0:
|
|
172
|
+
return _context7.abrupt("return", request('/api/GatewayMicro/Point/DownHistoryDataToExcelOrPdf', _objectSpread({
|
|
173
|
+
method: 'POST',
|
|
174
|
+
headers: {
|
|
175
|
+
'Content-Type': 'application/json-patch+json'
|
|
176
|
+
},
|
|
177
|
+
data: body
|
|
178
|
+
}, options || {})));
|
|
179
|
+
case 1:
|
|
180
|
+
case "end":
|
|
181
|
+
return _context7.stop();
|
|
182
|
+
}
|
|
183
|
+
}, _callee7);
|
|
184
|
+
}));
|
|
160
185
|
return _DownHistoryDataToExcelOrPdf.apply(this, arguments);
|
|
161
186
|
}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "coolcare-lite-scada-component",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.37",
|
|
4
4
|
"scripts": {
|
|
5
|
-
"start": "umi dev",
|
|
5
|
+
"start": " umi dev",
|
|
6
6
|
"build:prod": "UMI_ENV=prod umi build",
|
|
7
7
|
"build:generalfushi": "UMI_ENV=prod REACT_APP_PLATFORM=generalfushi umi build",
|
|
8
8
|
"build:yimin": "UMI_ENV=prod REACT_APP_PLATFORM=yimin umi build",
|