+
+
+
+
+
@@ -132,6 +137,11 @@ const downloadChrome = async () => {
await other.downBlobFile(other.adaptationUrl("/admin/sys-file/local/file/109.0.5414.120_chrome_installer_x64.exe"), {}, 'ChromeStandaloneSetup64.exe');
}
+// 下载大华播放插件
+const downloadDhPlugin = async () => {
+ await other.downBlobFile(other.adaptationUrl("/admin/sys-file/local/file/DHPlayerSetup.exe"), {}, 'DHPlayerSetup.exe');
+}
+
// 全屏点击时
const onScreenfullClick = () => {
if (!screenfull.isEnabled) {
diff --git a/src/views/area/_components/bindCameraTable.vue b/src/views/area/_components/bindCameraTable.vue
index d87b5f3..ea2e68f 100644
--- a/src/views/area/_components/bindCameraTable.vue
+++ b/src/views/area/_components/bindCameraTable.vue
@@ -48,9 +48,6 @@
-
- 预览
编辑
-
@@ -82,11 +78,9 @@ import * as AreaHouseApi from '/@/api/area/areaHouse'
// 引入组件
const BindCameraFormDialog = defineAsyncComponent(() => import('./bindCameraForm.vue'));
-const PreviewVideoDialog = defineAsyncComponent(() => import('../../device/components/preview-video/index.vue'));
// 定义变量内容
const formDialogRef = ref()
-const previewVideoDialogRef = ref()
const dataFormRef = ref();
const visible = ref(false)
diff --git a/src/views/device/components/preview-video/index.vue b/src/views/device/components/preview-video/index.vue
deleted file mode 100644
index 606fb7c..0000000
--- a/src/views/device/components/preview-video/index.vue
+++ /dev/null
@@ -1,271 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/src/views/device/components/preview-video/preview-video-dialog.vue b/src/views/device/components/preview-video/preview-video-dialog.vue
index d8675a4..a930c15 100644
--- a/src/views/device/components/preview-video/preview-video-dialog.vue
+++ b/src/views/device/components/preview-video/preview-video-dialog.vue
@@ -1,5 +1,6 @@
-
+
@@ -32,8 +33,6 @@ import { useMessage } from "/@/hooks/message";
import * as DeviceManageApi from "/@/api/device/deviceManage"
import * as DeviceChannelApi from "/@/api/device/deviceChannel"
-const PreviewVideo = defineAsyncComponent(() => import('./index.vue'));
-
const previewVideoRef = ref()
const state = reactive({
@@ -53,7 +52,6 @@ const channel = reactive({
const handleClose = () => {
state.dialogVisible = false
- previewVideoRef.value.destroy()
}
// 打开弹窗
@@ -68,10 +66,31 @@ const openDialog = async (id: string) => {
// 点击树
const handleNodeClick = (e: any) => {
if (e.id == -1) {
- previewVideoRef.value.init([], detail.deviceCode)
+ // 获取所有的channelCodeList
+ const channelList: any[] = []
+ for (let i = 0; i < channel.list.length; i++) {
+ const v: any = channel.list[i]
+ channelList.push({
+ channelId: v.channelCode,
+ channelName: v.channelName,
+ snum: i,
+ // 默认辅码流
+ streamType: 2
+ })
+ }
+ previewVideoRef.value?.startReal(channelList)
return
}
- previewVideoRef.value.init([e.channelCode], detail.deviceCode)
+ const targetChannel = channel.list.find((v: any) => v.channelCode == e.channelCode)
+ previewVideoRef.value?.startReal([
+ {
+ channelId: targetChannel.channelCode,
+ channelName: targetChannel.channelName,
+ snum: 0,
+ // 默认辅码流
+ streamType: 2
+ }
+ ])
}
// 初始化表单数据
@@ -115,8 +134,19 @@ const getDeviceChannelList = async () => {
}
]
}
- // 播放视频
- previewVideoRef.value.init([], detail.deviceCode)
+ // 获取所有的channelCodeList
+ const channelList: any[] = []
+ for (let i = 0; i < channel.list.length; i++) {
+ const v: any = channel.list[i]
+ channelList.push({
+ channelId: v.channelCode,
+ channelName: v.channelName,
+ snum: i,
+ // 默认辅码流
+ streamType: 2
+ })
+ }
+ previewVideoRef.value?.startReal(channelList)
} catch (error: any) {
console.error("|查询通道树|,意外的错误", error);
useMessage().error(error?.msg ?? "意外的错误");
@@ -148,4 +178,4 @@ defineExpose({
justify-content: space-between;
align-content: center;
}
-
\ No newline at end of file
+
diff --git a/src/views/device/components/replay-video/index.vue b/src/views/device/components/replay-video/index.vue
deleted file mode 100644
index a3da697..0000000
--- a/src/views/device/components/replay-video/index.vue
+++ /dev/null
@@ -1,247 +0,0 @@
-
-
-
-
-
diff --git a/src/views/device/components/replay-video/replay-video-dialog.vue b/src/views/device/components/replay-video/replay-video-dialog.vue
index fa8abbe..42e3d66 100644
--- a/src/views/device/components/replay-video/replay-video-dialog.vue
+++ b/src/views/device/components/replay-video/replay-video-dialog.vue
@@ -1,5 +1,5 @@
-
+
@@ -49,13 +52,12 @@
\ No newline at end of file
+
diff --git a/src/views/device/deviceGroupPlay/index.vue b/src/views/device/deviceGroupPlay/index.vue
index c955aee..2fb5055 100644
--- a/src/views/device/deviceGroupPlay/index.vue
+++ b/src/views/device/deviceGroupPlay/index.vue
@@ -10,12 +10,11 @@
-
-
+
+
+ @keyup.enter="init('REPLAY')">
-
+
{{ $t('common.queryBtn') }}
@@ -41,8 +40,7 @@
-
+
@@ -56,11 +54,7 @@
import { useMessage } from "/@/hooks/message";
import { useDict } from '/@/hooks/dict';
-import * as DeviceChannelApi from "/@/api/device/deviceChannel"
-
-// 引入组件
-const PreviewVideo = defineAsyncComponent(() => import("../components/preview-video/index.vue"));
-const ReplayVideo = defineAsyncComponent(() => import("../components/replay-video/index.vue"));
+import * as deviceChannelApi from "/@/api/device/deviceChannel"
const previewVideoRef = ref()
const replayVideoRef = ref()
@@ -80,7 +74,7 @@ const data = {
},
{
label: "回放",
- name: "DOOR",
+ name: "REPLAY",
}
]
}
@@ -127,12 +121,55 @@ function init(type: string) {
nextTick(async () => {
videoLoading.value = true
await new Promise(resolve => setTimeout(resolve, 500))
+ // 查询通道列表
+ let channelRecords = []
+ try {
+ const _params = {
+ current: 1,
+ size: 64,
+ deviceTreeMap: state.deviceTreeMap ?? null
+ }
+ let { code, data } = await deviceChannelApi.getChannelPage(_params);
+ if (code != 0) throw new Error("")
+ if (data.records && data.records.length) {
+ channelRecords = data.records
+ }
+ } catch (error) {
+ console.log("分组播放意外的错误error:", error);
+ }
switch (type) {
case 'PREVIEW':
- previewVideoRef.value.init(state.channelCodeList, null, state.deviceTreeMap)
+ const doorChannelList: any[] = []
+ for (let i = 0; i < channelRecords.length; i++) {
+ const v: any = channelRecords[i]
+ doorChannelList.push({
+ channelId: v.channelCode,
+ channelName: v.channelName,
+ snum: i,
+ // 默认辅码流
+ streamType: 2
+ })
+ }
+ previewVideoRef.value?.startReal([...doorChannelList])
break;
- case 'DOOR':
- await getDataList()
+ case 'REPLAY':
+ const replayChannelList: any[] = []
+ for (let i = 0; i < channelRecords.length; i++) {
+ const v: any = channelRecords[i]
+ replayChannelList.push({
+ channelId: v.channelCode,
+ channelName: v.channelName,
+ snum: i,
+ // 默认辅码流
+ streamType: Number(state.replayForm.streamType),
+ // 默认前3天(格式YYYY-MM-DD HH:mm:ss)
+ startTime: state.replayForm.videoDateList[0],
+ endTime: state.replayForm.videoDateList[1],
+ // 录像来源:2-设备录像 3-中心录像
+ recordSource: Number(state.replayForm.recordSource)
+ })
+ }
+ replayVideoRef.value?.startPlayback([...replayChannelList])
break;
}
videoLoading.value = false
@@ -151,22 +188,6 @@ async function destroy() {
}
}
-// 获取回放列表
-const getDataList = async () => {
- try {
- const { data } = await DeviceChannelApi.getReplayList({
- ...state.replayForm,
- deviceChannelCodeList: state.channelCodeList
- })
- state.dataList = data ?? []
- if (replayVideoRef.value) {
- replayVideoRef.value.init(state.dataList, state.replayForm)
- }
- } catch (error: any) {
- console.error("获取回放列表错误", error);
- }
-}
-
// 清空搜索条件
const resetQuery = () => {
// 清空搜索条件
@@ -177,7 +198,6 @@ const resetQuery = () => {
state.replayForm.streamType = "1"
// 重置录像来源为默认值
state.replayForm.recordSource = "1"
- getDataList()
}
/* ************************************* start 回放时间处理 start ************************************* */
diff --git a/src/views/device/deviceManage/index.vue b/src/views/device/deviceManage/index.vue
index 86144da..cbfb6fe 100644
--- a/src/views/device/deviceManage/index.vue
+++ b/src/views/device/deviceManage/index.vue
@@ -104,7 +104,6 @@ const storesPanel = usePanel()
// 引入组件
const FormDialog = defineAsyncComponent(() => import('../components/deviceForm.vue'));
-const PreviewVideo = defineAsyncComponent(() => import("../components/preview-video/index.vue"));
// 定义查询字典
const { device_category, is_sync, is_nline, dh_device_manufacturer } = useDict("device_category", "is_sync", "is_nline", "dh_device_manufacturer")
// 定义变量内容
diff --git a/src/views/duty/dutyPlan/components/video-pay.vue b/src/views/duty/dutyPlan/components/video-pay.vue
index e0e2c1e..808d3cb 100644
--- a/src/views/duty/dutyPlan/components/video-pay.vue
+++ b/src/views/duty/dutyPlan/components/video-pay.vue
@@ -5,7 +5,7 @@
-
+
@@ -13,7 +13,6 @@
import * as deviceChannelApi from "/@/api/device/deviceChannel"
const comTitle = defineAsyncComponent(() => import('./com-title.vue'));
-const PreviewVideo = defineAsyncComponent(() => import("../../../device/components/preview-video/index.vue"));
const refreshForm = reactive
({
dutyId: null,
@@ -22,20 +21,42 @@ const refreshForm = reactive({
deviceChannelCodeList: []
})
-const previewVideoRef = ref(null)
+const rtspPluginVideoRef = ref(null)
const refreshVideo = async () => {
- previewVideoRef.value.init(null, null, refreshForm.deviceTreeMap)
+ // 查询通道列表
+ try {
+ const _params = {
+ current: 1,
+ size: 64,
+ deviceTreeMap: refreshForm.deviceTreeMap ?? null
+ }
+ let { code, data } = await deviceChannelApi.getChannelPage(_params);
+ if (code != 0) throw new Error("")
+ if (data.records && data.records.length) {
+ const channelList = []
+ for (let index = 0; index < data.records.length; index++) {
+ const element = data.records[index];
+ channelList.push({
+ channelId: element.channelCode,
+ channelName: element.channelName,
+ snum: index,
+ // 默认辅码流
+ streamType: 2
+ })
+ }
+ rtspPluginVideoRef.value?.startReal(channelList)
+ }
+ } catch (error) {
+ console.log("分组播放意外的错误error:", error);
+ }
}
const groupChange = (e: any) => {
if (!e) return
const [groupIds, channelCodes, parentChildGroup] = e
if (!groupIds.length && !channelCodes.length) {
- if (previewVideoRef.value) {
- previewVideoRef.value?.close()
- }
return
}
refreshForm.groupIdList = groupIds