Commit 968768fe authored by 杨思琦's avatar 杨思琦

fix: iotIP修改

parent 51340d16
......@@ -261,7 +261,7 @@ class Notifier {
}
mqttConfig.mqtt_iotIP = self._siteConfig.mqtt_iotIP =
mqttConfig.mqtt_mess.TcpIP + ':' + mqttConfig.mqtt_mess.TcpPort;
mqttConfig.mqtt_mess.TcpIP + (mqttConfig.mqtt_mess.TcpPort ? ':' + mqttConfig.mqtt_mess.TcpPort : '');
// self.props.updateConfig && self.props.updateConfig(Object.assign({}, self.props.global, {
// ...mqttConfig
......@@ -425,6 +425,8 @@ class Notifier {
*/
speakMessage = message => {
if (!message) return;
const { version } = message;
if(version === '3.0') return this.speakDefault(message);
switch(message.infoType) {
case 'SCADA报警':
case '通用报警':
......@@ -485,6 +487,10 @@ class Notifier {
this.speak(msg);
};
speakDefault = message => {
let msg = `${message.title},${message.title}: ${message.infoContent ?? ''}`
this.speak(msg);
};
speak = msg => {
if (!this.speakState) return;
this.speakState.text = msg;
......@@ -511,6 +517,10 @@ class Notifier {
this.renderPopPlatform(message); // 显示报警弹窗
return;
}
if (message.version === '3.0' && message.infoLevel === PLATFORM_LEVEL) {
this.renderPopPlatform(message); // 显示报警弹窗
return;
}
};
renderPopPlatform(message) {
......
......@@ -342,7 +342,9 @@ class Login {
mqttConfig.mqtt_mess.TcpPort = DEFAULT_TCP_PORT;
mqttConfig.mqtt_IsSSL = `${mqttConfig.mqtt_mess.TcpIP}:${mqttConfig.mqtt_mess.TcpPort}`;
}
mqttConfig.mqtt_iotIP = `${mqttConfig.mqtt_mess.TcpIP}:${mqttConfig.mqtt_mess.TcpPort}`;
mqttConfig.mqtt_iotIP = `${mqttConfig.mqtt_mess.TcpIP}${
mqttConfig.mqtt_mess.TcpPort ? `:${mqttConfig.mqtt_mess.TcpPort}` : ''
}`;
self.globalConfig = Object.assign(self.globalConfig, {
...mqttConfig,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment