|
@@ -190,7 +190,7 @@
|
|
|
},
|
|
|
|
|
|
computed: {
|
|
|
- ...mapState(['splitScreenStatus','bigScale']),
|
|
|
+ ...mapState(['splitScreenStatus', 'bigScale']),
|
|
|
|
|
|
signalPreList: {
|
|
|
get() {
|
|
@@ -198,24 +198,23 @@
|
|
|
},
|
|
|
|
|
|
set(arr) {
|
|
|
- const arr2 = []
|
|
|
- arr.forEach(item => {
|
|
|
- arr2.push(JSON.parse(JSON.stringify(item)))
|
|
|
- })
|
|
|
- arr2.forEach(item => item.Id = guId())
|
|
|
- console.log(arr2)
|
|
|
-
|
|
|
- if(arr2.length>0){
|
|
|
- let index = arr2.length-1
|
|
|
- arr2[index].splitScreenStatus = this.$store.state.splitScreenStatus+1
|
|
|
- arr2[index].width = this.currentBigshow[0].Width*this.$store.state.bigScale/arr2[index].splitScreenStatus
|
|
|
- arr2[index].height = this.currentBigshow[0].Height*this.$store.state.bigScale/arr2[index].splitScreenStatus
|
|
|
- arr2[index].widthScale = arr2[index].width/(this.currentBigshow[0].Width*this.$store.state.bigScale)
|
|
|
- arr2[index].heightScale = arr2[index].height/(this.currentBigshow[0].Height*this.$store.state.bigScale)
|
|
|
- this.$store.dispatch('updateSignalPreList',arr2)
|
|
|
- return
|
|
|
+ if (arr.length > 0){
|
|
|
+ const arr2 = []
|
|
|
+ arr.forEach(item => {
|
|
|
+ arr2.push(JSON.parse(JSON.stringify(item)))
|
|
|
+ })
|
|
|
+ arr2.forEach(item => {
|
|
|
+ item.Id = guId()
|
|
|
+ item.splitScreenStatus = this.$store.state.splitScreenStatus + 1
|
|
|
+ item.width = this.currentBigshow[0].Width * this.$store.state.bigScale / item.splitScreenStatus
|
|
|
+ item.height = this.currentBigshow[0].Height * this.$store.state.bigScale / item.splitScreenStatus
|
|
|
+ item.widthScale = item.width / (this.currentBigshow[0].Width * this.$store.state.bigScale)
|
|
|
+ item.heightScale = item.height / (this.currentBigshow[0].Height * this.$store.state.bigScale)
|
|
|
+ })
|
|
|
+ this.$store.dispatch('updateSignalPreList', arr2)
|
|
|
+ }else {
|
|
|
+ this.$store.dispatch('updateSignalPreList', arr)
|
|
|
}
|
|
|
- this.$store.dispatch('updateSignalPreList',arr2)
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -251,11 +250,9 @@
|
|
|
// 监视分屏的状态
|
|
|
splitScreenStatus: function(num) {
|
|
|
this.$data.divArr = []
|
|
|
-
|
|
|
for (let i=0;i<(num+1)*(num+1);i++){
|
|
|
this.$data.divArr.push(i+1)
|
|
|
}
|
|
|
-
|
|
|
this.reqRefreshBigScreen(this.$data.streamWindows)
|
|
|
}
|
|
|
}
|