修改api
This commit is contained in:
parent
2a21170ba3
commit
2179458f24
@ -2,24 +2,24 @@ import axios from "axios";
|
||||
|
||||
export default {
|
||||
getAllOrganizations() {
|
||||
return axios.get('http://localhost:8080/api/organizations/listAll').then(response => {
|
||||
return axios.get('api/organizations/listAll').then(response => {
|
||||
return response.data;
|
||||
});
|
||||
},
|
||||
addOrganization(organization) {
|
||||
return axios.post('http://localhost:8080/api/organizations/addOrganization', organization).then(response => {
|
||||
return axios.post('api/organizations/addOrganization', organization).then(response => {
|
||||
return response.data;
|
||||
});
|
||||
},
|
||||
deleteOrganization(organizationId) {
|
||||
return axios.post('http://localhost:8080/api/organizations/deleteOrganization' , {organizationId:organizationId},{headers: {
|
||||
return axios.post('api/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/api/organizations/updateOrganization', organization).then(response => {
|
||||
return axios.post('api/organizations/updateOrganization', organization).then(response => {
|
||||
return response.data;
|
||||
});
|
||||
},
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
<el-button @click="handleReset">重置</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-button type="primary" @click="showDialogAdd = true">添加部门</el-button>
|
||||
<el-button type="primary" @click="showDialogAdd = true"><el-icon><Plus/></el-icon>添加部门</el-button>
|
||||
<el-table
|
||||
:data="tableData"
|
||||
style="width: 100%; margin-bottom: 20px"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user