等待接口返回数据的提示消息内容,及错误提示调整

This commit is contained in:
renpy 2023-08-29 15:47:01 +08:00
parent f442e5e758
commit f4917341b6

View File

@ -254,21 +254,27 @@ export default {
// //
async getDataProvisionEfficiency(arr, str) { async getDataProvisionEfficiency(arr, str) {
if (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 => { getAction('/stationOperation/getDataProvisionEfficiency').then(res => {
str&&this.$message.success({ content: 'Loaded!', key, duration: 2 }) if (res.success) {
res.result.forEach(item => { this.$message.destroy()
arr.forEach(el => { str&&this.$message.success({ content: 'Loaded!', key, duration: 2 })
if (parseInt(item.id) == el.stationId&&el.stationType!="Nuclear Facility"&&el.stationType!="NRL") { res.result.forEach(item => {
item.stationType = el.stationType arr.forEach(el => {
item.stationId = el.stationId 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.orgStationList = res.result this.upDateStationList = res.result
this.upDateStationList = res.result } else {
}).catch (error=> { this.$message.warning("This operation fails. Contact your system administrator")
}
}).catch(error => {
this.$message.destroy()
console.error(error) console.error(error)
}) })
}, },