diff --git a/src/api/scenic.js b/src/api/scenic.js index e322ecf..185067a 100644 --- a/src/api/scenic.js +++ b/src/api/scenic.js @@ -8,3 +8,12 @@ export function getGpsListApi(data) { params: data }) } + +// GPS状态列表 +export function getGpsStatusListApi(data) { + return request({ + url: '/fjtcc-api/api/largeScreen/spot/gpsStatusList', + method: 'get', + params: data + }) +} diff --git a/src/assets/images/all.png b/src/assets/images/all.png new file mode 100644 index 0000000..63ef004 Binary files /dev/null and b/src/assets/images/all.png differ diff --git a/src/auto-import.d.ts b/src/auto-import.d.ts index acb7264..2203fc1 100644 --- a/src/auto-import.d.ts +++ b/src/auto-import.d.ts @@ -7,6 +7,7 @@ export {} declare global { const EffectScope: typeof import('vue')['EffectScope'] + const ElMessage: typeof import('element-plus/es')['ElMessage'] const computed: typeof import('vue')['computed'] const createApp: typeof import('vue')['createApp'] const customRef: typeof import('vue')['customRef'] diff --git a/src/components/CoreVideo/allList.vue b/src/components/CoreVideo/allList.vue new file mode 100644 index 0000000..6658696 --- /dev/null +++ b/src/components/CoreVideo/allList.vue @@ -0,0 +1,220 @@ + + + + + diff --git a/src/components/CoreVideo/index.vue b/src/components/CoreVideo/index.vue index f4e8dee..05fb309 100644 --- a/src/components/CoreVideo/index.vue +++ b/src/components/CoreVideo/index.vue @@ -1,20 +1,20 @@ @@ -99,6 +124,7 @@ background-color: transparent !important; } .core-video { + position: relative; margin: vw(8); width: vw(300); border-radius: vw(2); @@ -114,6 +140,17 @@ font-weight: 800; color: #fff; } + .btn-all { + cursor: pointer; + position: absolute; + right: vw(0); + top: vw(0); + z-index: 999; + width: vw(60); + height: vw(24); + background-image: url('@/assets/images/all.png'); + background-size: 100% 100%; + } .list { overflow-y: auto; @@ -147,10 +184,12 @@ padding: vw(10); background-size: 100% 100%; &-unfollow { + cursor: pointer; display: none; position: absolute; - right: vw(8); - top: vw(8); + right: vw(4); + top: vw(4); + z-index: 99; width: vw(64); height: vh(24); text-align: center; diff --git a/src/components/VideoDialog/index.vue b/src/components/VideoDialog/index.vue index d616fec..64a41d4 100644 --- a/src/components/VideoDialog/index.vue +++ b/src/components/VideoDialog/index.vue @@ -12,14 +12,8 @@ -
-
聚焦 @@ -50,16 +44,16 @@ import { ElMessage } from 'element-plus' import { postVideoControlApi } from '@/api/monitor' - import { mode, baseUrl, proBaseUrl } from '@/utils/config' const Z00M_IN = 'ZOOM_IN' // 焦距变大 const Z00M_OUT = 'ZOOM_OUT' // 焦距变小 - const ACTION = '0' const UP = 'UP' // 上转 const DOWN = 'DOWN' // 下转 const LEFT = 'LEFT' // 左转 const RIGHT = 'RIGHT' // 右转 const STOP = 'STOP' // 停止操作 + let ACTION = '0' + let command = ref('') const props = defineProps({ src: { @@ -96,26 +90,27 @@ ACTION = '1' } else { ACTION = '0' + command.value = e } await postVideoControlApi({ - command: e, + command: command.value, action: ACTION, cameraIndexCode: props.cameraIndexCode }) + if (e == STOP) { + command.value = '' + } ElMessage({ message: '操作成功', type: 'success' }) } const handleClose = () => { - // webRtcServer.disconnect() hlsRef.destroy() hlsRef = null modelValue.value = false } const init = () => { - // webRtcServer = new WebRtcStreamer('bigVideo', `${mode == 'dev' ? baseUrl : proBaseUrl}/webrtc`) - // webRtcServer.connect(props.src) hlsRef = new Hls({ enableWorker: false, // 禁用 Worker 来避免额外的线程 enableSoftwareAES: true, // 使用软件解码器以避免硬件解码的额外请求 diff --git a/src/views/monitor/components/box-2.vue b/src/views/monitor/components/box-2.vue index f5e9f14..202594c 100644 --- a/src/views/monitor/components/box-2.vue +++ b/src/views/monitor/components/box-2.vue @@ -50,7 +50,7 @@ class="video-item" v-for="(item, index) in videoList" :key="index" - @click="handleItemVideo(item.hlsUrl, 100)" + @click="handleItemVideo(item.hlsUrl, 100, item.cameraIndexCode)" >
- +

{{ item.cameraName || item.cameraIndexCode }} @@ -84,8 +84,9 @@