获取所有年级班级列表-修改响应格式

parent 43d7caad
...@@ -144,10 +144,8 @@ export async function getAllGradeClasses(userInfo?: { userId: string; roles: str ...@@ -144,10 +144,8 @@ export async function getAllGradeClasses(userInfo?: { userId: string; roles: str
let dataList = (classList.data || []) let dataList = (classList.data || [])
.filter((item: any) => isAdmin || !allowedClassIds || allowedClassIds.has(item.id)) .filter((item: any) => isAdmin || !allowedClassIds || allowedClassIds.has(item.id))
.map((item: any) => ({ .map((item: any) => ({
classId: item.id, key: `${item.grade}${item.class_name}`,
className: item.class_name, value: item.id
grade: item.grade,
gradeName: getGradeName(item.grade),
})); }));
return { dataList }; return { dataList };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment