feat(wa): 群列表列对齐云客7列(序号/员工信息/员工WhatsApp/群信息/添加时间/最后沟通时间/操作)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
浅念
2026-08-24 18:19:53 +08:00
parent b66363e377
commit d86a70382d
+22 -4
View File
@@ -102,6 +102,12 @@ async function loadWaGroups(): Promise<void> {
}
}
function waCell(row: Group, key: string): string {
const rj = row.raw_json as Record<string, unknown> | null | undefined
const v = rj?.[key]
return v !== null && v !== undefined && String(v) !== 'null' ? String(v) : ''
}
function onWaSubTabChange(): void {
if (waSubTab.value === 'groups') loadWaGroups()
}
@@ -661,14 +667,26 @@ onMounted(() => {
<el-table-column label="序号" width="70" align="center">
<template #default="{ $index }">{{ (waGroupsPage - 1) * waGroupsPageSize + $index + 1 }}</template>
</el-table-column>
<el-table-column label="员工信息" min-width="140">
<template #default="{ row }">{{ row.owner_account_nickname || row.owner_account_id || '--' }}</template>
<el-table-column label="员工信息" min-width="130">
<template #default="{ row }">
<div>{{ waCell(row, 'userName') || '--' }}</div>
<div class="yk-cell__sub">{{ waCell(row, 'salePhone') || '--' }}</div>
</template>
</el-table-column>
<el-table-column label="员工WhatsApp" min-width="180">
<template #default="{ row }">
<div>{{ row.owner_account_nickname || '--' }}</div>
<div class="yk-cell__sub">{{ row.owner_account_id || '--' }}</div>
</template>
</el-table-column>
<el-table-column label="群信息" min-width="180">
<template #default="{ row }">{{ row.room_name || row.room_id || '--' }}</template>
</el-table-column>
<el-table-column label="消息数量" width="100" align="right">
<template #default="{ row }">{{ row.message_count ?? 0 }}</template>
<el-table-column label="添加时间" width="140">
<template #default="{ row }">{{ waCell(row, 'createTime') || '--' }}</template>
</el-table-column>
<el-table-column label="最后沟通时间" width="160">
<template #default="{ row }">{{ waCell(row, 'lastUpdate') || '--' }}</template>
</el-table-column>
<el-table-column label="操作" width="130" align="center">
<template #default="{ row }">