|
|
@@ -3,10 +3,10 @@ import type { OnActionClickParams, VxeTableGridOptions } from '#/adapter';
|
|
|
|
|
|
import { reactive } from 'vue';
|
|
|
|
|
|
-import { BcPage, useVbenModal } from '@vben/common-ui';
|
|
|
+import { alert, BcPage, confirm, useVbenModal } from '@vben/common-ui';
|
|
|
|
|
|
import { useClipboard } from '@vueuse/core';
|
|
|
-import { Button, message, Modal } from 'ant-design-vue';
|
|
|
+import { Button, message } from 'ant-design-vue';
|
|
|
|
|
|
import { useTableGridOptions, useVbenVxeGrid } from '#/adapter';
|
|
|
import { DepartmentApi, RoleApi, UserApi } from '#/api';
|
|
|
@@ -29,20 +29,23 @@ const [SelectCardModal, selectCardApi] = useVbenModal({
|
|
|
|
|
|
const handelResetPassword = async (id: number) => {
|
|
|
const data = await UserApi.resetPassword([id]);
|
|
|
- Modal.success({
|
|
|
+ confirm({
|
|
|
title: '重置成功',
|
|
|
content: `新密码为:${data}`,
|
|
|
- okText: `复制密码`,
|
|
|
- onOk: () => {
|
|
|
- copy(data);
|
|
|
- message.success('密码复制成功!');
|
|
|
+ confirmText: '复制密码',
|
|
|
+ beforeClose: ({ isConfirm }: { isConfirm: boolean }) => {
|
|
|
+ if (isConfirm) {
|
|
|
+ copy(data);
|
|
|
+ alert('密码复制成功!');
|
|
|
+ }
|
|
|
+ return true;
|
|
|
},
|
|
|
});
|
|
|
};
|
|
|
|
|
|
const handleDelete = async (id: number) => {
|
|
|
await UserApi.deleteDetail(id);
|
|
|
- message.success('数据删除成功');
|
|
|
+ alert('数据删除成功');
|
|
|
reload();
|
|
|
};
|
|
|
|
|
|
@@ -162,12 +165,8 @@ const handleDepartmentChange = (keys: any[]) => {
|
|
|
@change="handleDepartmentChange"
|
|
|
/>
|
|
|
</template>
|
|
|
- <FormEditModal :close-on-click-modal="false" @success="handelSuccess" />
|
|
|
- <SelectCardModal
|
|
|
- :close-on-click-modal="false"
|
|
|
- title="角色"
|
|
|
- @success="handelRoleSuccess"
|
|
|
- />
|
|
|
+ <FormEditModal @success="handelSuccess" />
|
|
|
+ <SelectCardModal title="角色" @success="handelRoleSuccess" />
|
|
|
<Grid>
|
|
|
<template #toolbar-tools>
|
|
|
<Button
|