From 39269c81905457378a73dc83050349d7a364a1f8 Mon Sep 17 00:00:00 2001
From: 田源 <tianyuan@vci-tech.com>
Date: 星期四, 16 一月 2025 18:00:49 +0800
Subject: [PATCH] 修改个人信息

---
 Source/plt-web/plt-web-ui/src/views/system/userInfo/index.vue      |   10 ++++++++--
 Source/plt-web/plt-web-ui/src/views/system/userInfo/userAvatar.vue |    1 -
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/Source/plt-web/plt-web-ui/src/views/system/userInfo/index.vue b/Source/plt-web/plt-web-ui/src/views/system/userInfo/index.vue
index 7ea499e..6c53aba 100644
--- a/Source/plt-web/plt-web-ui/src/views/system/userInfo/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/system/userInfo/index.vue
@@ -55,6 +55,7 @@
 import userAvatar from "./userAvatar";
 import {resetRouter} from '../../../router/router'
 import {mapGetters} from "vuex";
+import {setStore} from "@/util/store";
 
 export default {
   components: {userAvatar,},
@@ -91,6 +92,7 @@
   methods: {
     handleWitch() {
       if (this.index === '0') {
+        console.log('this.userInfo',this.userInfo)
         const {avatar, userId, userName, email, personName} = this.userInfo;
         this.userForm = {avatar, userId, userName, email, personName};
       } else {
@@ -107,7 +109,7 @@
       this.$refs.userForm.validate((valid) => {
         if (valid) {
           const params = {
-            id: this.userInfo.userId,
+            oid: this.userInfo.userOid,
             name: this.userForm.userName,
             email: this.userForm.email
           }
@@ -117,13 +119,17 @@
                 type: "success",
                 message: "淇敼淇℃伅鎴愬姛!"
               });
+              // 鏇存柊缂撳瓨
+              this.userInfo.userName = this.userForm.userName;
+              this.userInfo.email = this.userForm.email;
+              setStore({ name: 'userInfo', content: this.userInfo });
+              this.handleWitch();
             } else {
               this.$message({
                 type: "error",
                 message: res.data.msg
               });
             }
-            done();
           })
         } else {
           return false;
diff --git a/Source/plt-web/plt-web-ui/src/views/system/userInfo/userAvatar.vue b/Source/plt-web/plt-web-ui/src/views/system/userInfo/userAvatar.vue
index ce25b08..10458e4 100644
--- a/Source/plt-web/plt-web-ui/src/views/system/userInfo/userAvatar.vue
+++ b/Source/plt-web/plt-web-ui/src/views/system/userInfo/userAvatar.vue
@@ -176,7 +176,6 @@
         const reader = new FileReader();
         reader.onloadend = (result) => {
           this.userInfo.avatar = reader.result; // 瀛樺偍 Base64 瀛楃涓�
-
           setStore({ name: 'userInfo', content:  this.userInfo });
         };
         reader.readAsDataURL(res.data); // 璋冪敤reader鏂规硶

--
Gitblit v1.9.3