diff --git a/src/service/api/feedback.ts b/src/service/api/feedback.ts index 8ef171e..5dc1ca4 100644 --- a/src/service/api/feedback.ts +++ b/src/service/api/feedback.ts @@ -98,7 +98,7 @@ function serializeAttachments(attachments: Api.Project.AttachmentItem[]): string return attachments.length ? JSON.stringify(attachments) : ''; } -/** 分页(全量,不按提交人过滤;默认 createTime 倒序由后端保证) */ +/** 分页(支持按提交人 creator 过滤;默认 createTime 倒序由后端保证) */ export async function fetchGetFeedbackPage(params: Api.Feedback.FeedbackSearchParams) { const result = await request({ ...safeJsonRequestConfig, diff --git a/src/typings/api/feedback.d.ts b/src/typings/api/feedback.d.ts index 254e4dc..0708346 100644 --- a/src/typings/api/feedback.d.ts +++ b/src/typings/api/feedback.d.ts @@ -15,6 +15,8 @@ declare namespace Api { status?: string | number | null; /** 标题关键词,模糊匹配 */ title?: string; + /** 提交人用户 id(按提交人过滤;ID 铁律 string) */ + creator?: string; } /** diff --git a/src/typings/components.d.ts b/src/typings/components.d.ts index b902ed1..bf60d36 100644 --- a/src/typings/components.d.ts +++ b/src/typings/components.d.ts @@ -138,7 +138,6 @@ 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'] diff --git a/src/views/feedback/index.vue b/src/views/feedback/index.vue index 3f15c4a..5c5175b 100644 --- a/src/views/feedback/index.vue +++ b/src/views/feedback/index.vue @@ -45,7 +45,7 @@ function canEditRow(row: Api.Feedback.FeedbackItem) { } function getInitSearchParams(): Api.Feedback.FeedbackSearchParams { - return { pageNo: 1, pageSize: 20, type: undefined, status: undefined, title: undefined }; + return { pageNo: 1, pageSize: 20, type: undefined, status: undefined, title: undefined, creator: undefined }; } function transformPageResult( @@ -220,9 +220,10 @@ function handleSearch() { getDataByPage(1); } -// 搜索区「重置」只清搜索区自有字段(标题);左侧分面选中的 type/status 由分面单独控制,不在此连带清除 +// 搜索区「重置」清搜索区自有字段(标题、提交人);左侧分面选中的 type/status 由分面单独控制,不在此连带清除 function resetSearchParams() { searchParams.title = undefined; + searchParams.creator = undefined; searchParams.pageNo = 1; getDataByPage(1); } diff --git a/src/views/feedback/modules/feedback-search.vue b/src/views/feedback/modules/feedback-search.vue index 431bb03..135c9bf 100644 --- a/src/views/feedback/modules/feedback-search.vue +++ b/src/views/feedback/modules/feedback-search.vue @@ -1,4 +1,6 @@