From 36eca74de22035b411be8834e7e5049f0c0bf74c Mon Sep 17 00:00:00 2001 From: 13507605001 Date: Wed, 30 Nov 2022 14:12:14 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8E=AF=E5=A2=83=E7=9B=91=E6=8E=A7=E5=9B=BE?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/reagent/envrecord/index.vue | 18 ++++++++++-------- src/views/reagent/mainoverview/index.vue | 12 ++++++------ 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/src/views/reagent/envrecord/index.vue b/src/views/reagent/envrecord/index.vue index b0dbaf4..4e8b864 100644 --- a/src/views/reagent/envrecord/index.vue +++ b/src/views/reagent/envrecord/index.vue @@ -196,7 +196,7 @@ export default { value: '', // 温度记录详情 dialogVisible: false, - recordLoading: true, + recordLoading: false, record_client_id: undefined, recordData: [], record_page: 1, @@ -206,17 +206,17 @@ export default { record_day: undefined, start_time: undefined, end_time: undefined, - loadingLine: true + loadingLine: false } }, created() { if (this.$store.getters.currentOptions.length > 0) { this.client_id = this.$store.getters.currentOptions[0].client_id this.daily_client_id = this.client_id + this.getMonitoringData() + this.getDailyData() + // this.initCharts() } - this.getMonitoringData() - this.getDailyData() - this.initCharts() }, beforeDestroy() { window.removeEventListener('resize', () => { @@ -295,20 +295,22 @@ export default { get_monitoring_info(stringify(data)).then( res => { this.linechartData = res.data + this.lineCharts(t) } ).finally(() => { this.loadingLine = false }) }, initCharts() { - this.$nextTick(() => { - this.lineCharts() - }) + // this.$nextTick(() => { + // this.lineCharts() + // }) window.addEventListener('resize', () => { this.myChart2.resize() }) }, lineCharts(t) { + console.log('0101222222222', t) if (t) { this.myChart2.clear() } else { diff --git a/src/views/reagent/mainoverview/index.vue b/src/views/reagent/mainoverview/index.vue index a110221..c708450 100644 --- a/src/views/reagent/mainoverview/index.vue +++ b/src/views/reagent/mainoverview/index.vue @@ -400,13 +400,13 @@ export default { this.loading = true this.client_id = this.$store.getters.currentOptions[0].client_id this.rclient_id = this.client_id + this.getMonitoringData() + home_info().then(res => { + this.initDataFunc(res.data) + this.initAllCharts() + }).finally(() => (this.loading = false)) + this.remainingPageChange(1) } - this.getMonitoringData() - home_info().then(res => { - this.initDataFunc(res.data) - this.initAllCharts() - }).finally(() => (this.loading = false)) - this.remainingPageChange(1) }, beforeDestroy() { window.removeEventListener('resize', () => {