feat(c0): 服务机构端权限码与业务错误码

This commit is contained in:
liuyun 2026-10-14 12:39:42 +08:00
parent 6f32875295
commit b5eb94d3ae
2 changed files with 22 additions and 0 deletions

View File

@ -28,6 +28,17 @@ export const ErrorCodes = {
// 会话(20) // 会话(20)
SESSION_NOT_FOUND: 20001, // 会话不存在或已下线(404) SESSION_NOT_FOUND: 20001, // 会话不存在或已下线(404)
// 服务机构端·机构(40)
ORG_NOT_FOUND: 40001,
ORG_CODE_MISMATCH: 40002,
// 服务机构端·人员(41)
STAFF_NOT_FOUND: 41001,
STAFF_USER_LINKED: 41002,
// 服务机构端·目录(42)
SVC_LOC_NOT_FOUND: 42001,
SVC_ORG_NOT_FOUND: 42002,
SVC_LOC_IMMUTABLE: 42003,
} as const; } as const;
export type ErrorCode = (typeof ErrorCodes)[keyof typeof ErrorCodes]; export type ErrorCode = (typeof ErrorCodes)[keyof typeof ErrorCodes];

View File

@ -61,6 +61,17 @@ export const Permissions = {
}, },
audit: { list: 'audit:list' }, audit: { list: 'audit:list' },
loginLog: { list: 'login-log:list' }, loginLog: { list: 'login-log:list' },
// 服务机构端业务(C0 落地 agency/svcOrg/staff,其余为 C1–C4 预留)
agency: { view: 'agency:view', update: 'agency:update' },
svcOrg: { list: 'svc-org:list', config: 'svc-org:config', newNational: 'svc-org:new-national' },
staff: { list: 'staff:list', create: 'staff:create', update: 'staff:update', delete: 'staff:delete', groupAssign: 'staff:group-assign' },
elder: { list: 'elder:list', detail: 'elder:detail', create: 'elder:create', update: 'elder:update', statusChange: 'elder:status-change', import: 'elder:import', svcSave: 'elder:svc-save' },
plan: { create: 'plan:create', change: 'plan:change', detail: 'plan:detail', confirm: 'plan:confirm' },
order: { generate: 'order:generate', assign: 'order:assign', reassign: 'order:reassign', cancel: 'order:cancel', detail: 'order:detail', today: 'order:today' },
record: { checkin: 'record:checkin', checkout: 'record:checkout', itemSave: 'record:item-save', photoUpload: 'record:photo-upload', detail: 'record:detail' },
abnormal: { report: 'abnormal:report', list: 'abnormal:list', handle: 'abnormal:handle' },
qc: { pendingList: 'qc:pending-list', detail: 'qc:detail', pass: 'qc:pass', return: 'qc:return', exceptionLink: 'qc:exception-link' },
export: { export: 'export:export' },
} as const; } as const;
/** 全部权限码扁平列表(seed 授权与资源生成用)。 */ /** 全部权限码扁平列表(seed 授权与资源生成用)。 */