数据接受统计弹窗在等待接口数据的时候,弹窗内增加 loading...

This commit is contained in:
renpy 2023-08-29 16:32:39 +08:00
parent cf40e88018
commit 14eb95081c
2 changed files with 12 additions and 3 deletions

View File

@ -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

View File

@ -14,7 +14,9 @@
</div>
</div>
<!-- 图例结束 -->
<custom-chart ref="customChartRef" :option="option" :height="list.length * 295"></custom-chart>
<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: () => []