haoxuan
2023-11-07 11fd2edc8643a9b5923d05ff21d18b7d845d4f76
src/views/dashboard/components/DashboardTitle.vue
@@ -2,14 +2,9 @@
  <div class="dashboard-title">
    <div class="title-text">
      智能工作台 —
      <el-popover
        placement="bottom"
        :width="200"
        trigger="click"
        :content="deviceStore?.deviceInfo?.currentDeviceID ?? ''"
      >
      <el-popover placement="bottom" :width="200" trigger="click" :content="currentDeviceName">
        <template #reference>
          <el-text truncated class="device-name">{{ deviceStore?.deviceInfo?.currentDeviceID ?? '' }}</el-text>
          <el-text truncated class="device-name">{{ currentDeviceName }}</el-text>
        </template>
      </el-popover>
      <el-icon size="32" color="#0db7f5" style="margin-left: 20px; cursor: pointer" @click="openDevicesModal">
@@ -73,6 +68,12 @@
// 获取当前设备名
const deviceStore = useDevicesStore()
const currentDeviceName = computed(() => {
  return (
    deviceStore?.deviceInfo?.deviceList?.find((ele) => ele?.deviceID === deviceStore?.deviceInfo?.currentDeviceID)
      ?.deviceName ?? ''
  )
})
// 问题诊断列表
const problemList = computed(() => {