Showing
1 changed file
with
17 additions
and
3 deletions
@@ -140,6 +140,7 @@ | @@ -140,6 +140,7 @@ | ||
140 | EnumTableChartMode, | 140 | EnumTableChartMode, |
141 | ModeSwitchButton, | 141 | ModeSwitchButton, |
142 | } from '/@/components/Widget'; | 142 | } from '/@/components/Widget'; |
143 | + import { TransportTypeEnum } from '/@/enums/deviceEnum'; | ||
143 | 144 | ||
144 | interface DeviceInfo { | 145 | interface DeviceInfo { |
145 | alarmStatus: 0 | 1; | 146 | alarmStatus: 0 | 1; |
@@ -152,6 +153,7 @@ | @@ -152,6 +153,7 @@ | ||
152 | deviceType?: string; | 153 | deviceType?: string; |
153 | alias?: string; | 154 | alias?: string; |
154 | deviceProfileId: string; | 155 | deviceProfileId: string; |
156 | + transportType?: string; | ||
155 | } | 157 | } |
156 | type MarkerList = DeviceInfo & { marker: any; label: any }; | 158 | type MarkerList = DeviceInfo & { marker: any; label: any }; |
157 | 159 | ||
@@ -377,7 +379,15 @@ | @@ -377,7 +379,15 @@ | ||
377 | width: 330, // 信息窗口宽度 | 379 | width: 330, // 信息窗口宽度 |
378 | height: 0, // 信息窗口高度 | 380 | height: 0, // 信息窗口高度 |
379 | }; | 381 | }; |
380 | - const { name, alias, organizationDTO, deviceState, deviceProfile, deviceType } = record; | 382 | + const { |
383 | + name, | ||
384 | + alias, | ||
385 | + organizationDTO, | ||
386 | + deviceState, | ||
387 | + deviceProfile, | ||
388 | + deviceType, | ||
389 | + transportType, | ||
390 | + } = record; | ||
381 | const { address, longitude, latitude } = record.deviceInfo; | 391 | const { address, longitude, latitude } = record.deviceInfo; |
382 | 392 | ||
383 | // 创建信息窗口对象 | 393 | // 创建信息窗口对象 |
@@ -411,7 +421,9 @@ | @@ -411,7 +421,9 @@ | ||
411 | <div style="display:flex;justify-content:end; margin-top:10px"> | 421 | <div style="display:flex;justify-content:end; margin-top:10px"> |
412 | <button onclick="openDeviceInfoDrawer()" style="margin-right:10px;color:#fff;background-color:#409eff;padding:4px; border-radius:4px;">设备信息</button> | 422 | <button onclick="openDeviceInfoDrawer()" style="margin-right:10px;color:#fff;background-color:#409eff;padding:4px; border-radius:4px;">设备信息</button> |
413 | <button onclick="openHistoryModal()" style="display:${ | 423 | <button onclick="openHistoryModal()" style="display:${ |
414 | - deviceType !== 'GATEWAY' ? 'block' : 'none' | 424 | + deviceType !== 'GATEWAY' && transportType !== TransportTypeEnum.GBT28181 |
425 | + ? 'block' | ||
426 | + : 'none' | ||
415 | };color:#fff;background-color:#409eff;padding:4px; border-radius:4px;">${ | 427 | };color:#fff;background-color:#409eff;padding:4px; border-radius:4px;">${ |
416 | deviceType !== 'GATEWAY' ? '历史数据' : '' | 428 | deviceType !== 'GATEWAY' ? '历史数据' : '' |
417 | }</button> | 429 | }</button> |
@@ -443,10 +455,12 @@ | @@ -443,10 +455,12 @@ | ||
443 | 455 | ||
444 | // 设备信息 | 456 | // 设备信息 |
445 | const openDeviceInfoDrawer = async () => { | 457 | const openDeviceInfoDrawer = async () => { |
446 | - const { id, tbDeviceId } = globalRecord; | 458 | + const { id, tbDeviceId, transportType, deviceType } = globalRecord; |
447 | openDrawer(true, { | 459 | openDrawer(true, { |
448 | id, | 460 | id, |
449 | tbDeviceId, | 461 | tbDeviceId, |
462 | + transportType, | ||
463 | + deviceType, | ||
450 | }); | 464 | }); |
451 | }; | 465 | }; |
452 | 466 |