修复邮件列表发件无法搜索和不显示邮箱

This commit is contained in:
eoao
2025-06-29 14:25:39 +08:00
parent 7d2ebc657d
commit 8812e6a14b
9 changed files with 54 additions and 46 deletions
@@ -125,7 +125,7 @@
<span>
<Icon icon="mdi-light:email" width="20" height="20"/>
</span>
<span>{{ item.toEmail }}</span>
<span>{{ item.type === 0 ? item.toEmail : item.sendEmail }}</span>
</div>
<div class="del-status" v-if="item.isDel">
<el-tag type="info" size="small">已删除</el-tag>
+13 -10
View File
@@ -7,21 +7,17 @@
<el-scrollbar class="scrollbar">
<div v-infinite-scroll="getAccountList" :infinite-scroll-distance="600" :infinite-scroll-immediate="false">
<el-card class="item" :class="itemBg(item.accountId)" v-for="item in accounts" :key="item.accountId" @click="changeAccount(item)">
<div class="account" @click.stop="copyAccount(item.email)">
<el-tooltip v-if="showCopyInfo" effect="dark" :hide-after="0" :show-after="800" placement="top" content="点击复制">
{{ item.email }}
</el-tooltip>
<template v-else >
{{ item.email }}
</template>
<div class="account" >
{{ item.email }}
</div>
<div class="opt">
<div class="send-email" @click.stop>
<Icon icon="eva:email-fill" width="22" height="22" color="#fbbd08" />
</div>
<div class="settings" @click.stop>
<Icon icon="streamline-ultimate-color:copy-paste-1" width="19" height="19" @click.stop="copyAccount(item.email)"/>
<el-dropdown>
<Icon icon="fluent:settings-24-filled" width="20" height="20" color="#909399" />
<Icon icon="fluent:settings-24-filled" width="21" height="21" color="#909399" />
<template #dropdown >
<el-dropdown-menu>
<el-dropdown-item @click="openSetName(item)">改名</el-dropdown-item>
@@ -147,7 +143,6 @@ const addRef = ref({})
let account = null
let turnstileId = null
let verifyToken = ''
let showCopyInfo = window.innerWidth > 1024
const addForm = reactive({
email: '',
suffix: settingStore.domainList[0]
@@ -440,7 +435,15 @@ function submit() {
justify-content: space-between;
font-size: 12px;
color: #888;
.settings {
display: flex;
align-items: center;
gap: 10px;
}
.send-email {
display: flex;
align-items: center;
}
}
:deep(.el-card__body) {
+1
View File
@@ -386,6 +386,7 @@ function close() {
overflow: hidden;
}
div {
display: flex;
align-items: center;
+2 -3
View File
@@ -178,7 +178,6 @@ const userLineData = reactive({
})
const emailColumnData = {
barWidth: window.innerWidth > 767 ? '40%' : '60%',
receiveData: [],
sendData: [],
daysData: []
@@ -546,7 +545,8 @@ function createEmailColumnChart() {
name: '接收',
type: 'bar',
stack: 'total', // 堆叠组标识(必须相同)
barWidth: emailColumnData.barWidth,
barWidth: '60%',
barMaxWidth: 30,
emphasis: {
itemStyle: {
shadowBlur: 10,
@@ -562,7 +562,6 @@ function createEmailColumnChart() {
name: '发送',
type: 'bar',
stack: 'total', // 堆叠组标识(必须相同)
barWidth: '45%',
emphasis: {
itemStyle: {
shadowBlur: 10,
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -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-DDsmLAr5.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-p2lTpkGZ.css">
<script type="module" crossorigin src="/assets/index-CdIfOmmZ.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-CQpgk37-.css">
</head>
<body>
<div id="loading-first">
+8 -3
View File
@@ -1,7 +1,7 @@
import orm from '../entity/orm';
import email from '../entity/email';
import { emailConst, isDel, settingConst } from '../const/entity-const';
import { and, desc, eq, gt, inArray, lt, count, asc, sql, ne } from 'drizzle-orm';
import { and, desc, eq, gt, inArray, lt, count, asc, sql, ne, or } from 'drizzle-orm';
import { star } from '../entity/star';
import settingService from './setting-service';
import accountService from './account-service';
@@ -467,7 +467,7 @@ const emailService = {
async allList(c, params) {
let { emailId, size, name, subject, accountEmail, userEmail, type, timeSort } = params;
let { emailId, size, name, subject, accountEmail, sendEmail, userEmail, type, timeSort } = params;
size = Number(size);
@@ -512,7 +512,12 @@ const emailService = {
}
if (accountEmail) {
conditions.push(sql`${email.toEmail} COLLATE NOCASE LIKE ${accountEmail + '%'}`);
conditions.push(
or(
sql`${email.toEmail} COLLATE NOCASE LIKE ${accountEmail + '%'}`,
sql`${email.sendEmail} COLLATE NOCASE LIKE ${accountEmail + '%'}`,
)
)
}
if (name) {