From 8d0babadd9528cb3fdd454100161dc10ce31143e Mon Sep 17 00:00:00 2001 From: copper Date: Sun, 29 Nov 2020 14:41:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=87=8D=E7=BD=AE=E5=AF=86?= =?UTF-8?q?=E7=A0=81=E4=B8=8E=E6=9B=B4=E6=94=B9=E5=AF=86=E7=A0=81=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Main.vue | 37 ++++++++++- src/components/admin/forms/PasswordChange.vue | 64 +++++++++++++++++++ src/components/admin/tables/SensorTable.vue | 2 +- src/components/admin/tables/UserTable.vue | 32 +++++++++- src/utils/http.js | 4 +- src/utils/store.js | 13 ++++ 6 files changed, 145 insertions(+), 7 deletions(-) create mode 100644 src/components/admin/forms/PasswordChange.vue diff --git a/src/components/Main.vue b/src/components/Main.vue index bdddc1b..22c2d11 100644 --- a/src/components/Main.vue +++ b/src/components/Main.vue @@ -6,7 +6,15 @@ 水质监测平台 - 登出 + + + + + @@ -35,6 +43,17 @@ + + + @@ -48,6 +67,7 @@ import Analysis from '@/components/analysis/Index' import Logs from '@/components/logs/Index' import Admin from '@/components/admin/Index' import { logout } from '@/utils/http' +import PasswordChange from './admin/forms/PasswordChange.vue' export default { components: { 'icon-font':IconFont, @@ -55,17 +75,25 @@ export default { 'detail-search':DetailSearch, 'analysis':Analysis, // 'logs':Logs, - 'admin':Admin + 'admin':Admin, + PasswordChange }, data() { return { current:['map-layout'], - currentComp: 'map-layout' + currentComp: 'map-layout', + passwd_visible: false }; }, computed: { isAdmin() { return this.$store.getters.isSuper || this.$store.getters.isProject + }, + isAnyone() { + return this.$store.getters.isAnyone + }, + username() { + return this.$store.getters.username } }, methods: { @@ -79,6 +107,9 @@ export default { this.$router.push({ path: '/login' }) + }, + changePasswd() { + this.passwd_visible = true } } }; diff --git a/src/components/admin/forms/PasswordChange.vue b/src/components/admin/forms/PasswordChange.vue new file mode 100644 index 0000000..17bbf79 --- /dev/null +++ b/src/components/admin/forms/PasswordChange.vue @@ -0,0 +1,64 @@ + + + + + \ No newline at end of file diff --git a/src/components/admin/tables/SensorTable.vue b/src/components/admin/tables/SensorTable.vue index 795ae62..026532d 100644 --- a/src/components/admin/tables/SensorTable.vue +++ b/src/components/admin/tables/SensorTable.vue @@ -18,7 +18,7 @@ diff --git a/src/components/admin/tables/UserTable.vue b/src/components/admin/tables/UserTable.vue index 9b61c8e..d018170 100644 --- a/src/components/admin/tables/UserTable.vue +++ b/src/components/admin/tables/UserTable.vue @@ -19,11 +19,13 @@ 查看 删除 + + 密码重置 @@ -37,7 +39,7 @@