From 7b7cb87f855261f8420396120ed3c7943d406f33 Mon Sep 17 00:00:00 2001 From: acgist <289547414@qq.com> Date: Wed, 25 Oct 2023 07:39:10 +0800 Subject: [PATCH] =?UTF-8?q?[*]=20=E6=97=A5=E5=B8=B8=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- taoyao-client-web/src/components/Taoyao.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/taoyao-client-web/src/components/Taoyao.js b/taoyao-client-web/src/components/Taoyao.js index 05cf3c7..6153a6d 100644 --- a/taoyao-client-web/src/components/Taoyao.js +++ b/taoyao-client-web/src/components/Taoyao.js @@ -1124,11 +1124,10 @@ class Taoyao extends RemoteClient { /** * 终端告警信令 * - * @param {*} message + * @param {*} message 告警描述 */ clientAlarm(message) { - const me = this; - const date = new Date(); + const date = new Date(); const datetime = "" + date.getFullYear() + ((date.getMonth() < 9 ? "0" : "") + (date.getMonth() + 1)) + @@ -1136,7 +1135,7 @@ class Taoyao extends RemoteClient { ((date.getHours() < 10 ? "0" : "") + date.getHours()) + ((date.getMinutes() < 10 ? "0" : "") + date.getMinutes()) + ((date.getSeconds() < 10 ? "0" : "") + date.getSeconds()); - me.push(protocol.buildMessage("client::alarm", { + this.push(protocol.buildMessage("client::alarm", { message, datetime, })); @@ -1149,8 +1148,7 @@ class Taoyao extends RemoteClient { * @param {*} clientType 终端类型(可选) */ clientBroadcast(message, clientType) { - const me = this; - me.push(protocol.buildMessage("client::broadcast", { + this.push(protocol.buildMessage("client::broadcast", { ...message, clientType, }));