|
@@ -12,9 +12,9 @@
|
|
|
zIndex:item.ZIndex,
|
|
|
display:item.IsVisibility ? 'block' : 'none',
|
|
|
fontSize:item.FontSize*bigScale + 'px',
|
|
|
- backgroundImage:item.BackIcon ? 'url('+require(`../../../static/Data/${item.BackIcon}`)+')' : null,
|
|
|
backgroundSize:'100% 100%',
|
|
|
backgroundRepeat:'no-repeat',
|
|
|
+ backgroundImage:item.BackIcon ? 'url('+require(`../../../static/Data/${item.BackIcon}`)+')' : null,
|
|
|
backgroundColor:item.BackIcon ? null : `#${item.BrackgroupStr.slice(3)}`,
|
|
|
color:`#${item.ForegroundStr.slice(3)}`,
|
|
|
textAlign:'center',
|
|
@@ -43,9 +43,10 @@
|
|
|
count3: 0, // 管理控制按钮计数器
|
|
|
count4: 0, // 3个视频按钮计数器
|
|
|
count5: 0, // 安卓分布式按钮
|
|
|
- buttonJson:[],
|
|
|
- labelJson:[],
|
|
|
- slideJson:[]
|
|
|
+ buttonJson: [],
|
|
|
+ labelJson: [],
|
|
|
+ slideJson: [],
|
|
|
+ staticUrl:this.$store.state.staticUrl
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -66,6 +67,12 @@
|
|
|
|
|
|
this.slideJson = await getStaticFile('EnitySlider.Data')
|
|
|
this.funSliderArr = await getStaticFile('EnitySlider.Data')
|
|
|
+
|
|
|
+ // 设置按钮背景图片
|
|
|
+ const keyArr = Object.keys(this.$refs)
|
|
|
+ keyArr.forEach((item,index) => {
|
|
|
+ this.$refs[item][0].style.backgroundImage = this.buttonJson[index].BackIcon ? 'url('+`${this.staticUrl}/Data/${this.buttonJson[index].BackIcon}`+')' : null
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
computed: {
|
|
@@ -92,7 +99,7 @@
|
|
|
if (this.count4 === 0) {
|
|
|
this.$refs[e.ID][0].style.backgroundImage = 'url(' + require(`../../../static/Data/${e.ActionIcon}`) + ')'
|
|
|
++this.count4
|
|
|
- } else if(e !== this.lastData4) {
|
|
|
+ } else if (e !== this.lastData4) {
|
|
|
this.$refs[e.ID][0].style.backgroundImage = 'url(' + require(`../../../static/Data/${e.ActionIcon}`) + ')'
|
|
|
this.lastBtn4.style.backgroundImage = 'url(' + require(`../../../static/Data/${this.lastData4.BackIcon}`) + ')'
|
|
|
}
|
|
@@ -117,7 +124,7 @@
|
|
|
if (this.count2 === 0) {
|
|
|
this.$refs[e.ID][0].style.backgroundImage = 'url(' + require(`../../../static/Data/${e.ActionIcon}`) + ')'
|
|
|
++this.count2
|
|
|
- } else if(e !== this.lastData) {
|
|
|
+ } else if (e !== this.lastData) {
|
|
|
this.$refs[e.ID][0].style.backgroundImage = 'url(' + require(`../../../static/Data/${e.ActionIcon}`) + ')'
|
|
|
this.lastBtn.style.backgroundImage = 'url(' + require(`../../../static/Data/${this.lastData.BackIcon}`) + ')'
|
|
|
}
|
|
@@ -131,11 +138,12 @@
|
|
|
if (e.Name.includes('V0--Btn6') || e.Name.includes('V0--Btn61') || e.Name.includes('V0--Btn12') || e.Name.includes('V0--Btn58') || e.Name.includes('V0--Btn77')) {
|
|
|
// (1)背景切换
|
|
|
if (this.count3 === 0) {
|
|
|
- this.$refs[e.ID][0].style.backgroundImage = 'url(' + require(`../../../static/Data/${e.ActionIcon}`) + ')'
|
|
|
+ this.$refs[e.ID][0].style.backgroundImage = e.ActionIcon ? 'url('+`${this.staticUrl}/Data/${e.ActionIcon}`+')' : null
|
|
|
++this.count3
|
|
|
- } else if(e !== this.lastData3) {
|
|
|
- this.$refs[e.ID][0].style.backgroundImage = 'url(' + require(`../../../static/Data/${e.ActionIcon}`) + ')'
|
|
|
- this.lastBtn3.style.backgroundImage = 'url(' + require(`../../../static/Data/${this.lastData3.BackIcon}`) + ')'
|
|
|
+ } else if (e !== this.lastData3) {
|
|
|
+ this.$refs[e.ID][0].style.backgroundImage = e.ActionIcon ? 'url('+`${this.staticUrl}/Data/${e.ActionIcon}`+')' : null
|
|
|
+
|
|
|
+ this.lastBtn3.style.backgroundImage = this.lastData3.BackIcon ? 'url(' + `${this.staticUrl}/Data/${this.lastData3.BackIcon}` + ')' : null
|
|
|
}
|
|
|
// 保存点过的这个按钮和按钮数据
|
|
|
this.lastBtn3 = this.$refs[e.ID][0]
|
|
@@ -178,19 +186,19 @@
|
|
|
return
|
|
|
} else if (e.ID === '49653a62-99cb-40e1-a513-60e42893adb7' || e.ID === 'd55c81a8-54d7-4d90-aad7-4f34c3ba3950' || e.ID === '4142ab5b-ce52-4655-a28d-724bfabb24f0') {
|
|
|
// 自由屏
|
|
|
- this.$store.dispatch('splitScreen',0)
|
|
|
+ this.$store.dispatch('splitScreen', 0)
|
|
|
return
|
|
|
} else if (e.ID === '52de9a2e-d171-423d-860f-3fe2750ec757' || e.ID === '0cabb1ba-bcae-45d9-b019-2b45486f98e3' || e.ID === '9bb5b3e3-9e21-4716-8059-f5b35b24e3fa') {
|
|
|
// 四分屏
|
|
|
- this.$store.dispatch('splitScreen',1)
|
|
|
+ this.$store.dispatch('splitScreen', 1)
|
|
|
return
|
|
|
} else if (e.ID === 'ac0cc31c-a9b8-4bdf-88cf-928964b93ac5' || e.ID === '201e4bb0-c039-46c7-a55a-049d00de4769') {
|
|
|
// 九分屏
|
|
|
- this.$store.dispatch('splitScreen',2)
|
|
|
+ this.$store.dispatch('splitScreen', 2)
|
|
|
return
|
|
|
} else if (e.ID === '2d4c49bc-905b-4f96-a65c-9b0a3e057b3f') {
|
|
|
// 16分屏
|
|
|
- this.$store.dispatch('splitScreen',3)
|
|
|
+ this.$store.dispatch('splitScreen', 3)
|
|
|
return
|
|
|
}
|
|
|
|
|
@@ -199,7 +207,7 @@
|
|
|
if (this.count5 === 0) {
|
|
|
this.$refs[e.ID][0].style.backgroundImage = 'url(' + require(`../../../static/Data/${e.ActionIcon}`) + ')'
|
|
|
++this.count5
|
|
|
- } else if(e !== this.lastData5){
|
|
|
+ } else if (e !== this.lastData5) {
|
|
|
this.$refs[e.ID][0].style.backgroundImage = 'url(' + require(`../../../static/Data/${e.ActionIcon}`) + ')'
|
|
|
this.lastBtn5.style.backgroundImage = 'url(' + require(`../../../static/Data/${this.lastData5.BackIcon}`) + ')'
|
|
|
}
|
|
@@ -210,11 +218,11 @@
|
|
|
}
|
|
|
|
|
|
// 电源管理和电脑管理
|
|
|
- if(this.powerAndCompBtns.some(item => item.ID === e.ID)){
|
|
|
- if(e.ActionType === 2){
|
|
|
+ if (this.powerAndCompBtns.some(item => item.ID === e.ID)) {
|
|
|
+ if (e.ActionType === 2) {
|
|
|
this.$refs[e.ID][0].style.backgroundImage = 'url(' + require(`../../../static/Data/${e.ActionIcon}`) + ')'
|
|
|
e.ActionType = -2
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
this.$refs[e.ID][0].style.backgroundImage = 'url(' + require(`../../../static/Data/${e.BackIcon}`) + ')'
|
|
|
e.ActionType = 2
|
|
|
}
|
|
@@ -226,11 +234,11 @@
|
|
|
mouseDown(e) {
|
|
|
if (this.arr.some(item => e === item) && e.Text !== '安卓' && e.Text !== '分布式') { // 分屏控制按钮
|
|
|
this.$refs[e.ID][0].style.backgroundImage = 'url(' + require(`../../../static/Data/${e.ActionIcon}`) + ')'
|
|
|
- }else if(e.WindowID === '027ab76d-6b9c-46ac-abe6-75b8059f786b') { // 视频控制按钮
|
|
|
+ } else if (e.WindowID === '027ab76d-6b9c-46ac-abe6-75b8059f786b') { // 视频控制按钮
|
|
|
this.$refs[e.ID][0].style.backgroundImage = 'url(' + require(`../../../static/Data/${e.ActionIcon}`) + ')'
|
|
|
- }else if(e.WindowID === 'a12b287f-f68c-4efa-b652-d6e5b0a09d0d') { // 环境控制按钮
|
|
|
+ } else if (e.WindowID === 'a12b287f-f68c-4efa-b652-d6e5b0a09d0d') { // 环境控制按钮
|
|
|
this.$refs[e.ID][0].style.backgroundImage = 'url(' + require(`../../../static/Data/${e.ActionIcon}`) + ')'
|
|
|
- }else if(e.ID === '19554440-98bc-4644-83a0-d9cefd69153e'){ // 电脑控制All按钮
|
|
|
+ } else if (e.ID === '19554440-98bc-4644-83a0-d9cefd69153e') { // 电脑控制All按钮
|
|
|
this.$refs[e.ID][0].style.backgroundImage = 'url(' + require(`../../../static/Data/${e.ActionIcon}`) + ')'
|
|
|
}
|
|
|
return
|
|
@@ -240,11 +248,12 @@
|
|
|
mouseUp(e) {
|
|
|
if (this.arr.some(item => e === item) && e.Text !== '安卓' && e.Text !== '分布式') { // 分屏控制按钮
|
|
|
this.$refs[e.ID][0].style.backgroundImage = 'url(' + require(`../../../static/Data/${e.BackIcon}`) + ')'
|
|
|
- }else if(e.WindowID === '027ab76d-6b9c-46ac-abe6-75b8059f786b') { // 视频控制按钮
|
|
|
+ } else if (e.WindowID === '027ab76d-6b9c-46ac-abe6-75b8059f786b') { // 视频控制按钮
|
|
|
this.$refs[e.ID][0].style.backgroundImage = 'url(' + require(`../../../static/Data/${e.BackIcon}`) + ')'
|
|
|
- }else if(e.WindowID === 'a12b287f-f68c-4efa-b652-d6e5b0a09d0d') { // 环境控制按钮
|
|
|
+ } else if (e.WindowID === 'a12b287f-f68c-4efa-b652-d6e5b0a09d0d') { // 环境控制按钮
|
|
|
this.$refs[e.ID][0].style.backgroundImage = 'url(' + require(`../../../static/Data/${e.BackIcon}`) + ')'
|
|
|
- }if(e.ID === '19554440-98bc-4644-83a0-d9cefd69153e'){ // 电脑控制All按钮
|
|
|
+ }
|
|
|
+ if (e.ID === '19554440-98bc-4644-83a0-d9cefd69153e') { // 电脑控制All按钮
|
|
|
this.$refs[e.ID][0].style.backgroundImage = 'url(' + require(`../../../static/Data/${e.BackIcon}`) + ')'
|
|
|
}
|
|
|
return
|