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/HistoryFume.vue | 30 ++++++++++++------------------ 1 files changed, 12 insertions(+), 18 deletions(-) diff --git a/src/views/HistoryFume.vue b/src/views/HistoryFume.vue index 19cca83..ec814a2 100644 --- a/src/views/HistoryFume.vue +++ b/src/views/HistoryFume.vue @@ -5,7 +5,6 @@ import axiosInstanceInstance from '../utils/request.js' import TimeSelect from '../sfc/TimeSelect.vue'; -// import ShopNameAndID from '../sfc/TimeSelect.vue'; const ShopNameAndID = defineAsyncComponent(() => import('../sfc/../sfc/ShopNameAndID.vue') @@ -23,6 +22,10 @@ }, data() { return { + button:{ + // 鏌ヨ鐨勬寜閽� + queryButton:false, + }, // 绌虹姸鎬� isNoData:false, // 涓嬫媺妗嗕竴寮�濮嬪睍绀虹殑鍚嶅瓧 @@ -159,7 +162,6 @@ } ] } - console.log('option涓猴細',this.options); } else if (this.radio == 2) { // x杞存棩鏈熸椂闂� @@ -197,7 +199,6 @@ ] } - console.log('option涓猴細',this.options); } else { // x杞存棩鏈熸椂闂� @@ -241,11 +242,8 @@ ] } } - console.log('option涓猴細',this.options); } - else{ - console.log('exceedingData鏃犳暟鎹�'); - } + }, @@ -262,7 +260,6 @@ this.exportBeginTime =this.beginTime this.exportEndTime = this.endTime - console.log(this.currentDateTime, this.oneWeekAgoDateTime); let params = {}; params['devId'] = 'qinshi_31010320210010'; @@ -285,9 +282,6 @@ this.total = this.exceedingData.length; // 榛樿鏄剧ず绗竴椤� this.handleCurrentChange(1); - // this.drawChart(); - this.loading = false; - console.log('鍘嗗彶鏁版嵁涓猴細', this.exceedingData); }) }, @@ -312,6 +306,7 @@ params['endTime'] = this.endTime; } this.loading=true + this.button.queryButton = true axiosInstanceInstance .get('/fume/history', { params: params }) .then((response) => { @@ -319,7 +314,7 @@ // 淇濆瓨杩斿洖鐨� this.exceedingData = response.data.data; this.loading=false - + this.button.queryButton = false if(response.data.data.length==0){ ElMessage('璇ユ椂娈垫棤鏁版嵁') this.isNoData = true @@ -327,13 +322,10 @@ } // 绉婚櫎绌烘暟鎹姸鎬� this.isNoData = false - // this.displayData = response.data.data //琛ㄦ牸娓叉煋 // 鍒嗛〉 this.total = this.exceedingData.length; // 榛樿鏄剧ず绗竴椤� this.handleCurrentChange(1); - // 灞曠ず鎶樼嚎鍥� - // this.drawChart(); }) }, @@ -368,7 +360,6 @@ axiosInstanceInstance.get('/fume/export', { params: params }).then((result) => { this.exportData = result.data.data; - console.log(this.exportData); }); }, exportExcel() { @@ -432,7 +423,6 @@ const year2 = date2.getFullYear(); const month2 = date2.getMonth(); const day2 = date2.getDate(); - console.log(month1, month2); // 鍒ゆ柇涓や釜鏃ユ湡鏄惁鐩稿樊涓�涓湀 if (year1 === year2) { @@ -488,7 +478,7 @@ <!-- <el-date-picker v-model="beginTime" type="datetime" placeholder="寮�濮嬫椂闂�" value-format="YYYY-MM-DD HH:mm:ss" /> <el-date-picker v-model="endTime" type="datetime" placeholder="缁撴潫鏃堕棿" value-format="YYYY-MM-DD HH:mm:ss" /> --> <TimeSelect @submit-time="giveTime"></TimeSelect> - <el-button type="primary" plain @click="lineChart">鏌ヨ</el-button> + <el-button type="primary" plain :loading="button.queryButton" @click="lineChart">鏌ヨ</el-button> <el-tooltip @@ -680,4 +670,8 @@ .el-table { color: #000000; } +.chart-container { + height: 60vh; + width:80vw +} </style> -- Gitblit v1.9.3