切换日期,增加loading效果

This commit is contained in:
renpy 2023-08-21 16:56:38 +08:00
parent 421e869826
commit 26cc2b6a54

View File

@ -139,7 +139,7 @@ export default {
}, },
data() { data() {
return { return {
spinning:false, spinning: false,
emailStatus: null, emailStatus: null,
emailTotal: {}, emailTotal: {},
emailSpace: {}, emailSpace: {},
@ -181,14 +181,6 @@ export default {
}, },
mounted() { mounted() {
this.getEmailList() this.getEmailList()
// if (this.$route.query.emailId) {
// this.currId = this.emailId = this.$route.query.emailId
// this.getEmailStatus()
// this.getEmailTotal()
// this.getEmailSpace()
// this.getEmailToday()
// this.getEmailStatistics()
// }
}, },
watch: { watch: {
emailId(newValue, oldValue) { emailId(newValue, oldValue) {
@ -230,11 +222,13 @@ export default {
this.emailId = val this.emailId = val
}, },
onDateChange(val) { onDateChange(val) {
this.spinning = true
this.areaMailLine.clear() this.areaMailLine.clear()
this.startDate = this.getBeforeDate(val - 1) this.startDate = this.getBeforeDate(val - 1)
this.getEmailStatistics() this.getEmailStatistics()
}, },
onRangeDateChange(date, dateString) { onRangeDateChange(date, dateString) {
this.spinning = true
this.areaMailLine.clear() this.areaMailLine.clear()
this.startDate = dateString[0] this.startDate = dateString[0]
this.endDate = dateString[1] this.endDate = dateString[1]
@ -387,6 +381,7 @@ export default {
}) })
}, },
getEmailStatistics() { getEmailStatistics() {
this.spinning = false
let params = { let params = {
emailId: this.currId, emailId: this.currId,
startDate: this.startDate, startDate: this.startDate,