From f4917341b6b46d6c953bbeff018ef5af6bebb027 Mon Sep 17 00:00:00 2001 From: renpy Date: Tue, 29 Aug 2023 15:47:01 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AD=89=E5=BE=85=E6=8E=A5=E5=8F=A3=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E6=95=B0=E6=8D=AE=E7=9A=84=E6=8F=90=E7=A4=BA=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E5=86=85=E5=AE=B9=EF=BC=8C=E5=8F=8A=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/stationOperation/index.vue | 30 +++++++++++++++++----------- 1 file changed, 18 insertions(+), 12 deletions(-) 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) }) },