代码更新
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
package org.nl.modules.system.rest;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@@ -110,7 +111,10 @@ public class UserController {
|
||||
public ResponseEntity<Object> create(@Validated @RequestBody User resources){
|
||||
checkLevel(resources);
|
||||
// 默认密码 123456
|
||||
resources.setPassword(passwordEncoder.encode("123456"));
|
||||
if (ObjectUtil.isEmpty(resources.getPassword()))
|
||||
resources.setPassword(passwordEncoder.encode("123456"));
|
||||
else
|
||||
resources.setPassword(passwordEncoder.encode(resources.getPassword()));
|
||||
userService.create(resources);
|
||||
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="重置密码" prop="extId">
|
||||
<el-form-item label="密码" prop="password">
|
||||
<el-input v-model="form.password" style="width: 200px;"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -167,7 +167,7 @@
|
||||
<el-table-column :selectable="checkboxT" type="selection" width="55" />
|
||||
<el-table-column show-overflow-tooltip prop="username" label="用户名" />
|
||||
<el-table-column show-overflow-tooltip prop="nickName" label="昵称" />
|
||||
<!-- <el-table-column show-overflow-tooltip prop="passWord" label="密码" />-->
|
||||
<!-- <el-table-column show-overflow-tooltip prop="password" label="密码" />-->
|
||||
<el-table-column prop="gender" label="性别" />
|
||||
<el-table-column show-overflow-tooltip prop="phone" width="100" label="电话" />
|
||||
<el-table-column show-overflow-tooltip width="135" prop="email" label="邮箱" />
|
||||
@@ -297,6 +297,9 @@ export default {
|
||||
],
|
||||
phone: [
|
||||
{ required: true, trigger: 'blur', validator: validPhone }
|
||||
],
|
||||
password: [
|
||||
{ max: 20, message: '长度最多 20 个字符', trigger: 'change' }
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -354,6 +357,9 @@ export default {
|
||||
this.jobDatas = []
|
||||
this.roleDatas = []
|
||||
},
|
||||
[CRUD.HOOK.afterRefresh]() {
|
||||
console.log(this.crud.data)
|
||||
},
|
||||
// 初始化编辑时候的角色与岗位
|
||||
[CRUD.HOOK.beforeToEdit](crud, form) {
|
||||
this.getJobs(this.form.dept.id)
|
||||
|
||||
Reference in New Issue
Block a user