fix: 报告页面补充 loading 动画效果,自动刷新逻辑调整
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
width: 288px;
|
||||
height: 100%;
|
||||
border-right: 1px solid #E7EAED;
|
||||
position: relative;
|
||||
.cn-builtin-left-title {
|
||||
padding: 28px 0 26px 13px;
|
||||
font-size: 16px;
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
:height="height"
|
||||
:expand-row-keys="expandedIds"
|
||||
row-key="id"
|
||||
v-loading="toolsLoading"
|
||||
border
|
||||
tooltip-effect="light"
|
||||
@header-dragend="dragend"
|
||||
@@ -107,6 +108,11 @@
|
||||
<span v-if="item.prop === 'timeLimit'">
|
||||
{{handleTimeRange(scope.row)}}
|
||||
</span>
|
||||
<span v-else-if="item.prop === 'categoryId'">
|
||||
<span v-for="item in categoryList">
|
||||
<span v-if="scope.row.categoryId === item.id">{{item.name}}</span>
|
||||
</span>
|
||||
</span>
|
||||
<span v-else-if="item.prop === 'timePlan'">
|
||||
<template v-if="scope.row.config.isScheduler === 0">
|
||||
{{$t('report.always')}}
|
||||
@@ -217,6 +223,10 @@ export default {
|
||||
Loading,
|
||||
chartDetectionPagination
|
||||
},
|
||||
props: {
|
||||
categoryList: Array,
|
||||
toolsLoading: Boolean
|
||||
},
|
||||
inject: ['reload'],
|
||||
data () {
|
||||
return {
|
||||
@@ -227,7 +237,12 @@ export default {
|
||||
label: 'ID',
|
||||
prop: 'id',
|
||||
show: true,
|
||||
width: 40
|
||||
width: 50
|
||||
}, {
|
||||
label: this.$t('report.categoryType'),
|
||||
prop: 'categoryId',
|
||||
show: true,
|
||||
minWidth: 180
|
||||
}, {
|
||||
label: this.$t('config.user.name'),
|
||||
prop: 'name',
|
||||
@@ -384,7 +399,7 @@ export default {
|
||||
})
|
||||
}
|
||||
this.loadingDown = false
|
||||
const showInterval = this.downDataList.find(item => item.percent !== 1)
|
||||
const showInterval = this.downDataList.find(item => item.percent !== 1 && item.state !== 2)
|
||||
if (this.downDataList && showInterval) {
|
||||
this.intervalChange(param)
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<div class="cn-builtin">
|
||||
<div class="cn-builtin-left">
|
||||
<loading :loading="builtinLeftLoading"></loading>
|
||||
<div class="cn-builtin-left-title">
|
||||
{{$t('report.category')}}
|
||||
</div>
|
||||
@@ -34,9 +35,10 @@
|
||||
<template #default>
|
||||
<builtin-report-table
|
||||
ref="dataTable"
|
||||
v-loading="tools.loading"
|
||||
:tools-loading="tools.loading"
|
||||
:api="url"
|
||||
:custom-table-title="tools.customTableTitle"
|
||||
:category-list="builtinReportLeftMenu"
|
||||
:height="mainTableHeight"
|
||||
:table-data="tableData"
|
||||
@delete="del"
|
||||
@@ -75,6 +77,7 @@ import cnDataList from '@/components/table/CnDataList'
|
||||
import dataListMixin from '@/mixins/data-list'
|
||||
import { api } from '@/utils/api'
|
||||
import ReportBox from '@/components/rightBox/report/ReportBox'
|
||||
import Loading from '@/components/common/Loading'
|
||||
|
||||
export default {
|
||||
name: 'Report',
|
||||
@@ -141,17 +144,20 @@ export default {
|
||||
'report.november',
|
||||
'report.december'
|
||||
],
|
||||
tableId: 'builtinReportTable'
|
||||
tableId: 'builtinReportTable',
|
||||
builtinLeftLoading: false
|
||||
}
|
||||
},
|
||||
mixins: [dataListMixin],
|
||||
components: {
|
||||
Loading,
|
||||
cnDataList,
|
||||
builtinReportTable,
|
||||
ReportBox
|
||||
},
|
||||
methods: {
|
||||
queryGetTempData () {
|
||||
this.builtinLeftLoading = true
|
||||
get(api.reportCategory).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.builtinReportLeftMenu = res.data.list.map(c => {
|
||||
@@ -161,6 +167,7 @@ export default {
|
||||
}
|
||||
})
|
||||
}
|
||||
this.builtinLeftLoading = false
|
||||
})
|
||||
},
|
||||
getTableData (params) {
|
||||
|
||||
Reference in New Issue
Block a user