feat(projects): 增加意见反馈
This commit is contained in:
82
src/typings/api/feedback.d.ts
vendored
Normal file
82
src/typings/api/feedback.d.ts
vendored
Normal file
@@ -0,0 +1,82 @@
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 反馈记录。
|
||||
* - 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>;
|
||||
}
|
||||
}
|
||||
}
|
||||
4
src/typings/api/project.d.ts
vendored
4
src/typings/api/project.d.ts
vendored
@@ -170,6 +170,10 @@ declare namespace Api {
|
||||
name: string;
|
||||
size?: number;
|
||||
contentType?: string;
|
||||
/** 对象存储配置编号(上传返回),与 path 一起拼永久代理 URL */
|
||||
configId?: string;
|
||||
/** 文件相对路径(上传返回),与 configId 一起拼永久代理 URL */
|
||||
path?: string;
|
||||
}
|
||||
|
||||
/** 任务详情 / 分页响应里嵌入的活跃协办人引用(按加入时间正序) */
|
||||
|
||||
2
src/typings/components.d.ts
vendored
2
src/typings/components.d.ts
vendored
@@ -130,6 +130,7 @@ declare module 'vue' {
|
||||
IconMdiFolderOpen: typeof import('~icons/mdi/folder-open')['default']
|
||||
IconMdiFolderOutline: typeof import('~icons/mdi/folder-outline')['default']
|
||||
IconMdiFolderPlusOutline: typeof import('~icons/mdi/folder-plus-outline')['default']
|
||||
IconMdiInboxMultipleOutline: typeof import('~icons/mdi/inbox-multiple-outline')['default']
|
||||
IconMdiInformationOutline: typeof import('~icons/mdi/information-outline')['default']
|
||||
IconMdiKeyboardEsc: typeof import('~icons/mdi/keyboard-esc')['default']
|
||||
IconMdiKeyboardReturn: typeof import('~icons/mdi/keyboard-return')['default']
|
||||
@@ -137,6 +138,7 @@ declare module 'vue' {
|
||||
IconMdiPencilOutline: typeof import('~icons/mdi/pencil-outline')['default']
|
||||
IconMdiPlus: typeof import('~icons/mdi/plus')['default']
|
||||
IconMdiRefresh: typeof import('~icons/mdi/refresh')['default']
|
||||
IconMdiTagOutline: typeof import('~icons/mdi/tag-outline')['default']
|
||||
IconMdiUpload: typeof import('~icons/mdi/upload')['default']
|
||||
IconUilSearch: typeof import('~icons/uil/search')['default']
|
||||
LangSwitch: typeof import('./../components/common/lang-switch.vue')['default']
|
||||
|
||||
3
src/typings/elegant-router.d.ts
vendored
3
src/typings/elegant-router.d.ts
vendored
@@ -24,6 +24,7 @@ declare module "@elegant-router/types" {
|
||||
"403": "/403";
|
||||
"404": "/404";
|
||||
"500": "/500";
|
||||
"feedback": "/feedback";
|
||||
"iframe-page": "/iframe-page/:url";
|
||||
"infra": "/infra";
|
||||
"infra_log-management": "/infra/log-management";
|
||||
@@ -111,6 +112,7 @@ declare module "@elegant-router/types" {
|
||||
| "403"
|
||||
| "404"
|
||||
| "500"
|
||||
| "feedback"
|
||||
| "iframe-page"
|
||||
| "infra"
|
||||
| "login"
|
||||
@@ -143,6 +145,7 @@ declare module "@elegant-router/types" {
|
||||
| "500"
|
||||
| "iframe-page"
|
||||
| "login"
|
||||
| "feedback"
|
||||
| "infra_log-management_api-access-log"
|
||||
| "infra_log-management_api-error-log"
|
||||
| "infra_log-management"
|
||||
|
||||
Reference in New Issue
Block a user