|
|
|
@ -47,19 +47,41 @@
@@ -47,19 +47,41 @@
|
|
|
|
|
/> |
|
|
|
|
</a-form-item> |
|
|
|
|
</div> |
|
|
|
|
<div class="aui-inputClear"> |
|
|
|
|
<i class="icon icon-role"/> |
|
|
|
|
<a-form-item> |
|
|
|
|
<ApiSelect |
|
|
|
|
v-model:value="formData.identityProvider" |
|
|
|
|
:api="getDataByDictType" |
|
|
|
|
:params="{ |
|
|
|
|
type: 'identityProvider', |
|
|
|
|
tenantId: formData.tenantId |
|
|
|
|
}" |
|
|
|
|
:bordered="false" |
|
|
|
|
labelField="label" |
|
|
|
|
valueField="value" |
|
|
|
|
placeholder="请选择角色" |
|
|
|
|
/> |
|
|
|
|
</a-form-item> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</a-form> |
|
|
|
|
</div> |
|
|
|
|
<div class="aui-formButton"> |
|
|
|
|
<div style="margin-top: 12px" class="aui-formButton"> |
|
|
|
|
<div class="aui-flex"> |
|
|
|
|
<a-button |
|
|
|
|
:loading="loginLoading" |
|
|
|
|
class="aui-link-login aui-flex-box" |
|
|
|
|
class="aui-link-login aui-flex-box " |
|
|
|
|
type="primary" |
|
|
|
|
@click="handleLogin" |
|
|
|
|
>{{ t('sys.login.loginButton') }}</a-button> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="other-login-ways"> |
|
|
|
|
<span><a href="https://kicc.kanglailab.com/">康来智慧冷链平台</a></span> |
|
|
|
|
<a-divider type="vertical"/> |
|
|
|
|
<span><a href="https://kicc.kanglailab.com/">康来报告单平台</a></span> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
@ -84,6 +106,10 @@
@@ -84,6 +106,10 @@
|
|
|
|
|
import { useDesign } from '/@/hooks/web/useDesign'; |
|
|
|
|
import { useAppInject } from '/@/hooks/web/useAppInject'; |
|
|
|
|
import { useRouter } from 'vue-router'; |
|
|
|
|
import { ApiSelect } from '/@/components/Form'; |
|
|
|
|
import { getDataByDictType } from '/@/api/platform/system/controller/dictdata'; |
|
|
|
|
import {LoginStateEnum} from '/@/views/core/login/useLogin'; |
|
|
|
|
import {Button, Checkbox} from 'ant-design-vue'; |
|
|
|
|
|
|
|
|
|
const { currentRoute, replace } = useRouter(); |
|
|
|
|
const { params, query } = unref(currentRoute); |
|
|
|
@ -97,6 +123,8 @@
@@ -97,6 +123,8 @@
|
|
|
|
|
const formData = reactive<Recordable>({ |
|
|
|
|
username: '', |
|
|
|
|
password: '', |
|
|
|
|
identityProvider: undefined, |
|
|
|
|
tenantId: '1510456530575347712', |
|
|
|
|
}); |
|
|
|
|
const loginRef = ref(); |
|
|
|
|
const loginLoading = ref<boolean>(false); |
|
|
|
@ -111,11 +139,17 @@
@@ -111,11 +139,17 @@
|
|
|
|
|
createMessage.warn(t('sys.login.passwordPlaceholder')); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (!formData.identityProvider) { |
|
|
|
|
createMessage.warn(t('sys.login.identityProviderPlaceholder')); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
try { |
|
|
|
|
loginLoading.value = true; |
|
|
|
|
await userStore.login({ |
|
|
|
|
password: formData.password, |
|
|
|
|
username: formData.username, |
|
|
|
|
identityProvider: formData.identityProvider, |
|
|
|
|
tenantId: formData.tenantId, |
|
|
|
|
goHome: false, |
|
|
|
|
clientId: 'kics', |
|
|
|
|
performPostLoginAction: false |
|
|
|
@ -202,6 +236,16 @@
@@ -202,6 +236,16 @@
|
|
|
|
|
margin-left: 5px; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.other-login-ways { |
|
|
|
|
color: rgba(0,0,0,.5); |
|
|
|
|
text-align: center; |
|
|
|
|
margin-top: 20px; |
|
|
|
|
span { |
|
|
|
|
padding: 5px; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
</style> |
|
|
|
|
|
|
|
|
|
<style lang="less"> |
|
|
|
|