From 305a5f9824e973b210579e03e0342af4049bae73 Mon Sep 17 00:00:00 2001
From: trp <2477421791@qq.com>
Date: Sat, 9 Dec 2023 03:09:53 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E5=94=90=E6=B6=A6=E5=B9=B3:=E6=98=BE?=
=?UTF-8?q?=E7=A4=BA=E9=9D=A2=E6=9D=BF=E9=9B=8F=E5=BD=A2=E5=85=A8=E9=83=A8?=
=?UTF-8?q?=E5=AE=8C=E6=88=90=E5=B9=B6=E4=BC=98=E5=8C=96=E4=BA=86=E7=AC=AC?=
=?UTF-8?q?=E4=B8=80=E4=B8=AA=E9=A3=8E=E6=9C=BA=E9=9D=A2=E6=9D=BF=E6=A0=B7?=
=?UTF-8?q?=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/content/airInfo/AirInfo.vue | 6 +
.../content/badGasInfo/BadGasInfo.vue | 65 +++-
.../badGasInfo/childComps/GasInfoItem.vue | 125 ++++++++
src/components/content/fanInfo/FanInfo.vue | 281 ++++++++++++------
.../content/windPressure/WindPressureList.vue | 10 +-
5 files changed, 401 insertions(+), 86 deletions(-)
create mode 100644 src/components/content/badGasInfo/childComps/GasInfoItem.vue
diff --git a/src/components/content/airInfo/AirInfo.vue b/src/components/content/airInfo/AirInfo.vue
index 9c175d4..ccead2c 100644
--- a/src/components/content/airInfo/AirInfo.vue
+++ b/src/components/content/airInfo/AirInfo.vue
@@ -62,6 +62,12 @@ const info3 = reactive({
value: 80, //测量值
point: 88, //阈值
});
+setInterval(() => {
+ info.value = parseInt(Math.random() * 10) * 10;
+ info1.value = parseInt(Math.random() * 10) * 10;
+ info2.value = parseInt(Math.random() * 10) * 10;
+ info3.value = parseInt(Math.random() * 10) * 10;
+}, 2000);
diff --git a/src/components/content/badGasInfo/childComps/GasInfoItem.vue b/src/components/content/badGasInfo/childComps/GasInfoItem.vue
new file mode 100644
index 0000000..5d2ff3c
--- /dev/null
+++ b/src/components/content/badGasInfo/childComps/GasInfoItem.vue
@@ -0,0 +1,125 @@
+
+
+
+
+
+
+
diff --git a/src/components/content/fanInfo/FanInfo.vue b/src/components/content/fanInfo/FanInfo.vue
index 20b8966..29c2151 100644
--- a/src/components/content/fanInfo/FanInfo.vue
+++ b/src/components/content/fanInfo/FanInfo.vue
@@ -121,60 +121,110 @@ const option = {
series: [
{
type: "gauge",
- progress: {
- show: true,
- width: 15,
- lineStyle: {
- color: "yellow",
- },
- },
- axisLine: {
- lineStyle: {
- width: 5,
- },
- },
- axisTick: {
- show: false,
- },
- splitLine: {
- length: 15,
- lineStyle: {
- width: 1,
- color: "#099",
- },
- },
- axisLabel: {
- show: false,
- distance: 25,
- color: "#999",
- fontSize: 20,
- },
+ startAngle: -120,
+ endAngle: -420,
pointer: {
show: false,
},
- anchor: {
- show: false,
- showAbove: true,
- size: 0,
+ progress: {
+ show: true,
+ overlap: false,
+ roundCap: true,
+ clip: false,
itemStyle: {
borderWidth: 10,
+ borderColor: {
+ type: "linear",
+ x: 0,
+ y: 1,
+ x2: 0,
+ y2: 0,
+ colorStops: [
+ {
+ offset: 0,
+ color: "#4BB10E", // 0% 处的颜色
+ },
+ {
+ offset: 0.25,
+ color: "#B1AD0E", // 100% 处的颜色
+ },
+ {
+ offset: 0.75,
+ color: "#B1880E", // 100% 处的颜色
+ },
+ {
+ offset: 1,
+ color: "#D77E01", // 100% 处的颜色
+ },
+ ],
+ global: false, // 缺省为 false
+ },
+ color: {
+ type: "linear",
+ x: 0,
+ y: 1,
+ x2: 0,
+ y2: 0,
+ colorStops: [
+ {
+ offset: 0,
+ color: "#4BB10E", // 0% 处的颜色
+ },
+ {
+ offset: 0.25,
+ color: "#B1AD0E", // 100% 处的颜色
+ },
+ {
+ offset: 0.75,
+ color: "#B1880E", // 100% 处的颜色
+ },
+ {
+ offset: 1,
+ color: "#D77E01", // 100% 处的颜色
+ },
+ ],
+ global: false, // 缺省为 false
+ },
+ borderWidth: 10,
},
},
- title: {
- show: true,
+ max: 1000,
+ splitLine: {
+ show: false,
},
- detail: {
- valueAnimation: true,
- fontSize: 40,
- offsetCenter: [0, "0%"],
- formatter: "{value}Hz",
- color: "white",
+ axisTick: {
+ show: true,
+ splitNumber: 1,
+ length: 10,
+ },
+ axisLabel: {
+ show: false,
},
data: [
{
- value: 10,
+ value: 50,
+ fontSize: 2100,
+ detail: {
+ valueAnimation: true,
+ offsetCenter: ["0%", "0%"],
+ fontSize: 40,
+ color: "white",
+ },
},
],
+ axisLine: {
+ lineStyle: {
+ width: 3,
+ color: [[1, "#155F7C"]],
+ },
+ },
+ detail: {
+ width: 100,
+ height: 14,
+ fontSize: 26,
+ color: "inherit",
+ formatter: "{value}",
+ },
},
],
};
@@ -182,60 +232,110 @@ const option2 = {
series: [
{
type: "gauge",
- progress: {
- show: true,
- width: 15,
- lineStyle: {
- color: "yellow",
- },
- },
- axisLine: {
- lineStyle: {
- width: 5,
- },
- },
- axisTick: {
- show: false,
- },
- splitLine: {
- length: 15,
- lineStyle: {
- width: 1,
- color: "#099",
- },
- },
- axisLabel: {
- show: false,
- distance: 25,
- color: "#999",
- fontSize: 20,
- },
+ startAngle: -120,
+ endAngle: -420,
pointer: {
show: false,
},
- anchor: {
- show: false,
- showAbove: true,
- size: 0,
+ progress: {
+ show: true,
+ overlap: false,
+ roundCap: true,
+ clip: false,
itemStyle: {
borderWidth: 10,
+ borderColor: {
+ type: "linear",
+ x: 0,
+ y: 1,
+ x2: 0,
+ y2: 0,
+ colorStops: [
+ {
+ offset: 0,
+ color: "#4BB10E", // 0% 处的颜色
+ },
+ {
+ offset: 0.25,
+ color: "#B1AD0E", // 100% 处的颜色
+ },
+ {
+ offset: 0.75,
+ color: "#B1880E", // 100% 处的颜色
+ },
+ {
+ offset: 1,
+ color: "#D77E01", // 100% 处的颜色
+ },
+ ],
+ global: false, // 缺省为 false
+ },
+ color: {
+ type: "linear",
+ x: 0,
+ y: 1,
+ x2: 0,
+ y2: 0,
+ colorStops: [
+ {
+ offset: 0,
+ color: "#4BB10E", // 0% 处的颜色
+ },
+ {
+ offset: 0.25,
+ color: "#B1AD0E", // 100% 处的颜色
+ },
+ {
+ offset: 0.75,
+ color: "#B1880E", // 100% 处的颜色
+ },
+ {
+ offset: 1,
+ color: "#D77E01", // 100% 处的颜色
+ },
+ ],
+ global: false, // 缺省为 false
+ },
+ borderWidth: 10,
},
},
- title: {
- show: true,
+ max: 1000,
+ splitLine: {
+ show: false,
},
- detail: {
- valueAnimation: true,
- fontSize: 40,
- offsetCenter: [0, "0%"],
- formatter: "{value}Hz",
- color: "white",
+ axisTick: {
+ show: true,
+ splitNumber: 1,
+ length: 10,
+ },
+ axisLabel: {
+ show: false,
},
data: [
{
- value: 10,
+ value: 500,
+ fontSize: 2100,
+ detail: {
+ valueAnimation: true,
+ offsetCenter: ["0%", "0%"],
+ fontSize: 40,
+ color: "white",
+ },
},
],
+ axisLine: {
+ lineStyle: {
+ width: 3,
+ color: [[1, "#155F7C"]],
+ },
+ },
+ detail: {
+ width: 100,
+ height: 14,
+ fontSize: 26,
+ color: "inherit",
+ formatter: "{value}",
+ },
},
],
};
@@ -288,7 +388,9 @@ let isSAuto2 = ref("false");
height: 24px;
border: 2px solid #38cafb;
border-radius: 50%;
- text-align: center;
+ display: flex;
+ align-items: center;
+ justify-content: center;
}
::v-deep .el-radio__label {
font-size: 28px;
@@ -332,6 +434,19 @@ let isSAuto2 = ref("false");
height: 100%;
width: 30%;
margin: 0px 0px 0px 10px;
+ position: relative;
+ }
+ .echart::after {
+ content: "Hz";
+ font-size: 24px;
+ font-family: MicrosoftYaHei, MicrosoftYaHei;
+ font-weight: bold;
+ color: #ffffff;
+ line-height: 31px;
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, 60%);
}
.fan-name {
width: 39px;
diff --git a/src/components/content/windPressure/WindPressureList.vue b/src/components/content/windPressure/WindPressureList.vue
index 4f36e83..62bb015 100644
--- a/src/components/content/windPressure/WindPressureList.vue
+++ b/src/components/content/windPressure/WindPressureList.vue
@@ -9,7 +9,8 @@