|
|
|
@ -223,15 +223,6 @@ onMounted(()=>{ |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
/** 使用rem的思想实现图表字体等其他样式的自适应*/ |
|
|
|
|
function fontSize(px) { //传入字体大小 |
|
|
|
|
let clientWidth = window.innerWidth || document.body.clientWidth; //屏幕尺寸 |
|
|
|
|
if (!clientWidth) { |
|
|
|
|
return 0; |
|
|
|
|
} |
|
|
|
|
let fontSize = clientWidth / 1920; //设计稿尺寸 |
|
|
|
|
return px * fontSize; //转换为 rem的布局返回出去 |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//获取执行后的策略列表 |
|
|
|
|
function getCelueListFun(){ |
|
|
|
@ -259,7 +250,8 @@ let indoorChart; |
|
|
|
|
function indoorChartFun(){ |
|
|
|
|
for(let i = 0;i < data.celueInfoList.length;i++){ |
|
|
|
|
var temp = 'forId' + i; |
|
|
|
|
console.log(temp) |
|
|
|
|
console.log(data.celueInfoList[i].tempInAry.listTempIn) |
|
|
|
|
console.log(data.celueInfoList[i].tempInAry.timesIn) |
|
|
|
|
const chartDom = document.getElementById(temp) |
|
|
|
|
indoorChart = echarts.init(chartDom); |
|
|
|
|
const option = { |
|
|
|
@ -268,31 +260,39 @@ function indoorChartFun(){ |
|
|
|
|
// selectedMode: 'single', |
|
|
|
|
textStyle: { |
|
|
|
|
color: "#b6bee7", |
|
|
|
|
fontSize:fontSize(12) |
|
|
|
|
fontSize:14 |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
tooltip: { |
|
|
|
|
trigger: "axis", |
|
|
|
|
formatter: '', |
|
|
|
|
formatter: function(params) { |
|
|
|
|
var result = params[0].name + '<br>'; // 获取横轴数据项名称 |
|
|
|
|
for (var i = 0; i < params.length; i++) { |
|
|
|
|
var seriesName = params[i].seriesName; // 获取系列名称 |
|
|
|
|
var value = params[i].value; // 获取数据值 |
|
|
|
|
result += seriesName + ': ' + '<strong style="color: #F5901A">'+value+'</strong>' + '℃<br>'; // 拼接字符串 |
|
|
|
|
} |
|
|
|
|
return result; |
|
|
|
|
}, |
|
|
|
|
// borderColor: '#00fcff', |
|
|
|
|
borderWidth: 1 |
|
|
|
|
}, |
|
|
|
|
grid:{ |
|
|
|
|
show: true, |
|
|
|
|
top: '20%', |
|
|
|
|
bottom:'15%', |
|
|
|
|
left:'8%', |
|
|
|
|
bottom:'13%', |
|
|
|
|
left:'6%', |
|
|
|
|
right:'4%', |
|
|
|
|
borderWidth: 0, |
|
|
|
|
borderColor: '#767da1', |
|
|
|
|
}, |
|
|
|
|
xAxis: { |
|
|
|
|
type: 'category', |
|
|
|
|
data: [1,1,11,1,11,1,1,1], |
|
|
|
|
data: data.celueInfoList[i].tempInAry.timesIn, |
|
|
|
|
axisLabel: { |
|
|
|
|
textStyle: { |
|
|
|
|
color: "#b6bee7", |
|
|
|
|
fontSize:fontSize(10) |
|
|
|
|
fontSize:12 |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
axisLine: { |
|
|
|
@ -317,13 +317,13 @@ function indoorChartFun(){ |
|
|
|
|
// name:'℃', |
|
|
|
|
nameTextStyle: { |
|
|
|
|
color: "#b6bee7", |
|
|
|
|
fontSize:fontSize(10), |
|
|
|
|
fontSize:12, |
|
|
|
|
nameLocation: "start" |
|
|
|
|
}, |
|
|
|
|
axisLabel: { |
|
|
|
|
textStyle: { |
|
|
|
|
color: "#b6bee7", |
|
|
|
|
fontSize:fontSize(10) |
|
|
|
|
fontSize:12 |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
splitLine: { |
|
|
|
@ -334,7 +334,7 @@ function indoorChartFun(){ |
|
|
|
|
series: [ |
|
|
|
|
{ |
|
|
|
|
name: "室内温度", |
|
|
|
|
data: [1,1,11,1,11,1,1,1], |
|
|
|
|
data: data.celueInfoList[i].tempInAry.listTempIn, |
|
|
|
|
type: 'line', |
|
|
|
|
smooth: true, |
|
|
|
|
symbol: "none", //去掉圆点 |
|
|
|
@ -387,7 +387,7 @@ function indoorChartFun(){ |
|
|
|
|
flex-wrap: nowrap; |
|
|
|
|
//margin-bottom: 18px; |
|
|
|
|
.echartBox{ |
|
|
|
|
width: 230%; |
|
|
|
|
width: 60%; |
|
|
|
|
height: 160px; |
|
|
|
|
padding: 10px 0; |
|
|
|
|
border: 1px solid #ffffff50; |
|
|
|
@ -421,6 +421,9 @@ function indoorChartFun(){ |
|
|
|
|
::v-deep .el-input__inner{ |
|
|
|
|
color: #1fc7c7; |
|
|
|
|
} |
|
|
|
|
::v-deep .el-form{ |
|
|
|
|
width: 40%; |
|
|
|
|
} |
|
|
|
|
::v-deep .el-form .el-form-item__label{ |
|
|
|
|
color: #d3d3d3 !important; |
|
|
|
|
} |
|
|
|
|