2024-06-29 09:10:39 +00:00
|
|
|
import axios from "axios";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
getAllOrganizations() {
|
|
|
|
|
return axios.get('http://localhost:8080/organizations/listAll').then(response => {
|
|
|
|
|
return response.data;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
addOrganization(organization) {
|
|
|
|
|
return axios.post('http://localhost:8080/organizations/addOrganization', organization).then(response => {
|
|
|
|
|
return response.data;
|
|
|
|
|
});
|
2024-07-04 08:47:53 +00:00
|
|
|
},
|
|
|
|
|
deleteOrganization(organizationId) {
|
|
|
|
|
return axios.post('http://localhost:8080/organizations/deleteOrganization' , {organizationId:organizationId},{headers: {
|
|
|
|
|
'Content-Type': 'application/json' // 设置 Content-Type 为 application/json
|
|
|
|
|
}}).then(response => {
|
|
|
|
|
return response.data;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
updateOrganization(organization) {
|
|
|
|
|
return axios.post('http://localhost:8080/organizations/updateOrganization', organization).then(response => {
|
|
|
|
|
return response.data;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
getOrganizationById(organizationId) {
|
|
|
|
|
return axios.post('http://localhost:8080/organizations/getOrganizationById', {organizationId:organizationId},{headers: {
|
|
|
|
|
'Content-Type': 'application/json' // 设置 Content-Type 为 application/json
|
|
|
|
|
}}).then(response => {
|
|
|
|
|
return response.data;
|
|
|
|
|
});
|
|
|
|
|
},
|
2024-06-29 09:10:39 +00:00
|
|
|
}
|