Showing
1 changed file
with
8 additions
and
4 deletions
@@ -41,7 +41,8 @@ | @@ -41,7 +41,8 @@ | ||
41 | const { type } = dataType || {}; | 41 | const { type } = dataType || {}; |
42 | const { codeType, deviceProfile } = deviceDetail || {}; | 42 | const { codeType, deviceProfile } = deviceDetail || {}; |
43 | const { transportType } = deviceProfile || {}; | 43 | const { transportType } = deviceProfile || {}; |
44 | - const { registerAddress, actionType, zoomFactor } = extensionDesc || {}; | 44 | + const { registerAddress, actionType, zoomFactor } = extensionDesc || {}; //获取扩展描述内容 |
45 | + | ||
45 | formField.value = identifier; | 46 | formField.value = identifier; |
46 | zoomFactorValue.value = zoomFactor ? Number(zoomFactor) : 1; | 47 | zoomFactorValue.value = zoomFactor ? Number(zoomFactor) : 1; |
47 | isShowMultiply.value = type == 'INT' || type == 'DOUBLE' ? true : false; | 48 | isShowMultiply.value = type == 'INT' || type == 'DOUBLE' ? true : false; |
@@ -106,11 +107,14 @@ | @@ -106,11 +107,14 @@ | ||
106 | } | 107 | } |
107 | const flag = await validate(); | 108 | const flag = await validate(); |
108 | if (!flag) return; | 109 | if (!flag) return; |
110 | + | ||
109 | const oldValue = getFieldsValue()[unref(formField)]; | 111 | const oldValue = getFieldsValue()[unref(formField)]; |
110 | - modBUSForm.value.registerValues = unref(isShowMultiply) | ||
111 | - ? [oldValue * unref(zoomFactorValue)] | ||
112 | - : [oldValue]; | ||
113 | modBUSForm.value.registerNumber = 1; | 112 | modBUSForm.value.registerNumber = 1; |
113 | + modBUSForm.value.registerValues = [oldValue]; | ||
114 | + if (unref(isShowMultiply) && unref(modBUSForm).method == '06') { | ||
115 | + //bool类型的就不用去乘缩放因子了 | ||
116 | + modBUSForm.value.registerValues = [oldValue * unref(zoomFactorValue)]; | ||
117 | + } | ||
114 | 118 | ||
115 | if (unref(modBUSForm).method == '16' || unref(modBUSForm).method == '10') { | 119 | if (unref(modBUSForm).method == '16' || unref(modBUSForm).method == '10') { |
116 | const newValue = getArray( | 120 | const newValue = getArray( |