update 动态切换增加判断, 返回用户列表 ;

This commit is contained in:
zlyx 2023-02-09 19:08:11 +08:00
parent d6fbe175b6
commit b356b6961d

View File

@ -74,6 +74,7 @@ import RuoYiGit from '@/components/RuoYi/Git'
import RuoYiDoc from '@/components/RuoYi/Doc' import RuoYiDoc from '@/components/RuoYi/Doc'
import { tenantList } from "@/api/login"; import { tenantList } from "@/api/login";
import { dynamicClear, dynamicTenant } from "@/api/system/tenant"; import { dynamicClear, dynamicTenant } from "@/api/system/tenant";
import { listUser } from "@/api/system/user";
export default { export default {
data() { data() {
@ -81,7 +82,8 @@ export default {
userId: this.$store.getters.userId, userId: this.$store.getters.userId,
tenantId: undefined, tenantId: undefined,
companyName: undefined, companyName: undefined,
tenantList: [] tenantList: [],
userList: []
} }
}, },
components: { components: {
@ -120,13 +122,21 @@ export default {
methods: { methods: {
// //
dynamicTenantEvent(tenantId) { dynamicTenantEvent(tenantId) {
dynamicTenant(tenantId).then(res => { if (this.companyName != null && this.companyName !== '') {
this.$router.push("/index"); dynamicTenant(tenantId).then(res => {
}); this.$router.push("/index");
});
listUser().then(res => {
this.userList = res.rows;
})
}
}, },
dynamicClearEvent(tenantId) { dynamicClearEvent() {
dynamicClear(tenantId).then(res => { dynamicClear().then(res => {
this.$router.push("/index"); this.$router.push("/index");
listUser().then(res => {
this.userList = res.rows;
})
}); });
}, },
// //