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

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

@ -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">
@ -136,7 +137,7 @@ export default {
page: this.$route.query.page ? +this.$route.query.page : 1, page: this.$route.query.page ? +this.$route.query.page : 1,
pageSize: 10, pageSize: 10,
total: 0, total: 0,
loadIns: null loading: false,
}; };
}, },
watch: { watch: {
@ -203,9 +204,7 @@ export default {
}).catch(res => { }) }).catch(res => { })
}, },
getData () { getData () {
this.loadIns = Loading.service({ this.loading = true
background: "rgba(255,255,255,.6)"
});
this.$post(this.api.practiceByProduct, { this.$post(this.api.practiceByProduct, {
classId: this.classId, classId: this.classId,
mallId: this.mallId, mallId: this.mallId,
@ -216,10 +215,10 @@ export default {
this.list = res.data this.list = res.data
this.total = res.total this.total = res.total
this.$nextTick(() => { this.$nextTick(() => {
this.loadIns.close() this.loading = false
}); });
}).catch(res => { }).catch(res => {
this.loadIns.close() this.loading = false
}); });
}, },
// //

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

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

@ -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">
@ -91,8 +92,7 @@
</div> </div>
</div> </div>
<el-table v-loading="listLoading" <el-table ref="table"
ref="table"
:data="listData" :data="listData"
class="table" class="table"
stripe stripe
@ -297,7 +297,7 @@ export default {
total: 0, // total: 0, //
listData: [], // listData: [], //
multipleSelection: [], // multipleSelection: [], //
listLoading: false,// loading: false,//
ticker: null, // ticker: null, //
now: '', now: '',
}; };
@ -383,7 +383,7 @@ export default {
} }
}, },
getData (counddown) { getData (counddown) {
this.listLoading = true; this.loading = true;
const { mallIds } = this const { mallIds } = this
// const cur = this.curs.find(e => e.mallId == mallIds[0]) // const cur = this.curs.find(e => e.mallId == mallIds[0])
let data = { let data = {
@ -422,9 +422,9 @@ export default {
} }
}); });
counddown && this.beginTimer() counddown && this.beginTimer()
this.listLoading = false; this.loading = false;
}).catch(err => { }).catch(err => {
this.listLoading = false; this.loading = false;
}); });
}, },
initData () { initData () {

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

@ -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">
@ -75,7 +76,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"
@ -219,7 +219,6 @@
import util from "@/libs/util"; import util from "@/libs/util";
import Setting from "@/setting"; import Setting from "@/setting";
import { mapMutations } from "vuex"; import { mapMutations } from "vuex";
import { Loading } from 'element-ui'
import Bus from '@/libs/bus' import Bus from '@/libs/bus'
export default { export default {
name: "match", name: "match",

@ -381,12 +381,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 }) => {
this.published = publishStatus this.published = publishStatus
@ -416,7 +421,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
})
} }
} }
}, },
@ -442,8 +449,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 () {

@ -53,6 +53,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,6 +438,7 @@ export default {
diffSchool: false, diffSchool: false,
uploading: false, uploading: false,
exporting: false, exporting: false,
loading: false,
}; };
}, },
watch: { watch: {
@ -458,8 +460,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,
@ -467,7 +470,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) {
@ -477,8 +480,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 () {
@ -718,7 +720,6 @@ export default {
this.$refs.form.validate((valid) => { this.$refs.form.validate((valid) => {
if (valid) { if (valid) {
if (this.submiting) return false if (this.submiting) return false
this.submiting = true
const { form } = this const { form } = this
const team = this.teams.find(e => e.teamId == form.teamId) const team = this.teams.find(e => e.teamId == form.teamId)
if (team && team.invitationCode) form.invitationCode = team.invitationCode if (team && team.invitationCode) form.invitationCode = team.invitationCode

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

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

Loading…
Cancel
Save