diff --git a/src/views/projectFront/videoManage/ysyNew.vue b/src/views/projectFront/videoManage/ysyNew.vue index cfb04642..237e2adc 100644 --- a/src/views/projectFront/videoManage/ysyNew.vue +++ b/src/views/projectFront/videoManage/ysyNew.vue @@ -90,7 +90,8 @@ export default { devList: [], demoList: [], indextest: 0, - btnIndex: 0 + btnIndex: 0, + devs:[] } }, created() { }, @@ -110,10 +111,13 @@ export default { this.selectVideoFirst = index + 1 } else { var index = this.devList.findIndex((item) => item.url == a[0].url) - let devs = [] - devs.push(this.devList[index]) - console.log('块的点击事件1:', devs) - this.ysyBtn(devs, this.indextest, this.select) + this.devsob = [] + let ob = JSON.parse(JSON.stringify(this.devList[index])); + this.devsob.push(ob) + // this.devList.push(this.devList[index]) + console.log('块的点击事件1:', this.devList) + this.ysyBtn(this.devsob, this.indextest, this.select) + this.devs.push(this.devsob[0]) } // this.select = 1 @@ -128,7 +132,7 @@ export default { }, select: function (value, b) { this.indextest = 0 - console.log('选择显示video数量 :', this.devList) + console.log('选择显示video数量 :', this.devs) this.select = value this.selectVideoFirst = 1 this.devList.forEach((item, index) => { @@ -151,6 +155,27 @@ export default { ) } }) + + this.devs.forEach((item, index) => { + console.log('item数据', item); + // item.player.stop() + if (value == 1) { + item.player.reSize( + this.$refs.videoBox.offsetWidth, + this.$refs.videoBox.offsetHeight + ) + } else if (value == 2) { + item.player.reSize( + this.$refs.videoBox.offsetWidth / 2, + this.$refs.videoBox.offsetHeight / 2 + ) + } else if (value == 3) { + item.player.reSize( + this.$refs.videoBox.offsetWidth / 3, + this.$refs.videoBox.offsetHeight / 3 + ) + } + }) } // 选择显示video数量 }, @@ -196,6 +221,7 @@ export default { }) item2.player = player }) + console.log('item 完:', item ) } } }