Files
cn-rdms-web/src/typings/api/feedback.d.ts

85 lines
3.0 KiB
TypeScript
Raw Normal View History

2026-06-27 08:55:33 +08:00
declare namespace Api {
/**
* namespace Feedback
*
* backend api module: "feedback"
*/
namespace Feedback {
/** 反馈分页查询参数GET querytype/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>;
}
}
}