feat: 员工端新增个人资料页面,数据同步到花名册

- 后端新增 GET/PUT /portal/profile 接口,员工可查看和编辑个人资料
- 员工可编辑:紧急联系人、住址、银行卡、学历、参保城市
- 只读字段:姓名、性别、手机号、证件号码、部门、岗位、入职日期
- 数据直接写入 Employee 表(花名册),HR 管理端可见
- 更新操作记录证据链(PROFILE_UPDATE)
- 前端新增 MyProfile.tsx 页面,PortalNav 添加导航入口
This commit is contained in:
freedakgmail
2026-08-17 18:56:42 +08:00
parent cdbfeb4f99
commit c4a929fc8e
6 changed files with 319 additions and 1 deletions
+7
View File
@@ -1129,6 +1129,7 @@ portalAxios.interceptors.response.use(
)
const portalGet = ((url: string, config?: any) => portalAxios.get(url, config)) as any
const portalPost = ((url: string, data?: any, config?: any) => portalAxios.post(url, data, config)) as any
const portalPut = ((url: string, data?: any, config?: any) => portalAxios.put(url, data, config)) as any
export const portalApi = {
/** 登录 */
@@ -1191,6 +1192,12 @@ export const portalApi = {
/** 入职进度 */
onboardingProgress: () =>
portalGet('/onboarding/progress').then(unwrap<any>()),
/** 获取个人资料 */
getProfile: () =>
portalGet('/profile').then(unwrap<any>()),
/** 更新个人资料 */
updateProfile: (data: Record<string, unknown>) =>
portalPut('/profile', data).then(unwrap<any>()),
/** 制度列表 */
policies: () =>
portalGet('/policies').then(unwrap<any[]>()),