diff --git a/src/views/stationOperation/index.vue b/src/views/stationOperation/index.vue index a2bb765..0a19a45 100644 --- a/src/views/stationOperation/index.vue +++ b/src/views/stationOperation/index.vue @@ -254,21 +254,27 @@ export default { // 查询台站数据提供率及有效率 async getDataProvisionEfficiency(arr, str) { if (str) { - this.$message.loading({ content: 'Loading...', key, duration: 9 }) + this.$message.loading({ content: 'Loading station data, please wait...', key, duration: 0 }) } 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") { - item.stationType = el.stationType - item.stationId = el.stationId - } + if (res.success) { + this.$message.destroy() + 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") { + item.stationType = el.stationType + item.stationId = el.stationId + } + }) }) - }) - this.orgStationList = res.result - this.upDateStationList = res.result - }).catch (error=> { + this.orgStationList = res.result + this.upDateStationList = res.result + } else { + this.$message.warning("This operation fails. Contact your system administrator") + } + }).catch(error => { + this.$message.destroy() console.error(error) }) },