|
@@ -62,24 +62,53 @@
|
62
|
62
|
<div class="monitorContent">
|
63
|
63
|
<el-carousel class="monitor">
|
64
|
64
|
<el-carousel-item v-for="(item, index) in carouselData" :key="index">
|
65
|
|
- <p>{{ item.activeMonitor.title }}</p>
|
|
65
|
+ <p style="margin-left: 12px; margin-bottom: 3px; font-size: 14px;">{{ item.activeMonitor.title }}</p>
|
66
|
66
|
<div class="interactclass">
|
67
|
67
|
|
68
|
68
|
<div class="room" v-for="(item, index) in item.activeMonitor.array" :key="index">
|
69
|
69
|
<span style="z-index: 99;">{{ item.title }}</span>
|
70
|
70
|
<!-- <img :src="deviceImg + 'rb2.png'" alt="" @click="lookVideo(item)"> -->
|
71
|
|
- <div @click="lookVideo(item.src)">
|
72
|
|
- <videoPlay v-bind="videoData" />
|
|
71
|
+ <div style="background-color: aquamarine;width: 100%;height: 100%;" @click="lookVideo(item)">
|
|
72
|
+ <div class="vue3VideoPlay ">
|
|
73
|
+ <vue3VideoPlay
|
|
74
|
+
|
|
75
|
+ width="100%"
|
|
76
|
+ height="9vh"
|
|
77
|
+ style=" object-fit: fill"
|
|
78
|
+ :src="item.src"
|
|
79
|
+ :type="videoData.type"
|
|
80
|
+ :autoPlay="true"
|
|
81
|
+ :control="false"
|
|
82
|
+ :preload="meta"
|
|
83
|
+ />
|
|
84
|
+
|
|
85
|
+ </div>
|
73
|
86
|
</div>
|
74
|
87
|
</div>
|
75
|
88
|
</div>
|
76
|
89
|
|
77
|
|
- <p style="margin-top: 5px;">{{ item.activeMonitor.title1 }}</p>
|
|
90
|
+ <p style="margin-top: 18px;margin-left: 12px; margin-bottom: 3px; font-size: 14px; " >{{ item.activeMonitor.title1 }}</p>
|
78
|
91
|
<div class="interactclass">
|
79
|
92
|
<div class="room" v-for="(item, index) in item.activeMonitor.array1" :key="index">
|
80
|
|
- <span>{{ item.title }}</span>
|
81
|
|
- <div @click="lookVideo(item.src)">
|
82
|
|
- <videoPlay v-bind="videoData" />
|
|
93
|
+ <span style="z-index: 99;">{{ item.title }}</span>
|
|
94
|
+ <!-- <br>
|
|
95
|
+ <div>
|
|
96
|
+ {{ item.src }}
|
|
97
|
+ </div> -->
|
|
98
|
+ <div style="background-color: aquamarine;width: 100%;height: 100%;" @click="lookVideo(item)">
|
|
99
|
+ <div class="vue3VideoPlay ">
|
|
100
|
+ <vue3VideoPlay
|
|
101
|
+
|
|
102
|
+ width="100%"
|
|
103
|
+ height="9vh"
|
|
104
|
+ style="object-fit: fill"
|
|
105
|
+ :src="item.src"
|
|
106
|
+ :type="videoData.type"
|
|
107
|
+ :autoPlay="true"
|
|
108
|
+ :control="false"
|
|
109
|
+ />
|
|
110
|
+ </div>
|
|
111
|
+
|
83
|
112
|
</div>
|
84
|
113
|
</div>
|
85
|
114
|
</div>
|
|
@@ -91,7 +120,7 @@
|
91
|
120
|
</el-aside>
|
92
|
121
|
|
93
|
122
|
<!-- 视频播放弹框 -->
|
94
|
|
- <el-dialog class="videoDialog" v-model="videoDialog" :title="dialogTitle" width="60%" align="center" top="4%">
|
|
123
|
+ <el-dialog class="videoDialog" v-model="videoDialog" :title="dialogTitle" width="54.5%" align="center" top="10%">
|
95
|
124
|
<videoPlay v-bind="videoData" />
|
96
|
125
|
|
97
|
126
|
<!-- {{ videoData.src }} -->
|
|
@@ -99,17 +128,17 @@
|
99
|
128
|
</template>
|
100
|
129
|
|
101
|
130
|
<script >
|
102
|
|
-import { reactive, onMounted, ref, } from 'vue';
|
|
131
|
+import { reactive, onMounted, ref, nextTick } from 'vue';
|
103
|
132
|
import { ElCarousel, ElCarouselItem } from "element-plus";
|
104
|
133
|
import "vue3-video-play/dist/style.css";
|
105
|
134
|
import { videoPlay } from "vue3-video-play";
|
106
|
|
-import CircleProgress from './CircleProgress.vue';
|
|
135
|
+// import CircleProgress from './CircleProgress.vue';
|
107
|
136
|
import { getDevice, getVideoUrl,getvideo } from '../request/api';
|
108
|
137
|
|
109
|
138
|
|
110
|
139
|
export default ({
|
111
|
140
|
name: 'Histogram',
|
112
|
|
- components: { videoPlay, ElCarousel, ElCarouselItem, CircleProgress },
|
|
141
|
+ components: { videoPlay, ElCarousel, ElCarouselItem, },
|
113
|
142
|
setup() {
|
114
|
143
|
// 视频数据
|
115
|
144
|
const videoData = reactive({
|
|
@@ -143,18 +172,21 @@ export default ({
|
143
|
172
|
});
|
144
|
173
|
//视频播放弹框
|
145
|
174
|
const videoDialog = ref(false)
|
|
175
|
+
|
|
176
|
+ // const videoshow = ref(true)
|
146
|
177
|
const dialogTitle = ref("")
|
147
|
178
|
// 播放视频
|
148
|
179
|
const lookVideo = function (item) {
|
149
|
180
|
videoDialog.value = true;
|
150
|
181
|
dialogTitle.value = item.title
|
|
182
|
+ videoData.src = item.scr
|
151
|
183
|
console.log("点击了播放视频", 12312312, "播放路径", item)
|
152
|
|
- getVideoUrl({ "rtsp": item.src }).then((res) => {
|
153
|
|
- console.log("视频处理", res);
|
154
|
|
- console.log("视频处理2", res.data.httpFlv);
|
|
184
|
+ // getVideoUrl({ "rtsp": item.src }).then((res) => {
|
|
185
|
+ // console.log("视频处理", res);
|
|
186
|
+ // console.log("视频处理2", res.data.httpFlv);
|
155
|
187
|
|
156
|
|
- videoData.src = res.data.httpFlv
|
157
|
|
- })
|
|
188
|
+ // videoData.src = res.data.httpFlv
|
|
189
|
+ // })
|
158
|
190
|
// videoData.src = src
|
159
|
191
|
|
160
|
192
|
}
|
|
@@ -174,11 +206,11 @@ export default ({
|
174
|
206
|
|
175
|
207
|
|
176
|
208
|
//视频转码
|
177
|
|
- getvideo({
|
178
|
|
- "rtsp": "rtsp://admin:admin@10.116.255.67:554",
|
179
|
|
- }).then((res)=>{
|
180
|
|
- console.log('sadnuq21',res);
|
181
|
|
- })
|
|
209
|
+ // getvideo({
|
|
210
|
+ // "rtsp": "rtsp://admin:admin@10.116.255.67:554",
|
|
211
|
+ // }).then((res)=>{
|
|
212
|
+ // console.log('sadnuq21',res);
|
|
213
|
+ // })
|
182
|
214
|
|
183
|
215
|
let res = await getDevice()
|
184
|
216
|
console.log('s12312123',res);
|
|
@@ -191,9 +223,49 @@ export default ({
|
191
|
223
|
//截取数组前6项
|
192
|
224
|
interDevice.value = category.slice(0,6);
|
193
|
225
|
// 互动教室
|
194
|
|
- carouselData.value = monitor.slice(0,5)
|
|
226
|
+ carouselData.value = monitor
|
|
227
|
+
|
|
228
|
+ console.log('处理监控视频数据===',monitor);
|
|
229
|
+
|
|
230
|
+ monitor.map((res)=>{
|
|
231
|
+ console.log('sadhi2',res.activeMonitor);
|
|
232
|
+
|
|
233
|
+ res.activeMonitor.array.map(array =>{
|
|
234
|
+
|
|
235
|
+ //视频转码
|
|
236
|
+ getvideo({
|
|
237
|
+ "rtsp": array.src,
|
|
238
|
+ }).then((res)=>{
|
|
239
|
+ console.log('sadnuq21',res.data);
|
|
240
|
+ console.log('sadnuq21',res.data.httpFlv);
|
|
241
|
+ array.src='http://kbs-dokdo.gscdn.com/dokdo_300/_definst_/dokdo_300.stream/playlist.m3u8'
|
|
242
|
+ })
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+ })
|
|
246
|
+ res.activeMonitor.array1.map(array1 =>{
|
|
247
|
+ console.log('asdui1231',array1);
|
|
248
|
+ //视频转码
|
|
249
|
+ getvideo({
|
|
250
|
+ "rtsp": array1.src,
|
|
251
|
+ }).then((res)=>{
|
|
252
|
+ console.log('sadnuq212123s2',res.data);
|
|
253
|
+ array1.src='http://kbs-dokdo.gscdn.com/dokdo_300/_definst_/dokdo_300.stream/playlist.m3u8'
|
|
254
|
+ })
|
|
255
|
+ })
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+ })
|
|
259
|
+
|
|
260
|
+ setTimeout(() => {
|
|
261
|
+ console.log('sado2');
|
|
262
|
+ // videoshow=true
|
|
263
|
+ // console.log('sadhui21',videoshow);
|
|
264
|
+ }, 3000);
|
195
|
265
|
|
196
|
|
- console.log('处理监控视频数据===',monitor).slice(0,1);
|
|
266
|
+ setTimeout(() => {
|
|
267
|
+ console.log('处理后监控视频数据===',monitor);
|
|
268
|
+ }, 2000);
|
197
|
269
|
|
198
|
270
|
//物联设备统计
|
199
|
271
|
equipmentTotal.value = status
|