| | |
| | | return { |
| | | tabs: "", |
| | | userName: "", |
| | | activeName: "first", |
| | | activeName: "first" |
| | | }; |
| | | }, |
| | | components: { |
| | | tables, |
| | | forms, |
| | | signIn, |
| | | signIn |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["userInfo"]), |
| | | ...mapGetters(["userInfo"]) |
| | | }, |
| | | watch: { |
| | | userInfo() { |
| | | // console.log(userInfo); |
| | | }, |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.userName = this.userInfo.account; |
| | |
| | | this.$confirm(this.$t("logoutTip"), this.$t("tip"), { |
| | | confirmButtonText: this.$t("submitText"), |
| | | cancelButtonText: this.$t("cancelText"), |
| | | type: "warning", |
| | | type: "warning" |
| | | }).then(() => { |
| | | this.$store.dispatch("LogOut").then(() => { |
| | | resetRouter(); |
| | | this.$router.push({ path: "/login" }); |
| | | }); |
| | | }); |
| | | }, |
| | | }, |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | <style lang="scss"> |
| | |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | | </style> |