feat: 第三方登录认证功能和管理页
This commit is contained in:
1122
src/views/system/login-source/index.vue
Normal file
1122
src/views/system/login-source/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
@@ -79,14 +79,14 @@ onMounted(() => {
|
||||
|
||||
// background: url('./../assets/black_dot.png') 0% 0% / 14px 14px repeat;
|
||||
|
||||
background-image: url(@/assets/background_light.jpg);
|
||||
background-image: url(/background/light.jpg);
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
background-position: center center;
|
||||
}
|
||||
|
||||
[data-theme='dark'] .container {
|
||||
background-image: url(@/assets/background_dark.jpg);
|
||||
background-image: url(/background/dark.jpg);
|
||||
background-color: #141414;
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,6 @@ import useDictStore from '@/store/modules/dict';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import { DataNode } from 'ant-design-vue/es/tree';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { parseDataToTree } from '@/utils/parse-tree-utils';
|
||||
|
||||
const { getDict } = useDictStore();
|
||||
const userStore = useUserStore();
|
||||
@@ -45,10 +44,13 @@ const { t } = useI18n();
|
||||
let dict: {
|
||||
/**状态 */
|
||||
sysNormalDisable: DictType[];
|
||||
/**用户类型 */
|
||||
sysUserType: DictType[];
|
||||
/**性别 */
|
||||
sysUserSex: DictType[];
|
||||
} = reactive({
|
||||
sysNormalDisable: [],
|
||||
sysUserType: [],
|
||||
sysUserSex: [],
|
||||
});
|
||||
|
||||
@@ -142,6 +144,13 @@ let tableColumns: ColumnsType = [
|
||||
align: 'left',
|
||||
width: 200,
|
||||
},
|
||||
{
|
||||
title: t('views.system.user.userType'),
|
||||
dataIndex: 'userType',
|
||||
key: 'userType',
|
||||
align: 'left',
|
||||
width: 200,
|
||||
},
|
||||
{
|
||||
title: t('views.system.user.tenntName'),
|
||||
dataIndex: 'tenantId',
|
||||
@@ -398,7 +407,7 @@ function fnModalVisibleByEdit(userId?: string | number) {
|
||||
modalState.from.postIds = postIds;
|
||||
modalState.title =
|
||||
t('common.addText') + t('views.system.user.userInfo');
|
||||
fnGetDeptTree(); // 获取部门树
|
||||
fnGetDeptTree(); // 获取部门树
|
||||
modalState.openByEdit = true;
|
||||
} else {
|
||||
message.error(t('views.system.user.tipRowErr'), 2);
|
||||
@@ -825,18 +834,21 @@ function handleDel(value: any, options: any) {
|
||||
if (modalState.showTenant) fnGetDeptTree();
|
||||
}
|
||||
|
||||
|
||||
onMounted(() => {
|
||||
// 初始字典数据
|
||||
Promise.allSettled([
|
||||
getDict('sys_normal_disable'),
|
||||
getDict('sys_user_type'),
|
||||
getDict('sys_user_sex'),
|
||||
]).then(resArr => {
|
||||
if (resArr[0].status === 'fulfilled') {
|
||||
dict.sysNormalDisable = resArr[0].value;
|
||||
}
|
||||
if (resArr[1].status === 'fulfilled') {
|
||||
dict.sysUserSex = resArr[1].value;
|
||||
dict.sysUserType = resArr[1].value;
|
||||
}
|
||||
if (resArr[2].status === 'fulfilled') {
|
||||
dict.sysUserSex = resArr[2].value;
|
||||
}
|
||||
});
|
||||
// 获取列表数据
|
||||
@@ -1059,6 +1071,12 @@ onMounted(() => {
|
||||
{{ r.roleName }}
|
||||
</a-tag>
|
||||
</template>
|
||||
<template v-if="column.key === 'userType'">
|
||||
<DictTag :options="dict.sysUserType" :value="record.userType" />
|
||||
<a-tag :bordered="false" v-if="record.userSource != '#'">
|
||||
{{ record.userSource }}
|
||||
</a-tag>
|
||||
</template>
|
||||
<template v-if="column.key === 'tenantId'">
|
||||
{{ record.tenant?.tenantName }}
|
||||
</template>
|
||||
@@ -1104,7 +1122,10 @@ onMounted(() => {
|
||||
<template #icon><FormOutlined /></template>
|
||||
</a-button>
|
||||
</a-tooltip>
|
||||
<a-tooltip>
|
||||
<a-tooltip
|
||||
placement="topLeft"
|
||||
v-if="record.userId != userStore.userId"
|
||||
>
|
||||
<template #title>{{ t('common.deleteText') }}</template>
|
||||
<a-button
|
||||
type="link"
|
||||
@@ -1114,7 +1135,10 @@ onMounted(() => {
|
||||
<template #icon><DeleteOutlined /></template>
|
||||
</a-button>
|
||||
</a-tooltip>
|
||||
<a-tooltip placement="topLeft">
|
||||
<a-tooltip
|
||||
placement="topLeft"
|
||||
v-if="record.userId != userStore.userId"
|
||||
>
|
||||
<template #title>
|
||||
{{ t('views.system.user.resetPwd') }}
|
||||
</template>
|
||||
@@ -1240,7 +1264,7 @@ onMounted(() => {
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<a-row :gutter="16">
|
||||
<a-row>
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item
|
||||
:label="t('views.system.user.userWork')"
|
||||
|
||||
Reference in New Issue
Block a user