From 256c0efe6baa70a3839e13bde26c2a5cc13840c5 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Thu, 24 Jun 2021 18:34:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=94=A8=E6=88=B7=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E7=BB=84=E7=BB=87=E4=BC=9A=E9=97=AA=E7=8E=B0?= =?UTF-8?q?0(null)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/io/dataease/service/sys/SysUserService.java | 2 ++ frontend/src/layout/components/Topbar.vue | 2 +- frontend/src/views/link/pwd/index.vue | 3 ++- frontend/src/views/system/user/form.vue | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/backend/src/main/java/io/dataease/service/sys/SysUserService.java b/backend/src/main/java/io/dataease/service/sys/SysUserService.java index d5a067fbb1..740e20946e 100644 --- a/backend/src/main/java/io/dataease/service/sys/SysUserService.java +++ b/backend/src/main/java/io/dataease/service/sys/SysUserService.java @@ -30,6 +30,7 @@ import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.util.List; +import java.util.Optional; import java.util.stream.Collectors; @Service @@ -117,6 +118,7 @@ public class SysUserService { user.setUpdateTime(now); deleteUserRoles(user.getUserId());//先删除用户角色关联 saveUserRoles(user.getUserId(), request.getRoleIds());//再插入角色关联 + if (ObjectUtils.isEmpty(user.getDeptId())) user.setDeptId(0L); return sysUserMapper.updateByPrimaryKeySelective(user); } diff --git a/frontend/src/layout/components/Topbar.vue b/frontend/src/layout/components/Topbar.vue index 59a09def0b..c7ef78be59 100644 --- a/frontend/src/layout/components/Topbar.vue +++ b/frontend/src/layout/components/Topbar.vue @@ -106,7 +106,7 @@ export default { const { meta, path } = route // if set path, the sidebar will highlight the path you set if (meta.activeMenu) { - return meta.activeMenu + // return meta.activeMenu } // 如果是首页,首页高亮 if (path === '/panel') { diff --git a/frontend/src/views/link/pwd/index.vue b/frontend/src/views/link/pwd/index.vue index 9ce3dc973e..50fdbbe94e 100644 --- a/frontend/src/views/link/pwd/index.vue +++ b/frontend/src/views/link/pwd/index.vue @@ -5,7 +5,8 @@
- {{ $t('pblink.key_pwd') }} + {{ $t('pblink.key_pwd') }} +
diff --git a/frontend/src/views/system/user/form.vue b/frontend/src/views/system/user/form.vue index 113cb40964..ba5309f28b 100644 --- a/frontend/src/views/system/user/form.vue +++ b/frontend/src/views/system/user/form.vue @@ -288,7 +288,7 @@ export default { save() { this.$refs.createUserForm.validate(valid => { if (valid) { - !this.form.deptId && (this.form.deptId = 0) + // !this.form.deptId && (this.form.deptId = 0) const method = this.formType === 'add' ? addUser : editUser method(this.form).then(res => { this.$success(this.$t('commons.save_success'))