...
|
...
|
@@ -56,8 +56,8 @@ export class LightboxModeWebsocketService extends TelemetryWebsockerService { |
56
|
56
|
* @returns
|
57
|
57
|
*/
|
58
|
58
|
getNodeDataSubscribers(nodeData: NodeDataType) {
|
59
|
|
- const { dataSourceJson, actJson, id } = nodeData
|
60
|
|
- const cell = this.nodeUtils.getCellById(id)
|
|
59
|
+ const { dataSourceJson, actJson, configurationNodeId } = nodeData
|
|
60
|
+ const cell = this.nodeUtils.getCellById(configurationNodeId)
|
61
|
61
|
if (!cell) return []
|
62
|
62
|
const componentKey = this.nodeUtils.getNodeComponentKey(cell)
|
63
|
63
|
const categoryKey = this.nodeUtils.getNodeCategory(cell)
|
...
|
...
|
@@ -77,7 +77,7 @@ export class LightboxModeWebsocketService extends TelemetryWebsockerService { |
77
|
77
|
const { deviceId, attr } = actJson[key as ActTypeEnum]
|
78
|
78
|
// 无entityId及属性时不订阅
|
79
|
79
|
if (deviceId && attr) {
|
80
|
|
- const subscribe = TelemetrySubscriber.createTimeseriesSubscription(this, { id: deviceId, entityType: EntityType.DEVICE }, attr, this.getCommandSource(id, DataSourceTypeEnum.ACT, actJson[key as ActTypeEnum], key as ActTypeEnum))
|
|
80
|
+ const subscribe = TelemetrySubscriber.createTimeseriesSubscription(this, { id: deviceId, entityType: EntityType.DEVICE }, attr, this.getCommandSource(configurationNodeId, DataSourceTypeEnum.ACT, actJson[key as ActTypeEnum], key as ActTypeEnum))
|
81
|
81
|
subscribers.push(subscribe)
|
82
|
82
|
}
|
83
|
83
|
}
|
...
|
...
|
@@ -86,7 +86,7 @@ export class LightboxModeWebsocketService extends TelemetryWebsockerService { |
86
|
86
|
const { deviceId, attr } = dataSourceJson || {}
|
87
|
87
|
|
88
|
88
|
if (deviceId && attr) {
|
89
|
|
- const subscribe = TelemetrySubscriber.createTimeseriesSubscription(this, { id: deviceId, entityType: EntityType.DEVICE }, attr, this.getCommandSource(id, DataSourceTypeEnum.DATASOURCE, dataSourceJson))
|
|
89
|
+ const subscribe = TelemetrySubscriber.createTimeseriesSubscription(this, { id: deviceId, entityType: EntityType.DEVICE }, attr, this.getCommandSource(configurationNodeId, DataSourceTypeEnum.DATASOURCE, dataSourceJson))
|
90
|
90
|
subscribers.push(subscribe)
|
91
|
91
|
}
|
92
|
92
|
|
...
|
...
|
|