update 角色学科配置方法调用方式修改
This commit is contained in:
@@ -31,8 +31,8 @@ watch(
|
||||
|
||||
onMounted(async () => {
|
||||
await getAllDictDataFun();
|
||||
await getRoleDisciplineFun();
|
||||
getUserPermissionsFun();
|
||||
getRoleDisciplineFun();
|
||||
loading.value = false;
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -31,8 +31,8 @@ const loading = ref(true);
|
||||
|
||||
onMounted(async () => {
|
||||
await getAllDictDataFun();
|
||||
await getRoleDisciplineFun();
|
||||
getUserPermissionsFun();
|
||||
getRoleDisciplineFun();
|
||||
loading.value = false;
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -13,8 +13,8 @@ const loading = ref(true);
|
||||
|
||||
onMounted(async () => {
|
||||
await getAllDictDataFun();
|
||||
await getRoleDisciplineFun();
|
||||
getUserPermissionsFun();
|
||||
getRoleDisciplineFun();
|
||||
loading.value = false;
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -41,15 +41,14 @@ export const getUserPermissionsFun = () => {
|
||||
});
|
||||
};
|
||||
|
||||
export const getRoleDisciplineFun = () => {
|
||||
export const getRoleDisciplineFun = async () => {
|
||||
const params = {
|
||||
paramName: 'ROLE_DISCIPLINE',
|
||||
};
|
||||
querySystemParamConfigureApi(params).then((res: any) => {
|
||||
if (res.code === 200) {
|
||||
localStorage.setItem('ROLE_DISCIPLINE', JSON.stringify(res.data.values));
|
||||
}
|
||||
});
|
||||
const res: any = await querySystemParamConfigureApi(params);
|
||||
if (res.code === 200) {
|
||||
localStorage.setItem('ROLE_DISCIPLINE', JSON.stringify(res.data.values));
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -24,7 +24,6 @@ export const getDisciplineByRole = (roleCodes: string | string[]) => {
|
||||
const uniqueDisciplines = Array.from(new Set(allDisciplines));
|
||||
const uniqueSimulationType = Array.from(new Set(allSimulationType));
|
||||
return { simulationType: uniqueSimulationType, discipline: uniqueDisciplines };
|
||||
// return { simulationType: [], discipline: [] };
|
||||
} catch (error) {
|
||||
console.error('获取失败:', error);
|
||||
return { simulationType: [], discipline: [] };
|
||||
|
||||
Reference in New Issue
Block a user