From 11fd2edc8643a9b5923d05ff21d18b7d845d4f76 Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期二, 07 十一月 2023 10:36:03 +0800
Subject: [PATCH] Merge branch 'dev' of http://192.168.5.5:10010/r/web/bulletin-board-style1 into dev

---
 src/views/dashboard/components/DashboardTitle.vue |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/src/views/dashboard/components/DashboardTitle.vue b/src/views/dashboard/components/DashboardTitle.vue
index 015694a..49d3323 100644
--- a/src/views/dashboard/components/DashboardTitle.vue
+++ b/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(() => {

--
Gitblit v1.8.0