| | |
| | | <el-form ref="loginRef" :model="loginForm" :rules="loginRules" class="login-form"> |
| | | <div class="title-box"> |
| | | <h3 class="title">RuoYi-Vue-Plus多租户管理系统</h3> |
| | | <lang-select class="lang-select hover-effect" /> |
| | | <lang-select /> |
| | | </div> |
| | | <el-form-item v-if="tenantEnabled" prop="tenantId"> |
| | | <el-select v-model="loginForm.tenantId" filterable :placeholder="$t('tenant.selectPlaceholder')" style="width: 100%"> |
| | | <el-select v-model="loginForm.tenantId" filterable :placeholder="$t('login.selectPlaceholder')" style="width: 100%"> |
| | | <el-option v-for="item in tenantList" :key="item.tenantId" :label="item.companyName" :value="item.tenantId"></el-option> |
| | | <template #prefix><svg-icon icon-class="company" class="el-input__icon input-icon" /></template> |
| | | </el-select> |
| | |
| | | import { LoginData, TenantVO } from '@/api/types'; |
| | | import { to } from 'await-to-js'; |
| | | import { HttpStatus } from '@/enums/RespEnum'; |
| | | import { useI18n } from 'vue-i18n'; |
| | | |
| | | const userStore = useUserStore(); |
| | | const router = useRouter(); |
| | | const { t } = useI18n(); |
| | | |
| | | const loginForm = ref<LoginData>({ |
| | | tenantId: '000000', |
| | |
| | | watch( |
| | | () => router.currentRoute.value, |
| | | (newRoute: any) => { |
| | | redirect.value = newRoute.query && decodeURIComponent(newRoute.query.redirect); |
| | | redirect.value = newRoute.query && newRoute.query.redirect && decodeURIComponent(newRoute.query.redirect); |
| | | }, |
| | | { immediate: true } |
| | | ); |
| | |
| | | color: #707070; |
| | | } |
| | | |
| | | .lang-select { |
| | | line-height: 30px; |
| | | :deep(.lang-select--style) { |
| | | line-height: 0; |
| | | color: #7483a3; |
| | | |
| | | &.hover-effect { |
| | | cursor: pointer; |
| | | } |
| | | } |
| | | } |
| | | |