From 4fecd4a43f6e51d043185731234978d68a35563b Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Mon, 02 Dec 2024 17:00:27 +0800
Subject: [PATCH] 布局调整
---
src/pages/layout/index.vue | 260 +--------------------------------------------------
src/pages/layout/components/scomponents/layersControl.vue | 11 +
src/pages/layout/components/mainSearch.vue | 14 ++
3 files changed, 27 insertions(+), 258 deletions(-)
diff --git a/src/pages/layout/components/mainSearch.vue b/src/pages/layout/components/mainSearch.vue
index f737973..10c6050 100644
--- a/src/pages/layout/components/mainSearch.vue
+++ b/src/pages/layout/components/mainSearch.vue
@@ -2,7 +2,7 @@
* @Author: shuishen 1109946754@qq.com
* @Date: 2024-10-26 16:09:35
* @LastEditors: shuishen 1109946754@qq.com
- * @LastEditTime: 2024-11-27 15:28:29
+ * @LastEditTime: 2024-11-28 19:22:40
* @FilePath: \bigScreen\src\pages\layout\components\mainSearch.vue
* @Description:
*
@@ -114,7 +114,8 @@
} else {
window.$viewer.removeLayer(addTileLayers[item.name])
- addTileLayers = {}
+ addTileLayers[item.name] = null
+ delete addTileLayers[item.name]
}
}
@@ -122,15 +123,22 @@
function clearPoint () {
let arr = Object.keys(addTileLayers)
arr.forEach(i => {
- addTileLayers[i] && window.$viewer.removeLayer(addTileLayers[i])
+ addTileLayers[i] && window.$viewer && window.$viewer.removeLayer(addTileLayers[i])
+ addTileLayers[i] = null
+ delete addTileLayers[i]
})
+ addTileLayers = {}
}
onUnmounted(() => {
let arr = Object.keys(addTileLayers)
arr.forEach(i => {
addTileLayers[i] && window.$viewer && window.$viewer.removeLayer(addTileLayers[i])
+ addTileLayers[i] = null
+ delete addTileLayers[i]
})
+
+ addTileLayers = null
})
</script>
diff --git a/src/pages/layout/components/scomponents/layersControl.vue b/src/pages/layout/components/scomponents/layersControl.vue
index 16211f4..e908bf6 100644
--- a/src/pages/layout/components/scomponents/layersControl.vue
+++ b/src/pages/layout/components/scomponents/layersControl.vue
@@ -2,7 +2,7 @@
* @Author: shuishen 1109946754@qq.com
* @Date: 2024-10-31 10:47:29
* @LastEditors: shuishen 1109946754@qq.com
- * @LastEditTime: 2024-11-28 15:23:01
+ * @LastEditTime: 2024-11-28 19:23:46
* @FilePath: \bigScreen\src\pages\layout\components\scomponents\layersControl.vue
* @Description:
*
@@ -843,7 +843,7 @@
} else {
addTileLayers[item.layerName].clear()
window.$viewer && window.$viewer.removeLayer(addTileLayers[item.layerName])
-
+ addTileLayers[item.layerName] = null
delete addTileLayers[item.layerName]
}
}
@@ -928,8 +928,9 @@
let arr = Object.keys(addPupoLayers)
arr.filter(i => i != 'hgyq').forEach(i => {
addPupoLayers[i] && window.$viewer && window.$viewer.removeLayer(addPupoLayers[i])
+ addPupoLayers[i] = null
+ delete addPupoLayers[i]
})
- addPupoLayers = {}
}
onUnmounted(() => {
@@ -942,9 +943,13 @@
let arr = Object.keys(addTileLayers)
arr.filter(i => i != 'hgyq').forEach(i => {
addTileLayers[i] && window.$viewer && window.$viewer.removeLayer(addTileLayers[i])
+ addTileLayers[i] = null
+ delete addTileLayers[i]
})
+ addTileLayers = null
// 弹窗销毁
destroy()
+ addPupoLayers = null
EventBus.off('restHandleCheckChange', restHandleCheckChange)
EventBus.off('restHandleDelChange', restHandleDelChange)
diff --git a/src/pages/layout/index.vue b/src/pages/layout/index.vue
index e95d8fc..270aebd 100644
--- a/src/pages/layout/index.vue
+++ b/src/pages/layout/index.vue
@@ -1,261 +1,17 @@
-<!--
- * @Author: shuishen 1109946754@qq.com
- * @Date: 2022-08-18 16:18:24
- * @LastEditors: shuishen 1109946754@qq.com
- * @LastEditTime: 2024-11-21 12:29:12
- * @FilePath: \bigScreen\src\pages\layout\index.vue
- * @Description:
- *
- * Copyright (c) 2022 by shuishen 1109946754@qq.com, All Rights Reserved.
--->
<template>
- <div class="wrapper">
- <div v-if="showSinglePage" class="main-content single-page" id="MainContent">
- <router-view></router-view>
- </div>
-
- <map-container v-if="!showSinglePage" ref="MapContainer">
- <template #content>
- <div v-if="showContent" :class="[showSubLayout ? 'main-content-sub' : 'main-content']" id="MainContent">
- <main-search></main-search>
- <main-tool></main-tool>
-
- <router-view class="w100 h100" key="1"></router-view>
- </div>
- </template>
- </map-container>
+ <div class="w100 h100">
+ <router-view></router-view>
</div>
</template>
-<script setup>
-import { useRouter, useRoute } from 'vue-router'
-let router = useRouter()
-import mainSearch from './components/mainSearch.vue'
-import mainTool from './components/mainTool.vue'
+<script>
+export default {
+ setup () {
-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 showSinglePage = ref(false)
-// onMounted(() => {
-// store.setLoadSub(false)
-// }),
-
-// 监听createB的变化
-watch(
- [
- () => store.loadMap,
- () => storeRouter.loadSub,
- () => storeRouter.loadSingle,
- ],
- ([newLoadMap, newLoadSub, newLoadSingle]) => {
- showContent.value = newLoadMap
- showSubLayout.value = newLoadSub
- showSinglePage.value = newLoadSingle
- },
- { immediate: true } // 设置immediate为true以便在组件挂载时立即检查createB的值
-)
-
-const signOut = () => {
- loginStore.LogOut().then(res => {
- router.push({
- path: '/login'
- })
- })
+ return {}
+ }
}
</script>
-<style scoped lang="scss">
-$bg-blue: rgba(24, 33, 92, 0.9);
-
-.wrapper {
- position: relative;
- width: 100%;
- height: 100%;
-
- #MainContent {
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- z-index: 99;
- }
-
- .main-content {
- height: 1080px;
- background: url(/images/header.png) no-repeat center / 100% 100%,
- url(/images/pro-bg.png) no-repeat center / 100% 100%;
-
- pointer-events: none;
-
- &.single-page {
- background: url(/images/header.png) no-repeat center / 100% 100%,
- url(/images/pro-bg.png) no-repeat center / 100% 100%,
- rgba(0, 0, 0, 1);
- }
-
- .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;
- }
- }
-
-
- .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;
- 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;
- flex-direction: column;
- align-items: center;
- justify-content: space-between;
- cursor: pointer;
-
- .img {
- width: 16px;
- height: 16px;
- }
-
- span {
- font-size: 13px;
- }
- }
- }
-
- .main-container {
- position: absolute;
- top: 40px;
- left: 40px;
- right: 40px;
- bottom: 40px;
- }
- }
-}
-</style>
+<style lang="scss" scoped></style>
\ No newline at end of file
--
Gitblit v1.9.3