2026-06-27 08:55:33 +08:00
|
|
|
|
declare namespace Api {
|
|
|
|
|
|
/**
|
|
|
|
|
|
* namespace Feedback
|
|
|
|
|
|
*
|
|
|
|
|
|
* backend api module: "feedback"(用户意见反馈)
|
|
|
|
|
|
*/
|
|
|
|
|
|
namespace Feedback {
|
|
|
|
|
|
/** 反馈分页查询参数(GET query;type/status 传字符串即可,后端按 Integer 解析) */
|
|
|
|
|
|
interface FeedbackSearchParams {
|
|
|
|
|
|
pageNo: number;
|
|
|
|
|
|
pageSize: number;
|
|
|
|
|
|
/** 反馈分类,字典 feedback_type */
|
|
|
|
|
|
type?: string | number | null;
|
|
|
|
|
|
/** 处理状态,字典 feedback_status */
|
|
|
|
|
|
status?: string | number | null;
|
|
|
|
|
|
/** 标题关键词,模糊匹配 */
|
|
|
|
|
|
title?: string;
|
2026-06-29 09:53:24 +08:00
|
|
|
|
/** 提交人用户 id(按提交人过滤;ID 铁律 string) */
|
|
|
|
|
|
creator?: string;
|
2026-06-27 08:55:33 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 反馈记录。
|
|
|
|
|
|
* - id/creator 在 API 适配层已统一为 string;
|
|
|
|
|
|
* - content 为富文本 HTML 字符串(详细描述支持图文);
|
|
|
|
|
|
* - attachments 由后端 attachmentUrls(JSON 字符串) 解析为完整附件对象数组,与任务附件同构。
|
|
|
|
|
|
*/
|
|
|
|
|
|
interface FeedbackItem {
|
|
|
|
|
|
id: string;
|
|
|
|
|
|
/** 反馈分类,字典 feedback_type */
|
|
|
|
|
|
type: number;
|
|
|
|
|
|
title: string;
|
|
|
|
|
|
/** 详细描述,富文本 HTML */
|
|
|
|
|
|
content: string;
|
|
|
|
|
|
/** 内容纯文本预览(API 适配层预算,列表列直接取,免每次渲染重跑去标签正则) */
|
|
|
|
|
|
contentPreview: string;
|
|
|
|
|
|
/** 附件对象列表(含 fileId/url/name 等,支持下载与会话级清理) */
|
|
|
|
|
|
attachments: Api.Project.AttachmentItem[];
|
|
|
|
|
|
/** 联系方式(选填) */
|
|
|
|
|
|
contact?: string;
|
|
|
|
|
|
/** 处理状态,字典 feedback_status */
|
|
|
|
|
|
status: number;
|
|
|
|
|
|
/** 提交人用户 id(字符串) */
|
|
|
|
|
|
creator: string;
|
|
|
|
|
|
/** 提交人姓名(后端回填,缺失时前端回退展示 creator) */
|
|
|
|
|
|
creatorName?: string;
|
|
|
|
|
|
createTime: string;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 提交反馈参数(页面层传 attachments 对象数组,api 层 stringify 成 attachmentUrls) */
|
|
|
|
|
|
interface FeedbackSubmitParams {
|
|
|
|
|
|
type: number;
|
|
|
|
|
|
title: string;
|
|
|
|
|
|
content: string;
|
|
|
|
|
|
attachments: Api.Project.AttachmentItem[];
|
|
|
|
|
|
contact?: string;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 更新反馈参数(编辑态;后端更新接口待提供,见根目录后端诉求文档) */
|
|
|
|
|
|
interface FeedbackUpdateParams extends FeedbackSubmitParams {
|
|
|
|
|
|
id: string;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 分页返回(后端 { list, total } 形态) */
|
|
|
|
|
|
interface FeedbackListResult {
|
|
|
|
|
|
total: number;
|
|
|
|
|
|
list: FeedbackItem[];
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 反馈统计聚合(左侧分面面板用;全量口径,不随筛选变化)。
|
|
|
|
|
|
* typeCounts / statusCounts 已在 API 适配层归一化为 Record<码值字符串, 数量>,
|
|
|
|
|
|
* 由后端覆盖各自字典的全部码值(无数据为 0)。
|
|
|
|
|
|
*/
|
|
|
|
|
|
interface FeedbackStat {
|
|
|
|
|
|
/** 全部反馈总数 */
|
|
|
|
|
|
total: number;
|
|
|
|
|
|
/** 各分类计数:key=分类码值字符串(feedback_type) */
|
|
|
|
|
|
typeCounts: Record<string, number>;
|
|
|
|
|
|
/** 各状态计数:key=状态码值字符串(feedback_status) */
|
|
|
|
|
|
statusCounts: Record<string, number>;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|