205 lines
4.1 KiB
TypeScript
205 lines
4.1 KiB
TypeScript
import { ComboModel } from "@/components/hTable/hTable";
|
|
import { http } from "@/utils/http";
|
|
import type { Res, ResPage } from "@/utils/http/types";
|
|
import { Ref } from "vue";
|
|
/**
|
|
* @description 获取枚举下拉
|
|
* @param {string} type 枚举类型 type=StatusEnum
|
|
* @return {object}
|
|
*/
|
|
export function getPageUserList(data: any) {
|
|
return http.request<ResPage<UserDetail[]>>(
|
|
"post",
|
|
`userCenter/back/users/getpageuserlist`,
|
|
{
|
|
data
|
|
}
|
|
);
|
|
}
|
|
/**
|
|
* @description 编辑学校
|
|
* @return {void}
|
|
*/
|
|
export function EditSchool(data: any) {
|
|
return http.request<Res<any>>("post", `userCenter/back/schools/add`, {
|
|
data
|
|
});
|
|
}
|
|
/**
|
|
* @description 获取学校
|
|
* @return {void}
|
|
*/
|
|
export function getSchoolData() {
|
|
return http.request<Res<ComboModel[]>>(
|
|
"get",
|
|
`userCenter/public/getschooldata`
|
|
);
|
|
}
|
|
/**
|
|
* @description 获取职位列表
|
|
* @return {void}
|
|
*/
|
|
export function getPositionList(data: any) {
|
|
return http.request<Res<any>>(
|
|
"post",
|
|
`userCenter/back/positions/getpositionlist`,
|
|
{ data }
|
|
);
|
|
}
|
|
/**
|
|
* @description 云校下拉框数据
|
|
* @return {object}
|
|
*/
|
|
export function cloudSchoolCombo() {
|
|
let data = {
|
|
ValueName: "Id",
|
|
TextName: "Name"
|
|
};
|
|
return http.request<Res<any>>(
|
|
"post",
|
|
`userCenter/back/cloudschool/querycombo`,
|
|
{
|
|
data
|
|
}
|
|
);
|
|
}
|
|
/**
|
|
* @description 获取班级信息
|
|
* @return {object}
|
|
*/
|
|
export function getClassInfo(id) {
|
|
return http.request<Res<any>>("get", `userCenter/back/classes/${id}`);
|
|
}
|
|
/**
|
|
* @description 获取学校信息
|
|
* @return {object}
|
|
*/
|
|
export function getSchoolInfo(id) {
|
|
return http.request<Res<any>>("get", `userCenter/back/schools/${id}`);
|
|
}
|
|
|
|
/**
|
|
* @description 获取用户信息
|
|
* @return {object}
|
|
*/
|
|
export function getUserInfo(id) {
|
|
return http.request<Res<any>>(
|
|
"get",
|
|
`userCenter/back/users/getuserinfo?id=${id}`
|
|
);
|
|
}
|
|
|
|
/**
|
|
* @description 添加班级
|
|
* @return {object}
|
|
*/
|
|
export function addClasses(info: any) {
|
|
return http.request<Res<any>>("post", `userCenter/back/classes/addclass`, {
|
|
data: info
|
|
});
|
|
}
|
|
|
|
/**
|
|
* @description 添加班级
|
|
* @return {object}
|
|
*/
|
|
export function editUser(data: any) {
|
|
return http.request<Res<any>>("post", `userCenter/back/users/edituser`, {
|
|
data
|
|
});
|
|
}
|
|
|
|
/**
|
|
* @description 添加班级
|
|
* @return {object}
|
|
*/
|
|
export function getClassCombo(info: any) {
|
|
return http.request<Res<any>>("post", `userCenter/public/getclasscombo`, {
|
|
data: info
|
|
});
|
|
}
|
|
|
|
/**
|
|
* @description 获取科目
|
|
* @return {object}
|
|
*/
|
|
export function getSubjectData() {
|
|
return http.request<Res<any>>("get", `userCenter/public/getsubjectdata`);
|
|
}
|
|
/**
|
|
* @description 获取职位列表
|
|
* @return {object}
|
|
*/
|
|
export function getPositions(data) {
|
|
return http.request<Res<any>>("post", `userCenter/back/positions/positions`, {
|
|
data
|
|
});
|
|
}
|
|
|
|
//--------------------------interface----------------------------
|
|
|
|
/**
|
|
* 职位信息
|
|
*/
|
|
export interface Position {
|
|
userId: number;
|
|
id: number;
|
|
name: string;
|
|
schoolId: number;
|
|
enable: boolean;
|
|
endTime: string | null;
|
|
schoolName: string;
|
|
graduationYear: number;
|
|
grade: string;
|
|
classId: number;
|
|
gradeLevel: string;
|
|
className: string;
|
|
subjectId: number;
|
|
subjectName: string;
|
|
positionType: number;
|
|
positionLevel: number;
|
|
status: boolean;
|
|
classList?: ComboModel[];
|
|
}
|
|
|
|
/**
|
|
* 用户详细信息
|
|
*/
|
|
export interface UserDetail {
|
|
id: number;
|
|
templateId: number;
|
|
phone: string;
|
|
edited: boolean;
|
|
userType: number;
|
|
cloudSchoolId: number;
|
|
account: string;
|
|
studentId: string;
|
|
realName: string;
|
|
sex: number;
|
|
subjectLevel: any;
|
|
birthDate: string;
|
|
residence: string;
|
|
national: string;
|
|
headImage: string;
|
|
idCard: string | null;
|
|
pid: number;
|
|
pname: string;
|
|
cid: number;
|
|
cname: string;
|
|
rid: number;
|
|
rname: string;
|
|
wx: string;
|
|
isPerfectInfo: number;
|
|
level: number;
|
|
state: number;
|
|
meetingAccount: string | null;
|
|
gkSubject: string | null;
|
|
glSubject: string | null;
|
|
gSubject1: string | null;
|
|
gSubject2: string | null;
|
|
thirdPartyId: string | null;
|
|
pointPenSN: string | null;
|
|
subjectLevels: null;
|
|
positions: Position[];
|
|
}
|