@@ -92,6 +92,8 @@ export interface DevPlanTaskDto {
|
||||
|
||||
completedAt?: string | null;
|
||||
|
||||
attachmentUrls?: string[] | null;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -148,6 +150,8 @@ export interface CreateDevPlanTaskInput {
|
||||
|
||||
supportTicketId?: string;
|
||||
|
||||
attachmentUrls?: string[];
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -160,6 +164,8 @@ export interface UpdateDevPlanTaskInput {
|
||||
|
||||
status?: DevPlanTaskStatusDto;
|
||||
|
||||
attachmentUrls?: string[];
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -228,7 +234,23 @@ export interface DevPlanLinkedTaskSummary {
|
||||
|
||||
|
||||
|
||||
/** 技术支持工单类型 → 开发任务类型 */
|
||||
export type DevPlanTaskExportFormat = 'markdown' | 'docx' | 'xlsx' | 'pdf';
|
||||
|
||||
export interface DevPlanTaskExportRequest {
|
||||
scope: 'filter' | 'selected';
|
||||
format: DevPlanTaskExportFormat;
|
||||
ids?: string[];
|
||||
status?: string;
|
||||
type?: string;
|
||||
keyword?: string;
|
||||
}
|
||||
|
||||
export interface DevPlanTaskExportResponse {
|
||||
filename: string;
|
||||
mimeType: string;
|
||||
contentBase64: string;
|
||||
count: number;
|
||||
}
|
||||
|
||||
export function mapSupportTicketTypeToDevPlanTask(
|
||||
|
||||
|
||||
@@ -10,7 +10,9 @@ export const HQ_PERMISSION_CATALOG = [
|
||||
{ key: 'partners', label: '开城管理', group: '业务' },
|
||||
{ key: 'finance', label: '财务', group: '业务' },
|
||||
{ key: 'benefit', label: '好客权益', group: '业务' },
|
||||
{ key: 'benefit_debug', label: '核销调试', group: '业务' },
|
||||
{ key: 'deliveries', label: '配送单', group: '业务' },
|
||||
{ key: 'deliveries_debug', label: '小飞侠联调', group: '业务' },
|
||||
{ key: 'tickets', label: '工单中心', group: '业务' },
|
||||
{ key: 'tech_support', label: '技术支持', group: '业务' },
|
||||
{ key: 'invoices', label: '发票管理', group: '业务' },
|
||||
@@ -41,6 +43,11 @@ export const HQ_PERMISSION_CATALOG = [
|
||||
export type HqPermissionKey = (typeof HQ_PERMISSION_CATALOG)[number]['key'];
|
||||
|
||||
/** 危险操作:非超管角色默认不含,需在权限分配中显式勾选;超管默认拥有 */
|
||||
export const HQ_DEBUG_PERMISSION_KEYS = [
|
||||
'benefit_debug',
|
||||
'deliveries_debug',
|
||||
] as const satisfies readonly HqPermissionKey[];
|
||||
|
||||
export const HQ_DANGEROUS_PERMISSION_KEYS = [
|
||||
'users_delete',
|
||||
'orders_delete',
|
||||
@@ -51,8 +58,14 @@ export function isHqDangerousPermission(key: string): boolean {
|
||||
return (HQ_DANGEROUS_PERMISSION_KEYS as readonly string[]).includes(key);
|
||||
}
|
||||
|
||||
export function isHqDebugPermission(key: string): boolean {
|
||||
return (HQ_DEBUG_PERMISSION_KEYS as readonly string[]).includes(key);
|
||||
}
|
||||
|
||||
export function hqBasePermissionKeys(): HqPermissionKey[] {
|
||||
return HQ_PERMISSION_CATALOG.map((p) => p.key).filter((k) => !isHqDangerousPermission(k));
|
||||
return HQ_PERMISSION_CATALOG.map((p) => p.key).filter(
|
||||
(k) => !isHqDangerousPermission(k) && !isHqDebugPermission(k),
|
||||
);
|
||||
}
|
||||
|
||||
/** 系统配置 registry group → 权限 key */
|
||||
@@ -100,7 +113,7 @@ export const HQ_ADMIN_ROLES = [
|
||||
] as const;
|
||||
|
||||
export const HQ_ROLE_DEFAULT_PERMISSIONS: Record<string, HqPermissionKey[]> = {
|
||||
SUPER_ADMIN: hqBasePermissionKeys(),
|
||||
SUPER_ADMIN: [...hqBasePermissionKeys(), ...HQ_DEBUG_PERMISSION_KEYS],
|
||||
OPS: [
|
||||
'dashboard',
|
||||
'users',
|
||||
|
||||
@@ -96,6 +96,7 @@ export interface RejectSupportTicketRequest {
|
||||
export interface CreateDevPlanTaskFromTicketInput {
|
||||
content: string;
|
||||
type: 'BUG' | 'REQUIREMENT' | 'OPTIMIZATION';
|
||||
attachmentUrls?: string[];
|
||||
}
|
||||
|
||||
export interface ReviewSupportTicketRequest {
|
||||
|
||||
Reference in New Issue
Block a user