From 5b9c22a1e5e2364603778d1ed95e73129b47f1db Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期二, 12 十一月 2024 10:52:47 +0800
Subject: [PATCH] ll

---
 admin/src/components/common/CommonHeader.vue |   49 ++++++++++++++++++++++++++-----------------------
 1 files changed, 26 insertions(+), 23 deletions(-)

diff --git a/admin/src/components/common/CommonHeader.vue b/admin/src/components/common/CommonHeader.vue
index 4d0bd3f..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
     // }
   },
+  created() {
+
+  },
   mounted() {
-    // console.log('userInfo',this.userInfo);
+    // 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 => {
@@ -269,7 +272,7 @@
     align-items: center;
 
     .title {
-      width: 200px;
+      width: 240px;
     }
 
     // display: inline;

--
Gitblit v1.9.3