l
liukangdong
2024-10-28 c205de44f60c42dc1fc75b1dab32bbdd971534d9
l
已修改1个文件
20 ■■■■ 文件已修改
admin/src/components/common/CommonHeader.vue 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/components/common/CommonHeader.vue
@@ -31,9 +31,10 @@
      </div>
    </div>
    <!-- 修改密码 -->
    <template v-if="editPsd">
    <GlobalAlertWindow title="修改密码" :visible.sync="visible.changePwd"
      :showClose="!userInfo.needChangePwd || userInfo.needChangePwd == '1'"
      :showCancel="!userInfo.needChangePwd || userInfo.needChangePwd == '1'" @confirm="confirmChangePwd"
        :showClose="!userInfo.needChangePwd || userInfo.needChangePwd == '0'"
        :showCancel="!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>
@@ -41,8 +42,8 @@
            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-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>
@@ -51,6 +52,8 @@
        </el-form-item>
      </el-form>
    </GlobalAlertWindow>
    </template>
  </div>
</template>
@@ -72,6 +75,7 @@
    return {
      title: process.env.VUE_APP_TITLE,
      headerNavData: {},
      editPsd: false,
      visible: {
        // 修改密码
        changePwd: false
@@ -109,12 +113,14 @@
    //   return this.$route.meta.title
    // }
  },
  created() {
  },
  mounted() {
    // console.log('userInfo',this.userInfo);
    if (!this.userInfo.needChangePwd || this.userInfo.needChangePwd == '0') {
      // this.visible.changePwd = true
      this.visible.changePwd = true
    }
  },
  filters: {
    // 展示名称
@@ -132,6 +138,8 @@
    ...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()