shish hace 4 años
padre
commit
8dd139d5bf
Se han modificado 1 ficheros con 7 adiciones y 3 borrados
  1. 7 3
      hdPad/src/pages/home/components/workList.vue

+ 7 - 3
hdPad/src/pages/home/components/workList.vue

@@ -70,7 +70,8 @@ export default {
             _freshing: false,
             _freshing: false,
             sn:'',
             sn:'',
             thirdSn:'',
             thirdSn:'',
-            snTitle:'编号'
+            snTitle:'编号',
+            t:null
         }
         }
     },
     },
     watch:{
     watch:{
@@ -86,12 +87,15 @@ export default {
         if(this.mt == 'yes'){
         if(this.mt == 'yes'){
             this.snTitle = '美团编号'
             this.snTitle = '美团编号'
         }
         }
-
+        //有新制作单时自动刷新
         let that = this
         let that = this
-        setInterval(function () {
+        this.t = setInterval(function () {
             that.getWorkInfoList(1)
             that.getWorkInfoList(1)
         },5000)
         },5000)
     },
     },
+    destroyed(){
+        clearInterval(this.t)
+    },
     methods:{
     methods:{
         refreshList(){
         refreshList(){
             this.resetList()
             this.resetList()