智慧园区前端大屏
shuishen
2024-10-30 65f4b3f007fe452dc2dcc0045577f1cd10dd4e06
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<!--
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2022-08-18 16:18:24
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2024-10-28 19:44:29
 * @FilePath: \bigScreen\src\views\layout\index.vue
 * @Description: 
 * 
 * Copyright (c) 2022 by shuishen 1109946754@qq.com, All Rights Reserved. 
-->
<template>
  <div class="wrapper">
    <map-container ref="MapContainer">
      <template #content>
        <div v-if="showContent" class="main-content" id="MainContent">
          <div class="main-header">
            <div class="title">吉水工业园区化工集中区</div>
          </div>
 
          <div class="main-container">
            <!-- 地图区域 -->
            <router-view ref="target-name"></router-view>
          </div>
 
          <main-search></main-search>
          <main-tool></main-tool>
          <main-menu></main-menu>
        </div>
      </template>
    </map-container>
  </div>
</template>
 
<script setup>
import mainSearch from './components/mainSearch.vue'
import mainTool from './components/mainTool.vue'
import mainMenu from './components/mainMenu.vue'
 
import { useMap } from 'store/map'
const store = useMap()
const showContent = ref(false)
 
// 监听createB的变化  
watch(
  () => store.loadMap,
  (newValue) => {
    if (newValue) {
      showContent.value = true
    }
  },
  { immediate: true } // 设置immediate为true以便在组件挂载时立即检查createB的值  
)
</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;
 
    .main-header {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 68px;
      pointer-events: auto;
 
      .title {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        margin: auto;
        width: 456px;
        height: 40px;
        font-size: 32px;
        font-family: YouSheBiaoTiHei;
        font-weight: 400;
        color: #eff8fc;
        line-height: 35px;
        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;
      }
    }
 
    .main-container {
      position: absolute;
      top: 68px;
      left: 50px;
      right: 50px;
      bottom: 40px;
    }
  }
}
</style>