| | |
| | | </div> |
| | | </div> |
| | | <!-- 修改密码 --> |
| | | <template v-if="editPsd"> |
| | | <GlobalAlertWindow title="修改密码" :visible.sync="visible.changePwd" |
| | | :showClose="!userInfo.needChangePwd || userInfo.needChangePwd == '0'" |
| | | :showCancel="!userInfo.needChangePwd || userInfo.needChangePwd == '0'" @confirm="confirmChangePwd" |
| | |
| | | </el-form-item> |
| | | </el-form> |
| | | </GlobalAlertWindow> |
| | | </template> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | return { |
| | | title: process.env.VUE_APP_TITLE, |
| | | headerNavData: {}, |
| | | editPsd: false, |
| | | visible: { |
| | | // 修改密码 |
| | | changePwd: false |
| | |
| | | |
| | | }, |
| | | mounted() { |
| | | // console.log('userInfo',this.userInfo); |
| | | // needChangePwd 0 : 默认密码需要修改,1 不需要 |
| | | if (!this.userInfo.needChangePwd || this.userInfo.needChangePwd == '0') { |
| | | this.visible.changePwd = true |
| | | } |
| | |
| | | ...mapMutations(['setUserInfo', 'switchCollapseMenu', 'clearUserInfo']), |
| | | // 修改密码 |
| | | changePwd() { |
| | | this.$set(this.userInfo, 'needChangePwd', this.$store.state.userInfo.needChangePwd) |
| | | this.editPsd = true |
| | | this.visible.changePwd = true |
| | | this.$nextTick(() => { |
| | | this.$refs.changePwdDataForm.resetFields() |
| | |
| | | }) |
| | | .then(() => { |
| | | this.$tip.apiSuccess('修改成功') |
| | | this.$store.commit('setUserInfo', {needChangePwd: 1}) |
| | | this.visible.changePwd = false |
| | | }) |
| | | .catch(e => { |