谁控制谁展示设备是否执行成功

master
lld 2026-01-29 20:38:43 +08:00
parent f2f890da09
commit 44a3e4f20d
1 changed files with 6 additions and 3 deletions

View File

@ -522,7 +522,7 @@ export default {
success: (res) => {
if (res.confirm) {
//
this.message = JSON.stringify({[type]: status})
this.message = JSON.stringify({[`${type}1}`]: status})
//
this.publishMessage();
//
@ -599,8 +599,11 @@ export default {
this.deviceType = '';
// ========== ==========
this.$modal.msgSuccess("设备操作成功!");
if (ackData.clientId && (ackData.clientId===mqttUtil.getMqttState().clientId)) {
this.$modal[isSuccess ? 'msgSuccess' : 'msgError'](
`设备操作${isSuccess ? "成功" : "失败"}`
);
}
console.log(`指令[${commandField}=${commandValue}]执行${isSuccess ? "成功" : "失败"}`);
},