通用化svg支持显示每一条告警信息 #24
Labels
No Label
area/smartpanel
bug
done-waiting-confirmed
kind/feature
page/admin
page/simplepage
page/tab-admin
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: smartoilets-front/projects#24
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
https://smartoilets.net/simplepage/PWH/F2/female?profile=cleaner
效果是和之前 tab 页面一样,可以显示每一条alert信息
看了下 tab 这边是调用了/alert/info/noticeType 这个接口,根据里面的 noticeTypeName 以及
deviceAlertTextIds ,来决定要显示哪些内容,但是目前这个接口在 simple page 调不通,因为这个接口需要 token 校验,
加好了, 命名在这里
需要支持告警分类, event data里面新增一个 alertEventType, 命名规范需要修改为 STS__ALERT_NOTIFICATIONS:{字段名}:{字段值}, 例如
STS__ALERT_NOTIFICATIONS:alertEventType:cleaner, 则页面显示 alertEventType 为 cleaner 的所有告警, 快速取的一个字段名,后续可能会修改字段名,因此这里命名规范需要带上字段名, 方便后续可以直接在SVG上修改,而不需要更新前端.
还新增了 eventTime 字段,包含了事件时间的信息(由传感器上传的时间而不是服务器的时间) eventTime.time, 只有少部分数据有这个内容
这个内容拼接在告警文案后面,例如 事件时间: ${eventTime.time}
这里对接的是原来的 noticeType接口,因此上述评论忽略,不再有效
目前告警信息缺少位置信息等内容
这个是后端在 i18n 里面指定的,目前显示的 【10】, 里面没有看到有指定要替换的文案内容。可参考 【15】 的返回内容
多语言文案请求参数需要添加 retainAlertTextReplaceCopy=true 参数, 由于接口需要兼容以前钟顺写的页面,因此如果不加这个参数返回的内容是不包含位置信息的.