695593266@qq.com 9 ay önce
ebeveyn
işleme
5ad2e21b52
2 değiştirilmiş dosya ile 10 ekleme ve 2 silme
  1. 1 1
      src/store/modules/user.js
  2. 9 1
      src/views/singleLogin/index.vue

+ 1 - 1
src/store/modules/user.js

@@ -86,7 +86,7 @@ export default {
     },
     //用户的详情
     setAllUserInfo(state, info) {
-      localStorage.setItem('all', JSON.stringify(info));
+      // localStorage.setItem('all', JSON.stringify(info));
       state.allInfo = info;
     },
     // 设置登录用户的权限

+ 9 - 1
src/views/singleLogin/index.vue

@@ -108,6 +108,7 @@
     <el-dialog
       title="用户信息"
       :visible.sync="isInfo"
+      v-if="isInfo"
       append-to-body
       width="30%"
       center
@@ -446,11 +447,18 @@
           return this.$message.warning('请选择班组');
         }
 
+        this.isInfo = false;
+
+        console.log(this.infoForm, 'this.infoForm');
         this.$store.commit('user/setAllUserInfo', this.infoForm);
+
+        console.log(this.$store.state.user, 'this.$store.state.user');
         this.$router.push(this.$route?.query?.from ?? '/').catch(() => {});
       },
 
-      closeInfo() {},
+      closeInfo() {
+        this.isInfo = false;
+      },
 
       /* 更换图形验证码 */
       changeCaptcha() {