From 347758e6a496ed956cb99c67c54a16a84da31638 Mon Sep 17 00:00:00 2001
From: zhouwenxuan <1175765986@qq.com>
Date: Tue, 17 Oct 2023 14:08:04 +0800
Subject: [PATCH] 筛选气体监测阈值
---
src/views/monitorData/gasData/index.vue | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/views/monitorData/gasData/index.vue b/src/views/monitorData/gasData/index.vue
index 043df7a..3bc9b1d 100644
--- a/src/views/monitorData/gasData/index.vue
+++ b/src/views/monitorData/gasData/index.vue
@@ -149,8 +149,6 @@
return item.gasValue;
})
dataZoomEnd.value = xData.value.length > 25 ? 30 : 100;
- markLines.value = 110;
-
}else {
xData.value = [];
yData.value = [];
@@ -195,7 +193,10 @@
let res = await gasManageApi().getGas({});
if(res.data.code == 100) {
state.tableData.gasList = res.data.data;
+ console.log("气体",state.tableData.gasList)
+ //默认选择第一个气体
state.tableData.listQuery.searchParams.gas = state.tableData.gasList[0].id;
+ markLines.value = state.tableData.gasList[0].threshold;
initInfoData();
}else {
ElMessage({
@@ -216,12 +217,17 @@
};
const search = () => {
state.tableData.listQuery.pageIndex = 1;
+ const gasObj = state.tableData.gasList.filter(item => {
+ return item.id == state.tableData.listQuery.searchParams.gas
+ });
+ markLines.value = gasObj[0].threshold;
+
initInfoData();
- console.log("vla",state.tableData.listQuery.searchParams)
}
const reset = () => {
getNowTime();
state.tableData.listQuery.searchParams.gas = state.tableData.gasList[0].id;
+ markLines.value = state.tableData.gasList[0].threshold;
state.tableData.listQuery.pageIndex = 1;
initInfoData();
}
--
Gitblit v1.9.2