From f3acb8ce787f3df0eda633031473be4e6a9ff448 Mon Sep 17 00:00:00 2001 From: zmc <zmc_li@foxmail.com> Date: 星期四, 12 十月 2023 16:56:28 +0800 Subject: [PATCH] 油烟 更新了实时监控页面 --- src/views/analysis/graph/DayData.vue | 26 +++++++++----------------- 1 files changed, 9 insertions(+), 17 deletions(-) diff --git a/src/views/analysis/graph/DayData.vue b/src/views/analysis/graph/DayData.vue index 940909e..f9f263c 100644 --- a/src/views/analysis/graph/DayData.vue +++ b/src/views/analysis/graph/DayData.vue @@ -1,24 +1,10 @@ <template> <div class="search-container"> <el-container> - <!-- <el-header> - <el-header style="text-align:right; font-size:15px "> - <i class="el-icon-s-data" style="font-size: 15px;color:rgb(226,207,207);margin-right:10px;"></i> - <span style="color:rgb(226,207,207);">鏃ユ暟鎹�</span> - </el-header> - </el-header> --> + <el-main> <el-form :inline="true" :model="form" class="demo-form-inline"> - <!-- <el-form-item label="璁惧缂栧彿"> - <el-select class="checkbox" v-model="devId" placeholder="璇烽�夋嫨璁惧缂栧彿"> - <el-option - v-for="item in options" - :key="item.label" - :label="item.label" - :value="item.label"> - </el-option> - </el-select> --> <el-form-item label="搴楅摵鍚嶅拰璁惧缂栧彿"> <el-cascader :options="options" @@ -52,12 +38,12 @@ </el-form-item> <el-form-item> - <el-button type="primary" @click="fetchData">灞曠ず鍥�</el-button> + <el-button type="primary" :loading="button.showChartButton" @click="fetchData">灞曠ず鍥�</el-button> </el-form-item> </el-form> <el-card v-loading="loading"> - <div class="chart-container" ref="chart" v-show="!isNoData"></div> + <div class="chart-container" ref="chart" v-show="!isNoData"></div> <el-empty v-show="isNoData" :image-size="200" /> </el-card> </el-main> @@ -71,6 +57,10 @@ export default { data() { return { + button:{ + // 灞曠ず鍥剧殑鎸夐挳 + showChartButton:false, + }, isNoData:false, loading: false, chartData: [], //淇濆瓨鏌ヨ鐨勭粨鏋� @@ -257,12 +247,14 @@ params['end'] = this.end; } this.loading = true; + this.button.showChartButton = true axiosInstanceInstance .get('/data/id', { params: params }) .then((response) => { this.chartData = response.data.data; this.loading = false; + this.button.showChartButton = false if(response.data.data.length==0){ alert('璇ユ椂娈垫棤鏁版嵁') this.isNoData = true -- Gitblit v1.9.3