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) - } + }) }, // 获取已关注站点列表