|  |  |  | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <!-- 修改密码 --> | 
|---|
|  |  |  | <GlobalAlertWindow title="修改密码" :visible.sync="visible.changePwd" | 
|---|
|  |  |  | :showClose="!userInfo.needChangePwd || userInfo.needChangePwd == '1'" | 
|---|
|  |  |  | :showCancel="!userInfo.needChangePwd || userInfo.needChangePwd == '1'" @confirm="confirmChangePwd" | 
|---|
|  |  |  | @close="visible.changePwd = false"> | 
|---|
|  |  |  | <el-form :model="changePwdData.form" ref="changePwdDataForm" :rules="changePwdData.rules"> | 
|---|
|  |  |  | <el-form-item label="原始密码" prop="oldPwd" required> | 
|---|
|  |  |  | <el-input v-model="changePwdData.form.oldPwd" type="password" placeholder="请输入原始密码" maxlength="30" | 
|---|
|  |  |  | show-password></el-input> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="新密码" prop="newPwd" required> | 
|---|
|  |  |  | <el-input v-model="changePwdData.form.newPwd" type="password" placeholder="请输入新密码,密码需包含字母、数字及特殊字符中的至少两种" maxlength="20" | 
|---|
|  |  |  | show-password></el-input> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <!-- <div style="font-size: 12px;color:#999999">密码需包含字母、数字及特殊字符中的至少两种</div> --> | 
|---|
|  |  |  | <el-form-item label="确认新密码" prop="confirmPwd" required> | 
|---|
|  |  |  | <el-input v-model="changePwdData.form.confirmPwd" type="password" placeholder="请再次输入新密码" maxlength="20" | 
|---|
|  |  |  | show-password></el-input> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | </el-form> | 
|---|
|  |  |  | </GlobalAlertWindow> | 
|---|
|  |  |  | <GlobalAlertWindow title="修改密码" :visible.sync="visible.changePwd" | 
|---|
|  |  |  | :showClose="userInfo && (!userInfo.needChangePwd || userInfo.needChangePwd == '0')" | 
|---|
|  |  |  | :showCancel="userInfo && (!userInfo.needChangePwd || userInfo.needChangePwd == '0')" @confirm="confirmChangePwd" | 
|---|
|  |  |  | @close="visible.changePwd = false"> | 
|---|
|  |  |  | <el-form :model="changePwdData.form" ref="changePwdDataForm" :rules="changePwdData.rules"> | 
|---|
|  |  |  | <el-form-item label="原始密码" prop="oldPwd" required> | 
|---|
|  |  |  | <el-input v-model="changePwdData.form.oldPwd" type="password" placeholder="请输入原始密码" maxlength="30" | 
|---|
|  |  |  | show-password></el-input> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="新密码" prop="newPwd" required> | 
|---|
|  |  |  | <el-input v-model="changePwdData.form.newPwd" type="password" placeholder="请输入新密码,密码需包含字母、数字及特殊字符中的至少两种" | 
|---|
|  |  |  | maxlength="20" show-password></el-input> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <!-- <div style="font-size: 12px;color:#999999">密码需包含字母、数字及特殊字符中的至少两种</div> --> | 
|---|
|  |  |  | <el-form-item label="确认新密码" prop="confirmPwd" required> | 
|---|
|  |  |  | <el-input v-model="changePwdData.form.confirmPwd" type="password" placeholder="请再次输入新密码" maxlength="20" | 
|---|
|  |  |  | show-password></el-input> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | </el-form> | 
|---|
|  |  |  | </GlobalAlertWindow> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | //   return this.$route.meta.title | 
|---|
|  |  |  | // } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | mounted() { | 
|---|
|  |  |  | // console.log('userInfo',this.userInfo); | 
|---|
|  |  |  | if (!this.userInfo.needChangePwd || this.userInfo.needChangePwd == '0') { | 
|---|
|  |  |  | // this.visible.changePwd = true | 
|---|
|  |  |  | } | 
|---|
|  |  |  | created() { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | mounted() { | 
|---|
|  |  |  | // needChangePwd 0 : 默认密码需要修改,1 不需要 | 
|---|
|  |  |  | if (userInfo &&(!this.userInfo.needChangePwd || this.userInfo.needChangePwd == '0')) { | 
|---|
|  |  |  | this.visible.changePwd = true | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | filters: { | 
|---|
|  |  |  | // 展示名称 | 
|---|
|  |  |  | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | .then(() => { | 
|---|
|  |  |  | this.$tip.apiSuccess('修改成功') | 
|---|
|  |  |  | this.$store.commit('setUserInfo', {needChangePwd: 1}) | 
|---|
|  |  |  | this.visible.changePwd = false | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | .catch(e => { | 
|---|
|  |  |  | 
|---|
|  |  |  | align-items: center; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .title { | 
|---|
|  |  |  | width: 200px; | 
|---|
|  |  |  | width: 240px; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // display: inline; | 
|---|