Commit fec6e04b authored by Cai Wei's avatar Cai Wei

feat(*): 修改除尘器监控单位及描述

parent 8796e08a
......@@ -283,7 +283,7 @@ export const getBagMonitoringChartOption = (xData = [], seriesData = []) => ({
],
});
export const getLineOption2 = (xData = [], seriesData = [], legendDesc = "健康度指数(%)") => ({
export const getLineOption2 = (xData = [], seriesData = [], legendDesc = "健康度指数", unit = '') => ({
tooltip: {
trigger: "axis",
backgroundColor: 'rgba(24, 29, 33, 0.9)',
......@@ -291,6 +291,21 @@ export const getLineOption2 = (xData = [], seriesData = [], legendDesc = "健康
borderWidth: 2,
textStyle: {
color: '#fff'
},
formatter: function (params) {
// 展示保留圆点
const icon = '<span style="display: inline-block; width: 10px; height: 10px; border-radius: 50%; background-color: #399DFA; margin-right: 5px;"></span>';
return `第${params[0].name}天<br/> ${icon} ${params[0].seriesName}: ${params[0].value} ${unit}`;
}
},
// 添加子标题
title: {
text: legendDesc === '除尘器健康度指数' ? '根据除尘器日维度告警数据计算' : '',
right: "20",
top: "0%",
textStyle: {
color: '#909399',
fontSize: 12,
}
},
grid: {
......@@ -312,6 +327,11 @@ export const getLineOption2 = (xData = [], seriesData = [], legendDesc = "健康
},
xAxis: {
type: "category",
name: "天",
nameTextStyle: {
color: '#909399',
fontSize: 12,
},
axisTick: {
show: false,
},
......@@ -327,6 +347,11 @@ export const getLineOption2 = (xData = [], seriesData = [], legendDesc = "健康
},
yAxis: {
type: "value",
name: unit,
nameTextStyle: {
color: '#909399',
fontSize: 12,
},
axisLabel: {
color: "#909399",
},
......
......@@ -307,79 +307,6 @@ const dustInfo = reactive([
key: "pulseDetectorNum",
},
]);
const option2 = {
series: [
{
type: "gauge",
startAngle: 260,
endAngle: 300,
center: ["50%", "75%"],
radius: "90%",
min: 0,
max: 1,
splitNumber: 8,
axisLine: {
lineStyle: {
width: 3,
color: [
[0.25, "#FF6E76"],
[0.8, "#67c23a"],
[1, "#FF6E76"],
],
},
},
pointer: {
icon: "path://M12.8,0.7l12,40.1H0.7L12.8,0.7z",
length: "12%",
width: 20,
offsetCenter: [0, "-60%"],
itemStyle: {
color: "auto",
},
},
axisTick: {
length: 0,
lineStyle: {
color: "auto",
width: 2,
},
},
splitLine: {
length: 0,
lineStyle: {
color: "auto",
width: 5,
},
},
axisLabel: {
color: "#464646",
fontSize: 20,
distance: -60,
rotate: "tangential",
show: false,
},
title: {
offsetCenter: [0, "50%"],
fontSize: 12,
},
detail: {
fontSize: 20,
offsetCenter: [0, 0],
valueAnimation: true,
formatter: function (value) {
return Math.round(value * 100) + "";
},
color: "inherit",
},
data: [
{
value: 0.7,
name: "压差",
},
],
},
],
};
const indicatorOneInstance = ref();
const indicatorTwoInstance = ref();
const indicatorFun = (target, domId, option) => {
......@@ -423,7 +350,7 @@ const getHealthIndex = () => {
xData.push(item.time);
seriesData.push(item.healthIndex);
});
const option = getLineOption2(xData, seriesData, "健康度指数(%)");
const option = getLineOption2(xData, seriesData, "除尘器健康度指数", "%");
initChart(chartData[0], option, "chart0");
}
});
......@@ -448,7 +375,7 @@ const getPressure = () => {
xData.push(item.time);
seriesData.push(item.pressureDiff);
});
const option = getLineOption2(xData, seriesData, "压力差(kpa)");
const option = getLineOption2(xData, seriesData, "压力差", "kPa");
initChart(chartData[1], option, "chart1");
}
});
......@@ -473,7 +400,7 @@ const getEnergy = () => {
xData.push(item.time);
seriesData.push(item.energyConsumption);
});
const option = getLineOption2(xData, seriesData, "能耗(kwh)");
const option = getLineOption2(xData, seriesData, "能耗", "kW·h");
initChart(chartData[2], option, "chart2");
}
});
......@@ -748,8 +675,10 @@ const cancelRefreshEvent = () => {
// 取消鼠标事件
const cancelAllMouseEvent = () => {
clearTimeout(refreshTimer);
if (dustBox.value) {
dustBox.value.removeEventListener("mousemove", cancelRefreshEvent)
dustBox.value.removeEventListener("mousedown", cancelRefreshEvent)
}
}
</script>
<style lang="scss" scoped>
......
......@@ -1076,7 +1076,7 @@ export default {
)
.then((result) => {
localStorage.setItem("menuList", JSON.stringify(result.data));
this.$router.push('/dashboard');
this.$router.push('/monitor');
})
.catch((e) => {
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment