coolcare-lite-scada-component 4.1.0 → 4.1.2

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 (96) hide show
  1. package/es/app.js +23 -0
  2. package/es/components/BoxShadowPicker/index.less.d.ts +9 -9
  3. package/es/components/ColorPicker/util.js +4 -4
  4. package/es/components/DialogHistory/index.css +22 -0
  5. package/es/components/DialogHistory/index.js +388 -79
  6. package/es/components/DialogImagePicker/GroupPanel/index.js +1 -12
  7. package/es/components/ECharts/index.js +31 -23
  8. package/es/components/FormBindPoint/FreedomScene.js +181 -11
  9. package/es/components/FormBindPoint/ProductionOrDeviceScene.js +12 -5
  10. package/es/components/FormBindPoint/index.js +6 -0
  11. package/es/components/Icon/index.js +1 -1
  12. package/es/components/IconFont/index.js +6 -0
  13. package/es/components/ImageUploader/index.js +8 -7
  14. package/es/components/ModalChangePointValue.js +272 -0
  15. package/es/components/ModalChoosePoint/index.js +53 -16
  16. package/es/components/PointSelect/DeviceIndicatorTable.js +111 -0
  17. package/es/components/PointSelect/IndicatorSelect.js +182 -0
  18. package/es/constant.js +2 -2
  19. package/es/element/BorderBox/util/typings.d.ts +9 -9
  20. package/es/element/Decoration/util/typings.d.ts +9 -9
  21. package/es/element/EleFan/Component.js +1 -1
  22. package/es/element/EleFanBySvg/index.js +3 -3
  23. package/es/element/EleImage/index.js +1 -1
  24. package/es/element/ElePointImage/Component.js +30 -41
  25. package/es/element/ElePointImage/index.js +1 -1
  26. package/es/element/ElePointValue/Component.js +117 -17
  27. package/es/element/ElePointValue/PropsSet/StatisticsPropsSet/index.js +6 -0
  28. package/es/element/ElePointValue/index.css +11 -0
  29. package/es/element/ElePointValue/index.js +6 -0
  30. package/es/element/EleShine/Component.js +133 -23
  31. package/es/element/EleShine/PropsSet/OtherPropsSet/index.js +27 -34
  32. package/es/element/EleShine/PropsSet/PointAlarmTool.js +99 -0
  33. package/es/element/EleShine/PropsSet/index.js +9 -1
  34. package/es/element/EleShine/index.js +2 -1
  35. package/es/element/EleState/index.js +1 -1
  36. package/es/element/EleSwitch/Component.js +2 -12
  37. package/es/element/PipeNodes/NodeBL/index.js +1 -1
  38. package/es/element/PipeNodes/NodeBR/index.js +1 -1
  39. package/es/element/PipeNodes/NodeBottom/index.js +1 -1
  40. package/es/element/PipeNodes/NodeCenter/index.js +1 -1
  41. package/es/element/PipeNodes/NodeHorizontal/index.js +1 -1
  42. package/es/element/PipeNodes/NodeLeft/index.js +1 -1
  43. package/es/element/PipeNodes/NodeRight/index.js +1 -1
  44. package/es/element/PipeNodes/NodeTL/index.js +1 -1
  45. package/es/element/PipeNodes/NodeTR/index.js +1 -1
  46. package/es/element/PipeNodes/NodeTop/index.js +1 -1
  47. package/es/element/PipeNodes/NodeVertical/index.js +1 -1
  48. package/es/element/PointCard/PointListCard/Component.js +3 -2
  49. package/es/element/PointCard/PointListCard/index.js +1 -0
  50. package/es/element/type.d.ts +4 -6
  51. package/es/element/utils/getValueByExpression.js +3 -0
  52. package/es/element/utils/handleEleEvent.js +11 -1
  53. package/es/element/utils/pointWrite.js +4 -5
  54. package/es/hooks/usePointWatch.js +1 -1
  55. package/es/models/useEditor.js +14 -8
  56. package/es/pages/display/Player/index.js +444 -123
  57. package/es/pages/display/index.js +2 -2
  58. package/es/pages/document.ejs +1 -1
  59. package/es/pages/editor/PanelLeft/BasicShapeList/listData.js +8 -8
  60. package/es/pages/editor/PanelLeft/BorderBoxEleList/index.less.d.ts +7 -7
  61. package/es/pages/editor/PanelLeft/DecorationEleList/index.less.d.ts +7 -7
  62. package/es/pages/editor/PanelLeft/GroupManageDialog/index.js +4 -4
  63. package/es/pages/editor/PanelLeft/ImgGroup/index.js +1 -12
  64. package/es/pages/editor/PanelLeft/MetaEleList/listData.js +14 -14
  65. package/es/pages/editor/PanelLeft/PipeEleList/listData.js +11 -11
  66. package/es/pages/editor/PanelLeft/PointCardEleList/listData.js +6 -6
  67. package/es/pages/editor/PanelLeft/RecommendEleList/listData.js +4 -4
  68. package/es/pages/editor/PanelLeft/index.js +3 -3
  69. package/es/pages/editor/PanelRight/components/FormLayer/index.js +3 -1
  70. package/es/pages/editor/PanelRight/index.less.d.ts +7 -7
  71. package/es/pages/editor/PanelTop/HotKeyDescribe/index.js +1 -1
  72. package/es/pages/editor/PanelTop/Save/index.js +120 -67
  73. package/es/pages/editor/index.js +223 -135
  74. package/es/pages/editor/utils/scadaChangeLog.js +237 -0
  75. package/es/services/common/Uploader.js +1 -1
  76. package/es/services/common/typings.d.ts +15 -15
  77. package/es/services/energy/index.js +56 -0
  78. package/es/services/gateway/Device.js +22 -0
  79. package/es/services/gateway/Point.js +46 -25
  80. package/es/services/gateway/typings.d.ts +3 -0
  81. package/es/services/master/typings.d.ts +362 -362
  82. package/es/services/product/typings.d.ts +1045 -1045
  83. package/es/services/project/typings.d.ts +1609 -1609
  84. package/es/services/request.js +126 -13
  85. package/es/shims.x6.d.ts +15 -15
  86. package/es/typings.d.ts +12 -0
  87. package/es/utils/auth.js +6 -2
  88. package/es/utils/cssStyle.js +4 -4
  89. package/es/utils/dataURItoBlob.js +25 -0
  90. package/es/utils/date.js +7 -0
  91. package/es/utils/decomposeMatrix.js +5 -5
  92. package/es/utils/events.js +3 -3
  93. package/es/utils/index.js +34 -34
  94. package/es/utils/pointValueFormat.js +3 -3
  95. package/package.json +16 -15
  96. package/es/elementCss.css +0 -19
@@ -0,0 +1,237 @@
1
+ function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
2
+ function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
3
+ function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
4
+ function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
5
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
6
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
7
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
8
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
9
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
10
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
11
+ import { getAccessToken, parseAccessToken } from "../../../utils/auth";
12
+ var SCADA_CONFIG_CACHE_KEY_PREFIX = 'cc-scada-config-cache-v1';
13
+ var isPlainObject = function isPlainObject(value) {
14
+ return value !== null && _typeof(value) === 'object' && !Array.isArray(value) && !(value instanceof Date);
15
+ };
16
+ var _normalizeValue = function normalizeValue(value) {
17
+ if (Array.isArray(value)) {
18
+ return value.map(function (item) {
19
+ return _normalizeValue(item);
20
+ });
21
+ }
22
+ if (!isPlainObject(value)) {
23
+ return value;
24
+ }
25
+ var sorted = {};
26
+ Object.keys(value).sort().forEach(function (key) {
27
+ sorted[key] = _normalizeValue(value[key]);
28
+ });
29
+ return sorted;
30
+ };
31
+ var getGraphSnapshotData = function getGraphSnapshotData(graph) {
32
+ if (!(graph === null || graph === void 0 ? void 0 : graph.toJSON)) {
33
+ return {};
34
+ }
35
+ try {
36
+ var graphData = graph.toJSON();
37
+ if (graphData && _typeof(graphData) === 'object') {
38
+ return graphData;
39
+ }
40
+ } catch (_err) {
41
+ return {};
42
+ }
43
+ return {};
44
+ };
45
+ export var buildScadaConfigSnapshot = function buildScadaConfigSnapshot(pageConfig, graph, screenshot) {
46
+ var merged = _objectSpread({
47
+ pageConfig: pageConfig || {}
48
+ }, getGraphSnapshotData(graph));
49
+ return {
50
+ capturedAt: Date.now(),
51
+ data: JSON.stringify(_normalizeValue(merged)),
52
+ screenshot: screenshot
53
+ };
54
+ };
55
+ export var getScadaConfigCacheKey = function getScadaConfigCacheKey(query) {
56
+ if (query.scene === 'product') {
57
+ return "".concat(SCADA_CONFIG_CACHE_KEY_PREFIX, ":product:").concat(query.companyId, ":").concat(query.productId, ":").concat(query.productVersionId, ":").concat(query.scadaType);
58
+ }
59
+ if (query.scene === 'device') {
60
+ return "".concat(SCADA_CONFIG_CACHE_KEY_PREFIX, ":device:").concat(query.companyId, ":").concat(query.deviceId, ":").concat(query.scadaType);
61
+ }
62
+ return "".concat(SCADA_CONFIG_CACHE_KEY_PREFIX, ":freedom:").concat(query.companyId, ":").concat(query.scadaId);
63
+ };
64
+ export var getScadaConfigSnapshotFromStorage = function getScadaConfigSnapshotFromStorage(query) {
65
+ try {
66
+ var key = getScadaConfigCacheKey(query);
67
+ var cacheRaw = window.sessionStorage.getItem(key);
68
+ if (!cacheRaw) {
69
+ return null;
70
+ }
71
+ var cache = JSON.parse(cacheRaw);
72
+ if (typeof (cache === null || cache === void 0 ? void 0 : cache.data) === 'string') {
73
+ return cache;
74
+ }
75
+ } catch (_err) {
76
+ return null;
77
+ }
78
+ return null;
79
+ };
80
+ export var setScadaConfigSnapshotToStorage = function setScadaConfigSnapshotToStorage(query, snapshot) {
81
+ try {
82
+ var key = getScadaConfigCacheKey(query);
83
+ window.sessionStorage.setItem(key, JSON.stringify(snapshot));
84
+ } catch (_err) {
85
+ // ignore
86
+ }
87
+ };
88
+ var parseScadaConfig = function parseScadaConfig(snapshot) {
89
+ if (!(snapshot === null || snapshot === void 0 ? void 0 : snapshot.data)) {
90
+ return {};
91
+ }
92
+ try {
93
+ var parsed = JSON.parse(snapshot.data);
94
+ return isPlainObject(parsed) ? parsed : {};
95
+ } catch (_err) {
96
+ return {};
97
+ }
98
+ };
99
+ var getCellMap = function getCellMap(cells) {
100
+ var map = new Map();
101
+ if (!Array.isArray(cells)) {
102
+ return map;
103
+ }
104
+ cells.forEach(function (item) {
105
+ if (!item || _typeof(item) !== 'object') {
106
+ return;
107
+ }
108
+ var _ref = item,
109
+ id = _ref.id;
110
+ if (typeof id !== 'string' && typeof id !== 'number') {
111
+ return;
112
+ }
113
+ map.set(String(id), JSON.stringify(_normalizeValue(item)));
114
+ });
115
+ return map;
116
+ };
117
+ var pickCellDiff = function pickCellDiff(source, target) {
118
+ var added = [];
119
+ var removed = [];
120
+ var updated = [];
121
+ source.forEach(function (value, id) {
122
+ if (!target.has(id)) {
123
+ removed.push(id);
124
+ return;
125
+ }
126
+ if (target.get(id) !== value) {
127
+ updated.push(id);
128
+ }
129
+ });
130
+ target.forEach(function (_, id) {
131
+ if (!source.has(id)) {
132
+ added.push(id);
133
+ }
134
+ });
135
+ return {
136
+ added: added,
137
+ removed: removed,
138
+ updated: updated
139
+ };
140
+ };
141
+ export var buildScadaConfigChangePayload = function buildScadaConfigChangePayload(previousSnapshot, nextSnapshot, operatorUserId, afterScreenshot) {
142
+ var fallbackSummary = 'first-save-without-history';
143
+ if (!(previousSnapshot === null || previousSnapshot === void 0 ? void 0 : previousSnapshot.data) || !(nextSnapshot === null || nextSnapshot === void 0 ? void 0 : nextSnapshot.data)) {
144
+ return {
145
+ changedAt: new Date().toISOString(),
146
+ hasChanged: true,
147
+ operatorUserId: operatorUserId,
148
+ beforeScreenshot: previousSnapshot === null || previousSnapshot === void 0 ? void 0 : previousSnapshot.screenshot,
149
+ afterScreenshot: afterScreenshot || (nextSnapshot === null || nextSnapshot === void 0 ? void 0 : nextSnapshot.screenshot),
150
+ summary: fallbackSummary,
151
+ details: {
152
+ pageConfigChanged: true,
153
+ cellsAdded: [],
154
+ cellsRemoved: [],
155
+ cellsUpdated: []
156
+ }
157
+ };
158
+ }
159
+ var previous = parseScadaConfig(previousSnapshot);
160
+ var current = parseScadaConfig(nextSnapshot);
161
+ var prevCells = getCellMap(previous.cells);
162
+ var currCells = getCellMap(current.cells);
163
+ var cellDiff = pickCellDiff(prevCells, currCells);
164
+ var previousPageConfig = previous.pageConfig !== undefined ? _normalizeValue(previous.pageConfig) : {};
165
+ var currentPageConfig = current.pageConfig !== undefined ? _normalizeValue(current.pageConfig) : {};
166
+ var pageConfigChanged = JSON.stringify(previousPageConfig) !== JSON.stringify(currentPageConfig);
167
+ var hasChanged = JSON.stringify(previous) !== JSON.stringify(current) || pageConfigChanged || Boolean(cellDiff.added.length || cellDiff.removed.length || cellDiff.updated.length);
168
+ var summaryList = [];
169
+ if (pageConfigChanged) {
170
+ summaryList.push('page-config-changed');
171
+ }
172
+ if (cellDiff.added.length > 0) {
173
+ summaryList.push("add-".concat(cellDiff.added.length));
174
+ }
175
+ if (cellDiff.removed.length > 0) {
176
+ summaryList.push("remove-".concat(cellDiff.removed.length));
177
+ }
178
+ if (cellDiff.updated.length > 0) {
179
+ summaryList.push("update-".concat(cellDiff.updated.length));
180
+ }
181
+ return {
182
+ changedAt: new Date().toISOString(),
183
+ hasChanged: hasChanged,
184
+ operatorUserId: operatorUserId,
185
+ beforeScreenshot: previousSnapshot === null || previousSnapshot === void 0 ? void 0 : previousSnapshot.screenshot,
186
+ afterScreenshot: afterScreenshot || (nextSnapshot === null || nextSnapshot === void 0 ? void 0 : nextSnapshot.screenshot),
187
+ summary: summaryList.length > 0 ? summaryList.join(',') : 'no-change',
188
+ details: {
189
+ pageConfigChanged: pageConfigChanged,
190
+ cellsAdded: cellDiff.added,
191
+ cellsRemoved: cellDiff.removed,
192
+ cellsUpdated: cellDiff.updated
193
+ }
194
+ };
195
+ };
196
+ export var getCurrentOperatorId = function getCurrentOperatorId() {
197
+ var accessToken = getAccessToken();
198
+ if (!accessToken) {
199
+ return;
200
+ }
201
+ try {
202
+ return parseAccessToken(accessToken).UserId;
203
+ } catch (_err) {
204
+ return;
205
+ }
206
+ };
207
+ export var captureScadaScreenshot = /*#__PURE__*/function () {
208
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(graph) {
209
+ return _regenerator().w(function (_context) {
210
+ while (1) switch (_context.n) {
211
+ case 0:
212
+ if (!(!graph || typeof graph.toPNG !== 'function')) {
213
+ _context.n = 1;
214
+ break;
215
+ }
216
+ return _context.a(2, undefined);
217
+ case 1:
218
+ return _context.a(2, new Promise(function (resolve) {
219
+ try {
220
+ graph.toPNG(function (dataUri) {
221
+ if (typeof dataUri === 'string' && dataUri.length > 0) {
222
+ resolve(dataUri);
223
+ return;
224
+ }
225
+ resolve(undefined);
226
+ });
227
+ } catch (_err) {
228
+ resolve(undefined);
229
+ }
230
+ }));
231
+ }
232
+ }, _callee);
233
+ }));
234
+ return function captureScadaScreenshot(_x) {
235
+ return _ref2.apply(this, arguments);
236
+ };
237
+ }();
@@ -29,7 +29,7 @@ function _Upload() {
29
29
  formData.append(ele, item);
30
30
  }
31
31
  });
32
- return _context.a(2, request('/api/TestLineMicro/upload', _objectSpread({
32
+ return _context.a(2, request('/api/CommonMicro/Uploader/Upload', _objectSpread({
33
33
  method: 'POST',
34
34
  // headers: {
35
35
  // 'Content-Type': 'multipart/form-data',
@@ -1,15 +1,15 @@
1
- // @ts-ignore
2
- /* eslint-disable */
3
-
4
- declare namespace CommonAPI {
5
- type StringListResponseResult = {
6
- /** 请求是否成功 */
7
- success?: boolean;
8
- /** 响应代码 200 为成功, 非200为失败,Message为失败原因 */
9
- code?: number;
10
- /** 消息 */
11
- message?: string;
12
- /** 返回实体 */
13
- data?: string[];
14
- };
15
- }
1
+ // @ts-ignore
2
+ /* eslint-disable */
3
+
4
+ declare namespace CommonAPI {
5
+ type StringListResponseResult = {
6
+ /** 请求是否成功 */
7
+ success?: boolean;
8
+ /** 响应代码 200 为成功, 非200为失败,Message为失败原因 */
9
+ code?: number;
10
+ /** 消息 */
11
+ message?: string;
12
+ /** 返回实体 */
13
+ data?: string[];
14
+ };
15
+ }
@@ -0,0 +1,56 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
3
+ function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
4
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
7
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
8
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
9
+ function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
10
+ function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
11
+ // @ts-ignore
12
+ /* eslint-disable */
13
+ import request from "../request";
14
+
15
+ /** 添加或修改企业组态 POST /api/GatewayMicro/CompanyConfiguration/AddOrUpdateCompanyConfiguration */
16
+ export function GetDataConfigure(_x, _x2) {
17
+ return _GetDataConfigure.apply(this, arguments);
18
+ }
19
+ /** 添加或修改企业组态 POST /api/GatewayMicro/CompanyConfiguration/AddOrUpdateCompanyConfiguration */
20
+ function _GetDataConfigure() {
21
+ _GetDataConfigure = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(body, options) {
22
+ return _regenerator().w(function (_context) {
23
+ while (1) switch (_context.n) {
24
+ case 0:
25
+ return _context.a(2, request('/api/EnergyMicro/data-configure/getPageByCompanyId', _objectSpread({
26
+ method: 'POST',
27
+ headers: {
28
+ 'Content-Type': 'application/json-patch+json'
29
+ },
30
+ params: body
31
+ }, options || {})));
32
+ }
33
+ }, _callee);
34
+ }));
35
+ return _GetDataConfigure.apply(this, arguments);
36
+ }
37
+ export function GetEnergyByMeterList(_x3, _x4) {
38
+ return _GetEnergyByMeterList.apply(this, arguments);
39
+ }
40
+ function _GetEnergyByMeterList() {
41
+ _GetEnergyByMeterList = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(body, options) {
42
+ return _regenerator().w(function (_context2) {
43
+ while (1) switch (_context2.n) {
44
+ case 0:
45
+ return _context2.a(2, request('/api/EnergyMicro/comprehensive/getEnergyByMeterList', _objectSpread({
46
+ method: 'POST',
47
+ headers: {
48
+ 'Content-Type': 'application/json-patch+json'
49
+ },
50
+ data: body
51
+ }, options || {})));
52
+ }
53
+ }, _callee2);
54
+ }));
55
+ return _GetEnergyByMeterList.apply(this, arguments);
56
+ }
@@ -368,6 +368,8 @@ function _GetDeviceCumulativeUpLineLineChart() {
368
368
  export function GetDeviceDayLiveLineChart(_x32, _x33) {
369
369
  return _GetDeviceDayLiveLineChart.apply(this, arguments);
370
370
  }
371
+
372
+ /** 获取设备指标 POST /api/GatewayMicro/DeviceIndicator/GetDeviceIndicator */
371
373
  function _GetDeviceDayLiveLineChart() {
372
374
  _GetDeviceDayLiveLineChart = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee15(body, options) {
373
375
  return _regenerator().w(function (_context15) {
@@ -384,4 +386,24 @@ function _GetDeviceDayLiveLineChart() {
384
386
  }, _callee15);
385
387
  }));
386
388
  return _GetDeviceDayLiveLineChart.apply(this, arguments);
389
+ }
390
+ export function GetDeviceIndicator(_x34, _x35) {
391
+ return _GetDeviceIndicator.apply(this, arguments);
392
+ }
393
+ function _GetDeviceIndicator() {
394
+ _GetDeviceIndicator = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee16(body, options) {
395
+ return _regenerator().w(function (_context16) {
396
+ while (1) switch (_context16.n) {
397
+ case 0:
398
+ return _context16.a(2, request('/api/GatewayMicro/DeviceIndicator/GetDeviceIndicator', _objectSpread({
399
+ method: 'POST',
400
+ headers: {
401
+ 'Content-Type': 'application/json-patch+json'
402
+ },
403
+ data: body
404
+ }, options || {})));
405
+ }
406
+ }, _callee16);
407
+ }));
408
+ return _GetDeviceIndicator.apply(this, arguments);
387
409
  }
@@ -61,7 +61,7 @@ export function GetPointPage(_x5, _x6) {
61
61
  return _GetPointPage.apply(this, arguments);
62
62
  }
63
63
 
64
- /** 获取点位历史数据 POST /api/GatewayMicro/Point/GetPointHistoryData */
64
+ /** 获取点位历史数据 POST /api/GatewayMicro/DeviceIndicator/GetTdIndicatorHistoryData */
65
65
  function _GetPointPage() {
66
66
  _GetPointPage = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3(body, options) {
67
67
  return _regenerator().w(function (_context3) {
@@ -79,16 +79,16 @@ function _GetPointPage() {
79
79
  }));
80
80
  return _GetPointPage.apply(this, arguments);
81
81
  }
82
- export function GetPointHistoryData(_x7, _x8) {
83
- return _GetPointHistoryData.apply(this, arguments);
82
+ export function GetTdIndicatorHistoryData(_x7, _x8) {
83
+ return _GetTdIndicatorHistoryData.apply(this, arguments);
84
84
  }
85
85
  /** 获取点位历史数据 POST /api/GatewayMicro/Point/GetPointHistoryData */
86
- function _GetPointHistoryData() {
87
- _GetPointHistoryData = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4(body, options) {
86
+ function _GetTdIndicatorHistoryData() {
87
+ _GetTdIndicatorHistoryData = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4(body, options) {
88
88
  return _regenerator().w(function (_context4) {
89
89
  while (1) switch (_context4.n) {
90
90
  case 0:
91
- return _context4.a(2, request('/api/GatewayMicro/Point/GetPointHistoryData', _objectSpread({
91
+ return _context4.a(2, request('/api/GatewayMicro/DeviceIndicator/GetTdIndicatorHistoryData', _objectSpread({
92
92
  method: 'POST',
93
93
  headers: {
94
94
  'Content-Type': 'application/json-patch+json'
@@ -98,19 +98,40 @@ function _GetPointHistoryData() {
98
98
  }
99
99
  }, _callee4);
100
100
  }));
101
+ return _GetTdIndicatorHistoryData.apply(this, arguments);
102
+ }
103
+ export function GetPointHistoryData(_x9, _x0) {
101
104
  return _GetPointHistoryData.apply(this, arguments);
102
105
  }
103
- export function GetPointAggregationData(_x9, _x0) {
106
+ /** 获取点位历史数据 POST /api/GatewayMicro/Point/GetPointHistoryData */
107
+ function _GetPointHistoryData() {
108
+ _GetPointHistoryData = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5(body, options) {
109
+ return _regenerator().w(function (_context5) {
110
+ while (1) switch (_context5.n) {
111
+ case 0:
112
+ return _context5.a(2, request('/api/GatewayMicro/Point/GetPointHistoryData', _objectSpread({
113
+ method: 'POST',
114
+ headers: {
115
+ 'Content-Type': 'application/json-patch+json'
116
+ },
117
+ data: body
118
+ }, options || {})));
119
+ }
120
+ }, _callee5);
121
+ }));
122
+ return _GetPointHistoryData.apply(this, arguments);
123
+ }
124
+ export function GetPointAggregationData(_x1, _x10) {
104
125
  return _GetPointAggregationData.apply(this, arguments);
105
126
  }
106
127
 
107
128
  /** 获取点位历史数据 POST /api/GatewayMicro/Point/GetPointHistoryData */
108
129
  function _GetPointAggregationData() {
109
- _GetPointAggregationData = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5(body, options) {
110
- return _regenerator().w(function (_context5) {
111
- while (1) switch (_context5.n) {
130
+ _GetPointAggregationData = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee6(body, options) {
131
+ return _regenerator().w(function (_context6) {
132
+ while (1) switch (_context6.n) {
112
133
  case 0:
113
- return _context5.a(2, request('/api/GatewayMicro/Point/GetPointAggregationData', _objectSpread({
134
+ return _context6.a(2, request('/api/GatewayMicro/Point/GetPointAggregationData', _objectSpread({
114
135
  method: 'POST',
115
136
  headers: {
116
137
  'Content-Type': 'application/json-patch+json'
@@ -118,21 +139,21 @@ function _GetPointAggregationData() {
118
139
  data: body
119
140
  }, options || {})));
120
141
  }
121
- }, _callee5);
142
+ }, _callee6);
122
143
  }));
123
144
  return _GetPointAggregationData.apply(this, arguments);
124
145
  }
125
- export function GetTdIndicatorAggregateData(_x1, _x10) {
146
+ export function GetTdIndicatorAggregateData(_x11, _x12) {
126
147
  return _GetTdIndicatorAggregateData.apply(this, arguments);
127
148
  }
128
149
 
129
- /** 历史数据导出xlsx货pdf(支持进度条) POST /api/GatewayMicro/Point/DownHistoryDataToExcelOrPdf */
150
+ /** 历史数据导出xlsx或pdf(支持进度条) POST /api/GatewayMicro/Point/DownHistoryDataToExcelOrPdf */
130
151
  function _GetTdIndicatorAggregateData() {
131
- _GetTdIndicatorAggregateData = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee6(body, options) {
132
- return _regenerator().w(function (_context6) {
133
- while (1) switch (_context6.n) {
152
+ _GetTdIndicatorAggregateData = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee7(body, options) {
153
+ return _regenerator().w(function (_context7) {
154
+ while (1) switch (_context7.n) {
134
155
  case 0:
135
- return _context6.a(2, request('/api/GatewayMicro/DeviceIndicator/GetTdIndicatorAggregateData', _objectSpread({
156
+ return _context7.a(2, request('/api/GatewayMicro/DeviceIndicator/GetTdIndicatorAggregateData', _objectSpread({
136
157
  method: 'POST',
137
158
  headers: {
138
159
  'Content-Type': 'application/json-patch+json'
@@ -140,19 +161,19 @@ function _GetTdIndicatorAggregateData() {
140
161
  data: body
141
162
  }, options || {})));
142
163
  }
143
- }, _callee6);
164
+ }, _callee7);
144
165
  }));
145
166
  return _GetTdIndicatorAggregateData.apply(this, arguments);
146
167
  }
147
- export function DownHistoryDataToExcelOrPdf(_x11, _x12) {
168
+ export function DownHistoryDataToExcelOrPdf(_x13, _x14) {
148
169
  return _DownHistoryDataToExcelOrPdf.apply(this, arguments);
149
170
  }
150
171
  function _DownHistoryDataToExcelOrPdf() {
151
- _DownHistoryDataToExcelOrPdf = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee7(body, options) {
152
- return _regenerator().w(function (_context7) {
153
- while (1) switch (_context7.n) {
172
+ _DownHistoryDataToExcelOrPdf = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee8(body, options) {
173
+ return _regenerator().w(function (_context8) {
174
+ while (1) switch (_context8.n) {
154
175
  case 0:
155
- return _context7.a(2, request('/api/GatewayMicro/Point/DownHistoryDataToExcelOrPdf', _objectSpread({
176
+ return _context8.a(2, request('/api/GatewayMicro/Point/DownHistoryDataToExcelOrPdf', _objectSpread({
156
177
  method: 'POST',
157
178
  headers: {
158
179
  'Content-Type': 'application/json-patch+json'
@@ -160,7 +181,7 @@ function _DownHistoryDataToExcelOrPdf() {
160
181
  data: body
161
182
  }, options || {})));
162
183
  }
163
- }, _callee7);
184
+ }, _callee8);
164
185
  }));
165
186
  return _DownHistoryDataToExcelOrPdf.apply(this, arguments);
166
187
  }
@@ -16,6 +16,8 @@ declare namespace GatewayAPI {
16
16
  imgUrl?: string;
17
17
  /** json配置 */
18
18
  config?: string;
19
+ configChangeLog?: string;
20
+ operationUserId?: number;
19
21
  /** 创建时间 */
20
22
  createTime?: string;
21
23
  /** 更新时间 */
@@ -797,6 +799,7 @@ declare namespace GatewayAPI {
797
799
  deviceConfigurationType?: EProductConfigurationType;
798
800
  /** json配置 */
799
801
  config?: string;
802
+ configChangeLog?: string;
800
803
  /** 操作者ID */
801
804
  operationUserId?: number;
802
805
  };