添加loading

master
yujialong 8 months ago
parent 55b3fb1996
commit bc40fb5f28
  1. 11
      src/pages/achievement/info/course.vue
  2. 13
      src/pages/achievement/info/project.vue
  3. 13
      src/pages/achievement/list/course.vue
  4. 14
      src/pages/achievement/list/project.vue
  5. 10
      src/pages/achievement/show/index.vue
  6. 14
      src/pages/assessment/list/index.vue
  7. 10
      src/pages/expSystem/list/index.vue
  8. 5
      src/pages/match/list/index.vue
  9. 4
      src/pages/match/manage/matchArchList.vue
  10. 19
      src/pages/match/manage/matchRank.vue
  11. 13
      src/pages/match/manage/matchSignup.vue
  12. 2
      src/pages/product/list/index.vue
  13. 11
      src/pages/project/add/index.vue

@ -8,6 +8,7 @@
</div>
</el-card>
<div v-loading="loading">
<el-card shadow="hover"
class="m-b-20">
<el-tabs v-model="classId"
@ -267,10 +268,10 @@
</span>
</el-dialog>
</div>
</div>
</template>
<script>
import { Loading } from "element-ui";
import Setting from "@/setting";
import util from "@/libs/util";
import echarts from "echarts";
@ -320,7 +321,7 @@ export default {
totalDetail: 0,
curRow: {},
stageNumber: {},
loadIns: null
loading: false,
};
},
watch: {
@ -338,9 +339,7 @@ export default {
methods: {
//
async getData () {
this.loadIns = Loading.service({
background: "rgba(255,255,255,.6)"
})
this.loading = true
const per = +this.curTab
const res = await this.$post(this.api.productReadScore, {
pageNum: this.page,
@ -587,7 +586,7 @@ export default {
color: ["#8191fd"]
}]
})
this.loadIns.close()
this.loading = false
},
//
errorChart () {

@ -6,6 +6,7 @@
<span class="name">{{ experimentalName }}</span>
</div>
<div v-loading="loading">
<el-card v-if="classes.length"
shadow="hover"
class="m-b-20 head-card">
@ -272,10 +273,10 @@
</template>
</el-card>
</div>
</div>
</template>
<script>
import { Loading } from "element-ui";
import Setting from "@/setting";
import util from "@/libs/util";
import echarts from "echarts";
@ -320,7 +321,7 @@ export default {
pageActivation: 1,
pageSizeActivation: 10,
totalActivation: 0,
loadIns: null,
loading: false,
scores: {}
};
},
@ -366,9 +367,7 @@ export default {
},
//
async getData () {
this.loadIns = Loading.service({
background: "rgba(255,255,255,.6)"
})
this.loading = true
try {
//
const res = this.permissions ?
@ -388,7 +387,7 @@ export default {
this.getChart()
this.errorChart()
} catch (e) {
this.loadIns.close()
this.loading = false
}
},
//
@ -561,7 +560,7 @@ export default {
color: ["#8191fd"]
}]
})
this.loadIns.close()
this.loading = false
},
//
errorChart () {

@ -1,5 +1,6 @@
<template>
<div class="page">
<div class="page"
v-loading="loading">
<h6 class="p-title">筛选</h6>
<div class="tool mul">
<ul class="filter">
@ -136,7 +137,7 @@ export default {
page: this.$route.query.page ? +this.$route.query.page : 1,
pageSize: 10,
total: 0,
loadIns: null
loading: false,
};
},
watch: {
@ -203,9 +204,7 @@ export default {
}).catch(res => { })
},
getData () {
this.loadIns = Loading.service({
background: "rgba(255,255,255,.6)"
});
this.loading = true
this.$post(this.api.practiceByProduct, {
classId: this.classId,
mallId: this.mallId,
@ -216,10 +215,10 @@ export default {
this.list = res.data
this.total = res.total
this.$nextTick(() => {
this.loadIns.close()
this.loading = false
});
}).catch(res => {
this.loadIns.close()
this.loading = false
});
},
//

@ -1,5 +1,6 @@
<template>
<div class="page">
<div class="page"
v-loading="loading">
<h6 class="p-title">筛选</h6>
<div class="tool mul">
<ul class="filter">
@ -158,7 +159,6 @@
</template>
<script>
import { Loading } from "element-ui";
import util from "@/libs/util";
export default {
name: "achievement",
@ -203,7 +203,7 @@ export default {
page: this.$route.query.page ? +this.$route.query.page : 1,
pageSize: 10,
total: 0,
loadIns: null
loading: false,
};
},
watch: {
@ -275,9 +275,7 @@ export default {
}).catch(res => { })
},
getData () {
this.loadIns = Loading.service({
background: "rgba(255,255,255,.6)"
})
this.loading = true
const per = this.projectPermissions
const { mallId } = this
const cur = this.curs.find(e => e.mallId == mallId) || {}
@ -311,10 +309,10 @@ export default {
})
this.listData = list
this.$nextTick(() => {
this.loadIns.close()
this.loading = false
});
}).catch(res => {
this.loadIns.close()
this.loading = false
});
},
//

@ -6,7 +6,8 @@
content="查看报告"></el-page-header>
</el-card>
<div class="content">
<div class="content"
v-loading="loading">
<div class="text-right">
<el-button type="primary"
@click="exportPage">导出报告</el-button>
@ -243,8 +244,9 @@ export default {
this.getData()
},
methods: {
getData () { //
this.$get(`${this.api.reportDetail}?reportId=${this.reportId}`).then(({ report, userScores }) => {
async getData () { //
this.loading = true
const { report, userScores } = await this.$get(`${this.api.reportDetail}?reportId=${this.reportId}`)
this.form = report
this.expData = userScores
this.project = this.expData.find(e => e.lcRuleRecords) // lcRuleRecords
@ -272,7 +274,6 @@ export default {
} else {
this.handleList(userScores.find(e => e.lcRuleRecords) ? userScores : JSON.parse(data))
}
}).catch(res => { })
},
//
handleList (list) {
@ -299,6 +300,7 @@ export default {
})
}
this.expData = list
this.loading = false
},
exportPage () {
const form = Object.assign(this.form, this.infoData)

@ -1,5 +1,6 @@
<template>
<div class="page">
<div class="page"
v-loading="loading">
<h6 class="p-title">筛选</h6>
<div class="tool mul">
<ul class="filter">
@ -91,8 +92,7 @@
</div>
</div>
<el-table v-loading="listLoading"
ref="table"
<el-table ref="table"
:data="listData"
class="table"
stripe
@ -297,7 +297,7 @@ export default {
total: 0, //
listData: [], //
multipleSelection: [], //
listLoading: false,//
loading: false,//
ticker: null, //
now: '',
};
@ -383,7 +383,7 @@ export default {
}
},
getData (counddown) {
this.listLoading = true;
this.loading = true;
const { mallIds } = this
// const cur = this.curs.find(e => e.mallId == mallIds[0])
let data = {
@ -422,9 +422,9 @@ export default {
}
});
counddown && this.beginTimer()
this.listLoading = false;
this.loading = false;
}).catch(err => {
this.listLoading = false;
this.loading = false;
});
},
initData () {

@ -1,6 +1,7 @@
<template>
<div>
<div class="page">
<div class="page"
v-loading="loading">
<h6 class="p-title">筛选</h6>
<div class="tool mul">
<ul class="filter">
@ -78,7 +79,6 @@
<script>
import Setting from "@/setting";
import util from "@/libs/util";
import Cookie from 'js-cookie'
export default {
data () {
return {
@ -112,7 +112,8 @@ export default {
1: '默认'
},
pageNo: +this.$route.query.page || 1,
pageSize: 10
pageSize: 10,
loading: false,
};
},
watch: {
@ -132,6 +133,7 @@ export default {
this.getData();
},
getData () {
this.loading = true
let data = {
type: this.systemType,
systemName: this.systemSearch,
@ -141,7 +143,9 @@ export default {
this.$post(this.api.getSystemByCustomers, data).then(({ data }) => {
this.systemData = data.records;
this.totals = data.total;
this.loading = false
}).catch(res => {
this.loading = false
});
},
handleCurrentChange (val) {

@ -1,5 +1,6 @@
<template>
<div class="page">
<div class="page"
v-loading="loading">
<h6 class="p-title">筛选</h6>
<div class="tool mul">
<ul class="filter">
@ -75,7 +76,6 @@
stripe
header-align="center"
@selection-change="handleSelectionChange"
v-loading="loading"
row-key="id">
<el-table-column type="selection"
width="55"
@ -219,7 +219,6 @@
import util from "@/libs/util";
import Setting from "@/setting";
import { mapMutations } from "vuex";
import { Loading } from 'element-ui'
import Bus from '@/libs/bus'
export default {
name: "match",

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

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

@ -53,6 +53,7 @@
header-align="center"
@selection-change="handleSelectionChange"
row-key="id"
v-loading="loading"
@sort-change="sortChange">
<el-table-column type="selection"
width="80"
@ -437,6 +438,7 @@ export default {
diffSchool: false,
uploading: false,
exporting: false,
loading: false,
};
},
watch: {
@ -458,8 +460,9 @@ export default {
this.getTeam()
this.getClient()
},
getData () {
this.$post(this.api.queryRegistrationByCondition, {
async getData () {
this.loading = true
const { data } = await this.$post(this.api.queryRegistrationByCondition, {
pageNum: this.page,
pageSize: this.pageSize,
competitionId: this.id,
@ -467,7 +470,7 @@ export default {
isDisable: this.isDisable,
schoolOrder: this.schoolOrder,
teamOrder: this.teamOrder,
}).then(({ data }) => {
})
const list = data.records;
list.map(e => {
if (e.teacherDetails) {
@ -477,8 +480,7 @@ export default {
this.listData = list
this.total = data.total;
this.$refs.table.clearSelection();
}).catch(res => {
});
this.loading = false
},
//
getInfo () {
@ -718,7 +720,6 @@ export default {
this.$refs.form.validate((valid) => {
if (valid) {
if (this.submiting) return false
this.submiting = true
const { form } = this
const team = this.teams.find(e => e.teamId == form.teamId)
if (team && team.invitationCode) form.invitationCode = team.invitationCode

@ -194,7 +194,6 @@
</template>
<script>
import { Loading } from "element-ui";
import Setting from "@/setting";
export default {
data () {
@ -301,7 +300,6 @@ export default {
},
//
getData () {
// this.loadIns = Loading.service()
this.$post(this.api.websiteProductList, {
...this.form,
pageNum: this.page,

@ -1,6 +1,7 @@
<template>
<div ref="main"
class="main">
class="main"
v-loading="loading">
<el-form :disabled="isDetail">
<el-card shadow="hover"
class="m-b-20">
@ -359,7 +360,8 @@ export default {
submiting: false, //
updateTime: 0,
next: null,
backType: false
backType: false,
loading: false,
};
},
computed: {
@ -448,6 +450,7 @@ export default {
"setSystemId", "setProject"
]),
getInfoData () { //
this.loading = true
this.$get(`${this.api.getProjectDetail}?projectId=${this.projectId}`).then(res => {
let { projectManage, projectJudgmentVos } = res;
const { mallId, systemId } = projectManage
@ -464,12 +467,13 @@ export default {
this.projectJudgmentData.forEach((e, i) => {
e.sort = i + 1;
});
this.loading = false
this.$nextTick(() => {
this.$refs.main.scrollTop = 0;
this.updateTime = 0
});
}).catch(err => {
console.log(err);
this.loading = false
});
},
//
@ -484,7 +488,6 @@ export default {
e.children = data.filter(n => e.systemId.split(',').includes(n.id + '')) //
})
this.curs = res.data
console.log("🚀 ~ file: index.vue:431 ~ getSystemData ~ res.data:", res.data)
}
},
//

Loading…
Cancel
Save