coolcare-lite-scada-component 1.0.42 → 1.0.43
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.
|
@@ -22,6 +22,7 @@ var EleSwitchComponent = function EleSwitchComponent(_ref) {
|
|
|
22
22
|
value = _useState2[0],
|
|
23
23
|
setValue = _useState2[1];
|
|
24
24
|
var payload = node === null || node === void 0 ? void 0 : node.getData();
|
|
25
|
+
var premission = payload === null || payload === void 0 ? void 0 : payload.premission;
|
|
25
26
|
var configPoint = payload === null || payload === void 0 ? void 0 : (_payload$pointList = payload.pointList) === null || _payload$pointList === void 0 ? void 0 : _payload$pointList[0];
|
|
26
27
|
var pointData = usePointWatch(configPoint, payload === null || payload === void 0 ? void 0 : (_payload$mittMeta = payload.mittMeta) === null || _payload$mittMeta === void 0 ? void 0 : _payload$mittMeta.namespace);
|
|
27
28
|
var tooltipTitle = null;
|
|
@@ -50,7 +51,7 @@ var EleSwitchComponent = function EleSwitchComponent(_ref) {
|
|
|
50
51
|
pointId: 'pointId' in configPoint ? configPoint.pointId : undefined,
|
|
51
52
|
deviceId: 'deviceId' in configPoint ? configPoint.deviceId : undefined,
|
|
52
53
|
value: val ? checkedValue : unCheckedValue
|
|
53
|
-
});
|
|
54
|
+
}, premission);
|
|
54
55
|
setValue(val);
|
|
55
56
|
}
|
|
56
57
|
});
|
package/es/element/type.d.ts
CHANGED
|
@@ -99,12 +99,11 @@ function _getDevicePoint() {
|
|
|
99
99
|
}));
|
|
100
100
|
return _getDevicePoint.apply(this, arguments);
|
|
101
101
|
}
|
|
102
|
-
export function pointWrite(_x4) {
|
|
102
|
+
export function pointWrite(_x4, _x5) {
|
|
103
103
|
return _pointWrite.apply(this, arguments);
|
|
104
104
|
}
|
|
105
105
|
function _pointWrite() {
|
|
106
|
-
_pointWrite = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(params) {
|
|
107
|
-
var _query$premission;
|
|
106
|
+
_pointWrite = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(params, premission) {
|
|
108
107
|
var query, deviceId, value, pointId, deviceInfo, pointInfo, writeFunction, res;
|
|
109
108
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
110
109
|
while (1) switch (_context3.prev = _context3.next) {
|
|
@@ -116,8 +115,8 @@ function _pointWrite() {
|
|
|
116
115
|
}
|
|
117
116
|
return _context3.abrupt("return");
|
|
118
117
|
case 3:
|
|
119
|
-
console.log(
|
|
120
|
-
if (!(
|
|
118
|
+
console.log(premission);
|
|
119
|
+
if (!(premission === null || premission === void 0 ? void 0 : premission.includes('49'))) {
|
|
121
120
|
_context3.next = 7;
|
|
122
121
|
break;
|
|
123
122
|
}
|
|
@@ -555,7 +555,9 @@ var Player = function Player(_ref) {
|
|
|
555
555
|
var _jsonConfig$cells2;
|
|
556
556
|
jsonConfig === null || jsonConfig === void 0 ? void 0 : (_jsonConfig$cells2 = jsonConfig.cells) === null || _jsonConfig$cells2 === void 0 ? void 0 : _jsonConfig$cells2.forEach(function (v) {
|
|
557
557
|
if (v.data) {
|
|
558
|
+
var _query$premission;
|
|
558
559
|
v.data.mittMeta = mittMeta;
|
|
560
|
+
v.data.premission = ((_query$premission = query.premission) === null || _query$premission === void 0 ? void 0 : _query$premission.split(',')) || [];
|
|
559
561
|
}
|
|
560
562
|
});
|
|
561
563
|
graph.fromJSON(jsonConfig);
|
package/es/typings.d.ts
CHANGED