From 5abbc49b9fa3ead9cd1f60c9a6e3c769cedde952 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9C=E7=8E=89=E7=90=A6?= <7507756+jiang_yuqi@user.noreply.gitee.com> Date: Sun, 24 Mar 2024 01:36:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/video/aiBoxVideo.js | 2 +- src/pages/projectVideo.vue | 156 ++- src/pages/toAIVideoProject.vue | 1740 +++++++++++++++++++------------- vue.config.js | 16 +- 4 files changed, 1099 insertions(+), 815 deletions(-) diff --git a/src/api/video/aiBoxVideo.js b/src/api/video/aiBoxVideo.js index ce640e3..a8f37cc 100644 --- a/src/api/video/aiBoxVideo.js +++ b/src/api/video/aiBoxVideo.js @@ -2,7 +2,7 @@ import request from '@/utils/request' const listView=(deptId,projectId)=> { return request({ - url: `/bgscreen/aiBoxVideo/listView?deptId=${deptId||0}&projectId=${projectId||0}`, + url: `/bgscreen/aiBoxVideo/listView?deptId=${deptId||0}&projectId=${projectId||0}&pageSize=20&pageNum=1`, method: 'get' }) } diff --git a/src/pages/projectVideo.vue b/src/pages/projectVideo.vue index 2b2ba33..63eb1cb 100644 --- a/src/pages/projectVideo.vue +++ b/src/pages/projectVideo.vue @@ -242,7 +242,7 @@ export default { fontSize: "12px", height: "32px", }, - warningInterval: "", + warningInterval: undefined, warningTableData: [], //视频场布图分布点位 @@ -306,20 +306,19 @@ export default { parentVM: { vd01Flag: true, vd02Flag: true, vd03Flag: true, vd04Flag: true }, }; }, - beforeDestroy(){ - console.log("-----beforeDestroy------>") - this.players.forEach(p=>{ - if(p){ - try{ - p.stop(); - }catch(e){ - - } - } - }) + beforeDestroy() { + console.log("-----beforeDestroy------>"); + this.players.forEach((p) => { + if (p) { + try { + p.stop(); + } catch (e) {} + } + }); + clearInterval(this.warningInterval); }, mounted() { - window.xapp=this; + window.xapp = this; this.$bus.$on( "projectChange", debounce((res) => { @@ -959,7 +958,6 @@ export default { onMonitoringVideo(n) { this.mvNav = n; }, - // 表格滚动 方法 --------- 开始 warningScroll() { let maxHeight = this.$refs.warning.$el.querySelectorAll(".el-table__body")[0] @@ -1531,9 +1529,9 @@ export default { }); }, // 表格滚动调用的函数 - beforeDestroy() { - clearInterval(this.warningInterval); - }, + // beforeDestroy() { + + // }, handlePlay(it, idx) { this.videoReturnData = it; this.currentIndex = idx; @@ -1555,77 +1553,75 @@ export default { //查询视频通道 initVideo(videoDvrNumber, url) { let that = this; - that.players.forEach(p=>{ - if(p){ - try{ + that.players.forEach((p) => { + if (p) { + try { p.stop(); - }catch(e){ - - } + } catch (e) {} } - }) - that.players = []; - that.parentVM.vd01Flag=false; - that.parentVM.vd02Flag=false; - that.parentVM.vd03Flag=false; - that.parentVM.vd04Flag=false; + }); + that.players = []; + that.parentVM.vd01Flag = false; + that.parentVM.vd02Flag = false; + that.parentVM.vd03Flag = false; + that.parentVM.vd04Flag = false; this.$api.video.getVideoPassage(videoDvrNumber).then((response) => { let data = response.data; this.videoPassageList = data; that.showVideo = true; - that.parentVM.vd01Flag=true; - that.parentVM.vd02Flag=true; - that.parentVM.vd03Flag=true; - that.parentVM.vd04Flag=true; - setTimeout(()=>{ - data.forEach((it, idx) => { - let player = new WasmPlayer(null, "vd0" + (idx+1), null, { - Height: true, + that.parentVM.vd01Flag = true; + that.parentVM.vd02Flag = true; + that.parentVM.vd03Flag = true; + that.parentVM.vd04Flag = true; + setTimeout(() => { + data.forEach((it, idx) => { + let player = new WasmPlayer(null, "vd0" + (idx + 1), null, { + Height: true, + }); + that.players.push(player); + if (idx == 0) { + //that.url0 = url.replace("{{passage}}", it.passageValue); + that.url0 = + "http://111.21.209.230:7086/live/cameraid/" + + videoDvrNumber + + "$" + + it.passageValue + + "/substream/2.m3u8"; + that.players[0].play(that.url0, 1); + } + if (idx == 1) { + //that.url1 = url.replace("{{passage}}", it.passageValue); + that.url1 = + "http://111.21.209.230:7086/live/cameraid/" + + videoDvrNumber + + "$" + + it.passageValue + + "/substream/2.m3u8"; + that.players[1].play(that.url1, 1); + } + if (idx == 2) { + //that.url2 = url.replace("{{passage}}", it.passageValue); + that.url2 = + "http://111.21.209.230:7086/live/cameraid/" + + videoDvrNumber + + "$" + + it.passageValue + + "/substream/2.m3u8"; + that.players[2].play(that.url2, 1); + } + if (idx == 3) { + //that.url3 = url.replace("{{passage}}", it.passageValue); + that.url3 = + "http://111.21.209.230:7086/live/cameraid/" + + videoDvrNumber + + "$" + + it.passageValue + + "/substream/2.m3u8"; + that.players[3].play(that.url3, 1); + } }); - that.players.push(player); - if (idx == 0) { - //that.url0 = url.replace("{{passage}}", it.passageValue); - that.url0 = - "http://111.21.209.230:7086/live/cameraid/" + - videoDvrNumber + - "$" + - it.passageValue + - "/substream/2.m3u8"; - that.players[0].play(that.url0, 1); - } - if (idx == 1) { - //that.url1 = url.replace("{{passage}}", it.passageValue); - that.url1 = - "http://111.21.209.230:7086/live/cameraid/" + - videoDvrNumber + - "$" + - it.passageValue + - "/substream/2.m3u8"; - that.players[1].play(that.url1, 1); - } - if (idx == 2) { - //that.url2 = url.replace("{{passage}}", it.passageValue); - that.url2 = - "http://111.21.209.230:7086/live/cameraid/" + - videoDvrNumber + - "$" + - it.passageValue + - "/substream/2.m3u8"; - that.players[2].play(that.url2, 1); - } - if (idx == 3) { - //that.url3 = url.replace("{{passage}}", it.passageValue); - that.url3 = - "http://111.21.209.230:7086/live/cameraid/" + - videoDvrNumber + - "$" + - it.passageValue + - "/substream/2.m3u8"; - that.players[3].play(that.url3, 1); - } - }); - },400); + }, 400); }); }, handleOnError0(error) { diff --git a/src/pages/toAIVideoProject.vue b/src/pages/toAIVideoProject.vue index c481cf9..aafb58d 100644 --- a/src/pages/toAIVideoProject.vue +++ b/src/pages/toAIVideoProject.vue @@ -1,789 +1,1077 @@ \ No newline at end of file +.safe-afoot-overflow { + height: 900px !important; +} + diff --git a/vue.config.js b/vue.config.js index c644bef..bbccaad 100644 --- a/vue.config.js +++ b/vue.config.js @@ -8,13 +8,13 @@ module.exports = defineConfig({ port: 3000, open: true, proxy: { - '/jhapi/profile':{ - target: `http://62.234.3.186/jhapi/profile/`, - changeOrigin: true, - pathRewrite: { - '^/jhapi/profile':'/' - } - }, + // '/jhapi/profile':{ + // target: `http://62.234.3.186/jhapi/profile/`, + // changeOrigin: true, + // pathRewrite: { + // '^/jhapi/profile':'/' + // } + // }, '/jhapp':{ target: `http://62.234.3.186/`, changeOrigin: true, @@ -46,7 +46,7 @@ module.exports = defineConfig({ } }, '/profile':{ - target: `http://62.234.3.186/profile/`, + target: `http://szgc.jhncidg.com/jhapi/profile`, changeOrigin: true, pathRewrite: { '^/profile':'/'