From 6b909af0765b45f95ba012e2bbbc107bb51ebaa9 Mon Sep 17 00:00:00 2001 From: wuxw <928255095@qq.com> Date: Fri, 1 Aug 2025 16:23:33 +0800 Subject: [PATCH] v1.9 优化员工详情页面 --- src/api/staff/staffDetailApi.js | 11 ++--------- src/views/staff/staffDetailList.vue | 17 +++++++++-------- 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/src/api/staff/staffDetailApi.js b/src/api/staff/staffDetailApi.js index 97f8b79..34e25c5 100644 --- a/src/api/staff/staffDetailApi.js +++ b/src/api/staff/staffDetailApi.js @@ -9,11 +9,7 @@ export function getStaffDetail(params) { params }).then(response => { const res = response.data - if (res.code === 0) { resolve(res) - } else { - reject(new Error(res.msg || '获取员工详情失败')) - } }).catch(error => { reject(error) }) @@ -49,11 +45,8 @@ export function getStaffRoles(params) { params }).then(response => { const res = response.data - if (res.code === 0) { resolve(res) - } else { - reject(new Error(res.msg || '获取员工角色失败')) - } + }).catch(error => { reject(error) }) @@ -64,7 +57,7 @@ export function getStaffRoles(params) { export function getStaffPrivileges(params) { return new Promise((resolve, reject) => { request({ - url: '/privilege.queryStaffPrivileges', + url: '/query.user.privilege', method: 'get', params }).then(response => { diff --git a/src/views/staff/staffDetailList.vue b/src/views/staff/staffDetailList.vue index adf2bc2..ff6055e 100644 --- a/src/views/staff/staffDetailList.vue +++ b/src/views/staff/staffDetailList.vue @@ -77,12 +77,13 @@ {{ $t('staffDetailInfo.relatedRoleCommunity') }}