添加loading

dev_review
yujialong 11 months ago
parent 09d3eaa5d8
commit effa4606b7
  1. 5
      src/views/customer/customer.vue
  2. 4
      src/views/match/list/index.vue
  3. 4
      src/views/match/manage/matchArchList.vue
  4. 19
      src/views/match/manage/matchRank.vue
  5. 14
      src/views/match/manage/matchSignup.vue
  6. 10
      src/views/serve/projectAdd.vue
  7. 4
      src/views/user/User.vue

@ -1,5 +1,5 @@
<template> <template>
<div> <div v-loading="loading">
<el-card shadow="hover" <el-card shadow="hover"
class="mgb20"> class="mgb20">
<div> <div>
@ -85,8 +85,7 @@
v-auth>批量删除</el-button> v-auth>批量删除</el-button>
</div> </div>
</div> </div>
<el-table v-loading="loading" <el-table :data="listData"
:data="listData"
class="table" class="table"
ref="table" ref="table"
stripe stripe

@ -1,5 +1,6 @@
<template> <template>
<div class="page"> <div class="page"
v-loading="loading">
<h6 class="p-title">筛选</h6> <h6 class="p-title">筛选</h6>
<div class="tool mul"> <div class="tool mul">
<ul class="filter"> <ul class="filter">
@ -82,7 +83,6 @@
stripe stripe
header-align="center" header-align="center"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
v-loading="loading"
row-key="id"> row-key="id">
<el-table-column type="selection" <el-table-column type="selection"
width="55" width="55"

@ -387,12 +387,12 @@ export default {
stageId: this.stageId, stageId: this.stageId,
isNakadai: 1 isNakadai: 1
}) })
this.loading = false
this.total = page.total this.total = page.total
this.list = page.records this.list = page.records
this.statData = data this.statData = data
this.avgScore = (+data.avgScore).toFixed(2) this.avgScore = (+data.avgScore).toFixed(2)
this.getChart() this.method != 2 && this.getChart()
this.loading = false
} }
}, },
initData () { initData () {

@ -11,6 +11,7 @@
</el-card> </el-card>
<el-card shadow="hover" <el-card shadow="hover"
v-loading="loading"
class="m-b-20"> class="m-b-20">
<div class="tabs"> <div class="tabs">
<template v-for="(item, i) in grades"> <template v-for="(item, i) in grades">
@ -60,7 +61,6 @@
ref="table" ref="table"
stripe stripe
row-key="scoreId" row-key="scoreId"
v-loading="loading"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
header-align="center"> header-align="center">
<el-table-column type="selection" <el-table-column type="selection"
@ -372,6 +372,7 @@ export default {
}, },
// //
getRank () { getRank () {
this.loading = true
// //
if (this.type) { if (this.type) {
this.$post(this.api.manuallyUploadedRankings, { this.$post(this.api.manuallyUploadedRankings, {
@ -389,7 +390,9 @@ export default {
this.total = message.total this.total = message.total
this.getPublishTime() this.getPublishTime()
this.loading = false this.loading = false
}).catch(res => { }) }).catch(res => {
this.loading = false
})
} else { // } else { //
if (!this.active) { if (!this.active) {
// //
@ -408,7 +411,9 @@ export default {
this.total = total this.total = total
this.getPublishTime() this.getPublishTime()
this.loading = false this.loading = false
}).catch(res => { }) }).catch(res => {
this.loading = false
})
} else { } else {
// //
this.$post(`${this.api.stageRaceRanking}?competitionId=${this.id}&stageId=${this.active}&pageNum=${this.page}&pageSize=${this.pageSize}&publicationType=${this.type}&keyword=${this.keyword}`).then(({ page, total, publishStatus }) => { this.$post(`${this.api.stageRaceRanking}?competitionId=${this.id}&stageId=${this.active}&pageNum=${this.page}&pageSize=${this.pageSize}&publicationType=${this.type}&keyword=${this.keyword}`).then(({ page, total, publishStatus }) => {
@ -417,7 +422,9 @@ export default {
this.total = total this.total = total
this.getPublishTime() this.getPublishTime()
this.loading = false this.loading = false
}).catch(res => { }) }).catch(res => {
this.loading = false
})
} }
} }
}, },
@ -443,8 +450,8 @@ export default {
} }
}, },
// //
typeChange (val) { async typeChange (val) {
this.$post(`${this.api.toggleTheSortingMode}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}&whetherToManuallyPublish=${this.type}`).then(res => { }).catch(res => { }) await this.$post(`${this.api.toggleTheSortingMode}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}&whetherToManuallyPublish=${this.type}`)
this.getRank() this.getRank()
}, },
initData () { initData () {

@ -54,6 +54,7 @@
header-align="center" header-align="center"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
row-key="id" row-key="id"
v-loading="loading"
@sort-change="sortChange"> @sort-change="sortChange">
<el-table-column type="selection" <el-table-column type="selection"
width="80" width="80"
@ -437,7 +438,8 @@ export default {
}, },
uploading: false, uploading: false,
isBackstage: 0, isBackstage: 0,
exporting: false exporting: false,
loading: false,
}; };
}, },
watch: { watch: {
@ -459,8 +461,9 @@ export default {
this.getTeam() this.getTeam()
this.getClient() this.getClient()
}, },
getData () { async getData () {
this.$post(this.api.queryRegistrationByCondition, { this.loading = true
const { data } = await this.$post(this.api.queryRegistrationByCondition, {
pageNum: this.page, pageNum: this.page,
pageSize: this.pageSize, pageSize: this.pageSize,
competitionId: this.id, competitionId: this.id,
@ -468,7 +471,7 @@ export default {
isDisable: this.isDisable, isDisable: this.isDisable,
schoolOrder: this.schoolOrder, schoolOrder: this.schoolOrder,
teamOrder: this.teamOrder, teamOrder: this.teamOrder,
}).then(({ data }) => { })
const list = data.records; const list = data.records;
list.map(e => { list.map(e => {
if (e.teacherDetails) { if (e.teacherDetails) {
@ -478,8 +481,7 @@ export default {
this.listData = list this.listData = list
this.total = data.total; this.total = data.total;
this.$refs.table.clearSelection(); this.$refs.table.clearSelection();
}).catch(res => { this.loading = false
});
}, },
// //
getInfo () { getInfo () {

@ -1,6 +1,7 @@
<template> <template>
<div ref="main" <div ref="main"
class="main"> class="main"
v-loading="loading">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="24"> <el-col :span="24">
<el-card shadow="hover" <el-card shadow="hover"
@ -389,7 +390,8 @@ export default {
listLoading: false,// listLoading: false,//
submiting: false, // submiting: false, //
updateTime: 0, updateTime: 0,
savingJud: false savingJud: false,
loading: false,
}; };
}, },
computed: { computed: {
@ -463,6 +465,7 @@ export default {
}, },
getInfoData () { // getInfoData () { //
if (!this.isToPoint) { if (!this.isToPoint) {
this.loading = true
this.$get(`${this.api.getProjectDetail}?projectId=${this.projectId}`).then(res => { this.$get(`${this.api.getProjectDetail}?projectId=${this.projectId}`).then(res => {
let { projectManage, projectJudgmentVos } = res; let { projectManage, projectJudgmentVos } = res;
if (!projectManage.remark) projectManage.remark = projectManage.projectName // if (!projectManage.remark) projectManage.remark = projectManage.projectName //
@ -475,12 +478,13 @@ export default {
this.projectJudgmentData.forEach((e, i) => { this.projectJudgmentData.forEach((e, i) => {
e.sort = i + 1; e.sort = i + 1;
}); });
this.loading = false
this.$nextTick(() => { this.$nextTick(() => {
this.updateTime = 0 this.updateTime = 0
this.$refs.main.scrollTop = 0; this.$refs.main.scrollTop = 0;
}); });
}).catch(err => { }).catch(err => {
console.log(err); this.loading = false
}); });
} }
}, },

@ -1,5 +1,6 @@
<template> <template>
<div class="wrap"> <div class="wrap"
v-loading="loading">
<el-card shadow="hover" <el-card shadow="hover"
class="mgb20"> class="mgb20">
<div> <div>
@ -141,7 +142,6 @@
stripe stripe
header-align="center" header-align="center"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
v-loading="loading"
row-key="userId"> row-key="userId">
<el-table-column type="selection" <el-table-column type="selection"
width="55" width="55"

Loading…
Cancel
Save