coolcare-lite-scada-component 1.0.19 → 1.0.21
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.
|
@@ -192,7 +192,16 @@ var DialogHistory = function DialogHistory(_ref) {
|
|
|
192
192
|
name: dataItem.ts,
|
|
193
193
|
value: dataItem.val
|
|
194
194
|
};
|
|
195
|
-
})
|
|
195
|
+
}),
|
|
196
|
+
markPoint: {
|
|
197
|
+
data: [{
|
|
198
|
+
type: 'max',
|
|
199
|
+
name: '最大值'
|
|
200
|
+
}, {
|
|
201
|
+
type: 'min',
|
|
202
|
+
name: '最小值'
|
|
203
|
+
}]
|
|
204
|
+
}
|
|
196
205
|
});
|
|
197
206
|
});
|
|
198
207
|
|
|
@@ -26,9 +26,8 @@ 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
|
-
/** 刷新频率 */
|
|
30
|
-
var RefreshFrequency = 1.5 * 60 * 1000;
|
|
31
29
|
var Player = function Player(_ref) {
|
|
30
|
+
var _jsonConfig$pageConfi;
|
|
32
31
|
var jsonConfig = _ref.jsonConfig,
|
|
33
32
|
query = _ref.query,
|
|
34
33
|
onEvent = _ref.onEvent;
|
|
@@ -63,6 +62,9 @@ var Player = function Player(_ref) {
|
|
|
63
62
|
var mittMeta = useMemo(function () {
|
|
64
63
|
return getMittMeta(query);
|
|
65
64
|
}, [query]);
|
|
65
|
+
|
|
66
|
+
/** 刷新频率 */
|
|
67
|
+
var RefreshFrequency = ((jsonConfig === null || jsonConfig === void 0 ? void 0 : (_jsonConfig$pageConfi = jsonConfig.pageConfig) === null || _jsonConfig$pageConfi === void 0 ? void 0 : _jsonConfig$pageConfi.refreshFrequency) || 1.5 * 60) * 1000;
|
|
66
68
|
useEffect(function () {
|
|
67
69
|
window.scadaMode = 'player';
|
|
68
70
|
return function () {
|
|
@@ -71,11 +73,11 @@ var Player = function Player(_ref) {
|
|
|
71
73
|
}, []);
|
|
72
74
|
useEffect(function () {
|
|
73
75
|
if (jsonConfig) {
|
|
74
|
-
var _jsonConfig$
|
|
76
|
+
var _jsonConfig$pageConfi2, _window$parent;
|
|
75
77
|
var msg = {
|
|
76
78
|
event: 'scada-config-loaded',
|
|
77
79
|
payload: {
|
|
78
|
-
dimensions: (jsonConfig === null || jsonConfig === void 0 ? void 0 : (_jsonConfig$
|
|
80
|
+
dimensions: (jsonConfig === null || jsonConfig === void 0 ? void 0 : (_jsonConfig$pageConfi2 = jsonConfig.pageConfig) === null || _jsonConfig$pageConfi2 === void 0 ? void 0 : _jsonConfig$pageConfi2.dimensions) || {
|
|
79
81
|
width: 341,
|
|
80
82
|
height: 500
|
|
81
83
|
},
|
|
@@ -321,13 +323,13 @@ var Player = function Player(_ref) {
|
|
|
321
323
|
});
|
|
322
324
|
}, [query, mittMeta]);
|
|
323
325
|
useEffect(function () {
|
|
324
|
-
var _jsonConfig$
|
|
326
|
+
var _jsonConfig$pageConfi3, _graphRef$current3;
|
|
325
327
|
if (!wrapSize || !jsonConfig || !query) return;
|
|
326
|
-
if (query.zoomMode === 'width' && (jsonConfig === null || jsonConfig === void 0 ? void 0 : (_jsonConfig$
|
|
328
|
+
if (query.zoomMode === 'width' && (jsonConfig === null || jsonConfig === void 0 ? void 0 : (_jsonConfig$pageConfi3 = jsonConfig.pageConfig) === null || _jsonConfig$pageConfi3 === void 0 ? void 0 : _jsonConfig$pageConfi3.dimensions)) {
|
|
327
329
|
var _graphRef$current;
|
|
328
|
-
var _jsonConfig$
|
|
329
|
-
width = _jsonConfig$
|
|
330
|
-
height = _jsonConfig$
|
|
330
|
+
var _jsonConfig$pageConfi4 = jsonConfig.pageConfig.dimensions,
|
|
331
|
+
width = _jsonConfig$pageConfi4.width,
|
|
332
|
+
height = _jsonConfig$pageConfi4.height;
|
|
331
333
|
var scale = wrapSize.width / width;
|
|
332
334
|
(_graphRef$current = graphRef.current) === null || _graphRef$current === void 0 ? void 0 : _graphRef$current.resize(width * scale, height * scale);
|
|
333
335
|
} else {
|
|
@@ -42,7 +42,8 @@ var LayerForm = function LayerForm() {
|
|
|
42
42
|
backgroundColor = values.backgroundColor,
|
|
43
43
|
borderRadius = values.borderRadius,
|
|
44
44
|
backgroundImage = values.backgroundImage,
|
|
45
|
-
dimensionsSelectValue = values.dimensionsSelectValue
|
|
45
|
+
dimensionsSelectValue = values.dimensionsSelectValue,
|
|
46
|
+
refreshFrequency = values.refreshFrequency;
|
|
46
47
|
var width = values.width,
|
|
47
48
|
height = values.height;
|
|
48
49
|
if (dimensionsSelectValue !== '自定义') {
|
|
@@ -64,7 +65,8 @@ var LayerForm = function LayerForm() {
|
|
|
64
65
|
title: title,
|
|
65
66
|
backgroundColor: backgroundColor,
|
|
66
67
|
backgroundImage: backgroundImage,
|
|
67
|
-
borderRadius: borderRadius
|
|
68
|
+
borderRadius: borderRadius,
|
|
69
|
+
refreshFrequency: refreshFrequency
|
|
68
70
|
}));
|
|
69
71
|
}, {
|
|
70
72
|
leading: false,
|
|
@@ -138,6 +140,14 @@ var LayerForm = function LayerForm() {
|
|
|
138
140
|
autoComplete: "off",
|
|
139
141
|
onValuesChange: onFormChange
|
|
140
142
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
143
|
+
name: "refreshFrequency",
|
|
144
|
+
label: "\u5237\u65B0\u9891\u7387"
|
|
145
|
+
}, /*#__PURE__*/React.createElement(InputNumber, {
|
|
146
|
+
min: 5,
|
|
147
|
+
max: 999,
|
|
148
|
+
defaultValue: 90,
|
|
149
|
+
addonBefore: "秒"
|
|
150
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
141
151
|
name: "dimensionsSelectValue",
|
|
142
152
|
label: "\u5206\u8FA8\u7387"
|
|
143
153
|
}, /*#__PURE__*/React.createElement(Select, {
|
package/es/services/request.js
CHANGED
|
@@ -92,7 +92,7 @@ export function setRequrl(val) {
|
|
|
92
92
|
reqUrl = val;
|
|
93
93
|
}
|
|
94
94
|
var requestPrefixMap = {
|
|
95
|
-
dev: '',
|
|
95
|
+
dev: 'https://dev.sinocold.com:30443',
|
|
96
96
|
prod: 'https://iot.sinocold.net',
|
|
97
97
|
staging: 'https://dev.sinocold.com:30443',
|
|
98
98
|
generalfushi: 'https://iot.generalfushi.com'
|