xieb
2023-09-13 3667807a7b7418efc090ee3fa6a6b734bc3080bf
src/pages/page-web/projects/tsa.vue
@@ -9,6 +9,7 @@
      </a-row>
    </div>
    <div class="scrollbar" :style="{ height: scorllHeight + 'px' }">
      <!--机场-->
      <a-collapse :bordered="false" expandIconPosition="right" accordion style="background: #232323;">
        <a-collapse-panel :key="EDeviceTypeName.Dock" header="机场" style="border-bottom: 1px solid #4f4f4f;">
          <div v-if="onlineDocks.data.length === 0" style="height: 150px; color: white;">
@@ -163,6 +164,8 @@
          </div>
        </a-collapse-panel>
      </a-collapse>
      <!--设备-->
      <a-collapse :bordered="false" expandIconPosition="right" accordion style="background: #232323;">
        <a-collapse-panel :key="EDeviceTypeName.Aircraft" header="在线设备" style="border-bottom: 1px solid #4f4f4f;">
          <div v-if="onlineDevices.data.length === 0" style="height: 150px; color: white;">
@@ -306,21 +309,21 @@
onMounted(() => {
  // flyTo(global.$viewer, route.params.longitude as unknown as number, route.params.latitude as unknown as number)
  getOnlineTopo()
  setTimeout(() => {
    watch(() => store.state.deviceStatusEvent,
      data => {
        getOnlineTopo()
        if (data.deviceOnline.sn) {
          getUnreadHms(data.deviceOnline.sn)
        }
      },
      {
        deep: true
      }
    )
    getOnlineDeviceHms()
  }, 3000)
  // getOnlineTopo()
  // setTimeout(() => {
  //   watch(() => store.state.deviceStatusEvent,
  //     data => {
  //       getOnlineTopo()
  //       if (data.deviceOnline.sn) {
  //         getUnreadHms(data.deviceOnline.sn)
  //       }
  //     },
  //     {
  //       deep: true
  //     }
  //   )
  //   getOnlineDeviceHms()
  // }, 3000)
  const element = document.getElementsByClassName('scrollbar').item(0) as HTMLDivElement
  const parent = element?.parentNode as HTMLDivElement
  scorllHeight.value = parent?.clientHeight - parent?.firstElementChild?.clientHeight