Commit d82b2ed1 authored by 邓晓峰's avatar 邓晓峰

fix: message format

parent eb4e9796
This diff was suppressed by a .gitattributes entry.
...@@ -31,9 +31,8 @@ const Alarm = ({ message, confirmRead, config }) => { ...@@ -31,9 +31,8 @@ const Alarm = ({ message, confirmRead, config }) => {
confirmRead(false, [message.id]); confirmRead(false, [message.id]);
const widgetID = 'widget_city_综合运营_管网监控_实时监控_报警监控'; const widgetID = 'widget_city_综合运营_管网监控_实时监控_报警监控';
const webPath = 'product/scada/AlertMonitoring/AlertMonitoring'; const webPath = 'product/scada/AlertMonitoring/AlertMonitoring';
debugger
const widget = findPathByWidget("productex/water/IOTMonitor/RealTimeAlarm/RealTimeAlarm", config.widgets, "", "url"); const widget = findPathByWidget("productex/water/IOTMonitor/RealTimeAlarm/RealTimeAlarm", config.widgets, "", "url");
console.log(widget)
window.share.event.emit('listenerMointer', { window.share.event.emit('listenerMointer', {
widgetId: widgetID, widgetId: widgetID,
label: '报警监控', label: '报警监控',
...@@ -71,12 +70,12 @@ const Alarm = ({ message, confirmRead, config }) => { ...@@ -71,12 +70,12 @@ const Alarm = ({ message, confirmRead, config }) => {
<p>{alarmContent.alarmContent}</p> <p>{alarmContent.alarmContent}</p>
<p> <p>
<font style={{ color: '#ff0000' }} title="点击查看详情"> <font style={{ color: '#ff0000' }} title="点击查看详情">
{(alarmValue.length > 0 && {(alarmValue && Array.isArray(alarmValue) && alarmValue.length > 0 &&
alarmValue[0] !== 'undefined' && alarmValue[0] !== 'undefined' &&
alarmValue[0]) || alarmValue[0]) ||
''} ''}
</font> </font>
{`${(alarmValue.length > 0 && {`${(alarmValue && Array.isArray(alarmValue) && alarmValue.length > 0 &&
alarmValue[1] !== 'undefined' && alarmValue[1] !== 'undefined' &&
alarmValue[1]) || alarmValue[1]) ||
''} / ${alarmContent.alarmThreshold.split(' ').join('')}`} ''} / ${alarmContent.alarmThreshold.split(' ').join('')}`}
......
...@@ -301,7 +301,7 @@ class Notifier { ...@@ -301,7 +301,7 @@ class Notifier {
: '刚刚'; : '刚刚';
const messString = { const messString = {
id: parseMessage.ID, id: parseMessage.ID,
infoContent: messContent, infoContent: this._siteConfig.MessageLevel === DEFAULT_PARSE_LEVEL ? messContent: JSON.parse(messContent || "{}"),
infoLevel: parseMessage.level, infoLevel: parseMessage.level,
time: `${timeMss}`, time: `${timeMss}`,
infoType, infoType,
...@@ -550,7 +550,7 @@ class Notifier { ...@@ -550,7 +550,7 @@ class Notifier {
: '刚刚'; : '刚刚';
const message = { const message = {
id: hisMessage.HisID, id: hisMessage.HisID,
infoContent: hisMessage.InfoContent, infoContent: this._siteConfig.MessageLevel === DEFAULT_PARSE_LEVEL ? hisMessage.InfoContent: JSON.parse(hisMessage.InfoContent || "{}"),
time: `${timeMss}`, time: `${timeMss}`,
infoType: this.getMessageType(hisMessage.InfoType), infoType: this.getMessageType(hisMessage.InfoType),
dateTime: hisMessage.HisCreateTime, dateTime: hisMessage.HisCreateTime,
......
...@@ -65,6 +65,7 @@ select:-webkit-autofill { ...@@ -65,6 +65,7 @@ select:-webkit-autofill {
#app { #app {
& /deep/ .@{ant-prefix}-pro-basicLayout-content { & /deep/ .@{ant-prefix}-pro-basicLayout-content {
margin: 0 !important; margin: 0 !important;
height: 100%;
} }
.subapp-container div[data-qiankun='purehtml'] * { .subapp-container div[data-qiankun='purehtml'] * {
margin: inherit; margin: inherit;
......
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