组织机构可配置区域、类型、层级

支持cas登录
This commit is contained in:
yaoyn
2024-09-19 15:47:06 +08:00
parent 78b05fc000
commit 54def95458
8 changed files with 377 additions and 260 deletions

View File

@ -0,0 +1,40 @@
<template>
<div style="width: 100%; height: 300px; display: flex;justify-content: center;align-items: center;">
<a-spin />
</div>
</template>
<script lang="ts" setup>
import { useUserStore } from '/@/store/modules/user';
import { onMounted } from 'vue';
import { useRouter } from 'vue-router';
const { currentRoute } = useRouter();
const userStore = useUserStore();
onMounted(async () => {
const fullPath = currentRoute.value.fullPath;
let targetURL = ''
let redirect = ''
if (fullPath.includes('targetURL')) {
const list = fullPath.split('targetURL=');
targetURL = list[1];
} else {
const list = fullPath.split('redirect=');
redirect = list[1];
}
let params = {...currentRoute.value.query, targetURL: targetURL,redirect: redirect, mode: 'none',goHome:true }; //不要默认的错误提示
const token=currentRoute.value.query?.token;
//cas ticket的话走一遍后端换成token
const ticket=currentRoute.value.query?.ticket;
if(ticket){
params.ticket=ticket;
await userStore.casLogin(params);
}else if (token) {
await userStore.tokenLogin(token,params);
}
});
</script>
<style lang="less">
</style>

View File

@ -4,7 +4,7 @@
@register="registerDrawer"
showFooter
:title="getTitle"
width="45%"
width="50%"
@ok="handleSubmit"
>
<BasicForm @register="registerForm" :style="{ 'margin-right': '10px' }">
@ -112,16 +112,39 @@
defaultValue: 1,
componentProps: {
options: [
{ label: '总部', value: 3, disabled:true },
{ label: '板块', value: 2, disabled:true },
{ label: '公司', value: 1 },
{ label: '部门', value: 0 },
{ label: '部门', value: 0 }
],
onChange: deptTypeChange,
},
required: true,
},
{
field: 'areaId',
label: '行政区域',
component: 'Area',
componentProps: {
placeholder: '请选择行政区域'
},
},
];
const companySchema: FormSchema[] = [
{
field: 'companyLvl',
label: '公司层级',
component: 'RadioButtonGroup',
defaultValue: null,
componentProps: {
options: [
{ label: '三级业务单位', value: 3 },
{ label: '四级项目公司/场站', value: 4 }
],
},
required: false,
},
{
field: 'departmentNature',
label: '公司性质',