13693261870
2023-06-21 cdf12fc9e88b1af69f5c85165eb9fef4e23bf57a
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
<template>
  <div class="box">
    <div class="header">
      <div class="title1">重点视频选择区</div>
      <div class="title2">
        <div class="bg1"></div>
        <div @click="shwoAllVideoChange">查看全部</div>
      </div>
    </div>
    <div class="content">
      <div class="divBox">
        <div class="imageBox image6"
             :class="{ active: currentIndex == 5 }"
             @click="imageChange(5)"></div>
      </div>
      <div class="divBox">
        <div class="imageBox image5"
             :class="{ active: currentIndex == 2 }"
             @click="imageChange(2)"></div>
      </div>
      <div class="divBox">
        <div class="imageBox image3"
             :class="{ active: currentIndex == 3 }"
             @click="imageChange(3)"></div>
      </div>
      <div class="divBox">
        <div class="imageBox image4"
             :class="{ active: currentIndex == 1 }"
             @click="imageChange(1)"></div>
      </div>
      <div class="divBox">
        <div class="imageBox image1"
             :class="{ active: currentIndex == 4 }"
             @click="imageChange(4)"></div>
      </div>
      <div class="divBox">
        <div class="imageBox image2"
             :class="{ active: currentIndex == 6 }"
             @click="imageChange(6)"></div>
      </div>
    </div>
  </div>
</template>
 
<script>
import { fsync } from 'fs'
import { videoPreviewSubjectTree } from '../../../utils/api.js'
 
export default {
  //import引入的组件需要注入到对象中才能使用
  components: {},
  data () {
    //这里存放数据
    return {
      currentIndex: 0
    }
  },
  //方法集合
  methods: {
    async imageChange (id) {
      this.currentIndex = id;
      //this.$store.state.showVideoFlag = true
      var vs = { 5: '区域全景', 2: '荣京东街', 3: '大族广场', 1: '荣华路', 4: '博大公园', 6: '高点摄像头' };
      //var res = { 6: 6, 5: 1, 4: 5, 3: 4, 2: 3, 1: 2 };
      switch (id) {
        case 1:
          this.$store.state.xOffset = Offset[5].xOffset;
          this.$store.state.yOffset = Offset[5].yOffset;
          break;
        case 2:
          this.$store.state.xOffset = Offset[0].xOffset;
          this.$store.state.yOffset = Offset[0].yOffset;
          break;
        case 3:
          this.$store.state.xOffset = Offset[2].xOffset;
          this.$store.state.yOffset = Offset[2].yOffset;
          break;
        case 4:
          this.$store.state.xOffset = Offset[3].xOffset;
          this.$store.state.yOffset = Offset[3].yOffset;
          break;
        case 5:
          this.$store.state.xOffset = Offset[1].xOffset;
          this.$store.state.yOffset = Offset[1].yOffset;
          break;
        case 6:
          this.$store.state.xOffset = Offset[4].xOffset;
          this.$store.state.yOffset = Offset[4].yOffset;
          break;
      }
      this.$bus.$emit('stopPlay');
 
      if (this.$store.state.videoId != null) {
        map.execute('grapi', 'RoamingEnd', { time: 0.1 }, function () { }); // 停止漫游
      }
      var rs = await videoPreviewSubjectTree(VIDEO_SORT[id]);
      console.log('FocusPage => ', rs);
      if (!rs || rs.status != 200) return;
 
      this.$store.state.index = -1;
      this.$store.state.videoName = vs[id];
      this.$store.state.videoId = id;
 
      this.$store.commit('addVideos', rs.data.data.channelList);
      setTimeout(() => {
        this.$bus.$emit('playVideo', 0)
      }, 500); // 3500
    },
    shwoAllVideoChange () {
      this.$store.state.ShowPanoramicFlag = true
    }
  },
  created () { }
}
</script>
<style lang="less" scoped>
.box {
  // display: flex;
  width: 100%;
  height: 100%;
  position: absolute;
  .active {
    border: 1px solid #14fad7;
  }
  .header {
    width: 100%;
    height: 67px;
    background: url('../../../assets/img/FoucesVideoHeader.png') no-repeat
      center;
    background-size: 100% 100%;
    position: absolute;
 
    .title1 {
      line-height: 67px;
      margin-left: 23.57px;
      position: absolute;
      float: left;
      font-size: 32px;
      color: white;
      font-family: SourceHanSansCN;
    }
    .bg1 {
      height: 16px;
      width: 16px;
      float: right;
      right: 86px;
      background: url('../../../assets/img/Dot.png') no-repeat center;
      background-size: 100% 100%;
      position: absolute;
    }
 
    .title2 {
      top: 23.8px;
      position: absolute;
      font-size: 20px;
      height: 18.84px;
      right: 20.86px;
      line-height: 18.84px;
      float: right;
      color: #14fad7;
      cursor: pointer;
      font-family: SourceHanSansCN;
    }
  }
  .content {
    width: 100%;
    height: 670px;
    background: url('../../../assets/img/Rectangle 894.png') no-repeat center;
    background-size: 100% 100%;
    padding-top: 75px;
    .imageBox {
      width: 100%;
      height: 100%;
    }
 
    .divBox {
      width: 38%;
      height: 26%;
      margin-left: 5%;
      margin-top: 2%;
      float: left;
 
      padding: 1%;
    }
    .image1 {
      background: url('../../../assets/img/video/博大公园.png') no-repeat center;
      background-size: 100% 100%;
    }
    .image2 {
      background: url('../../../assets/img/video/创意生活广场.png') no-repeat
        center;
      background-size: 100% 100%;
    }
    .image3 {
      background: url('../../../assets/img/video/大族广场.png') no-repeat center;
      background-size: 100% 100%;
    }
    .image4 {
      background: url('../../../assets/img/video/荣华路.png') no-repeat center;
      background-size: 100% 100%;
    }
    .image5 {
      background: url('../../../assets/img/video/容京街.png') no-repeat center;
      background-size: 100% 100%;
    }
    .image6 {
      background: url('../../../assets/img/video/同仁医院.png') no-repeat center;
      background-size: 100% 100%;
    }
  }
}
</style>