From 34efcf19eebc5277f6c7c69a5b0f8a720371a754 Mon Sep 17 00:00:00 2001 From: MiLla <18826902282@163.com> Date: Thu, 4 Jul 2024 16:47:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9F=BA=E6=9C=AC=E5=AE=8C=E6=88=90=EF=BC=8C?= =?UTF-8?q?=E5=86=8D=E5=AE=8C=E5=96=84=E5=85=B6=E4=BB=96=E7=9A=84=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E4=B8=8E=E7=95=8C=E9=9D=A2=E5=B0=B1=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/HelloWorld.vue | 217 +++++++++++---- src/router/authentication.js | 9 +- src/services/authenticationService.js | 1 - src/services/organizationService.js | 21 +- .../authentication/authentication_login.vue | 90 +++++++ .../authentication/authentication_main.vue | 143 ++++++++++ .../authentication_register.vue | 103 ++++++++ src/views/authentication_login.vue | 36 --- src/views/authentication_register.vue | 59 ----- .../Organization_main.vue | 250 +++++++++++++----- 10 files changed, 714 insertions(+), 215 deletions(-) create mode 100644 src/views/authentication/authentication_login.vue create mode 100644 src/views/authentication/authentication_main.vue create mode 100644 src/views/authentication/authentication_register.vue delete mode 100644 src/views/authentication_login.vue delete mode 100644 src/views/authentication_register.vue diff --git a/src/components/HelloWorld.vue b/src/components/HelloWorld.vue index 66ccd16..b7569a2 100644 --- a/src/components/HelloWorld.vue +++ b/src/components/HelloWorld.vue @@ -1,60 +1,175 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/router/authentication.js b/src/router/authentication.js index 1ef2554..a86507e 100644 --- a/src/router/authentication.js +++ b/src/router/authentication.js @@ -1,8 +1,9 @@ -import authentication from '../views/authentication_login.vue' -import register from '../views/authentication_register.vue' +import authentication_main from '../views/authentication/authentication_main.vue' +import register from '../views/authentication/authentication_register.vue' +import authentication_login from "../views/authentication/authentication_login.vue"; export default [ - { path: '/', component: authentication }, - { path: '/login', component: authentication }, + { path: '/main', component: authentication_main }, + { path: '/login', component: authentication_login }, { path: '/register', component: register }, // { path: '/profile', component: Profile } ] diff --git a/src/services/authenticationService.js b/src/services/authenticationService.js index 9c190ac..0f312a5 100644 --- a/src/services/authenticationService.js +++ b/src/services/authenticationService.js @@ -9,7 +9,6 @@ export default { }; return axios.post(url, data) .then(response => { - alert(response.data.account); return response.data; }); }, diff --git a/src/services/organizationService.js b/src/services/organizationService.js index 0984050..431ab03 100644 --- a/src/services/organizationService.js +++ b/src/services/organizationService.js @@ -10,5 +10,24 @@ export default { return axios.post('http://localhost:8080/organizations/addOrganization', organization).then(response => { return response.data; }); - } + }, + 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; + }); + }, } \ No newline at end of file diff --git a/src/views/authentication/authentication_login.vue b/src/views/authentication/authentication_login.vue new file mode 100644 index 0000000..0ee1cba --- /dev/null +++ b/src/views/authentication/authentication_login.vue @@ -0,0 +1,90 @@ + + + + + \ No newline at end of file diff --git a/src/views/authentication/authentication_main.vue b/src/views/authentication/authentication_main.vue new file mode 100644 index 0000000..6ec09e1 --- /dev/null +++ b/src/views/authentication/authentication_main.vue @@ -0,0 +1,143 @@ + + + + + \ No newline at end of file diff --git a/src/views/authentication/authentication_register.vue b/src/views/authentication/authentication_register.vue new file mode 100644 index 0000000..56826c0 --- /dev/null +++ b/src/views/authentication/authentication_register.vue @@ -0,0 +1,103 @@ + + + + + + + + \ No newline at end of file diff --git a/src/views/authentication_login.vue b/src/views/authentication_login.vue deleted file mode 100644 index 6c2d6dc..0000000 --- a/src/views/authentication_login.vue +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/src/views/authentication_register.vue b/src/views/authentication_register.vue deleted file mode 100644 index 9c83d33..0000000 --- a/src/views/authentication_register.vue +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/src/views/organization-management/Organization_main.vue b/src/views/organization-management/Organization_main.vue index 75a880b..3acab73 100644 --- a/src/views/organization-management/Organization_main.vue +++ b/src/views/organization-management/Organization_main.vue @@ -1,13 +1,27 @@