大屏样式修复 代码更新

master
LI-CCONG\李聪聪 9 months ago
parent 174d182ec5
commit f5c657820a

@ -26,6 +26,8 @@ export default {
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
height: 100%; height: 100%;
width: 100%; width: 100%;
background-color: #020308;
overflow: hidden;
} }
.el-alert--error.is-light { .el-alert--error.is-light {

@ -1,3 +1,11 @@
/*
* @Author:
* @Date: 2024-01-19 10:49:46
* @LastEditors:
* @LastEditTime: 2024-01-19 13:51:58
* @FilePath: /vol-vue3/src/mixin/index.js
* @Description: ,`customMade`, koroFileHeader : https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
// 屏幕适配 mixin 函数 // 屏幕适配 mixin 函数
// * 默认缩放值 // * 默认缩放值
const scale = { const scale = {
@ -39,13 +47,15 @@ const scale = {
// 表示更宽 // 表示更宽
scale.width = ((window.innerHeight * baseProportion) / baseWidth).toFixed(5) scale.width = ((window.innerHeight * baseProportion) / baseWidth).toFixed(5)
scale.height = (window.innerHeight / baseHeight).toFixed(5) scale.height = (window.innerHeight / baseHeight).toFixed(5)
appRef.style.transform = `scale(${scale.width}, ${scale.height})` // appRef.style.transform = `scale(${scale.width}, ${scale.height})`
// appRef.style.transform = `scale(${scale.width}, ${scale.height}) translate(-50%, -50%)` appRef.style.transform = `scale(${scale.width}, ${scale.height}) translate(-50%, -50%)`
} else { } else {
// 表示更高 // 表示更高
// debugger
scale.height = ((window.innerWidth / baseProportion) / baseHeight).toFixed(5) scale.height = ((window.innerWidth / baseProportion) / baseHeight).toFixed(5)
scale.width = (window.innerWidth / baseWidth).toFixed(5) scale.width = (window.innerWidth / baseWidth).toFixed(5)
appRef.style.transform = `scale(${scale.width}, ${scale.height})` // appRef.style.transform = `scale(${scale.width}, ${scale.height})`
appRef.style.transform = `scale(${scale.width}, ${scale.height}) translate(-50%, -50%)`
} }
} }
}, },

@ -1,13 +1,27 @@
.big-data-container { .big-data-container {
// position: relative;
// overflow: hidden;
// height: 100%;
// width: 1920px;
color: #d3d6dd;
width: 1920px;
height: 1080px;
position: absolute; position: absolute;
top: 50%;
left: 50%;
-webkit-transform-origin: left top;
transform-origin: left top;
-webkit-transform: translate(-50%,-50%);
transform: translate(-50%,-50%);
overflow: hidden; overflow: hidden;
height: 100%;
width: 100%;
background-color: #1400a8; background-color: #1400a8;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25' viewBox='0 0 1200 800'%3E%3Cdefs%3E%3CradialGradient id='a' cx='0' cy='800' r='800' gradientUnits='userSpaceOnUse'%3E%3Cstop offset='0' stop-color='%230e0077'/%3E%3Cstop offset='1' stop-color='%230e0077' stop-opacity='0'/%3E%3C/radialGradient%3E%3CradialGradient id='b' cx='1200' cy='800' r='800' gradientUnits='userSpaceOnUse'%3E%3Cstop offset='0' stop-color='%2314057c'/%3E%3Cstop offset='1' stop-color='%2314057c' stop-opacity='0'/%3E%3C/radialGradient%3E%3CradialGradient id='c' cx='600' cy='0' r='600' gradientUnits='userSpaceOnUse'%3E%3Cstop offset='0' stop-color='%230d0524'/%3E%3Cstop offset='1' stop-color='%230d0524' stop-opacity='0'/%3E%3C/radialGradient%3E%3CradialGradient id='d' cx='600' cy='800' r='600' gradientUnits='userSpaceOnUse'%3E%3Cstop offset='0' stop-color='%231400a8'/%3E%3Cstop offset='1' stop-color='%231400a8' stop-opacity='0'/%3E%3C/radialGradient%3E%3CradialGradient id='e' cx='0' cy='0' r='800' gradientUnits='userSpaceOnUse'%3E%3Cstop offset='0' stop-color='%23000000'/%3E%3Cstop offset='1' stop-color='%23000000' stop-opacity='0'/%3E%3C/radialGradient%3E%3CradialGradient id='f' cx='1200' cy='0' r='800' gradientUnits='userSpaceOnUse'%3E%3Cstop offset='0' stop-color='%23130733'/%3E%3Cstop offset='1' stop-color='%23130733' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Crect fill='url(%23a)' width='1200' height='800'/%3E%3Crect fill='url(%23b)' width='1200' height='800'/%3E%3Crect fill='url(%23c)' width='1200' height='800'/%3E%3Crect fill='url(%23d)' width='1200' height='800'/%3E%3Crect fill='url(%23e)' width='1200' height='800'/%3E%3Crect fill='url(%23f)' width='1200' height='800'/%3E%3C/svg%3E"); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25' viewBox='0 0 1200 800'%3E%3Cdefs%3E%3CradialGradient id='a' cx='0' cy='800' r='800' gradientUnits='userSpaceOnUse'%3E%3Cstop offset='0' stop-color='%230e0077'/%3E%3Cstop offset='1' stop-color='%230e0077' stop-opacity='0'/%3E%3C/radialGradient%3E%3CradialGradient id='b' cx='1200' cy='800' r='800' gradientUnits='userSpaceOnUse'%3E%3Cstop offset='0' stop-color='%2314057c'/%3E%3Cstop offset='1' stop-color='%2314057c' stop-opacity='0'/%3E%3C/radialGradient%3E%3CradialGradient id='c' cx='600' cy='0' r='600' gradientUnits='userSpaceOnUse'%3E%3Cstop offset='0' stop-color='%230d0524'/%3E%3Cstop offset='1' stop-color='%230d0524' stop-opacity='0'/%3E%3C/radialGradient%3E%3CradialGradient id='d' cx='600' cy='800' r='600' gradientUnits='userSpaceOnUse'%3E%3Cstop offset='0' stop-color='%231400a8'/%3E%3Cstop offset='1' stop-color='%231400a8' stop-opacity='0'/%3E%3C/radialGradient%3E%3CradialGradient id='e' cx='0' cy='0' r='800' gradientUnits='userSpaceOnUse'%3E%3Cstop offset='0' stop-color='%23000000'/%3E%3Cstop offset='1' stop-color='%23000000' stop-opacity='0'/%3E%3C/radialGradient%3E%3CradialGradient id='f' cx='1200' cy='0' r='800' gradientUnits='userSpaceOnUse'%3E%3Cstop offset='0' stop-color='%23130733'/%3E%3Cstop offset='1' stop-color='%23130733' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Crect fill='url(%23a)' width='1200' height='800'/%3E%3Crect fill='url(%23b)' width='1200' height='800'/%3E%3Crect fill='url(%23c)' width='1200' height='800'/%3E%3Crect fill='url(%23d)' width='1200' height='800'/%3E%3Crect fill='url(%23e)' width='1200' height='800'/%3E%3Crect fill='url(%23f)' width='1200' height='800'/%3E%3C/svg%3E");
background-attachment: fixed; background-attachment: fixed;
background-size: cover; background-size: cover;
.header { .header {
height: 80px; height: 80px;
// background: url(./head_bg.png) no-repeat center center; // background: url(./head_bg.png) no-repeat center center;
@ -76,8 +90,8 @@
.data-right { .data-right {
flex: 1; flex: 1;
margin-right: 10px; margin-right: 10px;
display: flex; // display: flex;
flex-direction: column; // flex-direction: column;
.data-left-item, .data-left-item,
.data-right-item { .data-right-item {

@ -1,8 +1,8 @@
<template> <template>
<div id="big-data-container" class="big-data-container"> <div id="big-data-container" class="big-data-container" ref="appRef">
<dv-loading v-if="loading">Loading...</dv-loading> <dv-loading v-if="loading">Loading...</dv-loading>
<dv-full-screen-container v-else> <template v-else>
<div class="header"> <div class="header">
<div class="header-item"> <div class="header-item">
<h3 class="version">CHANKO V1.0.0</h3> <h3 class="version">CHANKO V1.0.0</h3>
@ -165,11 +165,11 @@
</div> </div>
</dv-border-box-13> </dv-border-box-13>
</div> </div>
</dv-full-screen-container> </template>
</div> </div>
</template> </template>
<script> <script>
import easyFlowMixin from '../../../mixin'
import Gauge from "@/components/echarts/Gauge.vue"; import Gauge from "@/components/echarts/Gauge.vue";
import Bar from "@/components/echarts/Bar.vue"; import Bar from "@/components/echarts/Bar.vue";
import Line from "@/components/echarts/Line.vue"; import Line from "@/components/echarts/Line.vue";
@ -183,6 +183,7 @@ export default {
Line, Line,
Number Number
}, },
mixins: [easyFlowMixin],
data() { data() {
return { return {
loading: true, loading: true,
@ -236,29 +237,29 @@ export default {
} }
}, },
mounted() { mounted() {
console.log(this.$refs.vline); // undefine // console.log(this.$refs.vline); // undefine
console.log("数据加载中..."); // console.log("...");
this.onLoading(); this.onLoading();
this.datetime = this.base.getDate(true); // this.datetime = this.base.getDate(true);
setInterval(() => { // setInterval(() => {
this.datetime = this.base.getDate(true); // this.datetime = this.base.getDate(true);
}); // });
window.addEventListener('beforeunload', this.clearTimer); // // window.addEventListener('beforeunload', this.clearTimer); //
}, },
methods: { methods: {
onLoading() { onLoading() {
this.getMachineData(); // this.getMachineData();
this.getWeekProcessData(); // this.getWeekProcessData();
this.getWeekWorkData(); // this.getWeekWorkData();
setTimeout(() => { // setTimeout(() => {
this.loading = false; this.loading = false;
}, 3000); // }, 3000);
// 10 // // 10
this.timer = setInterval(() => { // this.timer = setInterval(() => {
this.getMachineData(true); // this.getMachineData(true);
this.getWeekProcessData(true); // this.getWeekProcessData(true);
this.getWeekWorkData(true); // this.getWeekWorkData(true);
}, 10000); // }, 10000);
}, },
changeDevice(value) { changeDevice(value) {
this.gdfrom.configId = value; this.gdfrom.configId = value;

Loading…
Cancel
Save