Commit ae44df41d437a6fa0a34c5374fb0996a77998116

Authored by fengwotao
1 parent 69e68e92

fix: DEFECT-1681 告警弹窗,设备有别名则显示别名,没有则显示设备名称

... ... @@ -187,6 +187,7 @@ export interface AlarmLogItem {
187 187 originatorType: number;
188 188 deviceId: string;
189 189 deviceName: string;
  190 + deviceAlias: string;
190 191 type: string;
191 192 severity: string;
192 193 status: string;
... ...
... ... @@ -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' } }, '告警场景:'),
... ...