From ede8408dd31aaa8adc8c0aa374ce044c2e65fd8d Mon Sep 17 00:00:00 2001 From: duan Date: Fri, 12 Aug 2022 09:41:55 +0800 Subject: [PATCH] =?UTF-8?q?feat(src/views/reagent/envrecord):=20=E7=BB=99?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E7=9B=91=E6=8E=A7=E5=9B=BE=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?loading=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/reagent/envrecord/index.vue | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/views/reagent/envrecord/index.vue b/src/views/reagent/envrecord/index.vue index 4207184..f8cc656 100644 --- a/src/views/reagent/envrecord/index.vue +++ b/src/views/reagent/envrecord/index.vue @@ -28,7 +28,11 @@ -
+
@@ -154,12 +158,12 @@ export default { headerStyle: { 'background': '#E6E6E6' }, // 每日温度记录 tableData: [], - loading: false, + loading: true, daily_client_id: undefined, value: '', // 温度记录详情 dialogVisible: false, - recordLoading: false, + recordLoading: true, record_client_id: undefined, recordData: [], record_page: 1, @@ -168,7 +172,8 @@ export default { record_value: '', record_day: undefined, start_time: undefined, - end_time: undefined + end_time: undefined, + loadingLine: true } }, created() { @@ -179,8 +184,9 @@ export default { this.daily_client_id = this.client_id this.getMonitoringData() this.getDailyData() + this.initCharts() } - ).then(() => this.initCharts()) + ) }, beforeDestroy() { window.removeEventListener('resize', () => { @@ -212,11 +218,12 @@ export default { time_type: this.client_date, obj_type: this.radio1 } + this.loadingLine = true get_monitoring_info(stringify(data)).then( res => { this.linechartData = res.data } - ) + ).finally(() => { this.loadingLine = false }) }, initCharts() { this.lineCharts()