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 @@