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