diff --git a/ui/src/api/user/user-manage.ts b/ui/src/api/user/user-manage.ts new file mode 100644 index 000000000..edd15a1b1 --- /dev/null +++ b/ui/src/api/user/user-manage.ts @@ -0,0 +1,74 @@ +import { Result } from '@/request/Result' +import { get, put, post, del } from '@/request/index' +import type { pageRequest } from '@/api/type/common' +import type { Ref } from 'vue' + +const prefix = '/user_manage' +/** + * 用户分页列表 + * @query 参数 + email_or_username: string + */ +const getUserManage: ( + page: pageRequest, + email_or_username: string, + loading?: Ref, +) => Promise> = (page, email_or_username, loading) => { + return get( + `${prefix}/${page.current_page}/${page.page_size}`, + email_or_username ? { email_or_username } : undefined, + loading, + ) +} + +/** + * 删除用户 + * @param 参数 user_id, + */ +const delUserManage: (user_id: string, loading?: Ref) => Promise> = ( + user_id, + loading, +) => { + return del(`${prefix}/${user_id}`, undefined, {}, loading) +} + +/** + * 创建用户 + */ +const postUserManage: (data: any, loading?: Ref) => Promise> = ( + data, + loading, +) => { + return post(`${prefix}`, data, undefined, loading) +} + +/** + * 编辑用户 + */ +const putUserManage: ( + user_id: string, + data: any, + loading?: Ref, +) => Promise> = (user_id, data, loading) => { + return put(`${prefix}/${user_id}`, data, undefined, loading) +} + +/** + * 修改用户密码 + */ +const putUserManagePassword: ( + user_id: string, + data: any, + loading?: Ref +) => Promise> = (user_id, data, loading) => { + return put(`${prefix}/${user_id}/re_password`, data, undefined, loading) +} + + +export default { + getUserManage, + putUserManage, + delUserManage, + postUserManage, + putUserManagePassword +} diff --git a/ui/src/components/app-icon/icons/common.ts b/ui/src/components/app-icon/icons/common.ts new file mode 100644 index 000000000..8f201448c --- /dev/null +++ b/ui/src/components/app-icon/icons/common.ts @@ -0,0 +1,2 @@ +import { h } from 'vue' +export default {} diff --git a/ui/src/components/app-icon/index.ts b/ui/src/components/app-icon/index.ts index bb6d0d9ce..eaf5b0eb9 100644 --- a/ui/src/components/app-icon/index.ts +++ b/ui/src/components/app-icon/index.ts @@ -138,6 +138,31 @@ export const iconMap: any = { ]) }, }, + 'app-wordspace': { + iconReader: () => { + return h('i', [ + h( + 'svg', + { + style: { height: '100%', width: '100%' }, + viewBox: '0 0 1024 1024', + version: '1.1', + xmlns: 'http://www.w3.org/2000/svg', + }, + [ + h('path', { + d: 'M523.477333 113.92l429.568 273.408a21.333333 21.333333 0 0 1 0 36.010667L523.52 696.704a21.333333 21.333333 0 0 1-22.912 0L70.954667 423.338667a21.333333 21.333333 0 0 1 0-36.010667l429.610666-273.365333a21.333333 21.333333 0 0 1 22.912 0zM201.6 405.333333L512 602.88l310.4-197.546667L512 207.786667 201.6 405.333333z', + fill: 'currentColor', + }), + h('path', { + d: 'M110.805333 592.469333a21.333333 21.333333 0 0 0-29.354666 7.04l-22.314667 36.394667a21.333333 21.333333 0 0 0 7.04 29.312l390.613333 239.530667a84.992 84.992 0 0 0 89.088 0l390.613334-239.530667a21.333333 21.333333 0 0 0 7.04-29.312l-22.314667-36.394667a21.333333 21.333333 0 0 0-29.312-7.04L506.88 828.586667a10.666667 10.666667 0 0 1-11.136 0l-384.981333-236.074667z', + fill: 'currentColor', + }), + ], + ), + ]) + }, + }, // 动态加载的图标 ...dynamicIcons, } diff --git a/ui/src/components/app-table/index.vue b/ui/src/components/app-table/index.vue index 8da869779..720eeeaff 100644 --- a/ui/src/components/app-table/index.vue +++ b/ui/src/components/app-table/index.vue @@ -135,6 +135,7 @@ defineExpose({ }) onMounted(() => { + tableHeight.value = window.innerHeight - 300 window.onresize = () => { return (() => { diff --git a/ui/src/components/card-box/index.vue b/ui/src/components/card-box/index.vue index abf368214..dc1eb6996 100644 --- a/ui/src/components/card-box/index.vue +++ b/ui/src/components/card-box/index.vue @@ -83,7 +83,6 @@ function subHoveredEnter() { position: relative; min-height: var(--card-min-height); min-width: var(--card-min-width); - border-radius: 8px; .card-header { margin-top: -5px; } diff --git a/ui/src/components/layout-container/ContentContainer.vue b/ui/src/components/layout-container/ContentContainer.vue index 647d83e97..91b2e379b 100644 --- a/ui/src/components/layout-container/ContentContainer.vue +++ b/ui/src/components/layout-container/ContentContainer.vue @@ -8,9 +8,7 @@

{{ header }}

- -

{{ header }}

-
+ diff --git a/ui/src/layout/layout-header/SystemHeader.vue b/ui/src/layout/layout-header/SystemHeader.vue index 57989c9ee..5898cc777 100644 --- a/ui/src/layout/layout-header/SystemHeader.vue +++ b/ui/src/layout/layout-header/SystemHeader.vue @@ -1,18 +1,26 @@ · + diff --git a/ui/src/views/user-manage/component/UserPwdDialog.vue b/ui/src/views/user-manage/component/UserPwdDialog.vue new file mode 100644 index 000000000..9e4d39391 --- /dev/null +++ b/ui/src/views/user-manage/component/UserPwdDialog.vue @@ -0,0 +1,133 @@ + + + diff --git a/ui/src/views/user-manage/index.vue b/ui/src/views/user-manage/index.vue index 6b71feb15..ae39f3029 100644 --- a/ui/src/views/user-manage/index.vue +++ b/ui/src/views/user-manage/index.vue @@ -1,9 +1,259 @@ - +