mirror of
https://github.com/schroinerxy/cloud-mail.git
synced 2026-06-21 19:35:50 +08:00
饼状图不再统计空名
This commit is contained in:
@@ -125,7 +125,7 @@
|
||||
<span>
|
||||
<Icon icon="mdi-light:email" width="20" height="20"/>
|
||||
</span>
|
||||
<span>{{ item.accountEmail }}</span>
|
||||
<span>{{ item.status === 7 ? formateReceive(item.recipient) : item.accountEmail }}</span>
|
||||
</div>
|
||||
<div class="del-status" v-if="item.isDel">
|
||||
<el-tag type="info" size="small">已删除</el-tag>
|
||||
@@ -271,6 +271,12 @@ const accountShow = computed(() => {
|
||||
return uiStore.accountShow && settingStore.settings.manyEmail === 0
|
||||
})
|
||||
|
||||
|
||||
function formateReceive(recipient) {
|
||||
recipient = JSON.parse(recipient)
|
||||
return recipient.map(item => item.address).join(', ')
|
||||
}
|
||||
|
||||
function handleScroll(e) {
|
||||
}
|
||||
|
||||
|
||||
+186
File diff suppressed because one or more lines are too long
-186
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+2
-2
@@ -6,8 +6,8 @@
|
||||
<title></title>
|
||||
<link rel="icon" href="/assets/favicon-C5dAZutX.svg" type="image/svg+xml">
|
||||
<script src="https://challenges.cloudflare.com/turnstile/v0/api.js" async defer></script>
|
||||
<script type="module" crossorigin src="/assets/index-BgK8IB2e.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-BJW3-Q2l.css">
|
||||
<script type="module" crossorigin src="/assets/index-BYWjgX4H.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-DIddMqZG.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="loading-first">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import analysisDao from '../dao/analysis-dao';
|
||||
import orm from '../entity/orm';
|
||||
import email from '../entity/email';
|
||||
import { desc, count, eq } from 'drizzle-orm';
|
||||
import { desc, count, eq, and, ne, isNotNull } from 'drizzle-orm';
|
||||
import { emailConst } from '../const/entity-const';
|
||||
import kvConst from '../const/kv-const';
|
||||
import dayjs from 'dayjs';
|
||||
@@ -17,7 +17,6 @@ const analysisService = {
|
||||
const [
|
||||
numberCount,
|
||||
nameRatio,
|
||||
sendEmailRatio,
|
||||
userDayCountRaw,
|
||||
receiveDayCountRaw,
|
||||
sendDayCountRaw,
|
||||
@@ -28,18 +27,11 @@ const analysisService = {
|
||||
orm(c)
|
||||
.select({ name: email.name, total: count() })
|
||||
.from(email)
|
||||
.where(eq(email.type, emailConst.type.RECEIVE))
|
||||
.where(and(eq(email.type, emailConst.type.RECEIVE), isNotNull(email.name), ne(email.name,'')))
|
||||
.groupBy(email.name)
|
||||
.orderBy(desc(count()))
|
||||
.limit(6),
|
||||
|
||||
orm(c)
|
||||
.select({ email: email.sendEmail, total: count() })
|
||||
.from(email)
|
||||
.where(eq(email.type, emailConst.type.RECEIVE))
|
||||
.groupBy(email.sendEmail)
|
||||
.orderBy(desc(count()))
|
||||
.limit(6),
|
||||
|
||||
analysisDao.userDayCount(c),
|
||||
analysisDao.receiveDayCount(c),
|
||||
@@ -59,8 +51,7 @@ const analysisService = {
|
||||
numberCount,
|
||||
userDayCount,
|
||||
receiveRatio: {
|
||||
nameRatio,
|
||||
sendEmailRatio
|
||||
nameRatio
|
||||
},
|
||||
emailDayCount: {
|
||||
receiveDayCount,
|
||||
|
||||
Reference in New Issue
Block a user