Commit 05950903e71419fec8f4f774097cb7897c376766
Merge branch 'fix/attribute-distribution' into 'main_dev'
fix: 修改属性下发时deviceCode的取值 See merge request yunteng/thingskit-front!796
Showing
2 changed files
with
3 additions
and
3 deletions
@@ -167,6 +167,7 @@ export interface DeviceRecord { | @@ -167,6 +167,7 @@ export interface DeviceRecord { | ||
167 | creator: string; | 167 | creator: string; |
168 | createTime: string; | 168 | createTime: string; |
169 | codeType?: string; | 169 | codeType?: string; |
170 | + code?: string; | ||
170 | name: string; | 171 | name: string; |
171 | tenantId: string; | 172 | tenantId: string; |
172 | transportType: string; | 173 | transportType: string; |
@@ -39,10 +39,9 @@ | @@ -39,10 +39,9 @@ | ||
39 | const { name, detail, identifier, deviceDetail, extensionDesc } = record; | 39 | const { name, detail, identifier, deviceDetail, extensionDesc } = record; |
40 | const { dataType } = detail; | 40 | const { dataType } = detail; |
41 | const { type } = dataType || {}; | 41 | const { type } = dataType || {}; |
42 | - const { codeType, deviceProfile } = deviceDetail || {}; | 42 | + const { codeType, deviceProfile, code } = deviceDetail || {}; |
43 | const { transportType } = deviceProfile || {}; | 43 | const { transportType } = deviceProfile || {}; |
44 | const { registerAddress, actionType, zoomFactor } = extensionDesc || {}; //获取扩展描述内容 | 44 | const { registerAddress, actionType, zoomFactor } = extensionDesc || {}; //获取扩展描述内容 |
45 | - | ||
46 | formField.value = identifier; | 45 | formField.value = identifier; |
47 | zoomFactorValue.value = zoomFactor ? Number(zoomFactor) : 1; | 46 | zoomFactorValue.value = zoomFactor ? Number(zoomFactor) : 1; |
48 | isShowMultiply.value = type == 'INT' || type == 'DOUBLE' ? true : false; | 47 | isShowMultiply.value = type == 'INT' || type == 'DOUBLE' ? true : false; |
@@ -64,7 +63,7 @@ | @@ -64,7 +63,7 @@ | ||
64 | isShowModBUS.value = true; | 63 | isShowModBUS.value = true; |
65 | modBUSForm.value = { | 64 | modBUSForm.value = { |
66 | crc: 'CRC_16_LOWER', | 65 | crc: 'CRC_16_LOWER', |
67 | - deviceCode: '01', | 66 | + deviceCode: code, |
68 | method: actionType == '16' ? '10' : actionType, | 67 | method: actionType == '16' ? '10' : actionType, |
69 | registerAddress, | 68 | registerAddress, |
70 | registerNumber: 1, | 69 | registerNumber: 1, |