|
|
@ -7,130 +7,63 @@
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<div class="layout">
|
|
|
|
<div class="layout">
|
|
|
|
<div :style="bigScreenStyle">
|
|
|
|
<div :style="bigScreenStyle">
|
|
|
|
<widget v-for="(widget, index) in widgets"
|
|
|
|
<widget
|
|
|
|
|
|
|
|
v-for="(widget, index) in widgets"
|
|
|
|
:key="index"
|
|
|
|
:key="index"
|
|
|
|
v-model="widget.value"
|
|
|
|
v-model="widget.value"
|
|
|
|
:type="widget.type" />
|
|
|
|
:type="widget.type"
|
|
|
|
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import widget from '../designer/widget/temp'
|
|
|
|
import widget from "../designer/widget/temp";
|
|
|
|
import { detailDashboard } from '@/api/bigscreen'
|
|
|
|
import { detailDashboard } from "@/api/bigscreen";
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: 'Login',
|
|
|
|
name: "Login",
|
|
|
|
components: {
|
|
|
|
components: {
|
|
|
|
widget,
|
|
|
|
widget
|
|
|
|
},
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
list: [
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
type: 'widget-text',
|
|
|
|
|
|
|
|
value: {
|
|
|
|
|
|
|
|
data: {},
|
|
|
|
|
|
|
|
position: {
|
|
|
|
|
|
|
|
height: 200,
|
|
|
|
|
|
|
|
left: 0,
|
|
|
|
|
|
|
|
top: 0,
|
|
|
|
|
|
|
|
width: 200,
|
|
|
|
|
|
|
|
zIndex: 0,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
setup: {
|
|
|
|
|
|
|
|
background: '#12EF80',
|
|
|
|
|
|
|
|
color: '#F70F58',
|
|
|
|
|
|
|
|
fontSize: 30,
|
|
|
|
|
|
|
|
fontWeight: 'bold',
|
|
|
|
|
|
|
|
text: '文本文档',
|
|
|
|
|
|
|
|
textAlign: 'left',
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
type: 'widget-marquee',
|
|
|
|
|
|
|
|
value: {
|
|
|
|
|
|
|
|
data: {},
|
|
|
|
|
|
|
|
position: {
|
|
|
|
|
|
|
|
height: 200,
|
|
|
|
|
|
|
|
left: 200,
|
|
|
|
|
|
|
|
top: 0,
|
|
|
|
|
|
|
|
width: 200,
|
|
|
|
|
|
|
|
zIndex: 0,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
setup: {
|
|
|
|
|
|
|
|
background: 'yellow',
|
|
|
|
|
|
|
|
color: '#F70F58',
|
|
|
|
|
|
|
|
fontSize: 30,
|
|
|
|
|
|
|
|
fontWeight: 'bold',
|
|
|
|
|
|
|
|
text: '滚动文本',
|
|
|
|
|
|
|
|
textAlign: 'left',
|
|
|
|
|
|
|
|
marqueeSet: true,
|
|
|
|
|
|
|
|
marqueeQuit: 10,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
type: 'widget-href',
|
|
|
|
|
|
|
|
value: {
|
|
|
|
|
|
|
|
data: {},
|
|
|
|
|
|
|
|
position: {
|
|
|
|
|
|
|
|
height: 200,
|
|
|
|
|
|
|
|
left: 400,
|
|
|
|
|
|
|
|
top: 0,
|
|
|
|
|
|
|
|
width: 200,
|
|
|
|
|
|
|
|
zIndex: 0,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
setup: {
|
|
|
|
|
|
|
|
background: 'yellow',
|
|
|
|
|
|
|
|
color: '#F70F58',
|
|
|
|
|
|
|
|
fontSize: 30,
|
|
|
|
|
|
|
|
fontWeight: 'bold',
|
|
|
|
|
|
|
|
text: '超链接',
|
|
|
|
|
|
|
|
textAlign: 'left',
|
|
|
|
|
|
|
|
jumpMode: 'other',
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
bigScreenStyle: {},
|
|
|
|
bigScreenStyle: {},
|
|
|
|
widgets: [],
|
|
|
|
widgets: []
|
|
|
|
}
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
mounted() {
|
|
|
|
this.getData()
|
|
|
|
this.getData();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
async getData() {
|
|
|
|
async getData() {
|
|
|
|
const reportCode = this.$route.query.reportCode
|
|
|
|
const reportCode = this.$route.query.reportCode;
|
|
|
|
const { code, data } = await detailDashboard(reportCode)
|
|
|
|
const { code, data } = await detailDashboard(reportCode);
|
|
|
|
if (code != 200) return
|
|
|
|
if (code != 200) return;
|
|
|
|
const equipment = document.body.clientWidth
|
|
|
|
const equipment = document.body.clientWidth;
|
|
|
|
const ratioEquipment = equipment / data.dashboard.width
|
|
|
|
const ratioEquipment = equipment / data.dashboard.width;
|
|
|
|
this.bigScreenStyle = {
|
|
|
|
this.bigScreenStyle = {
|
|
|
|
width: data.dashboard.width + 'px',
|
|
|
|
width: data.dashboard.width + "px",
|
|
|
|
height: data.dashboard.height + 'px',
|
|
|
|
height: data.dashboard.height + "px",
|
|
|
|
'background-color': data.dashboard.backgroundColor,
|
|
|
|
"background-color": data.dashboard.backgroundColor,
|
|
|
|
'background-image': 'url(' + data.dashboard.backgroundImage + ')',
|
|
|
|
"background-image": "url(" + data.dashboard.backgroundImage + ")",
|
|
|
|
'background-position': '0% 0%',
|
|
|
|
"background-position": "0% 0%",
|
|
|
|
'background-size': '100% 100%',
|
|
|
|
"background-size": "100% 100%",
|
|
|
|
'background-repeat': 'initial',
|
|
|
|
"background-repeat": "initial",
|
|
|
|
'background-attachment': 'initial',
|
|
|
|
"background-attachment": "initial",
|
|
|
|
'background-origin': 'initial',
|
|
|
|
"background-origin": "initial",
|
|
|
|
'background-clip': 'initial',
|
|
|
|
"background-clip": "initial",
|
|
|
|
transform: `scale(${ratioEquipment}, ${ratioEquipment})`,
|
|
|
|
transform: `scale(${ratioEquipment}, ${ratioEquipment})`,
|
|
|
|
'transform-origin': '0 0',
|
|
|
|
"transform-origin": "0 0"
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
this.widgets = data.dashboard.widgets;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.widgets = data.dashboard.widgets
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
<style scoped lang="scss">
|
|
|
|
.layout {
|
|
|
|
.layout {
|
|
|
|
width: 100%;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
height: 100%;
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</style>
|
|
|
|