基于廊坊系统为基础,国防科技大学系统演示Demo
surprise
2024-04-28 c310c155e3e91e6b285b3fb3519a3ef7c6690d66
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
<template>
  <div class="top">
    <div class="topleft">
      <!-- <div
        class="topleft1"
        :class="currView == 'chart' ? 'active' : ''"
        @click="OpenInitChart"
      >
        <img src="../../assets/img/Screen/bigST.png" />
        <span>大屏视图</span>
      </div> -->
      <!-- <div
        class="topleft1"
        @click="OpenProjectree"
        :class="currView == 'tree' ? 'active' : ''"
      >
        <img src="../../assets/img/Screen/ptree.png" />
        <span>工程项目</span>
      </div> -->
      <div
        class="topleft__curr"
        @click="setMapViewStart()"
      >
        <img src="../../assets/img/Screen/ptree.png" />
        <span :title="currentProject">{{ currentProject }}</span>
      </div>
    </div>
    <div class="topCenter">
      <div>管网一张图</div>
    </div>
    <div class="topRight">
      <div
        class="topright1"
        :class="currView == 'chart' ? 'active' : ''"
        @click="OpenInitChart"
      >
        <img src="../../assets/img/Screen/bigST.png" />
        <span>返回大屏</span>
      </div>
      <div
        class="topright1 toprightC"
        @click="ReturnLast"
      >
        <img src="../../assets/img/Screen/return.png" />
        <span>返回上级</span>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      tree: false,
      screen: false,
      currView: "chart",
      currentProject: "大屏视图",
    }
  },
  mounted() {
    this.$bus.$on("changeProject", name => {
      // if (name == '全国项目' || name == '全球项目') {
      //   this.OpenProjectree()
      // }
      this.currView = "tree"
      this.currentProject = name
    })
  },
  methods: {
    ReturnLast() {
      sessionStorage.setItem("changeSelectStyle", 1)
      this.$router.push("/Synthesis")
    },
 
    //打开大屏
    OpenInitChart() {
      this.currView = "chart"
      this.screen = true
      this.$parent.$refs.mapleft.OpenLeftInit()
      this.$parent.$refs.mapright.OpenLeftInit()
      this.currentProject = "大屏视图"
      // 回到初始化视角
      this.setMapViewStart();
    },
    setMapViewStart() {
      window.viewer.camera.flyTo({
        destination: new Cesium.Cartesian3.fromDegrees(110, 32, 20000000),
        orientation: {
          heading: Cesium.Math.toRadians(0),
          pitch: Cesium.Math.toRadians(-90),
        },
      })
    },
    //打开工程树
    OpenProjectree() {
      this.screen = false
      this.currView = "tree"
      this.$parent.$refs.mapleft.OpenLeftProjectTree()
      this.$parent.$refs.mapright.OpenLeftProjectTree()
    },
  },
}
</script>
<style lang="less">
.top {
  height: 100%;
  width: 100%;
  background-image: url(../../assets/img/Screen/logobg.png);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: row;
  .topleft {
    width: 20%;
    height: 100%;
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    // justify-content: space-around;
    cursor: pointer;
    .topleft__curr {
      // overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      height: 36px;
      border-radius: 4px;
      background-image: url(../../assets/img/Screen/btnbg.png);
      background-repeat: no-repeat;
      background-size: 100% 100%;
      display: flex;
      align-items: center;
      margin-left: 5%;
      span {
        padding-right: 10px;
      }
    }
    .topleft1 {
      width: 127px;
      height: 36px;
      // border: 1px solid #30acff;
      border-radius: 4px;
      background-image: url(../../assets/img/Screen/btnbg.png);
      background-repeat: no-repeat;
      background-size: 100% 100%;
      display: flex;
      align-items: center;
      margin-left: 10%;
    }
    .active {
      background-image: url(../../assets/img/Screen/btnc.png);
      background-repeat: no-repeat;
      background-size: 100% 100%;
    }
    img {
      height: 26px;
      width: 32px;
      margin: 0px 8px;
    }
    span {
      color: #b3c8e3;
      font-size: 16px;
      letter-spacing: 1px;
    }
  }
  .topCenter {
    width: 60%;
    height: 100%;
    font-size: 36px;
    font-family: PangMenZhengDao, PangMenZhengDao-Regular;
    // font-weight: bold;
    font-style: italic;
    text-align: center;
    color: #e1eaff;
    letter-spacing: 6.55px;
    text-shadow: -14px 0px 25.25px 0.26px rgba(0, 120, 255, 0.19);
    div {
      margin-top: 5px;
    }
  }
  .topRight {
    width: 20%;
    height: 100%;
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: flex-end;
    cursor: pointer;
    .topright1 {
      width: 131px;
      height: 40px;
      background-image: url(../../assets/img/Screen/btnbg.png);
      background-repeat: no-repeat;
      background-size: 100% 100%;
      display: flex;
      align-items: center;
      margin-right: 10%;
      &.active {
        background-image: url(../../assets/img/Screen/btnc.png);
        background-repeat: no-repeat;
        background-size: 100% 100%;
      }
    }
 
    .toprightC {
      width: 131px;
      height: 40px;
      background-image: url(../../assets/img/Screen/btnbg.png);
      background-repeat: no-repeat;
      background-size: 100% 100%;
      display: flex;
      align-items: center;
      margin-right: 10%;
    }
    img {
      height: 26px;
      width: 32px;
      margin: 0px 8px;
    }
    span {
      color: #b3c8e3;
      font-size: 16px;
      letter-spacing: 1px;
    }
  }
}
</style>