Showing
1 changed file
with
8 additions
and
6 deletions
@@ -91,15 +91,17 @@ | @@ -91,15 +91,17 @@ | ||
91 | try { | 91 | try { |
92 | loading.value = true; | 92 | loading.value = true; |
93 | if (!props.deviceId) return; | 93 | if (!props.deviceId) return; |
94 | - if (!unref(isShowActionType)) { | ||
95 | - createMessage.warning('当前物模型扩展描述没有填写'); | ||
96 | - return; | ||
97 | - } | ||
98 | - const flag = await validate(); | ||
99 | - if (!flag) return; | 94 | + |
100 | const sendValue = ref({}); | 95 | const sendValue = ref({}); |
101 | //判断tcp类型 标识符是自定义还是ModBus | 96 | //判断tcp类型 标识符是自定义还是ModBus |
102 | if (unref(isShowModBUS)) { | 97 | if (unref(isShowModBUS)) { |
98 | + if (!unref(isShowActionType)) { | ||
99 | + createMessage.warning('当前物模型扩展描述没有填写'); | ||
100 | + return; | ||
101 | + } | ||
102 | + const flag = await validate(); | ||
103 | + if (!flag) return; | ||
104 | + | ||
103 | const oldValue = getFieldsValue()[unref(formField)]; | 105 | const oldValue = getFieldsValue()[unref(formField)]; |
104 | modBUSForm.value.registerValues = [oldValue]; | 106 | modBUSForm.value.registerValues = [oldValue]; |
105 | modBUSForm.value.registerNumber = 1; | 107 | modBUSForm.value.registerNumber = 1; |