Commit ae44df41d437a6fa0a34c5374fb0996a77998116
1 parent
69e68e92
fix: DEFECT-1681 告警弹窗,设备有别名则显示别名,没有则显示设备名称
Showing
2 changed files
with
3 additions
and
2 deletions
... | ... | @@ -67,7 +67,7 @@ export function useAlarmNotify(params: UseAlarmNotifyParams = {}) { |
67 | 67 | |
68 | 68 | if (items.length) { |
69 | 69 | const first = items.at(0)!; |
70 | - const { deviceName, id, severity, type } = first; | |
70 | + const { deviceAlias, deviceName, id, severity, type } = first; | |
71 | 71 | |
72 | 72 | let key: Nullable<string> = `open-notify-${id}`; |
73 | 73 | |
... | ... | @@ -80,7 +80,7 @@ export function useAlarmNotify(params: UseAlarmNotifyParams = {}) { |
80 | 80 | description: h('div', {}, [ |
81 | 81 | h('div', { style: { marginRight: '5px' } }, [ |
82 | 82 | h('span', { style: { marginRight: '5px' } }, '设备:'), |
83 | - h('span', {}, `[${deviceName}]`), | |
83 | + h('span', {}, `[${deviceAlias ?? deviceName}]`), | |
84 | 84 | ]), |
85 | 85 | h('div', { style: { marginRight: '5px' } }, [ |
86 | 86 | h('span', { style: { marginRight: '5px' } }, '告警场景:'), | ... | ... |