feat: 1. 完善全局路由的访问权限的验证。 2. 完善接口返回的树形路由结构 3.优化评查点列表的查询,改用表连接的方式,废弃使用数据库的rpc函数,同时进行地区隔离和权限隔离。
4. 删除冗余的评查文件列表。 5.完善上传文档 页面初始化查询数据的时候 查询文件类型(改成动态指定) 6. 添加获取入口模块的查询接口。 7.完善服务端中判断token的有效性,失效则跳转到登录页。 8. 重构layout和sidebar的页面,改成由动态权限路由来渲染对应的菜单栏。 9.重构入口页面,通过动态查询根据不同地区的人返回不同的入口。
This commit is contained in:
@@ -24,11 +24,11 @@ export function BasicInfo({ onChange, initialData, evaluationPointGroups = [], r
|
||||
// 找到当前评查点类型对应的code
|
||||
const getCheckpointTypeCode = () => {
|
||||
if (!formData.evaluation_point_groups_pid) return "";
|
||||
|
||||
|
||||
const typeGroup = evaluationPointGroups.find(
|
||||
group => group.id === formData.evaluation_point_groups_pid && group.pid === 0
|
||||
group => group.id === formData.evaluation_point_groups_pid && (!group.pid || group.pid === 0) // 🆕 NULL或0都表示顶级分组
|
||||
);
|
||||
|
||||
|
||||
return typeGroup?.code || "";
|
||||
};
|
||||
|
||||
@@ -45,7 +45,7 @@ export function BasicInfo({ onChange, initialData, evaluationPointGroups = [], r
|
||||
group.is_enabled
|
||||
);
|
||||
|
||||
// 获取评查点类型选项(pid=0的数据)
|
||||
// 🆕 获取评查点类型选项(pid为NULL或0的数据)
|
||||
const getCheckpointTypeOptions = () => {
|
||||
if (!evaluationPointGroups || evaluationPointGroups.length === 0) {
|
||||
return (
|
||||
@@ -54,8 +54,8 @@ export function BasicInfo({ onChange, initialData, evaluationPointGroups = [], r
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
const typeGroups = evaluationPointGroups.filter(group => group.pid === 0 && group.is_enabled);
|
||||
|
||||
const typeGroups = evaluationPointGroups.filter(group => (!group.pid || group.pid === 0) && group.is_enabled);
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -113,8 +113,8 @@ export function BasicInfo({ onChange, initialData, evaluationPointGroups = [], r
|
||||
case 'checkpoint-type':
|
||||
// 处理评查点类型选择
|
||||
if (value) {
|
||||
// 找到选中的类型组
|
||||
const selectedType = evaluationPointGroups.find(group => group.code === value && group.pid === 0);
|
||||
// 🆕 找到选中的类型组(pid为NULL或0表示顶级分组)
|
||||
const selectedType = evaluationPointGroups.find(group => group.code === value && (!group.pid || group.pid === 0));
|
||||
if (selectedType) {
|
||||
newData.evaluation_point_groups_pid = selectedType.id;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user