组织成员里面的邮箱校正

This commit is contained in:
付民康
2025-03-28 11:04:12 +08:00
parent 5da067cbb9
commit 0a14df5293
2 changed files with 13 additions and 2 deletions

View File

@@ -49,7 +49,11 @@
{{ memberRoleMap[row.roleCode] ?? '' }} {{ memberRoleMap[row.roleCode] ?? '' }}
</template> </template>
</d-column> </d-column>
<d-column field="email" header="邮箱" /> <d-column field="email" header="邮箱" >
<template #default="{ row }">
{{ normalizeEmailDomain(row.email) || '' }}
</template>
</d-column>
<d-column field="createTime" header="加入时间" /> <d-column field="createTime" header="加入时间" />
<d-column header="操作"> <d-column header="操作">
<template #default="{ row }"> <template #default="{ row }">
@@ -208,6 +212,13 @@ const memberRoleMap = {
[OrganizationMemberRoleEnum.MEMBER]: '成员' [OrganizationMemberRoleEnum.MEMBER]: '成员'
}; };
function normalizeEmailDomain(email) {
if (!email) return '';
const parts = email.split('@');
if (parts.length !== 2) return email; // 无效邮箱格式
return `${parts[0]}@${parts[1].toLowerCase()}`;
}
const { accountInfo, RemoveInfo } = useAccount(); const { accountInfo, RemoveInfo } = useAccount();

View File

@@ -8,7 +8,7 @@
</d-breadcrumb> </d-breadcrumb>
<div class="version-detail-header"> <div class="version-detail-header">
<div class="header-top"> <div class="header-top">
<GAvatar style="margin-right: 16px" :name="accountInfo.username" :src="accountInfo.avatar" name="Vue" :width="72" :height="72"></GAvatar> <GAvatar style="margin-right: 16px" :name="accountInfo.username" :src="accountInfo.avatar" :width="72" :height="72"></GAvatar>
<div class="pt-24"> <div class="pt-24">
<div class="header-title1">{{ accountInfo.username || '--' }}</div> <div class="header-title1">{{ accountInfo.username || '--' }}</div>
<div class="header-div"> <div class="header-div">