Commit 24bcf151abd67bb5b62630f4ab43e8edeb5d9b57
Committed by
xp.Huang
1 parent
3ec5a6da
fix: 修复实时数据获取节点信息变更id为configurationNodeId
Showing
3 changed files
with
7 additions
and
7 deletions
... | ... | @@ -25,7 +25,7 @@ const loading = ref(false) |
25 | 25 | // 存储视频数据 |
26 | 26 | const videoConfig = computed(() => { |
27 | 27 | return contentDataStore?.contentData.filter((item) => { |
28 | - return props.config.cellInfo?.id === item.id | |
28 | + return props.config.cellInfo?.id === item.configurationNodeId | |
29 | 29 | }) |
30 | 30 | }) |
31 | 31 | ... | ... |
... | ... | @@ -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 | ... | ... |
... | ... | @@ -34,7 +34,7 @@ export const useContentDataStore = defineStore('app-content-data', { |
34 | 34 | actions: { |
35 | 35 | |
36 | 36 | getNodeDataById(id: string): Undefineable<NodeDataType> { |
37 | - const data = this.contentData.find(item => item.id === id) | |
37 | + const data = this.contentData.find(item => item.configurationNodeId === id) | |
38 | 38 | return data |
39 | 39 | }, |
40 | 40 | |
... | ... | @@ -68,7 +68,7 @@ export const useContentDataStore = defineStore('app-content-data', { |
68 | 68 | const { cellInfo } = config |
69 | 69 | const { id } = cellInfo || {} |
70 | 70 | if (!id) return null |
71 | - return this.contentData.find(item => item.id === id) || null | |
71 | + return this.contentData.find(item => item.configurationNodeId === id) || null | |
72 | 72 | }, |
73 | 73 | |
74 | 74 | setPermissions(string: string[]) { | ... | ... |