trunk/pc4mobx/organization/apis/officeManage.js

127 lines
2.7 KiB
JavaScript
Raw Normal View History

2022-05-16 17:13:37 +08:00
/*
* Author: 黎永顺
* Description:
* Date: 2022-05-13 16:36:09
2022-06-22 16:09:43 +08:00
* LastEditTime: 2022-06-22 14:37:27
2022-05-16 17:13:37 +08:00
*/
2022-05-13 18:06:15 +08:00
import { WeaTools } from "ecCom";
2022-06-22 16:09:43 +08:00
export const getHasRight = params => {
2022-05-13 18:06:15 +08:00
return WeaTools.callApi(
"/api/bs/hrmorganization/postinfo/getHasRight",
"GET",
params
);
};
2022-06-22 16:09:43 +08:00
export const getSearchCondition = params => {
2022-05-13 18:06:15 +08:00
return WeaTools.callApi(
"/api/bs/hrmorganization/postinfo/getSearchCondition",
"GET",
params
);
};
2022-06-22 16:09:43 +08:00
export const getPostInfoForm = params => {
2022-05-13 18:06:15 +08:00
return WeaTools.callApi(
"/api/bs/hrmorganization/postinfo/getPostInfoForm",
"GET",
params
);
};
2022-06-22 16:09:43 +08:00
export const savePostInfo = params => {
2022-05-16 17:13:37 +08:00
return fetch("/api/bs/hrmorganization/postinfo/savePostInfo", {
method: "POST",
mode: "cors",
headers: {
2022-06-22 16:09:43 +08:00
"Content-Type": "application/json"
2022-05-16 17:13:37 +08:00
},
2022-06-22 16:09:43 +08:00
body: JSON.stringify(params)
2022-05-16 17:13:37 +08:00
});
};
2022-06-22 16:09:43 +08:00
export const updatePostInfo = params => {
2022-05-16 17:13:37 +08:00
return fetch("/api/bs/hrmorganization/postinfo/updatePostInfo", {
method: "POST",
mode: "cors",
headers: {
2022-06-22 16:09:43 +08:00
"Content-Type": "application/json"
2022-05-16 17:13:37 +08:00
},
2022-06-22 16:09:43 +08:00
body: JSON.stringify(params)
2022-05-16 17:13:37 +08:00
});
};
2022-06-22 16:09:43 +08:00
export const updateForbiddenTagById = params => {
2022-05-16 17:13:37 +08:00
return fetch("/api/bs/hrmorganization/postinfo/updateForbiddenTagById", {
method: "POST",
mode: "cors",
headers: {
2022-06-22 16:09:43 +08:00
"Content-Type": "application/json"
2022-05-16 17:13:37 +08:00
},
2022-06-22 16:09:43 +08:00
body: JSON.stringify(params)
2022-05-16 17:13:37 +08:00
});
};
2022-06-22 16:09:43 +08:00
export const savePost = params => {
2022-05-16 17:13:37 +08:00
return fetch("/api/bs/hrmorganization/post/savePost", {
method: "POST",
mode: "cors",
headers: {
2022-06-22 16:09:43 +08:00
"Content-Type": "application/json"
2022-05-16 17:13:37 +08:00
},
2022-06-22 16:09:43 +08:00
body: JSON.stringify(params)
});
};
export const updatePost = params => {
return fetch("/api/bs/hrmorganization/post/updatePost", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(params)
2022-05-16 17:13:37 +08:00
});
};
2022-06-22 16:09:43 +08:00
export const deleteByIds = params => {
2022-05-16 17:13:37 +08:00
return fetch("/api/bs/hrmorganization/post/deleteByIds", {
method: "POST",
mode: "cors",
headers: {
2022-06-22 16:09:43 +08:00
"Content-Type": "application/json"
2022-05-16 17:13:37 +08:00
},
2022-06-22 16:09:43 +08:00
body: JSON.stringify(params)
2022-05-16 17:13:37 +08:00
});
};
2022-06-22 16:09:43 +08:00
export const deletePostinfoByIds = params => {
2022-05-16 17:13:37 +08:00
return fetch("/api/bs/hrmorganization/postinfo/deleteByIds", {
method: "POST",
mode: "cors",
headers: {
2022-06-22 16:09:43 +08:00
"Content-Type": "application/json"
2022-05-16 17:13:37 +08:00
},
2022-06-22 16:09:43 +08:00
body: JSON.stringify(params)
2022-05-16 17:13:37 +08:00
});
};
2022-06-22 16:09:43 +08:00
export const getTreeData = params => {
2022-05-16 17:13:37 +08:00
return WeaTools.callApi(
"/api/bs/hrmorganization/post/getTreeData",
"GET",
params
);
};
2022-06-22 16:09:43 +08:00
export const getPostForm = params => {
2022-05-16 17:13:37 +08:00
return WeaTools.callApi(
"/api/bs/hrmorganization/post/getPostForm",
"GET",
params
);
};
2022-06-22 16:09:43 +08:00
export const getPostInfoTable = params => {
2022-05-16 17:13:37 +08:00
return WeaTools.callApi(
"/api/bs/hrmorganization/postinfo/getPostInfoTable",
"GET",
params
);
};