feat: 附件管理拆为独立tab + 员工端附件上传

管理端:
- 花名册详情新增「附件资料」独立tab(人事信息分组下)
- 从 BasicInfo 移除附件管理代码到独立 AttachmentsTab 组件
- shared.ts 添加 attachments tab 类型和计数映射

员工端:
- 后端新增 GET/POST/DELETE /portal/attachments 接口
- 前端 api-services 添加 portalDelete + 附件 API 方法
- MyProfile 新增附件资料卡片,支持上传/查看/删除附件
- 附件类型:身份证/银行卡/学历证书/职业资格证书/合同/照片/其他
This commit is contained in:
freedakgmail
2026-08-17 19:27:45 +08:00
parent 7b2f722984
commit 007109e425
7 changed files with 321 additions and 50 deletions
+10
View File
@@ -1130,6 +1130,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
const portalDelete = ((url: string, config?: any) => portalAxios.delete(url, config)) as any
export const portalApi = {
/** 登录 */
@@ -1198,6 +1199,15 @@ export const portalApi = {
/** 更新个人资料 */
updateProfile: (data: Record<string, unknown>) =>
portalPut('/profile', data).then(unwrap<any>()),
/** 获取附件列表 */
getAttachments: () =>
portalGet('/attachments').then(unwrap<any[]>()),
/** 上传附件 */
addAttachment: (data: Record<string, unknown>) =>
portalPost('/attachments', data).then(unwrap<any>()),
/** 删除附件 */
removeAttachment: (id: string) =>
portalDelete(`/attachments/${id}`),
/** 制度列表 */
policies: () =>
portalGet('/policies').then(unwrap<any[]>()),