From a025bd0aff7b67491cfdcb445745886c0ffaa8d2 Mon Sep 17 00:00:00 2001 From: guonan <guonan201020@163.com> Date: 星期三, 04 六月 2025 13:51:00 +0800 Subject: [PATCH] 地球样式 --- src/views/GisView.vue | 23 ++++++++++++++++++++--- src/store/simulation.js | 20 +++++++++++--------- 2 files changed, 31 insertions(+), 12 deletions(-) diff --git a/src/store/simulation.js b/src/store/simulation.js index d5c460d..4bfc089 100644 --- a/src/store/simulation.js +++ b/src/store/simulation.js @@ -23,12 +23,12 @@ const weatherShow = ref(false) const barShow = ref(false) const deviceShow = ref(false) - const showResultAssess = ref(false) const showLayerTree = ref(true) - const showDangerAssess = ref(false) const schemCard = ref([]) const backToHome = ref(false) const selectedScheme = ref(null) + // 妯℃嫙浠跨湡鍥句緥 + const isShowEarth = ref(false) // 闄嶉洦鏁版嵁鍒楄〃 const rainFalls = ref() // 闄嶉洦鍗曚綅 @@ -58,8 +58,6 @@ rightRiverShow.value = false showPreview.value = false deviceShow.value = false - showResultAssess.value = false - showDangerAssess.value = false schemCard.value = [] } @@ -102,24 +100,29 @@ init() flyToHomeView() locationShow.value = true + isShowEarth.value = true + } const startZHJC = () => { init() functionShow.value = true deviceShow.value = true + isShowEarth.value = true + } const startMNFZ = () => { init() leftShow.value = true - // rightRiverShow.value = true + isShowEarth.value = false + } const startMNPG = () => { init() - // showResultAssess.value = true - // showDangerAssess.value = true + isShowEarth.value = false + } const setBackToHome = (value) => { @@ -162,9 +165,7 @@ weatherShow, barShow, deviceShow, - showResultAssess, showLayerTree, - showDangerAssess, schemCard, backToHome, rainFalls, @@ -172,6 +173,7 @@ DangerPoint, DeviceShowSwitch, DangerShowSwitch, + isShowEarth, // 鏂规鐩稿叧鏂规硶 setSchemCard, diff --git a/src/views/GisView.vue b/src/views/GisView.vue index 1fea18c..b91d965 100644 --- a/src/views/GisView.vue +++ b/src/views/GisView.vue @@ -1,10 +1,18 @@ <template> <div id="gis-view" ref="mapRef"></div> <!-- 鍒囨崲搴曞浘褰卞儚 --> - <div @click="handleShow" class="diqiu"> + <div + @click="handleShow" + class="diqiu" + :class="{ 'shift-right': simStore.isShowEarth }" + > <img src="@/assets/img/screen/dq.png" alt="" /> </div> - <div v-show="picShow" class="earthBox"> + <div + v-show="picShow" + class="earthBox" + :class="{ 'shift-right': simStore.isShowEarth }" + > <div v-for="(item, index) in views" :key="index" @@ -34,6 +42,8 @@ import { getDistrictCount, getDistrictCountByCity } from "@/api/index"; import { useRoute } from "vue-router"; import { EventBus } from "@/eventBus"; // 寮曞叆浜嬩欢鎬荤嚎 +import { useSimStore } from "@/store/simulation"; +const simStore = useSimStore(); const views = [ { label: "鍦板浘", value: "map", icon: "鍦板浘.png" }, @@ -53,7 +63,7 @@ const currentIndex = ref(-1); -let currentLayer = null; +let currentLayer = null; const switchView = async (index) => { currentIndex.value = index; @@ -617,4 +627,11 @@ .item-container.active .label { background-color: rgba(33, 137, 103, 0.8); } + +.diqiu.shift-right { + right: 10%; +} +.earthBox.shift-right { + right: 13%; +} </style> -- Gitblit v1.9.3