forked from github/dataease
feat: 优化仪表盘页面loading
This commit is contained in:
parent
df0d2a9b22
commit
0f2f3983bb
@ -30,7 +30,6 @@ export function querySubjectWithGroup(data) {
|
||||
return request({
|
||||
url: '/panel/subject/querySubjectWithGroup',
|
||||
method: 'post',
|
||||
loading: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
@ -4,7 +4,6 @@ export function tree(data) {
|
||||
return request({
|
||||
url: '/api/panelView/tree',
|
||||
method: 'post',
|
||||
loading: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<el-row>
|
||||
<el-row v-loading="$store.getters.loadingMap[$store.getters.currentPath]">
|
||||
<el-row v-loading="slidersLoading">
|
||||
<el-col :span="2">
|
||||
<span> </span>
|
||||
<ul class="direction">
|
||||
@ -100,6 +100,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
sliders: [],
|
||||
slidersLoading: false,
|
||||
sliderWidth: 240,
|
||||
imgWidth: 240,
|
||||
currentIndex: 1,
|
||||
@ -150,8 +151,10 @@ export default {
|
||||
})
|
||||
},
|
||||
querySubjectWithGroup() {
|
||||
this.slidersLoading = true
|
||||
querySubjectWithGroup({}).then(response => {
|
||||
this.sliders = response.data
|
||||
this.slidersLoading = false
|
||||
})
|
||||
},
|
||||
move(offset, direction, speed) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-col>
|
||||
<el-col v-loading="loading">
|
||||
<el-row style="margin-top: 5px">
|
||||
<el-row style="margin-left: 5px;margin-right: 5px">
|
||||
<el-input
|
||||
@ -42,14 +42,14 @@
|
||||
</span>
|
||||
</el-tree>
|
||||
</el-row>
|
||||
<!-- <el-row v-if="detailItem&&detailItem.snapshot" class="detail-class">-->
|
||||
<!-- <el-card class="filter-card-class">-->
|
||||
<!-- <div slot="header" class="button-div-class">-->
|
||||
<!-- <span>{{ detailItem.name }}</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- <img draggable="false" class="view-list-thumbnails" :src="detailItem.snapshot" alt="">-->
|
||||
<!-- </el-card>-->
|
||||
<!-- </el-row>-->
|
||||
<!-- <el-row v-if="detailItem&&detailItem.snapshot" class="detail-class">-->
|
||||
<!-- <el-card class="filter-card-class">-->
|
||||
<!-- <div slot="header" class="button-div-class">-->
|
||||
<!-- <span>{{ detailItem.name }}</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- <img draggable="false" class="view-list-thumbnails" :src="detailItem.snapshot" alt="">-->
|
||||
<!-- </el-card>-->
|
||||
<!-- </el-row>-->
|
||||
</el-row>
|
||||
</el-col>
|
||||
</template>
|
||||
@ -68,7 +68,8 @@ export default {
|
||||
},
|
||||
data: [],
|
||||
showdetail: false,
|
||||
detailItem: null
|
||||
detailItem: null,
|
||||
loading: false
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -91,8 +92,10 @@ export default {
|
||||
},
|
||||
loadData() {
|
||||
const param = {}
|
||||
this.loading = true
|
||||
tree(param).then(res => {
|
||||
this.data = res.data
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
handleDragStart(node, ev) {
|
||||
|
Loading…
Reference in New Issue
Block a user