diff --git a/public/playerVideo6/jessibuca.js b/public/playerVideo6/jessibuca.js index 1450494..601f208 100644 --- a/public/playerVideo6/jessibuca.js +++ b/public/playerVideo6/jessibuca.js @@ -37,8 +37,8 @@ hasControl: !1, loadingText: '', background: '', - decoder: `${window.localStorage.getItem('deployPath')}/playerVideo6/decoder.js`, // 线上使用 - // decoder: `/playerVideo6/decoder.js`, // 本地使用 + // decoder: `${window.localStorage.getItem('deployPath')}/playerVideo6/decoder.js`, // 线上使用 + decoder: `/playerVideo6/decoder.js`, // 本地使用 // decoder: import.meta.env.MODE === 'development' ? `/playerVideo6/decoder.js` : `${window.localStorage.getItem('deployPath')}/playerVideo6/decoder.js`, url: '', rotate: 0, diff --git a/public/playerVideo6/jessibuca.js b/public/playerVideo6/jessibuca.js index 1450494..601f208 100644 --- a/public/playerVideo6/jessibuca.js +++ b/public/playerVideo6/jessibuca.js @@ -37,8 +37,8 @@ hasControl: !1, loadingText: '', background: '', - decoder: `${window.localStorage.getItem('deployPath')}/playerVideo6/decoder.js`, // 线上使用 - // decoder: `/playerVideo6/decoder.js`, // 本地使用 + // decoder: `${window.localStorage.getItem('deployPath')}/playerVideo6/decoder.js`, // 线上使用 + decoder: `/playerVideo6/decoder.js`, // 本地使用 // decoder: import.meta.env.MODE === 'development' ? `/playerVideo6/decoder.js` : `${window.localStorage.getItem('deployPath')}/playerVideo6/decoder.js`, url: '', rotate: 0, diff --git a/src/components.d.ts b/src/components.d.ts index a1c59be..0ebd6ef 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -20,7 +20,6 @@ AuthAll: typeof import('./components/AuthAll/index.vue')['default'] BarChartHorizontal: typeof import('./components/Echart/BarChartHorizontal.vue')['default'] BarChartVertical: typeof import('./components/Echart/BarChartVertical.vue')['default'] - BarChartVerticalDynamics: typeof import('./components/Echart/BarChartVerticalDynamics.vue')['default'] BarCodeBind: typeof import('./components/BarCodeBind/index.vue')['default'] BatchActionBar: typeof import('./components/BatchActionBar/index.vue')['default'] BenchCol: typeof import('./components/benchCol/index.vue')['default'] @@ -44,7 +43,6 @@ ImagesUpload: typeof import('./components/ImagesUpload/index.vue')['default'] ImageUpload: typeof import('./components/ImageUpload/index.vue')['default'] LineChart: typeof import('./components/Echart/LineChart.vue')['default'] - LineChartDynamics: typeof import('./components/Echart/LineChartDynamics.vue')['default'] MeasureRecords: typeof import('./components/Sample/measureRecords.vue')['default'] NodeWrap: typeof import('./components/workFlow/nodeWrap.vue')['default'] NodeWrapBan: typeof import('./components/workFlow/nodeWrapBan.vue')['default'] @@ -55,7 +53,6 @@ PieChart: typeof import('./components/Echart/PieChart.vue')['default'] PromoterDrawer: typeof import('./components/drawer/promoterDrawer.vue')['default'] QrDialog: typeof import('./components/QrDialog/index.vue')['default'] - RadarChart: typeof import('./components/Echart/radarChart.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] ScanSampleDialog: typeof import('./components/ScanSampleDialog/index.vue')['default'] diff --git a/public/playerVideo6/jessibuca.js b/public/playerVideo6/jessibuca.js index 1450494..601f208 100644 --- a/public/playerVideo6/jessibuca.js +++ b/public/playerVideo6/jessibuca.js @@ -37,8 +37,8 @@ hasControl: !1, loadingText: '', background: '', - decoder: `${window.localStorage.getItem('deployPath')}/playerVideo6/decoder.js`, // 线上使用 - // decoder: `/playerVideo6/decoder.js`, // 本地使用 + // decoder: `${window.localStorage.getItem('deployPath')}/playerVideo6/decoder.js`, // 线上使用 + decoder: `/playerVideo6/decoder.js`, // 本地使用 // decoder: import.meta.env.MODE === 'development' ? `/playerVideo6/decoder.js` : `${window.localStorage.getItem('deployPath')}/playerVideo6/decoder.js`, url: '', rotate: 0, diff --git a/src/components.d.ts b/src/components.d.ts index a1c59be..0ebd6ef 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -20,7 +20,6 @@ AuthAll: typeof import('./components/AuthAll/index.vue')['default'] BarChartHorizontal: typeof import('./components/Echart/BarChartHorizontal.vue')['default'] BarChartVertical: typeof import('./components/Echart/BarChartVertical.vue')['default'] - BarChartVerticalDynamics: typeof import('./components/Echart/BarChartVerticalDynamics.vue')['default'] BarCodeBind: typeof import('./components/BarCodeBind/index.vue')['default'] BatchActionBar: typeof import('./components/BatchActionBar/index.vue')['default'] BenchCol: typeof import('./components/benchCol/index.vue')['default'] @@ -44,7 +43,6 @@ ImagesUpload: typeof import('./components/ImagesUpload/index.vue')['default'] ImageUpload: typeof import('./components/ImageUpload/index.vue')['default'] LineChart: typeof import('./components/Echart/LineChart.vue')['default'] - LineChartDynamics: typeof import('./components/Echart/LineChartDynamics.vue')['default'] MeasureRecords: typeof import('./components/Sample/measureRecords.vue')['default'] NodeWrap: typeof import('./components/workFlow/nodeWrap.vue')['default'] NodeWrapBan: typeof import('./components/workFlow/nodeWrapBan.vue')['default'] @@ -55,7 +53,6 @@ PieChart: typeof import('./components/Echart/PieChart.vue')['default'] PromoterDrawer: typeof import('./components/drawer/promoterDrawer.vue')['default'] QrDialog: typeof import('./components/QrDialog/index.vue')['default'] - RadarChart: typeof import('./components/Echart/radarChart.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] ScanSampleDialog: typeof import('./components/ScanSampleDialog/index.vue')['default'] diff --git a/src/views/monitor/realTime/index-new-gm-plugin.vue b/src/views/monitor/realTime/index-new-gm-plugin.vue index 760f95c..8806711 100644 --- a/src/views/monitor/realTime/index-new-gm-plugin.vue +++ b/src/views/monitor/realTime/index-new-gm-plugin.vue @@ -149,16 +149,16 @@ } } -function handleNodeClick(data: any, node: any, self: any) { +function handleNodeClick(data: any, node: any, self: any, isDrag = false) { console.log('获取设备信息', data) if (data.device.deviceStatusName === '离线') { ElMessage.warning(`设备 ${data.device.monitorName} 离线`) - return false + // return false } const now = new Date().getTime() - if (now - treeClickCount < 300) { // 双击事件的判断,300毫秒内重复点击 - if (data.children.length !== 0) { // 点击父亲 + if (now - treeClickCount < 300 || isDrag) { // 双击事件的判断,300毫秒内重复点击 + if (data && data.children && data.children?.length !== 0) { // 点击父亲 return } // 不播放重复的视频 @@ -207,7 +207,6 @@ points.value = [] drawPoints.value = [] } - // 获取视频流接口 fetchStream(data.device.cameraIndexCode).then(async (res: any) => { leafLoading.value = false @@ -244,7 +243,9 @@ } }) } - treeClickCount = now + if (!isDrag) { + treeClickCount = now + } } const testurl = { @@ -256,25 +257,25 @@ // 创建流 async function fetchStream(deviceId: string) { loading.value = true - // const res = await setTimeout(() => { - // ElMessage.warning('获取视频数据中...') - // }, 3000) - // loading.value = false - // return { - // url: testurl[`${currentIndex}`], - // createStreamResponseId: currentIndex, - // } - const res = await createStream(deviceId) + const res = await setTimeout(() => { + ElMessage.warning('获取视频数据中...') + }, 3000) loading.value = false - if (res && res.data) { - return { - url: res.data.url, - createStreamResponseId: res.data.id, - } + return { + url: testurl[`${currentIndex}`], + createStreamResponseId: currentIndex, } - else { - // ElMessage.warning('创建流失败!') - } + // const res = await createStream(deviceId) + // loading.value = false + // if (res && res.data) { + // return { + // url: res.data.url, + // createStreamResponseId: res.data.id, + // } + // } + // else { + // // ElMessage.warning('创建流失败!') + // } } // 停止流 @@ -376,7 +377,30 @@ return data // 返回修改后的原始数据 } +// ----------------------------------------------拖拽-------------------------------------------------- +// 处理拖拽开始事件 +const handleDragStart = (event: DragEvent, data: any) => { + if (data.children.length === 0) { // 仅允许拖拽叶子节点 + event.dataTransfer?.setData('text/plain', JSON.stringify(data.device)) // 存储设备数据 + } +} +// 处理拖拽经过事件 +const handleDragOver = (event: DragEvent) => { + event.preventDefault() // 允许在此区域放置 +} +// 处理拖拽结束事件 +const handleDrop = (event: DragEvent) => { + event.preventDefault() + const deviceData = JSON.parse(event.dataTransfer?.getData('text/plain') as string) + if (deviceData) { + handleNodeClick({ device: { ...deviceData } }, null, null, true) + } + else { + ElMessage.warning('请拖拽摄像头') + } +} +// ---------------------------------------------------------------------------------------------------- onMounted(() => { videoTree().then((response) => { if (response.code === 200) { @@ -415,7 +439,11 @@ @node-click="handleNodeClick" >