UnisKB/ui/src/views/authentication/index.vue

62 lines
1.5 KiB
Vue
Raw Normal View History

2024-07-09 09:50:37 +00:00
<template>
2024-07-19 08:27:12 +00:00
<div class="authentication-setting p-16-24">
2024-07-16 09:32:27 +00:00
<h4>{{ $t('login.authentication') }}</h4>
2024-07-09 09:50:37 +00:00
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
<template v-for="(item, index) in tabList" :key="index">
<el-tab-pane :label="item.label" :name="item.name">
<div class="authentication-setting__main main-calc-height">
2024-07-10 03:27:52 +00:00
<el-scrollbar>
<div class="form-container">
2024-07-09 09:50:37 +00:00
<component :is="item.component" />
2024-07-10 03:27:52 +00:00
</div>
</el-scrollbar>
2024-07-09 09:50:37 +00:00
</div>
</el-tab-pane>
</template>
</el-tabs>
</div>
</template>
<script setup lang="ts">
2024-07-11 11:51:28 +00:00
import { ref, computed, onMounted } from 'vue'
2024-07-22 10:52:56 +00:00
import { useRouter } from 'vue-router'
2024-07-09 09:50:37 +00:00
import LDAP from './component/LDAP.vue'
2024-07-11 11:51:28 +00:00
import { t } from '@/locales'
2024-07-22 10:52:56 +00:00
import useStore from '@/stores'
const { user } = useStore()
const router = useRouter()
2024-07-09 09:50:37 +00:00
const activeName = ref('LDAP')
const tabList = [
{
2024-07-11 11:51:28 +00:00
label: t('login.ldap.title'),
2024-07-09 09:50:37 +00:00
name: 'LDAP',
component: LDAP
}
]
function handleClick() {}
2024-07-22 10:52:56 +00:00
onMounted(() => {
if (user.isExpire()) {
router.push({ path: `/application` })
}
})
2024-07-09 09:50:37 +00:00
</script>
<style lang="scss" scoped>
.authentication-setting__main {
background-color: var(--app-view-bg-color);
box-sizing: border-box;
min-width: 700px;
2024-07-19 08:27:12 +00:00
height: calc(100vh - var(--app-header-height) - var(--app-view-padding) * 2 - 70px);
2024-07-09 09:50:37 +00:00
box-sizing: border-box;
.form-container {
width: 70%;
margin: 0 auto;
:deep(.el-checkbox__label) {
font-weight: 400;
}
}
}
</style>