| | |
| | | </el-dropdown-item> |
| | | </el-dropdown-menu> |
| | | </el-dropdown> |
| | | <el-dialog title="修改密码" :visible.sync="dialogFormVisible" :append-to-body="true"> |
| | | <el-dialog title="修改密码" :visible.sync="dialogFormVisible" :append-to-body="true" width="40%"> |
| | | <el-form :model="form"> |
| | | <el-form-item label="旧密码" :label-width="formLabelWidth"> |
| | | <el-input v-model="form.oldPwd" autocomplete="off"></el-input> |
| | |
| | | newPwd: '', |
| | | confirmPwd: '' |
| | | }, |
| | | user: { |
| | | id: null, |
| | | name: 'value' |
| | | }, |
| | | dialogFormVisible: false, |
| | | formLabelWidth: '120px' |
| | | formLabelWidth: '120px', |
| | | user: { |
| | | id: null, |
| | | name: 'value' |
| | | } |
| | | } |
| | | }, |
| | | components: { |
| | |
| | | 'avatar' |
| | | ]) |
| | | }, |
| | | data() { |
| | | return { |
| | | user: { |
| | | id: null, |
| | | name: 'value' |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getUser() |
| | | }, |
| | |
| | | }, |
| | | async logout() { |
| | | // await this.$store.dispatch('user/logout') |
| | | this.$router.push(`/login?redirect=${this.$route.fullPath}`) |
| | | sessionStorage.removeItem("user") |
| | | localStorage.removeItem("autoenter"); |
| | | this.$router.push(`/login?redirect=${this.$route.fullPath}`) |
| | | this.$router.replace({path: '/login'}); |
| | | location.reload(); |
| | | }, |
| | | getUser(){ |
| | | get(this.$url.info).then(res=>{ |
| | | this.user = res.data |
| | | sessionStorage.setItem("user",JSON.stringify(res.data)) |
| | | }) |
| | | } |
| | | } |