From e977b8737d88aa1bd0286fe27bf4fd22cb2501d9 Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期四, 18 七月 2024 17:34:42 +0800
Subject: [PATCH] 整合代码

---
 Source/plt-web/plt-web-ui/src/page/index/top/index.vue |   67 ++++++++++++++++++++++-----------
 1 files changed, 45 insertions(+), 22 deletions(-)

diff --git a/Source/plt-web/plt-web-ui/src/page/index/top/index.vue b/Source/plt-web/plt-web-ui/src/page/index/top/index.vue
index 49677d6..7225469 100644
--- a/Source/plt-web/plt-web-ui/src/page/index/top/index.vue
+++ b/Source/plt-web/plt-web-ui/src/page/index/top/index.vue
@@ -27,14 +27,15 @@
           <top-color></top-color>
         </div>
       </el-tooltip>
-      <el-tooltip v-if="showDebug"
-                  :content="logsFlag?$t('navbar.bug'):logsLen+$t('navbar.bugs')"
-                  effect="dark"
-                  placement="bottom">
-        <div class="top-bar__item">
-          <top-logs></top-logs>
-        </div>
-      </el-tooltip>
+<!--      閿欒鏃ュ織-->
+<!--      <el-tooltip v-if="showDebug"-->
+<!--                  :content="logsFlag?$t('navbar.bug'):logsLen+$t('navbar.bugs')"-->
+<!--                  effect="dark"-->
+<!--                  placement="bottom">-->
+<!--        <div class="top-bar__item">-->
+<!--          <top-logs></top-logs>-->
+<!--        </div>-->
+<!--      </el-tooltip>-->
       <el-tooltip v-if="showLock"
                   :content="$t('navbar.lock')"
                   effect="dark"
@@ -51,13 +52,14 @@
           <top-theme></top-theme>
         </div>
       </el-tooltip>
-      <el-tooltip :content="$t('navbar.notice')"
-                  effect="dark"
-                  placement="bottom">
-        <div class="top-bar__item top-bar__item--show">
-          <top-notice></top-notice>
-        </div>
-      </el-tooltip>
+<!--      娑堟伅閫氱煡-->
+<!--      <el-tooltip :content="$t('navbar.notice')"-->
+<!--                  effect="dark"-->
+<!--                  placement="bottom">-->
+<!--        <div class="top-bar__item top-bar__item&#45;&#45;show">-->
+<!--          <top-notice></top-notice>-->
+<!--        </div>-->
+<!--      </el-tooltip>-->
       <el-tooltip :content="$t('navbar.language')"
                   effect="dark"
                   placement="bottom">
@@ -129,6 +131,8 @@
 import topColor from "./top-color";
 import topNotice from './top-notice'
 import topLang from "./top-lang";
+import {changePassword} from "@/api/user"
+import func from "@/util/func";
 
 export default {
   components: {
@@ -151,9 +155,10 @@
         column: [
           {
             label: '鐧婚檰瀵嗙爜',
-            prop: 'input',
+            prop: 'oldPassword',
             span: 24,
             labelWidth:"15%",
+            type:'password',
             rules: [
               {
                 required: true,
@@ -164,9 +169,10 @@
           },
           {
             label: '鏂扮櫥闄嗗瘑鐮�',
-            prop: 'input1',
+            prop: 'password',
             span: 24,
             labelWidth:"15%",
+            type:'password',
             rules: [
               {
                 required: true,
@@ -177,9 +183,10 @@
           },
           {
             label: '鏂板瘑鐮佺櫥闄嗙‘璁�',
-            prop: 'input2',
+            prop: 'confirmPassword',
             span: 24,
             labelWidth:"15%",
+            type:'password',
             rules: [
               {
                 required: true,
@@ -270,7 +277,6 @@
   methods: {
     // 淇敼瀵嗙爜
     changePasswordHandler() {
-      console.log('123');
       this.passwordVisible = true;
     },
     handleScreen() {
@@ -293,10 +299,27 @@
       this.userBox = true;
     },
     submitSwitch(form, done) {
-      this.$store.dispatch("refreshToken", form).then(() => {
-        this.userBox = false;
-        this.$router.push({path: "/"});
+      let userInfo = JSON.parse(localStorage.getItem('saber-userInfo'));
+
+      let params = {
+        userOid:userInfo.content.userOid,
+        oldPassword:func.encryptData(form.oldPassword,'daliantan0v0vcip'),
+        password:func.encryptData(form.password,'daliantan0v0vcip'),
+        confirmPassword:func.encryptData(form.confirmPassword,'daliantan0v0vcip'),
+
+      }
+      changePassword(params).then(res =>{
+        if(res.data.code === 200){
+          this.$message.success(res.data.msg);
+          this.passwordVisible = false;
+        }
+      }).catch(err => {
+        console.log(err);
       })
+      // this.$store.dispatch("refreshToken", form).then(() => {
+      //   this.userBox = false;
+      //   this.$router.push({path: "/"});
+      // })
       done();
     },
     logout() {

--
Gitblit v1.9.3