From f00fdcd42a18d838c2f28a010463edbcf45e94dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E8=87=AA=E8=BE=BE?= <980324341@qq.com> Date: Sun, 6 Sep 2026 23:43:00 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E9=9C=80=E6=B1=82):=20=E2=91=A0=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E7=AE=A1=E7=90=86=E8=A1=A5=E3=80=8C=E8=A7=92=E8=89=B2?= =?UTF-8?q?=E3=80=8D=E7=AD=9B=E9=80=89(=E5=89=8D=E7=AB=AF+=E5=90=8E?= =?UTF-8?q?=E7=AB=AF=20role=20=E5=8F=82=E6=95=B0)=20=E2=91=A1=E8=BD=AF?= =?UTF-8?q?=E4=BB=B6/=E6=95=B0=E5=AD=97=E4=BA=BA=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E9=A1=B5=E8=A1=A5=E7=89=88=E6=9C=AC=E5=8F=B7=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=20=E2=91=A2=E5=85=A8=E7=AB=99=20el-select=20=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=20filterable(=E5=88=86=E7=BB=84/=E6=89=80=E5=B1=9E=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=91=98/=E8=A7=92=E8=89=B2=E7=AD=89=E5=A4=A7?= =?UTF-8?q?=E4=B8=8B=E6=8B=89=E5=8F=AF=E6=A8=A1=E7=B3=8A=E6=90=9C=E7=B4=A2?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin-frontend-vue/src/api/users-dto.ts | 4 ++ .../src/pages/account/CreateUserDialog.vue | 2 +- .../src/pages/account/MenusPage.vue | 4 +- .../src/pages/account/UsersPage.vue | 15 ++++-- .../src/pages/account/users-filter.ts | 11 +++-- .../src/pages/asin/QueryAsinPage.vue | 4 +- .../src/pages/asin/SkipPricePage.vue | 4 +- .../RecordsDigitalHumanVersionPage.vue | 47 +++++++++++++++++-- .../records/RecordsSoftwareVersionPage.vue | 47 +++++++++++++++++-- .../src/pages/shop/ShopManagePage.vue | 2 +- 10 files changed, 115 insertions(+), 25 deletions(-) diff --git a/admin-frontend-vue/src/api/users-dto.ts b/admin-frontend-vue/src/api/users-dto.ts index 768cd1c1..827bdafc 100644 --- a/admin-frontend-vue/src/api/users-dto.ts +++ b/admin-frontend-vue/src/api/users-dto.ts @@ -13,6 +13,8 @@ export interface UserListParams { keyword?: string createdById?: number | null adminId?: number | null + /** 角色过滤(''=全部)。 */ + role?: string } /** 序列化到 GET /api/admin/users 的查询参数(Java snake_case)。 */ @@ -23,6 +25,7 @@ export interface UserListQuery { search?: string created_by_id?: number admin_id?: number + role?: string } /** 用户列表项即 AdminUser(与 Java AdminUserItemVo 字段对齐)。 */ @@ -67,6 +70,7 @@ export function toUserListQuery(params: UserListParams): UserListQuery { if (params.keyword) query.username = params.keyword if (params.createdById != null) query.created_by_id = params.createdById if (params.adminId != null) query.admin_id = params.adminId + if (params.role) query.role = params.role return query } diff --git a/admin-frontend-vue/src/pages/account/CreateUserDialog.vue b/admin-frontend-vue/src/pages/account/CreateUserDialog.vue index 5c4a5b5f..ebbd9b43 100644 --- a/admin-frontend-vue/src/pages/account/CreateUserDialog.vue +++ b/admin-frontend-vue/src/pages/account/CreateUserDialog.vue @@ -93,7 +93,7 @@ async function create(): Promise { /> - + diff --git a/admin-frontend-vue/src/pages/account/MenusPage.vue b/admin-frontend-vue/src/pages/account/MenusPage.vue index cae2d584..bfce8e11 100644 --- a/admin-frontend-vue/src/pages/account/MenusPage.vue +++ b/admin-frontend-vue/src/pages/account/MenusPage.vue @@ -295,12 +295,12 @@ onMounted(loadMenus) - + - +
- + + + +
+
+ + + + + +
diff --git a/admin-frontend-vue/src/pages/account/users-filter.ts b/admin-frontend-vue/src/pages/account/users-filter.ts index 8c3fd7d7..128e8bcc 100644 --- a/admin-frontend-vue/src/pages/account/users-filter.ts +++ b/admin-frontend-vue/src/pages/account/users-filter.ts @@ -7,18 +7,20 @@ export interface UserFilterState { keyword: string /** 按创建管理员过滤(可选)。 */ createdByAdminId: number | null + /** 角色过滤(''=全部;super_admin/admin/normal)。 */ + role: string page: number pageSize: number } export function createUserFilterState(): UserFilterState { - return { keyword: '', createdByAdminId: null, page: USER_PAGE_MIN_PAGE, pageSize: USER_PAGE_DEFAULT_SIZE } + return { keyword: '', createdByAdminId: null, role: '', page: USER_PAGE_MIN_PAGE, pageSize: USER_PAGE_DEFAULT_SIZE } } /** 修改筛选条件时重置回第一页(避免停在可能越界的旧页)。 */ export function withFilterReset( state: UserFilterState, - next: Partial>, + next: Partial>, ): UserFilterState { return { ...state, ...next, page: USER_PAGE_MIN_PAGE } } @@ -36,10 +38,13 @@ export function isFilterActive(state: UserFilterState): boolean { /** 页面状态 → 查询适配层参数(空关键字不下发)。 */ export function toUserListParams(state: UserFilterState): UserListParams { const keyword = state.keyword.trim() - return { + const params: UserListParams = { page: state.page, pageSize: state.pageSize, keyword: keyword || undefined, createdById: state.createdByAdminId, } + const role = (state.role || '').trim() + if (role) params.role = role + return params } diff --git a/admin-frontend-vue/src/pages/asin/QueryAsinPage.vue b/admin-frontend-vue/src/pages/asin/QueryAsinPage.vue index dc27d397..3e5c388f 100644 --- a/admin-frontend-vue/src/pages/asin/QueryAsinPage.vue +++ b/admin-frontend-vue/src/pages/asin/QueryAsinPage.vue @@ -426,7 +426,7 @@ onMounted(() => {
- + @@ -461,7 +461,7 @@ onMounted(() => { - + diff --git a/admin-frontend-vue/src/pages/asin/SkipPricePage.vue b/admin-frontend-vue/src/pages/asin/SkipPricePage.vue index b640a77e..f8b41930 100644 --- a/admin-frontend-vue/src/pages/asin/SkipPricePage.vue +++ b/admin-frontend-vue/src/pages/asin/SkipPricePage.vue @@ -473,7 +473,7 @@ onMounted(() => { - + @@ -514,7 +514,7 @@ onMounted(() => { - + diff --git a/admin-frontend-vue/src/pages/records/RecordsDigitalHumanVersionPage.vue b/admin-frontend-vue/src/pages/records/RecordsDigitalHumanVersionPage.vue index 217e7378..7062759f 100644 --- a/admin-frontend-vue/src/pages/records/RecordsDigitalHumanVersionPage.vue +++ b/admin-frontend-vue/src/pages/records/RecordsDigitalHumanVersionPage.vue @@ -29,11 +29,18 @@ const items = ref([]) /** 分页(对齐 admin.js:6311 pageSize=20 + 数字页码 + 跳转;Java 列表接口不分页,前端分页呈现)。 */ const pageSize = 20 const page = ref(1) +/** 版本号搜索(客户端过滤)。 */ +const versionKeyword = ref('') +const filteredItems = computed(() => { + const kw = (versionKeyword.value || '').trim().toLowerCase() + if (!kw) return items.value + return items.value.filter((item) => `${item.version}`.toLowerCase().includes(kw)) +}) const pagedItems = computed(() => { const start = (page.value - 1) * pageSize - return items.value.slice(start, start + pageSize) + return filteredItems.value.slice(start, start + pageSize) }) -const totalPages = computed(() => Math.max(1, Math.ceil(items.value.length / pageSize))) +const totalPages = computed(() => Math.max(1, Math.ceil(filteredItems.value.length / pageSize))) const jumpPage = ref('') const uploadVisible = ref(false) @@ -191,7 +198,10 @@ onMounted(load)

版本列表

- +
+ + +
@@ -242,13 +252,13 @@ onMounted(load) 加载中... - 暂无版本记录 + {{ versionKeyword ? '暂无匹配版本' : '暂无版本记录' }}
-