处理邮箱日志列表页面的初始化数据

This commit is contained in:
renpy 2023-08-17 11:15:11 +08:00
parent 51165b42a3
commit 41e97ed2e9

View File

@ -6,7 +6,7 @@
<div style="display: flex;align-items: center;">
<span class="item-label">Email</span>
<a-select style="width:160px"
v-model="email"
v-model="emailId"
placeholder="select..."
:filter-option="filterOption"
show-arrow
@ -203,7 +203,7 @@ export default {
emailStatus: null,
emailTotal: {},
emailSpace: {},
email: undefined,
emailId: "",
emailToday: [],
emailOptions: [],
date: 7,
@ -239,13 +239,25 @@ export default {
this.startDate = this.getBeforeDate(6)
},
mounted() {
this.currId = this.$route.query.emailId
this.getEmailList()
this.getEmailStatus()
this.getEmailTotal()
this.getEmailSpace()
this.getEmailToday()
this.getEmailStatistics()
// if (this.$route.query.emailId) {
// this.currId = this.emailId = this.$route.query.emailId
// this.getEmailStatus()
// this.getEmailTotal()
// this.getEmailSpace()
// this.getEmailToday()
// this.getEmailStatistics()
// }
},
watch: {
emailId(newValue, oldValue) {
this.currId = newValue
this.getEmailStatus()
this.getEmailTotal()
this.getEmailSpace()
this.getEmailToday()
this.getEmailStatistics()
}
},
methods: {
moment,
@ -257,6 +269,9 @@ export default {
getEmailList() {
getAction("/sysEmail/sourceList").then(res => {
if (res.success) {
// if (!this.$route.query.emailId) {
this.emailId = this.$route.query.emailId || res.result[0].sourceId
// }
this.emailOptions = res.result.map(item => {
return {
label: item.sourceName,