coolcare-lite-scada-component 2.0.31 → 2.0.33

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.
@@ -41,7 +41,9 @@ var EleSwitchComponent = function EleSwitchComponent(_ref) {
41
41
  getContainer: function getContainer() {
42
42
  return document.getElementById("scada-body");
43
43
  },
44
- onOk: function onOk() {
44
+ onOk: function onOk(close) {
45
+ var _window$event;
46
+ (_window$event = window.event) === null || _window$event === void 0 ? void 0 : _window$event.stopPropagation();
45
47
  if (window.scadaMode === 'edit' || !configPoint || !(payload === null || payload === void 0 ? void 0 : payload.pointWriteable)) {
46
48
  return;
47
49
  }
@@ -54,6 +56,12 @@ var EleSwitchComponent = function EleSwitchComponent(_ref) {
54
56
  value: val ? checkedValue : unCheckedValue
55
57
  });
56
58
  setValue(val);
59
+ close();
60
+ },
61
+ onCancel: function onCancel(close) {
62
+ var _window$event2;
63
+ (_window$event2 = window.event) === null || _window$event2 === void 0 ? void 0 : _window$event2.stopPropagation();
64
+ close();
57
65
  }
58
66
  });
59
67
  };
@@ -27,7 +27,7 @@ import emitter from "../../../utils/events";
27
27
  import { GetDevicePoint } from "../../../services/gateway/Device";
28
28
  import "./index.css";
29
29
  /** 刷新频率 */
30
- var RefreshFrequency = 1.5 * 60 * 1000;
30
+ var RefreshFrequency = 10 * 1000;
31
31
  var Player = function Player(_ref) {
32
32
  var jsonConfig = _ref.jsonConfig,
33
33
  query = _ref.query,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coolcare-lite-scada-component",
3
- "version": "2.0.31",
3
+ "version": "2.0.33",
4
4
  "scripts": {
5
5
  "start": "umi dev",
6
6
  "build:prod": "UMI_ENV=prod umi build",