feat(staff): 员工详情独立页(StaffDetail.vue,替代 drawer 降级,对齐云客 userDetailNew)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
浅念
2026-08-11 17:05:01 +08:00
parent 0e1cb87156
commit 20cf2c51f0
4 changed files with 347 additions and 3 deletions
+15 -1
View File
@@ -511,6 +511,20 @@ function openDrawer(row: Account): void {
drawerOpen.value = true
}
/**
* 员工姓名 click → standalone 员工详情 page (mirrors 云客 userDetailNew).
* The 员工姓名 cell is a small, deliberate click target, distinct from the
* row-click quick-preview drawer. Prefer the structured `user_id`; fall back
* to `account_id` for accounts that carry no staff binding (so the page can
* still resolve by the account identifier).
*/
function goToDetail(row: Account): void {
router.push({
name: 'staff-detail',
params: { userId: row.user_id ?? row.account_id },
})
}
const drawerSections = computed(() =>
drawerAccount.value ? buildAccountSections(drawerAccount.value) : [],
)
@@ -608,7 +622,7 @@ onMounted(() => {
</div>
<div class="yk-staffinfo__pair">
<span class="yk-staffinfo__k">员工姓名</span>
<el-button link type="primary" size="small" class="yk-staffinfo__v" @click.stop="openDrawer(row)">{{ cellText(row, 'userName') }}</el-button>
<el-button link type="primary" size="small" class="yk-staffinfo__v" @click.stop="goToDetail(row)">{{ cellText(row, 'userName') }}</el-button>
</div>
<div class="yk-staffinfo__pair">
<span class="yk-staffinfo__k">微信手机号</span>