feat: 新增从参数取默认密码
This commit is contained in:
parent
a7b8b6efb0
commit
846bab7b7e
@ -2,8 +2,7 @@
|
|||||||
|
|
||||||
**FEATURES**
|
**FEATURES**
|
||||||
|
|
||||||
- 基础功能已经开发完毕
|
- 用户管理 新增从参数取默认密码
|
||||||
- 工作流相关模块等待后端重构后开发
|
|
||||||
|
|
||||||
**BUG FIXES**
|
**BUG FIXES**
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@ import { addFullName, cloneDeep, getPopupContainer } from '@vben/utils';
|
|||||||
import { Tag } from 'ant-design-vue';
|
import { Tag } from 'ant-design-vue';
|
||||||
|
|
||||||
import { useVbenForm } from '#/adapter';
|
import { useVbenForm } from '#/adapter';
|
||||||
|
import { configInfoByKey } from '#/api/system/config';
|
||||||
import { postOptionSelect } from '#/api/system/post';
|
import { postOptionSelect } from '#/api/system/post';
|
||||||
import {
|
import {
|
||||||
findUserInfo,
|
findUserInfo,
|
||||||
@ -113,6 +114,16 @@ async function setupDeptSelect() {
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增时候 从参数设置获取默认密码
|
||||||
|
*/
|
||||||
|
async function loadDefaultPassword(update: boolean) {
|
||||||
|
if (!update) {
|
||||||
|
const defaultPassword = await configInfoByKey('sys.user.initPassword');
|
||||||
|
defaultPassword && formApi.setFieldValue('password', defaultPassword);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const [BasicDrawer, drawerApi] = useVbenDrawer({
|
const [BasicDrawer, drawerApi] = useVbenDrawer({
|
||||||
onCancel: handleCancel,
|
onCancel: handleCancel,
|
||||||
onConfirm: handleConfirm,
|
onConfirm: handleConfirm,
|
||||||
@ -165,8 +176,8 @@ const [BasicDrawer, drawerApi] = useVbenDrawer({
|
|||||||
fieldName: 'postIds',
|
fieldName: 'postIds',
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
// 部门选择
|
// 部门选择 && 初始密码
|
||||||
await setupDeptSelect();
|
await Promise.all([setupDeptSelect(), loadDefaultPassword(isUpdate.value)]);
|
||||||
if (user) {
|
if (user) {
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
// 添加基础信息
|
// 添加基础信息
|
||||||
|
Loading…
Reference in New Issue
Block a user