diff --git a/apps/web-antd/src/api/system/dict/dict-type.ts b/apps/web-antd/src/api/system/dict/dict-type.ts index 2f5576de..cbb5e92a 100644 --- a/apps/web-antd/src/api/system/dict/dict-type.ts +++ b/apps/web-antd/src/api/system/dict/dict-type.ts @@ -1,6 +1,6 @@ import type { DictType } from './dict-type-model'; -import type { ID, IDS, PageQuery } from '#/api/common'; +import type { ID, IDS, PageQuery, PageResult } from '#/api/common'; import { commonExport } from '#/api/helper'; import { requestClient } from '#/api/request'; @@ -18,8 +18,8 @@ enum Api { * @param params 请求参数 * @returns list */ -export function dictList(params?: PageQuery) { - return requestClient.get(Api.dictTypeList, { params }); +export function dictTypeList(params?: PageQuery) { + return requestClient.get>(Api.dictTypeList, { params }); } /** @@ -27,7 +27,7 @@ export function dictList(params?: PageQuery) { * @param data 表单参数 * @returns blob */ -export function dictExport(data: any) { +export function dictTypeExport(data: any) { return commonExport(Api.dictTypeExport, data); } diff --git a/apps/web-antd/src/api/system/tenant-package/index.ts b/apps/web-antd/src/api/system/tenant-package/index.ts index 4b74faee..1851a7bc 100644 --- a/apps/web-antd/src/api/system/tenant-package/index.ts +++ b/apps/web-antd/src/api/system/tenant-package/index.ts @@ -1,6 +1,6 @@ import type { TenantPackage } from './model'; -import type { ID, IDS, PageQuery } from '#/api/common'; +import type { ID, IDS, PageQuery, PageResult } from '#/api/common'; import { commonExport } from '#/api/helper'; import { requestClient } from '#/api/request'; @@ -14,7 +14,9 @@ enum Api { } export function packageList(params?: PageQuery) { - return requestClient.get(Api.packageList, { params }); + return requestClient.get>(Api.packageList, { + params, + }); } // 下拉框 diff --git a/apps/web-antd/src/views/_core/profile/components/online-device.vue b/apps/web-antd/src/views/_core/profile/components/online-device.vue index 452097f2..a0309d46 100644 --- a/apps/web-antd/src/views/_core/profile/components/online-device.vue +++ b/apps/web-antd/src/views/_core/profile/components/online-device.vue @@ -1,8 +1,53 @@ - + diff --git a/apps/web-antd/src/views/_core/profile/index.vue b/apps/web-antd/src/views/_core/profile/index.vue index 4e595b03..b27d62df 100644 --- a/apps/web-antd/src/views/_core/profile/index.vue +++ b/apps/web-antd/src/views/_core/profile/index.vue @@ -40,7 +40,12 @@ async function handleUploadFinish() { - + diff --git a/apps/web-antd/src/views/monitor/logininfor/index.vue b/apps/web-antd/src/views/monitor/logininfor/index.vue index 530b0510..d5b75986 100644 --- a/apps/web-antd/src/views/monitor/logininfor/index.vue +++ b/apps/web-antd/src/views/monitor/logininfor/index.vue @@ -110,6 +110,7 @@ function handleMultiDelete() { onOk: async () => { await loginInfoRemove(ids); await tableApi.query(); + checked.value = false; }, }); } diff --git a/apps/web-antd/src/views/monitor/online/index.vue b/apps/web-antd/src/views/monitor/online/index.vue index 3311c7d6..f9d5bf17 100644 --- a/apps/web-antd/src/views/monitor/online/index.vue +++ b/apps/web-antd/src/views/monitor/online/index.vue @@ -11,6 +11,9 @@ import { forceLogout, onlineList } from '#/api/monitor/online'; import { columns, querySchema } from './data'; const formOptions: VbenFormProps = { + commonConfig: { + labelWidth: 80, + }, schema: querySchema(), wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4', }; @@ -44,7 +47,7 @@ const [BasicTable, tableApi] = useVbenVxeGrid({ formOptions, gridOptions }); async function handleForceOffline(row: Recordable) { await forceLogout(row.tokenId); - await tableApi.reload(); + await tableApi.query(); } @@ -52,7 +55,7 @@ async function handleForceOffline(row: Recordable) { - + diff --git a/apps/web-antd/src/views/system/config/index.vue b/apps/web-antd/src/views/system/config/index.vue index d523599a..a4382e50 100644 --- a/apps/web-antd/src/views/system/config/index.vue +++ b/apps/web-antd/src/views/system/config/index.vue @@ -1,6 +1,8 @@ diff --git a/apps/web-antd/src/views/system/dict/index.vue b/apps/web-antd/src/views/system/dict/index.vue index 1254cff9..2f2331f8 100644 --- a/apps/web-antd/src/views/system/dict/index.vue +++ b/apps/web-antd/src/views/system/dict/index.vue @@ -6,8 +6,17 @@ import DictTypePanel from './type/index.vue'; + + diff --git a/apps/web-antd/src/views/system/dict/type/data.ts b/apps/web-antd/src/views/system/dict/type/data.ts index 8fd6c641..78dad00f 100644 --- a/apps/web-antd/src/views/system/dict/type/data.ts +++ b/apps/web-antd/src/views/system/dict/type/data.ts @@ -1,4 +1,4 @@ -import { type FormSchemaGetter, z } from '#/adapter'; +import { type FormSchemaGetter, type VxeGridProps, z } from '#/adapter'; export const querySchema: FormSchemaGetter = () => [ { @@ -13,6 +13,33 @@ export const querySchema: FormSchemaGetter = () => [ }, ]; +export const columns: VxeGridProps['columns'] = [ + { type: 'checkbox', width: 60 }, + { + title: '字典名称', + field: 'dictName', + }, + { + title: '字典类型', + field: 'dictType', + }, + { + title: '备注', + field: 'remark', + }, + { + title: '创建时间', + field: 'createTime', + }, + { + field: 'action', + fixed: 'right', + slots: { default: 'action' }, + title: '操作', + width: 180, + }, +]; + export const modalSchema: FormSchemaGetter = () => [ { component: 'Input', diff --git a/apps/web-antd/src/views/system/dict/type/dict-type-model.vue b/apps/web-antd/src/views/system/dict/type/dict-type-modal.vue similarity index 100% rename from apps/web-antd/src/views/system/dict/type/dict-type-model.vue rename to apps/web-antd/src/views/system/dict/type/dict-type-modal.vue diff --git a/apps/web-antd/src/views/system/dict/type/index.vue b/apps/web-antd/src/views/system/dict/type/index.vue index 1b169781..4ed77f04 100644 --- a/apps/web-antd/src/views/system/dict/type/index.vue +++ b/apps/web-antd/src/views/system/dict/type/index.vue @@ -1,65 +1,197 @@ diff --git a/apps/web-antd/src/views/system/notice/index.vue b/apps/web-antd/src/views/system/notice/index.vue index 50ba542b..72a13920 100644 --- a/apps/web-antd/src/views/system/notice/index.vue +++ b/apps/web-antd/src/views/system/notice/index.vue @@ -1,6 +1,8 @@ diff --git a/apps/web-antd/src/views/system/tenantPackage/data.ts b/apps/web-antd/src/views/system/tenantPackage/data.ts index f2dcd25c..7e8fba8c 100644 --- a/apps/web-antd/src/views/system/tenantPackage/data.ts +++ b/apps/web-antd/src/views/system/tenantPackage/data.ts @@ -1,4 +1,4 @@ -import type { FormSchemaGetter } from '#/adapter'; +import type { FormSchemaGetter, VxeGridProps } from '#/adapter'; export const querySchema: FormSchemaGetter = () => [ { @@ -8,6 +8,30 @@ export const querySchema: FormSchemaGetter = () => [ }, ]; +export const columns: VxeGridProps['columns'] = [ + { type: 'checkbox', width: 60 }, + { + title: '套餐名称', + field: 'packageName', + }, + { + title: '备注', + field: 'remark', + }, + { + title: '租户状态', + field: 'status', + slots: { default: 'status' }, + }, + { + field: 'action', + fixed: 'right', + slots: { default: 'action' }, + title: '操作', + width: 180, + }, +]; + export const drawerSchema: FormSchemaGetter = () => [ { component: 'Input', diff --git a/apps/web-antd/src/views/system/tenantPackage/index.vue b/apps/web-antd/src/views/system/tenantPackage/index.vue index 261a41ea..3013da23 100644 --- a/apps/web-antd/src/views/system/tenantPackage/index.vue +++ b/apps/web-antd/src/views/system/tenantPackage/index.vue @@ -1,24 +1,200 @@ diff --git a/apps/web-antd/src/views/system/user/index.vue b/apps/web-antd/src/views/system/user/index.vue index 3a82df07..7645ee67 100644 --- a/apps/web-antd/src/views/system/user/index.vue +++ b/apps/web-antd/src/views/system/user/index.vue @@ -10,8 +10,17 @@ import { type VbenFormProps, } from '@vben/common-ui'; import { $t } from '@vben/locales'; +import { getPopupContainer } from '@vben/utils'; -import { Avatar, Modal, Popconfirm, Space } from 'ant-design-vue'; +import { + Avatar, + Dropdown, + Menu, + MenuItem, + Modal, + Popconfirm, + Space, +} from 'ant-design-vue'; import dayjs from 'dayjs'; import { useVbenVxeGrid, type VxeGridProps } from '#/adapter'; @@ -28,6 +37,8 @@ import { columns, querySchema } from './data'; import DeptTree from './dept-tree.vue'; import userDrawer from './user-drawer.vue'; import userImportModal from './user-import-modal.vue'; +import userInfoModal from './user-info-modal.vue'; +import userResetPwdModal from './user-reset-pwd-modal.vue'; /** * 导入 @@ -100,6 +111,7 @@ const gridOptions: VxeGridProps = { rowConfig: { isHover: true, keyField: 'userId', + height: 48, }, round: true, align: 'center', @@ -152,95 +164,133 @@ function handleMultiDelete() { }, }); } + +const [UserInfoModal, userInfoModalApi] = useVbenModal({ + connectedComponent: userInfoModal, +}); +function handleUserInfo(row: Recordable) { + userInfoModalApi.setData({ userId: row.userId }); + userInfoModalApi.open(); +} + +const [UserResetPwdModal, userResetPwdModalApi] = useVbenModal({ + connectedComponent: userResetPwdModal, +}); + +function handleResetPwd(record: Recordable) { + userResetPwdModalApi.setData({ record }); + userResetPwdModalApi.open(); +} diff --git a/apps/web-antd/src/views/system/user/info.tsx b/apps/web-antd/src/views/system/user/info.tsx index 68009601..cd00bb81 100644 --- a/apps/web-antd/src/views/system/user/info.tsx +++ b/apps/web-antd/src/views/system/user/info.tsx @@ -5,10 +5,12 @@ import { DictEnum } from '@vben/constants'; import { Tag } from 'ant-design-vue'; import dayjs from 'dayjs'; import duration from 'dayjs/plugin/duration'; +import relativeTime from 'dayjs/plugin/relativeTime'; import { renderDict } from '#/utils/render'; dayjs.extend(duration); +dayjs.extend(relativeTime); function renderTags(list: string[]) { return ( @@ -100,7 +102,7 @@ export const descSchema: DescItem[] = [ // 默认en显示 dayjs.locale('zh-cn'); // 计算相差秒数 - const diffSeconds = dayjs(new Date()).diff(dayjs(value), 'second'); + const diffSeconds = dayjs().diff(dayjs(value), 'second'); /** * 转为时间显示(x月 x天) * https://dayjs.fenxianglu.cn/category/duration.html#%E4%BA%BA%E6%80%A7%E5%8C%96 diff --git a/apps/web-antd/src/views/system/user/user-info-modal.vue b/apps/web-antd/src/views/system/user/user-info-modal.vue index 63491e42..80a917e9 100644 --- a/apps/web-antd/src/views/system/user/user-info-modal.vue +++ b/apps/web-antd/src/views/system/user/user-info-modal.vue @@ -50,7 +50,7 @@ async function handleOpenChange(open: boolean) { diff --git a/apps/web-antd/src/views/system/user/user-reset-pwd-modal.vue b/apps/web-antd/src/views/system/user/user-reset-pwd-modal.vue index 37c1682a..68d7a88e 100644 --- a/apps/web-antd/src/views/system/user/user-reset-pwd-modal.vue +++ b/apps/web-antd/src/views/system/user/user-reset-pwd-modal.vue @@ -46,7 +46,7 @@ const [BasicForm, formApi] = useVbenForm({ rules: 'required', }, { - component: 'StrengthMeter', + component: 'InputPassword', componentProps: { placeholder: '请输入新的密码, 密码长度为5 - 20', }, @@ -58,6 +58,10 @@ const [BasicForm, formApi] = useVbenForm({ .max(20, { message: '密码长度为5 - 20' }), }, ], + showDefaultActions: false, + commonConfig: { + labelWidth: 80, + }, }); async function handleOpenChange(open: boolean) { @@ -76,7 +80,7 @@ async function handleSubmit() { if (!valid) { return; } - const data = formApi.getValues(); + const data = await formApi.getValues(); await userResetPassword(data as any); emit('reload'); handleCancel(); @@ -94,8 +98,14 @@ async function handleCancel() { diff --git a/apps/web-antd/src/views/tool/gen/index.vue b/apps/web-antd/src/views/tool/gen/index.vue index 378b87c6..92ba2c31 100644 --- a/apps/web-antd/src/views/tool/gen/index.vue +++ b/apps/web-antd/src/views/tool/gen/index.vue @@ -1,6 +1,7 @@