Showing
1 changed file
with
3 additions
and
3 deletions
... | ... | @@ -7752,8 +7752,8 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
7752 | 7752 | } else if (commandType === COMMAND_TYPE_ENUM.MODBUS) { |
7753 | 7753 | const dataSource = currentNodeData?.dataSources?.[0] || getDataSourceBindValue() |
7754 | 7754 | if (dataSource) { |
7755 | - const additional = dataSource?.additional || {} | |
7756 | - if (dataSource?.deviceType !== 'SENDOR' && !additional?.deviceCode) { | |
7755 | + const additional = dataSource?.additional || getDataSourceBindValue() | |
7756 | + if (dataSource?.deviceType !== 'SENDOR' && !(additional?.deviceCode)) { | |
7757 | 7757 | UseLayUi.topErrorMsg('设备地址码不存在') |
7758 | 7758 | return false |
7759 | 7759 | } |
... | ... | @@ -8967,7 +8967,7 @@ DataFormatPanel.prototype.addDataFont = function (container) { |
8967 | 8967 | [enumDataSourceConst.ATTR_NAME]: value, |
8968 | 8968 | }) |
8969 | 8969 | |
8970 | - const selected = thingsModel.find(item => item.identifier === value) | |
8970 | + const selected = thingsModel?.find(item => item.identifier === value) | |
8971 | 8971 | |
8972 | 8972 | if (!selected) return |
8973 | 8973 | // const type = selected?.extensionDesc?.dataType | ... | ... |