diff --git a/packages/IntelligentSecurity/AppISManage/AppISManage.vue b/packages/IntelligentSecurity/AppISManage/AppISManage.vue index fc9da6f4..b4ed4241 100644 --- a/packages/IntelligentSecurity/AppISManage/AppISManage.vue +++ b/packages/IntelligentSecurity/AppISManage/AppISManage.vue @@ -24,7 +24,7 @@ - + @@ -61,7 +61,7 @@ splitOps() { return [ {label: "单分屏", value: 1, per: "100%"}, - {label: "四分屏", value: 4, per: "49%"}, + {label: "四分屏", value: 4, per: "49.2%"}, {label: "九分屏", value: 9, per: "32%"} ] }, @@ -93,6 +93,16 @@ } }, + watch: { + slider () { + this.$refs.AiMonitor && this.$refs.AiMonitor.forEach(e => { + e.reset() + }) + + this.$refs.Synergy && this.$refs.Synergy.init() + } + }, + created() { this.selected.areaId = this.user.info.areaId this.disabledLevel = this.user.info.areaList.length - 1 @@ -122,7 +132,7 @@ this.monitors = [this.monitors[0]] } - this.$refs.AiMonitor.forEach(e => { + this.$refs.AiMonitor && this.$refs.AiMonitor.forEach(e => { e.reset() }) }, diff --git a/packages/IntelligentSecurity/components/AiSlwVideo.vue b/packages/IntelligentSecurity/components/AiSlwVideo.vue index f7f5ea6d..05ab2ae2 100644 --- a/packages/IntelligentSecurity/components/AiSlwVideo.vue +++ b/packages/IntelligentSecurity/components/AiSlwVideo.vue @@ -71,7 +71,7 @@ @@ -135,19 +135,30 @@ this.form.date = this.$moment(new Date()).format('YYYY-MM-DD') this.$nextTick(() => { this.width = document.querySelector(`#${this.videoId}`).offsetWidth + 'px' + + document.addEventListener('fullscreenchange', this.fullScreenChange) }) }, methods: { + destroyed () { + document.removeEventListener('fullscreenchange', this.fullScreenChange) + }, + fullScreenChange () { + if (document.fullscreenElement) { + } else { + this.reset() + } + }, exitFullscreen () { if (document.exitFullscreen) { document.exitFullscreen() - } else if (document.msExitFullscreen) { - document.msExitFullscreen() } else if (document.mozCancelFullScreen) { document.mozCancelFullScreen() } else if (document.webkitExitFullscreen) { document.webkitExitFullscreen() + } else if (document.msExitFullscreen) { + window.top.document.msExitFullscreen() } }, @@ -208,15 +219,16 @@ this.$emit('close') }, - requestFullScreen (element) { - var requestMethod = element.requestFullScreen || element.webkitRequestFullScreen || element.mozRequestFullScreen || element.msRequestFullScreen; - if (requestMethod) { - requestMethod.call(element); - } else if (typeof window.ActiveXObject !== 'undefined') { - var wscript = new ActiveXObject('WScript.Shell') - if (wscript !== null) { - wscript.SendKeys('{F11}') - } + requestFullScreen (elem) { + if (elem.requestFullscreen) { + elem.requestFullscreen() + } else if (elem.mozRequestFullScreen) { + elem.mozRequestFullScreen() + } else if (elem.webkitRequestFullscreen) { + elem.webkitRequestFullscreen() + } else if (elem.msRequestFullscreen) { + elem = window.top.document.body + elem.msRequestFullscreen() } } } @@ -388,7 +400,7 @@ .volume-slider { display: none; position: absolute; - bottom: 20px; + bottom: 15px; left: 50%; z-index: -1; opacity: 0; diff --git a/packages/IntelligentSecurity/components/Synergy.vue b/packages/IntelligentSecurity/components/Synergy.vue index 6ea4fa7f..3ce9f38c 100644 --- a/packages/IntelligentSecurity/components/Synergy.vue +++ b/packages/IntelligentSecurity/components/Synergy.vue @@ -48,6 +48,18 @@ +
+
+ +
+
+
+ + 通道{{ index }} +
+
+
+
@@ -90,6 +102,8 @@ form: { date: '' }, + isShowTimeline: false, + checkList: [], isInit: false, left: 0, date: '', @@ -99,7 +113,8 @@ x: 0, time: '', videoId: `synergr-${new Date().getTime()}`, - isFullscreen: false + isFullscreen: false, + timer: null } }, @@ -278,10 +293,7 @@ reset () { setTimeout(() => { - this.width = document.querySelector(`#${this.videoId}`).offsetWidth + 'px' - this.$nextTick(() => { - this.$refs.timeline.init() - }) + this.init() }, 60) } } @@ -294,9 +306,68 @@ width: 100%; height: 100%; font-size: 0; - overflow: hidden; background: rgba(40, 43, 58, 1); + .playback { + position: absolute; + top: 0; + left: 50%; + z-index: 1; + width: 100%; + padding-top: 6px; + text-align: center; + transform: translate(-50%, -100%); + background: #202330; + + .synergr-more { + width: 80px; + height: 16px; + margin: 0 auto; + cursor: pointer; + background: url(https://cdn.cunwuyun.cn/slw2.0/images/more.png); + color: #fff; + + img { + position: relative; + transition: all ease 0.5s; + transform: rotate(180deg); + } + + &.active img { + transform: rotate(0); + } + } + + .playback-list { + padding: 8px 16px; + background: rgba(22, 24, 33, 1); + font-size: 12px; + color: #FFFFFF; + + .playback-item { + display: flex; + align-items: center; + width: 100%; + margin-bottom: 4px; + + &:last-child { + margin-bottom: 0; + } + + .playback-item__timeline { + flex: 1; + height: 8px; + border-radius: 6px; + background: linear-gradient(180deg, #00CBFF 0%, #009CFF 100%); + } + + span { + padding: 0 8px 0 0; + } + } + } + } + .time-scale { display: flex; position: absolute; diff --git a/packages/IntelligentSecurity/components/Timeline.vue b/packages/IntelligentSecurity/components/Timeline.vue index d289d82b..da3cd898 100644 --- a/packages/IntelligentSecurity/components/Timeline.vue +++ b/packages/IntelligentSecurity/components/Timeline.vue @@ -57,6 +57,7 @@ }, methods: { + onMousemove (e) { const canvasInfo = document.querySelector(`#${this.id}`).getBoundingClientRect() const seconds = 24 * 60 * 60 @@ -90,8 +91,8 @@ secTotime (s) { var t = '' if(s > -1){ - var hour = Math.floor(s / 3600) - var min = Math.floor(s / 60) % 60 + var hour = Math.ceil(s / 3600) + var min = Math.ceil(s / 60) % 60 var sec = s % 60 if(hour < 10) { t = '0'+ hour + ":"