From 58446e87a8b9e67a7067949e337e3c4d55a50f88 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Mon, 02 Dec 2024 17:51:26 +0800
Subject: [PATCH] 路由调整

---
 src/pages/map/index.vue |  149 ++++++++-----------------------------------------
 1 files changed, 26 insertions(+), 123 deletions(-)

diff --git a/src/pages/map/index.vue b/src/pages/map/index.vue
index af33496..f66317a 100644
--- a/src/pages/map/index.vue
+++ b/src/pages/map/index.vue
@@ -1,27 +1,23 @@
+<!--
+ * @Author: shuishen 1109946754@qq.com
+ * @Date: 2024-11-28 17:02:08
+ * @LastEditors: shuishen 1109946754@qq.com
+ * @LastEditTime: 2024-12-02 17:45:30
+ * @FilePath: \bigScreen\src\pages\map\index.vue
+ * @Description: 
+ * 
+ * Copyright (c) 2024 by shuishen, All Rights Reserved. 
+-->
 <template>
   <div class="wrapper">
     <map-container ref="MapContainer">
       <template #content>
-        <div v-if="showContent" class="main-content" id="MainContent">
+        <div v-if="showContent" :class="[showSubLayout ? 'main-content-sub' : 'main-content']" id="MainContent">
           <main-search></main-search>
           <main-tool></main-tool>
 
           <div class="w100 h100 relative">
-            <div class="main-header">
-              <div class="title">吉水化工园区“一园一策一图”VR平台</div>
-
-              <div class="login-out" @click="signOut">
-                <img :src="loginOutBg" class="img" />
-                <span>退出</span>
-              </div>
-            </div>
-
-            <div class="main-container">
-              <!-- 地图区域 -->
-              <router-view></router-view>
-            </div>
-
-            <main-menu></main-menu>
+            <router-view></router-view>
           </div>
         </div>
       </template>
@@ -30,42 +26,25 @@
 </template>
 
 <script setup>
-import { getAssetsFile } from 'utils/utils'
-const loginOutBg = getAssetsFile('login.png', '/images')
-import mainMenu from './components/mainMenu.vue'
-
-import { useRouter, useRoute } from 'vue-router'
-let router = useRouter()
 import mainSearch from './components/mainSearch.vue'
 import mainTool from './components/mainTool.vue'
 
-import { useLogin } from 'store/login'
-const loginStore = useLogin()
 import { useMap } from 'store/map'
 import { useRouterStore } from 'store/router'
 
 const store = useMap()
+const storeRouter = useRouterStore()
 const showContent = ref(false)
+const showSubLayout = ref(false)
 
-const signOut = () => {
-  loginStore.LogOut().then(res => {
-    router.push({
-      path: '/login'
-    })
-  })
-}
-
-// onMounted(() => {
-//   store.setLoadSub(false)
-// }),
-
-// 监听createB的变化
 watch(
   [
     () => store.loadMap,
+    () => storeRouter.loadSub,
   ],
-  ([newLoadMap]) => {
+  ([newLoadMap, newLoadSub]) => {
     showContent.value = newLoadMap
+    showSubLayout.value = newLoadSub
   },
   { immediate: true } // 设置immediate为true以便在组件挂载时立即检查createB的值
 )
@@ -101,6 +80,14 @@
         url(/images/pro-bg.png) no-repeat center / 100% 100%,
         rgba(0, 0, 0, 1);
     }
+  }
+
+  .main-content-sub {
+    height: 1080px;
+    background: url(/images/wrapper-box-bg.png) no-repeat center / 100% 100%,
+      url(/images/pro-bg.png) no-repeat center / 100% 100%;
+
+    pointer-events: none;
 
     .main-header {
       position: absolute;
@@ -148,26 +135,19 @@
         height: 36px;
         color: #fff;
         display: flex;
+        flex-direction: column;
         align-items: center;
         justify-content: space-between;
-        padding: 0 10px;
         cursor: pointer;
 
         .img {
           width: 16px;
           height: 16px;
-          margin-right: 5px;
         }
 
         span {
           font-size: 13px;
         }
-      }
-
-      .login-out:hover {
-        background-color: #3c5e8f;
-        border-radius: 20px;
-
       }
     }
 
@@ -179,82 +159,5 @@
       bottom: 40px;
     }
   }
-}
-
-.main-header {
-  position: absolute;
-  top: 0;
-  left: 0;
-  width: 100%;
-  height: 40px;
-  pointer-events: auto;
-
-  .title {
-    position: absolute;
-    top: 0;
-    left: 0;
-    right: 0;
-    bottom: 0;
-    margin: auto;
-    width: 640px;
-    height: 40px;
-    font-size: 24px;
-    font-family: YouSheBiaoTiHei;
-    font-weight: 400;
-    color: #eff8fc;
-    line-height: 40px;
-    text-align: center;
-    letter-spacing: 8px;
-    font-weight: bolder;
-    background: linear-gradient(to bottom,
-        #e2eaf0 0%,
-        #aed1f1 100%);
-    -webkit-background-clip: text;
-    -webkit-text-fill-color: transparent;
-    // opacity: 0.89;
-    // text-shadow: 0px 4px 1px rgba(19, 80, 143, 0.66);
-
-    // background: linear-gradient(0deg, rgba(119, 186, 255, 0.45) 0%, rgba(233, 248, 255, 0.45) 73.3154296875%, rgba(255, 255, 255, 0.45) 100%);
-    // -webkit-background-clip: text;
-    // -webkit-text-fill-color: transparent;
-  }
-
-
-  .login-out {
-    position: absolute;
-    top: 10px;
-    right: 40px;
-    height: 36px;
-    color: #fff;
-    display: flex;
-    align-items: center;
-    justify-content: space-between;
-    padding: 0 10px;
-    cursor: pointer;
-
-    .img {
-      width: 16px;
-      height: 16px;
-      margin-right: 5px;
-    }
-
-    span {
-      font-size: 13px;
-    }
-  }
-
-  .login-out:hover {
-    background-color: #3c5e8f;
-    border-radius: 20px;
-
-  }
-}
-
-.main-container {
-  position: absolute;
-  top: 40px;
-  left: 40px;
-  right: 40px;
-  bottom: 40px;
 }
 </style>
\ No newline at end of file

--
Gitblit v1.9.3