数据接受统计弹窗在等待接口数据的时候,弹窗内增加 loading...
This commit is contained in:
parent
cf40e88018
commit
14eb95081c
|
@ -233,7 +233,7 @@
|
|||
<!-- 右侧图表展示栏 -->
|
||||
<div class="data-receive-status-chart" :class="{ 'on-screen': !leftPaneShow }">
|
||||
<template v-if="showChart">
|
||||
<RealTimeDataChart ref="realtimeChartRef" :list="statusList" :scale-settings="initialDataRecieveSettings" />
|
||||
<RealTimeDataChart ref="realtimeChartRef" :spinning="spinLoading" :list="statusList" :scale-settings="initialDataRecieveSettings" />
|
||||
<resize-observer @notify="handleResize" />
|
||||
</template>
|
||||
</div>
|
||||
|
@ -419,7 +419,8 @@ export default {
|
|||
|
||||
markerList: [], // 要在地图上展示的marker列表
|
||||
|
||||
showPane: true
|
||||
showPane: true,
|
||||
spinLoading: false
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
@ -720,6 +721,7 @@ export default {
|
|||
|
||||
// 获取数据接收状态列表
|
||||
async getDataRecieveStatusList() {
|
||||
this.spinLoading = true
|
||||
try {
|
||||
this.isGettingStatusList = true
|
||||
const { success, result, message } = await getAction(
|
||||
|
@ -728,6 +730,7 @@ export default {
|
|||
userId: this.$store.getters.userInfo.id
|
||||
}
|
||||
)
|
||||
this.spinLoading = false
|
||||
if (success) {
|
||||
const statusList = []
|
||||
result.forEach(item => {
|
||||
|
@ -746,6 +749,7 @@ export default {
|
|||
this.$message.error(message)
|
||||
}
|
||||
} catch (error) {
|
||||
this.spinLoading = false
|
||||
console.error(error)
|
||||
} finally {
|
||||
this.isGettingStatusList = false
|
||||
|
|
|
@ -14,7 +14,9 @@
|
|||
</div>
|
||||
</div>
|
||||
<!-- 图例结束 -->
|
||||
<a-spin :spinning="spinning">
|
||||
<custom-chart ref="customChartRef" :option="option" :height="list.length * 295"></custom-chart>
|
||||
</a-spin>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -79,6 +81,9 @@ export default {
|
|||
title: {
|
||||
type: String
|
||||
},
|
||||
spinning: {
|
||||
type: Boolean
|
||||
},
|
||||
list: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
|
|
Loading…
Reference in New Issue
Block a user