From 6bd673610b45c8b7af056d296dde17585c886586 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期一, 28 十月 2024 17:26:30 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
admin/src/components/common/CommonHeader.vue | 50 +++++++++++++++++++++++++++++---------------------
1 files changed, 29 insertions(+), 21 deletions(-)
diff --git a/admin/src/components/common/CommonHeader.vue b/admin/src/components/common/CommonHeader.vue
index 05c8f4c..bae0e5b 100644
--- a/admin/src/components/common/CommonHeader.vue
+++ b/admin/src/components/common/CommonHeader.vue
@@ -31,26 +31,29 @@
</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>
+ <template v-if="editPsd">
+ <GlobalAlertWindow title="淇敼瀵嗙爜" :visible.sync="visible.changePwd"
+ :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>
+ <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>
+ </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
}
-
},
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()
--
Gitblit v1.9.3