fix: enm screen css调整
This commit is contained in:
parent
1dbe5218fa
commit
10656c643a
|
|
@ -76,7 +76,7 @@ const routes = [
|
||||||
"meta": {
|
"meta": {
|
||||||
"title": "驾驶舱2",
|
"title": "驾驶舱2",
|
||||||
"icon": "el-icon-position",
|
"icon": "el-icon-position",
|
||||||
"perms": ["bigScreen"],
|
"perms": ["bigScreen2"],
|
||||||
"fullpage": true,
|
"fullpage": true,
|
||||||
},
|
},
|
||||||
"component": "bigScreen/index_enm"
|
"component": "bigScreen/index_enm"
|
||||||
|
|
|
||||||
|
|
@ -141,18 +141,6 @@ export default {
|
||||||
resizeTimeout: null,
|
resizeTimeout: null,
|
||||||
engine: null,
|
engine: null,
|
||||||
loadedPercent: 0,
|
loadedPercent: 0,
|
||||||
chart1: null,
|
|
||||||
chart2: null,
|
|
||||||
chart3: null,
|
|
||||||
chart4: null,
|
|
||||||
chart5: null,
|
|
||||||
chart6: null,
|
|
||||||
chart1Option: {},
|
|
||||||
chart2Option: {},
|
|
||||||
chart3Option: {},
|
|
||||||
chart4Option: {},
|
|
||||||
chart5Option: {},
|
|
||||||
chart6Option: {},
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -191,7 +179,6 @@ export default {
|
||||||
// 获取窗口的总高度
|
// 获取窗口的总高度
|
||||||
var windowHeight = window.innerHeight;
|
var windowHeight = window.innerHeight;
|
||||||
var windowWidth = window.innerWidth;
|
var windowWidth = window.innerWidth;
|
||||||
var chartsHeight = window.innerWidth*1.8;
|
|
||||||
// 获取目标元素
|
// 获取目标元素
|
||||||
var left_main = document.getElementsByClassName('left_main')[0];
|
var left_main = document.getElementsByClassName('left_main')[0];
|
||||||
var left_other = document.getElementsByClassName('left_other')[0];
|
var left_other = document.getElementsByClassName('left_other')[0];
|
||||||
|
|
@ -206,24 +193,34 @@ export default {
|
||||||
right_main.style.width = '20%';
|
right_main.style.width = '20%';
|
||||||
left_other.style.position = 'absolute';
|
left_other.style.position = 'absolute';
|
||||||
left_other.style.width = '20%';
|
left_other.style.width = '20%';
|
||||||
left_other.style.height = (windowHeight - 220) + 'px';;
|
|
||||||
right_other.style.position = 'absolute';
|
right_other.style.position = 'absolute';
|
||||||
right_other.style.width = '20%';
|
right_other.style.width = '20%';
|
||||||
right_other.style.height = (windowHeight - 220) + 'px';;
|
model.style.height = (windowHeight - 40) + 'px';
|
||||||
model.style.height = (windowHeight - 60) + 'px';
|
var chartHeight = (windowHeight-350)/3 + 'px';
|
||||||
|
var charts = document.getElementsByClassName('chart')
|
||||||
|
for(var i=0;i<charts.length;i++){
|
||||||
|
var chart = charts[i]
|
||||||
|
chart.style.height = chartHeight;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
var chartHeight = windowWidth*0.6;
|
||||||
left_main.style.position = 'static';
|
left_main.style.position = 'static';
|
||||||
left_main.style.width = '100%';
|
left_main.style.width = '100%';
|
||||||
right_main.style.position = 'static';
|
right_main.style.position = 'static';
|
||||||
right_main.style.width = '100%';
|
right_main.style.width = '100%';
|
||||||
left_other.style.position = 'static';
|
left_other.style.position = 'static';
|
||||||
left_other.style.width = '100%';
|
left_other.style.width = '100%';
|
||||||
left_other.style.height = chartsHeight + 'px';
|
|
||||||
right_other.style.position = 'static';
|
right_other.style.position = 'static';
|
||||||
right_other.style.width = '100%';
|
right_other.style.width = '100%';
|
||||||
right_other.style.height = chartsHeight + 'px';
|
model.style.height = chartHeight;
|
||||||
model.style.height = windowWidth*0.6;;
|
var charts = document.getElementsByClassName('chart')
|
||||||
|
for(var i=0;i<charts.length;i++){
|
||||||
|
var chart = charts[i]
|
||||||
|
chart.style.height = chartHeight;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if(this.engine != null){
|
if(this.engine != null){
|
||||||
this.engine.resize();
|
this.engine.resize();
|
||||||
|
|
@ -254,7 +251,8 @@ export default {
|
||||||
backgroundColor: '',
|
backgroundColor: '',
|
||||||
tooltip: {},
|
tooltip: {},
|
||||||
legend: {
|
legend: {
|
||||||
data: ['销量']
|
data: ['销量'],
|
||||||
|
top: 0
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
data: ['衬衫', '羊毛衫', '雪纺衫', '裤子', '高跟鞋', '袜子']
|
data: ['衬衫', '羊毛衫', '雪纺衫', '裤子', '高跟鞋', '袜子']
|
||||||
|
|
@ -268,10 +266,10 @@ export default {
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
grid: { // 让图表占满容器
|
grid: { // 让图表占满容器
|
||||||
top: "10%",
|
top: "5%",
|
||||||
left: "12%",
|
left: "12%",
|
||||||
right: "0px",
|
right: "0px",
|
||||||
bottom: "20%"
|
bottom: "15%"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -454,13 +452,13 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.dashboard {
|
.dashboard {
|
||||||
background-color: black;
|
background-color: #33334d;
|
||||||
/* background-color: #0b2e4a; */
|
/* background-color: #0b2e4a; */
|
||||||
font-family: Inter, "-apple-system", BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "noto sans", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
font-family: Inter, "-apple-system", BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "noto sans", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
header {
|
header {
|
||||||
height: 60px;
|
height: 50px;
|
||||||
/* 调整头部高度 */
|
/* 调整头部高度 */
|
||||||
background-image: url('/public/img/header_bg.png');
|
background-image: url('/public/img/header_bg.png');
|
||||||
/* 替换为实际的背景图片路径 */
|
/* 替换为实际的背景图片路径 */
|
||||||
|
|
@ -499,7 +497,7 @@ header {
|
||||||
.left_main,
|
.left_main,
|
||||||
.right_main {
|
.right_main {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 60px;
|
top: 30px;
|
||||||
width: 20%;
|
width: 20%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -510,10 +508,8 @@ header {
|
||||||
.left_other,
|
.left_other,
|
||||||
.right_other {
|
.right_other {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 220px;
|
top: 190px;
|
||||||
display: flex;
|
|
||||||
width: 20%;
|
width: 20%;
|
||||||
flex-direction: column;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.right_other {
|
.right_other {
|
||||||
|
|
@ -522,7 +518,6 @@ header {
|
||||||
|
|
||||||
|
|
||||||
.panel {
|
.panel {
|
||||||
flex: 1;
|
|
||||||
padding: 4px 8px;
|
padding: 4px 8px;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
background: linear-gradient(#99fffe, #99fffe) left -3px top 0, linear-gradient(#99fffe, #99fffe) left -3px top -3px, linear-gradient(#99fffe, #99fffe) right -3px top 0, linear-gradient(#99fffe, #99fffe) right -3px top -3px, linear-gradient(#99fffe, #99fffe) left -3px bottom 0, linear-gradient(#99fffe, #99fffe) left -3px bottom -3px, linear-gradient(#99fffe, #99fffe) right -3px bottom 0, linear-gradient(#99fffe, #99fffe) right -3px bottom -3px;
|
background: linear-gradient(#99fffe, #99fffe) left -3px top 0, linear-gradient(#99fffe, #99fffe) left -3px top -3px, linear-gradient(#99fffe, #99fffe) right -3px top 0, linear-gradient(#99fffe, #99fffe) right -3px top -3px, linear-gradient(#99fffe, #99fffe) left -3px bottom 0, linear-gradient(#99fffe, #99fffe) left -3px bottom -3px, linear-gradient(#99fffe, #99fffe) right -3px bottom 0, linear-gradient(#99fffe, #99fffe) right -3px bottom -3px;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue