|
@@ -29,6 +29,7 @@ export default {
|
29
|
29
|
videoMap: {}, // window index - {ws url, camera index code}
|
30
|
30
|
currentWindowIndex: 0,
|
31
|
31
|
viewUrl: null,
|
|
32
|
+ isActive: false,
|
32
|
33
|
}
|
33
|
34
|
},
|
34
|
35
|
mounted() {
|
|
@@ -175,7 +176,7 @@ export default {
|
175
|
176
|
},
|
176
|
177
|
]
|
177
|
178
|
list.forEach(d => {
|
178
|
|
- const type = d.cameraType
|
|
179
|
+ const type = d.live
|
179
|
180
|
const temp = {
|
180
|
181
|
label: d.cameraName,
|
181
|
182
|
... d
|
|
@@ -255,6 +256,7 @@ export default {
|
255
|
256
|
}
|
256
|
257
|
},
|
257
|
258
|
doControl(command, action = 0, speed = 20, presetIndex = 10) {
|
|
259
|
+
|
258
|
260
|
if(this.videoMap[this.currentWindowIndex]) {
|
259
|
261
|
const data = this.videoMap[this.currentWindowIndex]
|
260
|
262
|
const cameraId = data.cameraId
|
|
@@ -274,6 +276,14 @@ export default {
|
274
|
276
|
return this.$message.warning('请选择播放中的窗口')
|
275
|
277
|
}
|
276
|
278
|
},
|
|
279
|
+ circle() {
|
|
280
|
+ if(this.isActive) {
|
|
281
|
+ this.doControl('LEFT', 1)
|
|
282
|
+ }else {
|
|
283
|
+ this.doControl('LEFT', 0)
|
|
284
|
+ }
|
|
285
|
+ this.isActive = !this.isActive
|
|
286
|
+ },
|
277
|
287
|
doControl1(command) {
|
278
|
288
|
this.doControl(command, 0)
|
279
|
289
|
setTimeout(() => {
|
|
@@ -308,7 +318,7 @@ export default {
|
308
|
318
|
}
|
309
|
319
|
manualCapture(q).then(resp => {
|
310
|
320
|
if(resp) {
|
311
|
|
- this.$systemUtils.download(resp)
|
|
321
|
+ this.$systemUtils.download2(resp)
|
312
|
322
|
}
|
313
|
323
|
})
|
314
|
324
|
}
|
|
@@ -384,25 +394,25 @@ export default {
|
384
|
394
|
[{label: '←', code: 'LEFT'}, {label: 'center', code: 'GOTO_PRESET'}, {label: '→', code: 'RIGHT'}],
|
385
|
395
|
[{label: '↙', code: 'LEFT_DOWN'}, {label: '↓', code: 'DOWN'}, {label: '↘', code: 'RIGHT_DOWN'}]]">
|
386
|
396
|
<el-row class="row">
|
387
|
|
- <el-button v-if="item.code !== 'GOTO_PRESET'" v-for="item in list" :key="item.code" class="small-btn" @click="doControl1(item.code)">{{item.label}}</el-button>
|
388
|
|
- <el-button v-else class="small-btn" icon="el-icon-refresh" @click="doControl(item.code)"></el-button>
|
|
397
|
+ <el-button v-if="item.code !== 'GOTO_PRESET'" v-for="item in list" :key="item.code" class="small-btn" @mousedown="doControl(item.code, 0)" @mouseup="doControl(item.code, 1)">{{item.label}}</el-button>
|
|
398
|
+ <el-button v-else class="small-btn" :class="{ 'is-active': isActive }" icon="el-icon-refresh" @click="circle()"></el-button>
|
389
|
399
|
</el-row>
|
390
|
400
|
</template>
|
391
|
401
|
</el-row>
|
392
|
402
|
<el-row class="row">
|
393
|
403
|
<el-col :span="12">
|
394
|
|
- <el-button type="primary" class="btn" icon="el-icon-plus" @click="doControl1('FOCUS_NEAR')">聚焦</el-button>
|
|
404
|
+ <el-button type="primary" class="btn" icon="el-icon-plus" @mousedown="doControl('FOCUS_NEAR', 0)" @mouseup="doControl('FOCUS_NEAR', 1)">聚焦</el-button>
|
395
|
405
|
</el-col>
|
396
|
406
|
<el-col :span="12">
|
397
|
|
- <el-button type="primary" class="btn" icon="el-icon-remove" @click="doControl1('FOCUS_FAR')">聚焦</el-button>
|
|
407
|
+ <el-button type="primary" class="btn" icon="el-icon-remove" @mousedown="doControl('FOCUS_FAR', 0)" @mouseup="doControl('FOCUS_FAR', 1)">聚焦</el-button>
|
398
|
408
|
</el-col>
|
399
|
409
|
</el-row>
|
400
|
410
|
<el-row class="row">
|
401
|
411
|
<el-col :span="12">
|
402
|
|
- <el-button type="primary" class="btn" icon="el-icon-plus" @click="doControl1('ZOOM_IN')">调焦</el-button>
|
|
412
|
+ <el-button type="primary" class="btn" icon="el-icon-plus" @mousedown="doControl('ZOOM_IN', 0)" @mouseup="doControl('ZOOM_IN', 1)">调焦</el-button>
|
403
|
413
|
</el-col>
|
404
|
414
|
<el-col :span="12">
|
405
|
|
- <el-button type="primary" class="btn" icon="el-icon-remove" @click="doControl1('ZOOM_OUT')">调焦</el-button>
|
|
415
|
+ <el-button type="primary" class="btn" icon="el-icon-remove" @mousedown="doControl('ZOOM_OUT', 0)" @mouseup="doControl('ZOOM_OUT', 1)">调焦</el-button>
|
406
|
416
|
</el-col>
|
407
|
417
|
</el-row>
|
408
|
418
|
<!-- <el-row class="row">-->
|
|
@@ -473,4 +483,9 @@ export default {
|
473
|
483
|
width: calc(50vw - 8px);
|
474
|
484
|
}
|
475
|
485
|
}
|
|
486
|
+
|
|
487
|
+.el-button.is-active {
|
|
488
|
+ background-color: #409EFF;
|
|
489
|
+ color: white;
|
|
490
|
+}
|
476
|
491
|
</style>
|