优化监控中心前台样式

This commit is contained in:
fks-yangshouda
2024-08-20 15:40:49 +08:00
parent 7d049151b6
commit e99f441461
11 changed files with 151 additions and 32 deletions

View File

@@ -326,10 +326,10 @@
.get(environmentMonitor.queryDeviceArea, { orgId: orgId.value, point: typeValue.value })
.then((res) => {
treeData2.value = res.data;
if (treeData2.value && treeData2.value.length > 0) {
quyuvalue.value = [treeData2.value[0].childList[0].id];
getDeviceHotMap();
}
// if (treeData2.value && treeData2.value.length > 0) {
// quyuvalue.value = [treeData2.value[0].childList[0].id];
// getDeviceHotMap();
// }
});
};
@@ -342,12 +342,13 @@
break;
}
}
let time = timeValue.value.format('YYYY-MM-DD');
http
.post(environmentMonitor.getDeviceHotMap, {
orgId: orgId.value,
environmentType: environmentType,
location: quyuvalue.value, // 区域id或者name
time: '2024-07-01',
time: time,
timeRate: frequencyValue.value, // 频率
})
@@ -383,7 +384,7 @@
// 获取区域数据
await queryDeviceArea();
// await getDeviceHotMap();
getDeviceHotMap();
// let hotData = {
// timeList: [
@@ -749,6 +750,33 @@
hotChar.dispose();
}
hotChar = echarts.init(hotChartRef.value);
let min = 0;
let max = 100;
if (typeValue.value == 'MFStem') {
// 温度
min = -20;
max = 40;
} else if (typeValue.value == 'MFSCORAr') {
// CO2浓度
min = 350;
max = 2000;
} else if (typeValue.value == 'MFSPM') {
// PM2.5
min = 0;
max = 500;
} else if (typeValue.value == 'MFSwf') {
// 光照度
min = 0;
max = 10000;
} else if (typeValue.value == 'MFSvf') {
// TVOC
min = 0;
max = 1;
} else if (typeValue.value == 'MFShum') {
//湿度
min = 0;
max = 100;
}
const option = {
tooltip: {
@@ -772,11 +800,21 @@
splitArea: {
show: true,
},
axisLabel: {
formatter: function (value) {
// 每五个字符插入一个换行符
if (value.length > 5) {
return value.match(/.{1,5}/g).join('\n');
}
return value;
},
lineHeight: 20,
},
},
visualMap: {
show: false,
min: 0,
max: 30,
min: min,
max: max,
// calculable: true,
// orient: 'horizontal',
// left: 'center',
@@ -803,7 +841,7 @@
],
};
hotChar = echarts.init(hotChartRef.value);
// hotChar = echarts.init(hotChartRef.value);
hotChar.setOption(option);
}
};

View File

@@ -9,7 +9,11 @@
margin-top: 0.5%;
padding-left: 1.5%;
background: #ffffff;
font-family: 'PingFangSC-Regular', sans-serif;
font-family: 'PingFang SC';
font-size: 16px;
font-weight: 700;
letter-spacing: 1.33px;
line-height: 21px;
">
<a-tab-pane key="1" tab="综合数据" />
<a-tab-pane key="2" tab="历史数据" />