From f442e5e7587f825663c10f89894eb3e5228f856a Mon Sep 17 00:00:00 2001 From: renpy Date: Tue, 29 Aug 2023 15:10:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=B0=E7=AB=99=E6=9C=89=E6=95=88=E7=8E=87?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E7=AD=89=E5=BE=85=E5=93=8D=E5=BA=94=E6=9C=9F?= =?UTF-8?q?=E9=97=B4=E5=A2=9E=E5=8A=A0=E6=8F=90=E7=A4=BA,=E5=BE=97?= =?UTF-8?q?=E5=88=B0=E7=9B=B8=E5=BA=94=E4=B9=8B=E5=90=8E=E5=86=8D=E5=85=B3?= =?UTF-8?q?=E6=8E=89this.$message.loading('Loading=20station=20data,=20ple?= =?UTF-8?q?ase=20wait...',=200);?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/stationOperation/index.vue | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/views/stationOperation/index.vue b/src/views/stationOperation/index.vue index ffdbdbb..a2bb765 100644 --- a/src/views/stationOperation/index.vue +++ b/src/views/stationOperation/index.vue @@ -171,7 +171,7 @@ import DataListItem from './components/DataListItem.vue' import ScrollContainer from '@/components/ScrollContainer/index.vue' import { getAction } from '../../api/manage' import { cloneDeep } from 'lodash' - +const key= "updateList" export default { components: { Map, @@ -235,7 +235,7 @@ export default { this.dataList = cloneDeep(res) this.markerList = cloneDeep(res) this.markerList_clone = cloneDeep(res) - this.getDataProvisionEfficiency(this.markerList_clone) + this.getDataProvisionEfficiency(this.markerList_clone,"one") this.timer = setInterval(() => { setTimeout(() => { this.getDataProvisionEfficiency(this.markerList_clone) @@ -252,9 +252,12 @@ export default { }, // 查询台站数据提供率及有效率 - async getDataProvisionEfficiency(arr) { - try { - const res = await getAction('/stationOperation/getDataProvisionEfficiency') + async getDataProvisionEfficiency(arr, str) { + if (str) { + this.$message.loading({ content: 'Loading...', key, duration: 9 }) + } + getAction('/stationOperation/getDataProvisionEfficiency').then(res => { + str&&this.$message.success({ content: 'Loaded!', key, duration: 2 }) res.result.forEach(item => { arr.forEach(el => { if (parseInt(item.id) == el.stationId&&el.stationType!="Nuclear Facility"&&el.stationType!="NRL") { @@ -265,9 +268,9 @@ export default { }) this.orgStationList = res.result this.upDateStationList = res.result - } catch (error) { + }).catch (error=> { console.error(error) - } + }) }, // 获取已关注站点列表