处理station页面加载的loading弹窗切换路由后依旧显示的问题
This commit is contained in:
parent
10d31adf6d
commit
08b707d45b
|
@ -180,6 +180,17 @@ export default {
|
||||||
ScrollContainer,
|
ScrollContainer,
|
||||||
DataListItem
|
DataListItem
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
"$route": {
|
||||||
|
handler:function(val,oldVal) {
|
||||||
|
if (val.name!=="station-operation") {
|
||||||
|
this.$message.destroy()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
deep:true,
|
||||||
|
immediate:true
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
activeKey: '1',
|
activeKey: '1',
|
||||||
|
@ -191,7 +202,7 @@ export default {
|
||||||
followedDataList: [], // 关注
|
followedDataList: [], // 关注
|
||||||
markerList: [], // 地图上标记点列表
|
markerList: [], // 地图上标记点列表
|
||||||
markerList_clone: [], // 地图上标记点列表
|
markerList_clone: [], // 地图上标记点列表
|
||||||
upDateStationList: [], // 地图上标记点列表
|
upDateStationList: [], // 有效率列表(显示波纹)
|
||||||
orgStationList: [], // 地图上标记点列表
|
orgStationList: [], // 地图上标记点列表
|
||||||
markerType: 1, // 是否绘制地图上的圆
|
markerType: 1, // 是否绘制地图上的圆
|
||||||
circleRadius: 0,
|
circleRadius: 0,
|
||||||
|
@ -254,13 +265,15 @@ export default {
|
||||||
|
|
||||||
// 查询台站数据提供率及有效率
|
// 查询台站数据提供率及有效率
|
||||||
async getDataProvisionEfficiency(arr, str) {
|
async getDataProvisionEfficiency(arr, str) {
|
||||||
if (str) {
|
if (str && this.$route.path=="/station-operation") {
|
||||||
this.$message.loading({ content: 'Loading station data, please wait...', key, duration: 0 })
|
this.$message.loading({ content: 'Loading station data, please wait...', key, duration: 0 })
|
||||||
}
|
}
|
||||||
getAction('/stationOperation/getDataProvisionEfficiency').then(res => {
|
getAction('/stationOperation/getDataProvisionEfficiency').then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$message.destroy()
|
this.$message.destroy()
|
||||||
str&&this.$message.success({ content: 'Loaded!', key, duration: 2 })
|
if (str && this.$route.path == "/station-operation") {
|
||||||
|
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") {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user