yusheng hai 1 ano
pai
achega
9d03f3581f
Modificáronse 1 ficheiros con 7 adicións e 0 borrados
  1. 7 0
      src/views/login/index.vue

+ 7 - 0
src/views/login/index.vue

@@ -112,6 +112,7 @@
   import xyy from '@/assets/xyy.jpg';
   import { getPathAddress } from '@/api/system/file';
   import { setCurrentUser } from '@/utils/token-util';
+  import { factoryareaId } from '@/api/system/user';
 
   export default {
     // eslint-disable-next-line vue/multi-word-component-names
@@ -213,6 +214,12 @@
                 res.data.avatar && res.data.avatar.length
                   ? filePath + res.data.avatar[0].storePath
                   : xyy;
+
+              if (res.data.factoryId) {
+                let factoryareaData= await factoryareaId(res.data.factoryId)
+                res.data['factoryName']=factoryareaData.name
+              }
+
               this.$store.commit('user/setUserInfo', res.data);
               this.loading = false;
               this.$message.success(res.message);