From 0bda79a1d5f0de3a1885f13763c516650bc19007 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期二, 29 十月 2024 16:00:38 +0800
Subject: [PATCH] ll
---
admin/src/components/common/CommonHeader.vue | 53 ++++++++++++++++++++++++++++-------------------------
1 files changed, 28 insertions(+), 25 deletions(-)
diff --git a/admin/src/components/common/CommonHeader.vue b/admin/src/components/common/CommonHeader.vue
index 19c4196..ca89668 100644
--- a/admin/src/components/common/CommonHeader.vue
+++ b/admin/src/components/common/CommonHeader.vue
@@ -31,26 +31,26 @@
</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.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>
</div>
</template>
@@ -109,12 +109,14 @@
// 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 (!this.userInfo.needChangePwd || this.userInfo.needChangePwd == '0') {
+ this.visible.changePwd = true
+ }
},
filters: {
// 灞曠ず鍚嶇О
@@ -184,6 +186,7 @@
})
.then(() => {
this.$tip.apiSuccess('淇敼鎴愬姛')
+ this.$store.commit('setUserInfo', {needChangePwd: 1})
this.visible.changePwd = false
})
.catch(e => {
--
Gitblit v1.9.3