Ver Fonte

回跳调整至生产进度看板

yhluo há 6 meses atrás
pai
commit
65ec8b2f49
2 ficheiros alterados com 15 adições e 16 exclusões
  1. 1 16
      src/views/compare/index.vue
  2. 14 0
      src/views/makeprocess/index.vue

+ 1 - 16
src/views/compare/index.vue

@@ -108,8 +108,7 @@ export default {
       dateYear: null,
       dateWeek: null,
       weekday: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
-      decorationColor: ['#568aea', '#000000'],
-      fromComponent: ''
+      decorationColor: ['#568aea', '#000000']
     }
   },
   components: {
@@ -117,14 +116,6 @@ export default {
     leftdown1,
     leftup1
   },
-  beforeRouteEnter(to, from, next) {
-    next(vm => {
-      console.log(from.meta.title)
-      if (from.meta.title == '组装看板' || from.meta.title == '车间看板') {
-        vm.fromComponent = from.meta.title;
-      }
-    })
-  },
   created() {
      this.isFullScreen = document.fullscreenElement;
   },
@@ -139,12 +130,6 @@ export default {
             type: 'warning'
         });
     })
-    
-    if (this.fromComponent) {
-      setTimeout(() => {
-        this.$router.go(-1);
-      }, 60000)
-    }
   },
   beforeDestroy () {
     clearInterval(this.timing);

+ 14 - 0
src/views/makeprocess/index.vue

@@ -95,11 +95,20 @@ export default {
       dateWeek: null,
       weekday: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
       decorationColor: ['#568aea', '#000000'],
+      fromComponent: ''
     }
   },
   components: {
     bottom1
   },
+  beforeRouteEnter(to, from, next) {
+    next(vm => {
+      console.log(from.meta.title)
+      if (from.meta.title == '组装看板' || from.meta.title == '车间看板') {
+        vm.fromComponent = from.meta.title;
+      }
+    })
+  },
   created() {
     this.isFullScreen = document.fullscreenElement;
   },
@@ -114,6 +123,11 @@ export default {
           type: 'warning'
       });
     })
+    if (this.fromComponent) {
+      setTimeout(() => {
+        this.$router.go(-1);
+      }, 60000)
+    }
   },
   beforeDestroy () {
     clearInterval(this.timing);