给用户的录入界面增加密码的输入
This commit is contained in:
@@ -581,12 +581,10 @@ public class UserService {
|
|||||||
public UserEx addUser(UserEx ue) throws Exception{
|
public UserEx addUser(UserEx ue) throws Exception{
|
||||||
/**
|
/**
|
||||||
* 新增用户默认设置
|
* 新增用户默认设置
|
||||||
* 1、密码默认123456
|
* 1是否系统自带默认为非系统自带
|
||||||
* 2是否系统自带默认为非系统自带
|
* 2是否管理者默认为员工
|
||||||
* 3是否管理者默认为员工
|
* 3默认用户状态为正常
|
||||||
* 4默认用户状态为正常
|
|
||||||
* */
|
* */
|
||||||
ue.setPassword(Tools.md5Encryp(BusinessConstants.USER_DEFAULT_PASSWORD));
|
|
||||||
ue.setIsystem(BusinessConstants.USER_NOT_SYSTEM);
|
ue.setIsystem(BusinessConstants.USER_NOT_SYSTEM);
|
||||||
if(ue.getIsmanager()==null){
|
if(ue.getIsmanager()==null){
|
||||||
ue.setIsmanager(BusinessConstants.USER_NOT_MANAGER);
|
ue.setIsmanager(BusinessConstants.USER_NOT_MANAGER);
|
||||||
|
|||||||
@@ -133,7 +133,7 @@
|
|||||||
}
|
}
|
||||||
let reg = /^(?=.*[a-z])(?=.*\d).{6,}$/;
|
let reg = /^(?=.*[a-z])(?=.*\d).{6,}$/;
|
||||||
if (!reg.test(value)) {
|
if (!reg.test(value)) {
|
||||||
callback(new Error('密码由6位数字、小写字母组成!'))
|
callback(new Error('用户密码至少要有数字和小写字母,并且长度至少6位!'))
|
||||||
}
|
}
|
||||||
callback()
|
callback()
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
@cancel="handleCancel"
|
@cancel="handleCancel"
|
||||||
cancelText="取消"
|
cancelText="取消"
|
||||||
okText="保存"
|
okText="保存"
|
||||||
style="top:5%;height: 85%;">
|
style="top:2%;height:95%;">
|
||||||
<template slot="footer">
|
<template slot="footer">
|
||||||
<a-button key="back" v-if="isReadOnly" @click="handleCancel">
|
<a-button key="back" v-if="isReadOnly" @click="handleCancel">
|
||||||
取消
|
取消
|
||||||
@@ -23,8 +23,10 @@
|
|||||||
<a-spin :spinning="confirmLoading">
|
<a-spin :spinning="confirmLoading">
|
||||||
<a-form :form="form" id="userModal">
|
<a-form :form="form" id="userModal">
|
||||||
<a-form-item label="登录名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item label="登录名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-input placeholder="请输入登录名称" v-decorator.trim="[ 'loginName', validatorRules.loginName]" :readOnly="!!model.id"
|
<a-input placeholder="请输入登录名称" v-decorator.trim="[ 'loginName', validatorRules.loginName]" :readOnly="!!model.id" />
|
||||||
suffix="初始密码:123456" />
|
</a-form-item>
|
||||||
|
<a-form-item label="用户密码" :labelCol="labelCol" :wrapperCol="wrapperCol" v-if="!model.id">
|
||||||
|
<a-input-password placeholder="请输入用户密码" v-decorator.trim="[ 'password', validatorRules.password]" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="用户姓名" :labelCol="labelCol" :wrapperCol="wrapperCol" >
|
<a-form-item label="用户姓名" :labelCol="labelCol" :wrapperCol="wrapperCol" >
|
||||||
<a-input placeholder="请输入用户姓名" v-decorator.trim="[ 'username', validatorRules.username]" />
|
<a-input placeholder="请输入用户姓名" v-decorator.trim="[ 'username', validatorRules.username]" />
|
||||||
@@ -71,11 +73,10 @@
|
|||||||
<script>
|
<script>
|
||||||
import pick from 'lodash.pick'
|
import pick from 'lodash.pick'
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
|
import md5 from 'md5'
|
||||||
import JSelectPosition from '@/components/jeecgbiz/JSelectPosition'
|
import JSelectPosition from '@/components/jeecgbiz/JSelectPosition'
|
||||||
import { ACCESS_TOKEN } from "@/store/mutation-types"
|
import { ACCESS_TOKEN } from "@/store/mutation-types"
|
||||||
import { getAction } from '@/api/manage'
|
|
||||||
import {addUser,editUser,queryOrganizationTreeList,roleAllList} from '@/api/api'
|
import {addUser,editUser,queryOrganizationTreeList,roleAllList} from '@/api/api'
|
||||||
import { disabledAuthFilter } from "@/utils/authFilter"
|
|
||||||
import {autoJumpNextInput} from "@/utils/util"
|
import {autoJumpNextInput} from "@/utils/util"
|
||||||
import {mixinDevice} from '@/utils/mixin'
|
import {mixinDevice} from '@/utils/mixin'
|
||||||
import JImageUpload from '../../../components/jeecg/JImageUpload'
|
import JImageUpload from '../../../components/jeecg/JImageUpload'
|
||||||
@@ -105,6 +106,12 @@
|
|||||||
required: true, message: '请输入登录名称!'
|
required: true, message: '请输入登录名称!'
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
|
password: {
|
||||||
|
rules: [
|
||||||
|
{ required: true, message: '请输入用户密码!' },
|
||||||
|
{ pattern: /^(?=.*[a-z])(?=.*\d).{6,}$/, message: '用户密码至少要有数字和小写字母,并且长度至少6位!' }
|
||||||
|
]
|
||||||
|
},
|
||||||
username:{
|
username:{
|
||||||
rules: [{
|
rules: [{
|
||||||
required: true, message: '请输入用户姓名!'
|
required: true, message: '请输入用户姓名!'
|
||||||
@@ -168,6 +175,7 @@
|
|||||||
let obj;
|
let obj;
|
||||||
if(!this.model.id){
|
if(!this.model.id){
|
||||||
formData.id = this.userId;
|
formData.id = this.userId;
|
||||||
|
formData.password = md5(values.password);
|
||||||
obj=addUser(formData);
|
obj=addUser(formData);
|
||||||
}else{
|
}else{
|
||||||
obj=editUser(formData);
|
obj=editUser(formData);
|
||||||
|
|||||||
Reference in New Issue
Block a user