提交 256c0efe authored 作者: fit2cloud-chenyw's avatar fit2cloud-chenyw

fix: 用户管理删除组织会闪现0(null)

上级 99bd4727
...@@ -30,6 +30,7 @@ import org.springframework.transaction.annotation.Transactional; ...@@ -30,6 +30,7 @@ import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.List; import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@Service @Service
...@@ -117,6 +118,7 @@ public class SysUserService { ...@@ -117,6 +118,7 @@ public class SysUserService {
user.setUpdateTime(now); user.setUpdateTime(now);
deleteUserRoles(user.getUserId());//先删除用户角色关联 deleteUserRoles(user.getUserId());//先删除用户角色关联
saveUserRoles(user.getUserId(), request.getRoleIds());//再插入角色关联 saveUserRoles(user.getUserId(), request.getRoleIds());//再插入角色关联
if (ObjectUtils.isEmpty(user.getDeptId())) user.setDeptId(0L);
return sysUserMapper.updateByPrimaryKeySelective(user); return sysUserMapper.updateByPrimaryKeySelective(user);
} }
......
...@@ -106,7 +106,7 @@ export default { ...@@ -106,7 +106,7 @@ export default {
const { meta, path } = route const { meta, path } = route
// if set path, the sidebar will highlight the path you set // if set path, the sidebar will highlight the path you set
if (meta.activeMenu) { if (meta.activeMenu) {
return meta.activeMenu // return meta.activeMenu
} }
// 如果是首页,首页高亮 // 如果是首页,首页高亮
if (path === '/panel') { if (path === '/panel') {
......
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
<div class="span-header"> <div class="span-header">
<div class="bi-text"> <div class="bi-text">
{{ $t('pblink.key_pwd') }} <span style="text-align: center;">{{ $t('pblink.key_pwd') }}
</span>
</div> </div>
</div> </div>
......
...@@ -288,7 +288,7 @@ export default { ...@@ -288,7 +288,7 @@ export default {
save() { save() {
this.$refs.createUserForm.validate(valid => { this.$refs.createUserForm.validate(valid => {
if (valid) { if (valid) {
!this.form.deptId && (this.form.deptId = 0) // !this.form.deptId && (this.form.deptId = 0)
const method = this.formType === 'add' ? addUser : editUser const method = this.formType === 'add' ? addUser : editUser
method(this.form).then(res => { method(this.form).then(res => {
this.$success(this.$t('commons.save_success')) this.$success(this.$t('commons.save_success'))
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论