台站有效率接口等待响应期间增加提示,得到相应之后再关掉this.$message.loading('Loading station data, please wait...', 0);
This commit is contained in:
parent
9cf8508741
commit
f442e5e758
|
@ -171,7 +171,7 @@ import DataListItem from './components/DataListItem.vue'
|
||||||
import ScrollContainer from '@/components/ScrollContainer/index.vue'
|
import ScrollContainer from '@/components/ScrollContainer/index.vue'
|
||||||
import { getAction } from '../../api/manage'
|
import { getAction } from '../../api/manage'
|
||||||
import { cloneDeep } from 'lodash'
|
import { cloneDeep } from 'lodash'
|
||||||
|
const key= "updateList"
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
Map,
|
Map,
|
||||||
|
@ -235,7 +235,7 @@ export default {
|
||||||
this.dataList = cloneDeep(res)
|
this.dataList = cloneDeep(res)
|
||||||
this.markerList = cloneDeep(res)
|
this.markerList = cloneDeep(res)
|
||||||
this.markerList_clone = cloneDeep(res)
|
this.markerList_clone = cloneDeep(res)
|
||||||
this.getDataProvisionEfficiency(this.markerList_clone)
|
this.getDataProvisionEfficiency(this.markerList_clone,"one")
|
||||||
this.timer = setInterval(() => {
|
this.timer = setInterval(() => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.getDataProvisionEfficiency(this.markerList_clone)
|
this.getDataProvisionEfficiency(this.markerList_clone)
|
||||||
|
@ -252,9 +252,12 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
// 查询台站数据提供率及有效率
|
// 查询台站数据提供率及有效率
|
||||||
async getDataProvisionEfficiency(arr) {
|
async getDataProvisionEfficiency(arr, str) {
|
||||||
try {
|
if (str) {
|
||||||
const res = await getAction('/stationOperation/getDataProvisionEfficiency')
|
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 => {
|
res.result.forEach(item => {
|
||||||
arr.forEach(el => {
|
arr.forEach(el => {
|
||||||
if (parseInt(item.id) == el.stationId&&el.stationType!="Nuclear Facility"&&el.stationType!="NRL") {
|
if (parseInt(item.id) == el.stationId&&el.stationType!="Nuclear Facility"&&el.stationType!="NRL") {
|
||||||
|
@ -265,9 +268,9 @@ export default {
|
||||||
})
|
})
|
||||||
this.orgStationList = res.result
|
this.orgStationList = res.result
|
||||||
this.upDateStationList = res.result
|
this.upDateStationList = res.result
|
||||||
} catch (error) {
|
}).catch (error=> {
|
||||||
console.error(error)
|
console.error(error)
|
||||||
}
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 获取已关注站点列表
|
// 获取已关注站点列表
|
||||||
|
|
Loading…
Reference in New Issue
Block a user