Bladeren bron

修复单独报工执行人选择的问题

695593266@qq.com 9 maanden geleden
bovenliggende
commit
b3ec897161

+ 1 - 1
src/views/login/index.vue

@@ -202,7 +202,7 @@
       },
       /* 跳转到首页 */
       goHome() {
-        localStorage.setItem('singleUserInfo', '2');
+        // localStorage.setItem('singleUserInfo', '2');
         this.$router.push(this.$route?.query?.from ?? '/').catch(() => {});
       },
       /* 更换图形验证码 */

+ 7 - 1
src/views/produce/components/feeding/index.vue

@@ -360,7 +360,13 @@
     },
     mounted() {
       this.getChooseEngrave();
-      this.getTeamList(this.$store.state.user.info.teamId);
+      if (localStorage.getItem('singleUserInfo') == '1') {
+        const data = JSON.parse(localStorage.getItem('chooseUserInfo'));
+        this.getTeamList(data.teamId);
+      } else {
+        this.getTeamList(this.$store.state.user.info.teamId);
+      }
+      // this.getTeamList(this.$store.state.user.info.teamId);
     },
 
     methods: {

+ 6 - 1
src/views/produce/components/jobBooking/index.vue

@@ -592,7 +592,12 @@
     },
 
     mounted() {
-      this.getTeamList(this.$store.state.user.info.teamId);
+      if (localStorage.getItem('singleUserInfo') == '1') {
+        const data = JSON.parse(localStorage.getItem('chooseUserInfo'));
+        this.getTeamList(data.teamId);
+      } else {
+        this.getTeamList(this.$store.state.user.info.teamId);
+      }
     },
 
     methods: {

+ 7 - 1
src/views/produce/components/warehousing/index.vue

@@ -602,7 +602,13 @@
     },
 
     mounted() {
-      this.getTeamList(this.$store.state.user.info.teamId);
+      if (localStorage.getItem('singleUserInfo') == '1') {
+        const data = JSON.parse(localStorage.getItem('chooseUserInfo'));
+        this.getTeamList(data.teamId);
+      } else {
+        this.getTeamList(this.$store.state.user.info.teamId);
+      }
+      // this.getTeamList(this.$store.state.user.info.teamId);
     },
 
     methods: {