|
@@ -1,11 +1,12 @@
|
1
|
1
|
<!-- 实时视频监控 -->
|
2
|
2
|
<script setup>
|
3
|
|
- import { getPreview, controlling } from '@/api/previewPlayback'
|
|
3
|
+ import { getPreview, controlling, manualCapture } from '@/api/previewPlayback'
|
4
|
4
|
import { useRoute } from 'vue-router'
|
5
|
5
|
import commonSelect from '@/components/CommonSelector/index.vue'
|
6
|
6
|
import api from '@/api/orgInfo/info'
|
7
|
7
|
import cameraApi from '@/api/camera/index'
|
8
|
8
|
import { message } from 'ant-design-vue'
|
|
9
|
+ import { downloadLink } from '@/utils/systemUtils'
|
9
|
10
|
|
10
|
11
|
const activeKey = ref('1')
|
11
|
12
|
const route = useRoute()
|
|
@@ -217,9 +218,9 @@
|
217
|
218
|
|
218
|
219
|
const circle = () => {
|
219
|
220
|
if (isActive.value) {
|
220
|
|
- doControl('LEFT', 0)
|
221
|
|
- } else {
|
222
|
221
|
doControl('LEFT', 1)
|
|
222
|
+ } else {
|
|
223
|
+ doControl('LEFT', 0)
|
223
|
224
|
}
|
224
|
225
|
isActive.value = !isActive.value
|
225
|
226
|
}
|
|
@@ -240,6 +241,30 @@
|
240
|
241
|
doControl('STOP_TRACK', 1)
|
241
|
242
|
}
|
242
|
243
|
|
|
244
|
+ const captureOne = (i = null) => {
|
|
245
|
+ console.log('ready capture one')
|
|
246
|
+ if (i == null) {
|
|
247
|
+ i = currentWindowIndex
|
|
248
|
+ }
|
|
249
|
+ if (videoMap[i]) {
|
|
250
|
+ const data = videoMap[i]
|
|
251
|
+ const cameraIndexCode = data.cameraIndexCode
|
|
252
|
+ manualCapture({ cameraIndexCode }).then((url) => {
|
|
253
|
+ console.log('capture url', url)
|
|
254
|
+ downloadLink(url)
|
|
255
|
+ })
|
|
256
|
+ } else {
|
|
257
|
+ return message.warning('请选择播放中的窗口')
|
|
258
|
+ }
|
|
259
|
+ }
|
|
260
|
+
|
|
261
|
+ const captureAll = () => {
|
|
262
|
+ let i = 0
|
|
263
|
+ for (const _ of Object.values(videoMap)) {
|
|
264
|
+ captureOne(i++)
|
|
265
|
+ }
|
|
266
|
+ }
|
|
267
|
+
|
243
|
268
|
const orgSelect = (orgId, event) => {
|
244
|
269
|
const org = event.node
|
245
|
270
|
cameraListData.value = []
|
|
@@ -355,11 +380,11 @@
|
355
|
380
|
<a-button type="primary" class="btn">中止轮巡</a-button>
|
356
|
381
|
</div>
|
357
|
382
|
<div class="row">
|
358
|
|
- <a-button type="primary" class="mr-5 btn">窗口抓图</a-button>
|
|
383
|
+ <a-button type="primary" class="mr-5 btn" @click="captureOne">窗口抓图</a-button>
|
359
|
384
|
<a-button type="primary" class="btn" @click="stopPlay">窗口关闭</a-button>
|
360
|
385
|
</div>
|
361
|
386
|
<div class="row">
|
362
|
|
- <a-button type="primary" class="mr-5 btn">全部抓图</a-button>
|
|
387
|
+ <a-button type="primary" class="mr-5 btn" @click="captureAll">全部抓图</a-button>
|
363
|
388
|
<a-button type="primary" class="btn" @click="stopAllPlay">全部关闭</a-button>
|
364
|
389
|
</div>
|
365
|
390
|
<div v-if="hasPerm(['controlCloud'])" class="flex flex-col">
|