From b356b6961d1a63d676511532b4cf8970901ffef4 Mon Sep 17 00:00:00 2001 From: zlyx <1242874891@qq.com> Date: Thu, 9 Feb 2023 19:08:11 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E5=8A=A8=E6=80=81=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=A4=E6=96=AD,=20=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=88=97=E8=A1=A8=20;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/layout/components/Navbar.vue | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/ruoyi-ui/src/layout/components/Navbar.vue b/ruoyi-ui/src/layout/components/Navbar.vue index 50c833d81..287ff106b 100644 --- a/ruoyi-ui/src/layout/components/Navbar.vue +++ b/ruoyi-ui/src/layout/components/Navbar.vue @@ -74,6 +74,7 @@ import RuoYiGit from '@/components/RuoYi/Git' import RuoYiDoc from '@/components/RuoYi/Doc' import { tenantList } from "@/api/login"; import { dynamicClear, dynamicTenant } from "@/api/system/tenant"; +import { listUser } from "@/api/system/user"; export default { data() { @@ -81,7 +82,8 @@ export default { userId: this.$store.getters.userId, tenantId: undefined, companyName: undefined, - tenantList: [] + tenantList: [], + userList: [] } }, components: { @@ -120,13 +122,21 @@ export default { methods: { // 动态切换 dynamicTenantEvent(tenantId) { - dynamicTenant(tenantId).then(res => { - this.$router.push("/index"); - }); + if (this.companyName != null && this.companyName !== '') { + dynamicTenant(tenantId).then(res => { + this.$router.push("/index"); + }); + listUser().then(res => { + this.userList = res.rows; + }) + } }, - dynamicClearEvent(tenantId) { - dynamicClear(tenantId).then(res => { + dynamicClearEvent() { + dynamicClear().then(res => { this.$router.push("/index"); + listUser().then(res => { + this.userList = res.rows; + }) }); }, // 租户列表