|
@@ -5,19 +5,19 @@
|
|
<div v-for="item in buttonJson"
|
|
<div v-for="item in buttonJson"
|
|
:style="{
|
|
:style="{
|
|
position:'absolute',
|
|
position:'absolute',
|
|
- left:item.Left*Scale+'px',
|
|
|
|
- top:item.Top*Scale+'px',
|
|
|
|
- width:item.Width*Scale + 'px',
|
|
|
|
- height:item.Height*Scale + 'px',
|
|
|
|
|
|
+ left:item.Left*scale+'px',
|
|
|
|
+ top:item.Top*scale+'px',
|
|
|
|
+ width:item.Width*scale + 'px',
|
|
|
|
+ height:item.Height*scale + 'px',
|
|
zIndex:item.ZIndex,
|
|
zIndex:item.ZIndex,
|
|
display:item.IsVisibility ? 'block' : 'none',
|
|
display:item.IsVisibility ? 'block' : 'none',
|
|
- fontSize:item.FontSize*Scale + 'px',
|
|
|
|
|
|
+ fontSize:item.FontSize*scale + 'px',
|
|
backgroundImage:'url('+require(`../../../static/images/${item.BackIcon}`)+')',
|
|
backgroundImage:'url('+require(`../../../static/images/${item.BackIcon}`)+')',
|
|
backgroundSize:'100% 100%',
|
|
backgroundSize:'100% 100%',
|
|
backgroundRepeat:'no-repeat',
|
|
backgroundRepeat:'no-repeat',
|
|
color:`#${item.ForegroundStr.slice(3)}`,
|
|
color:`#${item.ForegroundStr.slice(3)}`,
|
|
textAlign:'center',
|
|
textAlign:'center',
|
|
- lineHeight:item.Height*Scale + 'px',
|
|
|
|
|
|
+ lineHeight:item.Height*scale + 'px',
|
|
cursor:'default'
|
|
cursor:'default'
|
|
}"
|
|
}"
|
|
:ref="item.ID"
|
|
:ref="item.ID"
|
|
@@ -32,6 +32,7 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import {mapState} from 'vuex'
|
|
import {mapState} from 'vuex'
|
|
|
|
+ import {getStaticFile} from "../../utils/tools"
|
|
|
|
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
@@ -41,36 +42,38 @@
|
|
count3: 0, // 管理控制按钮计数器
|
|
count3: 0, // 管理控制按钮计数器
|
|
count4: 0, // 3个视频按钮计数器
|
|
count4: 0, // 3个视频按钮计数器
|
|
count5: 0, // 安卓分布式按钮
|
|
count5: 0, // 安卓分布式按钮
|
|
|
|
+ buttonJson:[],
|
|
|
|
+ labelJson:[],
|
|
|
|
+ slideJson:[]
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
|
|
- mounted() {
|
|
|
|
- // 获取分屏按钮数组(将分屏按钮和其他按钮区分开)
|
|
|
|
- this.arr = this.buttonJson.filter(item => (item.WindowID === '9a0dff23-8633-4e7f-89bf-cc4f68ec88e1' || item.WindowID === '08208721-41cc-4f1e-937b-3a1627389049' || item.WindowID === 'ab842585-0c91-4e65-bfed-a219bcaaeb43'))
|
|
|
|
-
|
|
|
|
- // 获取功能按钮涉及到的按钮和label
|
|
|
|
- // 1.电源管理 2.音频管理 3.视频管理 4.环境控制 5.电脑控制
|
|
|
|
- const funcBtnArr = this.buttonJson.filter(item => (item.WindowID === 'd80a8b6e-9f88-41ff-b3a7-1ff8d6ee37a5' || item.WindowID === 'cb2687fd-931a-4b38-a76d-9c3ea171b8d8' || item.WindowID === '027ab76d-6b9c-46ac-abe6-75b8059f786b' || item.WindowID === 'a12b287f-f68c-4efa-b652-d6e5b0a09d0d' || item.WindowID === 'd9868551-b579-4258-9bc7-7c1f733773f5'))
|
|
|
|
- const funcLabArr = this.labelJson.filter(item => (item.WindowID === 'd80a8b6e-9f88-41ff-b3a7-1ff8d6ee37a5' || item.WindowID === 'cb2687fd-931a-4b38-a76d-9c3ea171b8d8' || item.WindowID === '027ab76d-6b9c-46ac-abe6-75b8059f786b' || item.WindowID === 'a12b287f-f68c-4efa-b652-d6e5b0a09d0d' || item.WindowID === 'd9868551-b579-4258-9bc7-7c1f733773f5'))
|
|
|
|
- this.funcObj = {
|
|
|
|
- funcBtnArr,
|
|
|
|
- funcLabArr,
|
|
|
|
- funSliderArr:this.sliderJson
|
|
|
|
- }
|
|
|
|
|
|
+ async mounted() {
|
|
|
|
|
|
|
|
+ this.buttonJson = await getStaticFile('EnityButton.Data')
|
|
|
|
+ // 获取分屏按钮数组
|
|
|
|
+ this.arr = this.buttonJson.filter(item => (item.WindowID === '9a0dff23-8633-4e7f-89bf-cc4f68ec88e1' || item.WindowID === '08208721-41cc-4f1e-937b-3a1627389049' || item.WindowID === 'ab842585-0c91-4e65-bfed-a219bcaaeb43'))
|
|
|
|
+ // 获取功能按钮
|
|
|
|
+ this.funcBtnArr = this.buttonJson.filter(item => (item.WindowID === 'd80a8b6e-9f88-41ff-b3a7-1ff8d6ee37a5' || item.WindowID === 'cb2687fd-931a-4b38-a76d-9c3ea171b8d8' || item.WindowID === '027ab76d-6b9c-46ac-abe6-75b8059f786b' || item.WindowID === 'a12b287f-f68c-4efa-b652-d6e5b0a09d0d' || item.WindowID === 'd9868551-b579-4258-9bc7-7c1f733773f5'))
|
|
// 获取电源管理和电脑控制按钮
|
|
// 获取电源管理和电脑控制按钮
|
|
this.powerAndCompBtns = this.buttonJson.filter(item => (item.WindowID === 'd80a8b6e-9f88-41ff-b3a7-1ff8d6ee37a5' || item.WindowID === 'd9868551-b579-4258-9bc7-7c1f733773f5') && item.ID !== '19554440-98bc-4644-83a0-d9cefd69153e')
|
|
this.powerAndCompBtns = this.buttonJson.filter(item => (item.WindowID === 'd80a8b6e-9f88-41ff-b3a7-1ff8d6ee37a5' || item.WindowID === 'd9868551-b579-4258-9bc7-7c1f733773f5') && item.ID !== '19554440-98bc-4644-83a0-d9cefd69153e')
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ this.labelJson = await getStaticFile('EnityLable.Data')
|
|
|
|
+ this.funcLabArr = this.labelJson.filter(item => (item.WindowID === 'd80a8b6e-9f88-41ff-b3a7-1ff8d6ee37a5' || item.WindowID === 'cb2687fd-931a-4b38-a76d-9c3ea171b8d8' || item.WindowID === '027ab76d-6b9c-46ac-abe6-75b8059f786b' || item.WindowID === 'a12b287f-f68c-4efa-b652-d6e5b0a09d0d' || item.WindowID === 'd9868551-b579-4258-9bc7-7c1f733773f5'))
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ this.slideJson = await getStaticFile('EnitySlider.Data')
|
|
|
|
+ this.funSliderArr = res.data
|
|
},
|
|
},
|
|
|
|
|
|
computed: {
|
|
computed: {
|
|
- ...mapState(['buttonJson','labelJson','sliderJson','Scale']),
|
|
|
|
|
|
+ ...mapState(['scale']),
|
|
},
|
|
},
|
|
|
|
|
|
methods: {
|
|
methods: {
|
|
// 点击按钮
|
|
// 点击按钮
|
|
clickBtn(e) {
|
|
clickBtn(e) {
|
|
- // console.log(e)
|
|
|
|
-
|
|
|
|
// 预案管理声音开关
|
|
// 预案管理声音开关
|
|
if (e.ID === '355d3c32-1502-40b4-9ddd-663d5b8469e7') {
|
|
if (e.ID === '355d3c32-1502-40b4-9ddd-663d5b8469e7') {
|
|
if (this.count % 2 === 0) {
|
|
if (this.count % 2 === 0) {
|
|
@@ -139,7 +142,7 @@
|
|
|
|
|
|
// (2)界面切换
|
|
// (2)界面切换
|
|
// 按钮
|
|
// 按钮
|
|
- this.funcObj.funcBtnArr.forEach((item, index) => {
|
|
|
|
|
|
+ this.funcBtnArr.forEach((item, index) => {
|
|
if (e.MouseDownActionList[0].SourceID === item.WindowID) {
|
|
if (e.MouseDownActionList[0].SourceID === item.WindowID) {
|
|
item.IsVisibility = true
|
|
item.IsVisibility = true
|
|
} else {
|
|
} else {
|
|
@@ -148,7 +151,7 @@
|
|
})
|
|
})
|
|
|
|
|
|
// 标签
|
|
// 标签
|
|
- this.funcObj.funcLabArr.forEach((item, index) => {
|
|
|
|
|
|
+ this.funcLabArr.forEach((item, index) => {
|
|
if (e.MouseDownActionList[0].SourceID === item.WindowID) {
|
|
if (e.MouseDownActionList[0].SourceID === item.WindowID) {
|
|
item.IsVisibility = true
|
|
item.IsVisibility = true
|
|
} else {
|
|
} else {
|
|
@@ -157,7 +160,7 @@
|
|
})
|
|
})
|
|
|
|
|
|
// 滑块
|
|
// 滑块
|
|
- this.funcObj.funSliderArr.forEach((item, index) => {
|
|
|
|
|
|
+ this.funSliderArr.forEach((item, index) => {
|
|
if (e.MouseDownActionList[0].SourceID === item.WindowID) {
|
|
if (e.MouseDownActionList[0].SourceID === item.WindowID) {
|
|
item.IsVisibility = true
|
|
item.IsVisibility = true
|
|
} else {
|
|
} else {
|