This commit is contained in:
guochunsi
2025-12-31 17:40:01 +08:00
parent 6d94e91b70
commit 74c06bb8a0
713 changed files with 115034 additions and 46 deletions

236
src/api/basic/basicclass.ts Normal file
View File

@@ -0,0 +1,236 @@
/*
* Copyright (c) 2018-2025, cyweb All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the pig4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
*/
import request from '/@/utils/request';
/**
* 获取列表
* @param query
*/
export const fetchList = (query?: any) => {
return request({
url: '/basic/basicclass/page',
method: 'get',
params: query,
});
};
/**
* 新增
* @param obj
*/
export const addObj = (obj: any) => {
return request({
url: '/basic/basicclass',
method: 'post',
data: obj,
});
};
/**
* 获取详情
* @param id
*/
export const getObj = (id: string | number) => {
return request({
url: `/basic/basicclass/${id}`,
method: 'get',
});
};
/**
* 删除
* @param id
*/
export const delObj = (id: string | number) => {
return request({
url: `/basic/basicclass/${id}`,
method: 'delete',
});
};
/**
* 更新
* @param obj
*/
export const putObj = (obj: any) => {
return request({
url: '/basic/basicclass',
method: 'put',
data: obj,
});
};
/**
* 批量更新规则
* @param obj
*/
export const putObjs = (obj: any) => {
return request({
url: '/basic/basicclass/batchUpdataRuleById',
method: 'post',
data: obj,
});
};
/**
* 根据信息查询所有班级
* @param query
*/
export const queryAllClassByInfo = (query: string | number) => {
return request({
url: `/basic/basicclass/queryAllClassByInfo/${query}`,
method: 'get',
});
};
/**
* 根据专业查询班级年级
* @param query
*/
export const queryClassGradeByMajor = (query: string | number) => {
return request({
url: `/basic/basicclass/queryClassGradeByMajor/${query}`,
method: 'get',
});
};
/**
* 根据班级编号获取班级信息
* @param obj
*/
export const getClassByClassNo = (obj: string | number) => {
return request({
url: `/basic/basicclass/queryClassInfoByCode/${obj}`,
method: 'get',
});
};
/**
* 获取专业名称列表
*/
export const getMajorNameList = () => {
return request({
url: '/basic/major/getMajorNameList',
method: 'get',
});
};
/**
* 获取二级学院列表
*/
export const getDeptList = () => {
return request({
url: '/basic/basicdept/getDeptList?secondFlag=1',
method: 'get',
});
};
/**
* 获取二级部门列表
*/
export const getDeptListByLevel2 = () => {
return request({
url: '/basic/basicdept/getDeptList?deptLevel=2',
method: 'get',
});
};
/**
* 查询所有年级列表
*/
export const queryAllGradeList = () => {
return request({
url: '/basic/basicclass/queryAllGradeList',
method: 'get',
});
};
/**
* 获取年级列表
*/
export const getGradeList = () => {
return request({
url: '/basic/basicclass/getGradeList',
method: 'get',
});
};
/**
* 根据部门代码查询班级
* @param id
*/
export const queryClassByDeptCode = (id: string | number) => {
return request({
url: `/basic/basicclass/queryClassByDeptCode/${id}`,
method: 'get',
});
};
/**
* 根据查询条件查询班级名称和编号
* @param query
*/
export const queryClassNameAndNoByQuery = (query: string | number) => {
return request({
url: `/basic/basicclass/queryClassNameAndNoByQuery/${query}`,
method: 'get',
});
};
/**
* 获取列表
*/
export const list = () => {
return request({
url: '/basic/basicclass/list',
method: 'get',
});
};
/**
* 查班级列表 - 班主任角色查自己班级
*/
export const getClassListByRole = () => {
return request({
url: '/basic/basicclass/listByRole',
method: 'get',
});
};
/**
* 查询所有非离校班级
*/
export const queryNoLeavelClass = () => {
return request({
url: '/basic/basicclass/queryNoLeavelClass',
method: 'get',
});
};
/**
* 获取班级流失情况
* @param query
*/
export const getClassLose = (query?: any) => {
return request({
url: '/basic/basicclass/getClassLose',
method: 'get',
params: query,
});
};