You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
2.1 KiB

import { ResPage, Stage, Subject, Scheme, Structure } from "@/api/interface/index";
import http from "@/api";
export const getStageList = () => {
return http.get<ResPage<Stage.ResStageList>>(`/dsRes/base/getStageList`, { loading: false });
};
export const getSubjectList = (params: Subject.ReqSubjectParams) => {
return http.get<ResPage<Subject.ResSubjectList>>(`/dsRes/base/listSubject`, params, { loading: false });
};
export const getSubjectInfoById = params => {
return http.get(`/dsRes/base/getSubject`, params);
};
export const addSubject = params => {
return http.post(`/dsRes/base/addSubject`, params);
};
export const updateSubject = params => {
return http.post(`/dsRes/base/updateSubject`, params);
};
export const deleteSubject = params => {
return http.post(`/dsRes/base/delSubject`, params);
};
export const getSchemeList = (params: Scheme.ReqSchemeParams) => {
return http.get<ResPage<Scheme.ResSchemeList>>(`/dsRes/base/listScheme`, params, { loading: false });
};
export const getSchemeInfoById = params => {
return http.get(`/dsRes/base/getScheme`, params);
};
export const addScheme = params => {
return http.post(`/dsRes/base/addScheme`, params);
};
export const updateScheme = params => {
return http.post(`/dsRes/base/updateScheme`, params);
};
export const deleteScheme = params => {
return http.post(`/dsRes/base/delScheme`, params);
};
export const getStructureList = params => {
return http.get<ResPage<Structure.ResStructureList>>(`/dsRes/base/fetchStructure`, params, { loading: false });
};
export const getStructureInfoById = params => {
return http.get(`/dsRes/base/getResourceStructureById`, params);
};
export const addStructure = params => {
return http.post(`/dsRes/base/addResourceStructure`, params);
};
export const updateStructure = params => {
return http.post(`/dsRes/base/updateResourceStructureById`, params);
};
export const deleteStructure = params => {
return http.post(`/dsRes/base/delResourceStructureById`, params);
};
export const getStructureRootNode = params => {
return http.get<any>(`/dsRes/base/fetchStructure`, params, { loading: false });
};