From d3290cacdae24c00244569de87aa5d7f8cd0c774 Mon Sep 17 00:00:00 2001
From: Gary Gu <garygu@Garydebijibendiannao.local>
Date: Tue, 27 May 2025 15:10:40 +0800
Subject: [PATCH] feat: 设备状态UI修改

---
 src/Dashboard.vue |   48 ++++++++++++++++++++++++++++++------------------
 1 files changed, 30 insertions(+), 18 deletions(-)

diff --git a/src/Dashboard.vue b/src/Dashboard.vue
index 3bd3d56..c920516 100644
--- a/src/Dashboard.vue
+++ b/src/Dashboard.vue
@@ -2,7 +2,7 @@
  * @Author: gjj Ganjj@probim.com.cn
  * @Date: 2025-02-14 14:32:17
  * @LastEditors: gjj Ganjj@probim.com.cn
- * @LastEditTime: 2025-02-24 17:30:13
+ * @LastEditTime: 2025-02-25 15:38:05
  * @FilePath: \北京交通大学\src\Dashboard.vue
 -->
 <!-- eslint-disable vue/no-textarea-mustache -->
@@ -19,15 +19,7 @@
     }"
   >
     <!--头部-->
-    <app-header class="absolute z-[100] top-0 left-0 right-0" :selected-id="currentProjectId"  />
-
-    
-
-    <!--全屏、切换地图-->
-    <!--<div class="absolute z-[50] top-20 left-4 flex space-x-3">
-      <fullscreen-button />
-      <switch-map mapType="gis" @changeMap="onChangeMap" />
-    </div>-->
+    <app-header class="absolute z-[100] top-0 left-0 right-0" :selected-id="currentProjectId" @onHomeClick="switchView" />
 
 
 
@@ -36,23 +28,26 @@
       <div class="flex-1 min-w-0">
         <!-- 左侧模块 -->
         <div class="w-full h-full">
-          <project-view/>
+          <project-view v-if="isReady"/>
         </div>
       </div>
       <div class="flex-1 min-w-0">
         <!-- 中间模块 -->
         <div class="w-full h-full">
-          <equipment-view/>
+          <equipment-view v-if="isReady"/>
         </div>
       </div>
       <div class="w-[1080px]">
         <!-- 右侧模块 -->
         <div class="w-full h-full">
-          <Home/>
+          <Home v-if="isReady"/>
         </div>
       </div>
     </div>
 
+<!--    <div class="absolute inset-0 top-[80px] flex" v-if="clickTab === 'xietong'">
+      <iframe :src="iframeSrc" class="xieTongIframe" frameborder='0'></iframe>
+    </div>-->
 
     <!--multiverse渲染容器
     <div id="renderDom" class="absolute z-[40] top-0 bottom-0 left-0 right-0 w-full h-full"></div>-->
@@ -65,8 +60,6 @@
 import Vue from "vue";
 import { mapGetters } from "vuex";
 import Header from "./components/Header.vue";
-import FullscreenButton from "./components/FullScreenButton.vue";
-import SwitchMap from "./components/SwitchMap.vue";
 import Home from "./views/Home.vue";
 import ProjectView from "./views/ProjectView.vue";
 import { sceneJSON } from "./sceneJSON.js";
@@ -89,8 +82,6 @@
   name: "Dashboard",
   components: {
     "app-header": Header,
-    "fullscreen-button": FullscreenButton,
-    "switch-map": SwitchMap,
     "Home": Home,
     "project-view": ProjectView,
     "equipment-view": EquipmentView  
@@ -98,7 +89,10 @@
   data() {
     return {
       backgroundImage: new URL('@/assets/images/backgrounds/screen.png', import.meta.url).href,
-      currentProjectId: '1c179617-a7d9-4243-b813-84fa55a17ce7'
+      currentProjectId: '1c179617-a7d9-4243-b813-84fa55a17ce7',
+      isReady: false,
+      clickTab:'home',
+      iframeSrc: window.ProjectConfig.xieTongIframeSrc
     };
   },
   computed: {
@@ -113,6 +107,17 @@
     this.resetEngineRelated();
   },
   methods: {
+    /**
+     * 切换视图
+     * @param val
+     */
+    switchView(val){
+      switch (val){
+        case 'xietong':
+          window.open(window.ProjectConfig.xieTongIframeSrc, '_blank');
+          break;
+      }
+    },
     //重置引擎相关的东西
     resetEngineRelated() {
       window.scene = window.underlay = null;
@@ -147,6 +152,7 @@
       }
     },
     getLoginInfo() {
+      this.isReady = true
       const data = {
         "UserName": "JSC",
         "Password": "JSC@jsc123",
@@ -173,3 +179,9 @@
   },
 };
 </script>
+<style lang="scss" scoped>
+  .xieTongIframe{
+    width: 100%;
+    height: 100%;
+  }
+</style>

--
Gitblit v1.9.3