From 60016fbd669c4a19dd0894ad4eda8a34f5b50f76 Mon Sep 17 00:00:00 2001 From: Shiwen Cheng Date: Sun, 14 Feb 2021 21:28:02 +0800 Subject: [PATCH] [Improvement-4740][UI] Set the default Tenant as default or the first exist tenant in save process (#4742) --- .../src/js/conf/home/pages/dag/_source/udp/udp.vue | 6 +++--- .../home/pages/security/pages/users/_source/createUser.vue | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/udp/udp.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/udp/udp.vue index a040b4be43..50f6016191 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/udp/udp.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/udp/udp.vue @@ -213,10 +213,10 @@ this.timeout = dag.timeout || 0 this.checkedTimeout = this.timeout !== 0 this.$nextTick(() => { - if (dag.tenantId === -1) { - this.tenantId = this.store.state.user.userInfo.tenantId - } else { + if (dag.tenantId > -1) { this.tenantId = dag.tenantId + } else if (this.store.state.user.userInfo.tenantId) { + this.tenantId = this.store.state.user.userInfo.tenantId } }) }, diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/users/_source/createUser.vue b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/users/_source/createUser.vue index 882a54c230..e53128b23e 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/users/_source/createUser.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/users/_source/createUser.vue @@ -293,7 +293,7 @@ this.email = this.item.email this.phone = this.item.phone this.userState = this.item.state + '' || '1' - if (this.item.tenantName) { + if (this.item.tenantId) { this.tenantId = this.item.tenantId } this.$nextTick(() => { @@ -311,7 +311,7 @@ this.email = this.item.email this.phone = this.item.phone this.userState = this.state + '' || '1' - if (this.item.tenantName) { + if (this.item.tenantId) { this.tenantId = this.item.tenantId } if (this.queueList.length > 0) {