zhouwenxuan
2023-10-17 347758e6a496ed956cb99c67c54a16a84da31638
筛选气体监测阈值
已修改2个文件
15 ■■■■■ 文件已修改
src/views/monitorData/gasData/index.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/monitorData/weatherData/index.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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();
}
src/views/monitorData/weatherData/index.vue
@@ -226,9 +226,8 @@
};
const search = () => {
    console.log("vla",state.tableData.listQuery.searchParams)
    changeWeather(state.tableData.listQuery.searchParams.weatherType);
    initInfoData();
    changeWeather(state.tableData.listQuery.searchParams.weatherType);
}
const reset = () => {
    getNowTime();