Parcourir la source

定时刷新值班列表

libushang il y a 9 mois
Parent
commit
e92ba00009
1 fichiers modifiés avec 14 ajouts et 2 suppressions
  1. 14 2
      src/views/emergencyCommandMap/RightSection/JointDuty.vue

+ 14 - 2
src/views/emergencyCommandMap/RightSection/JointDuty.vue

@@ -104,6 +104,16 @@ const handleDownLoad = () => {
     document.body.removeChild(a);
     document.body.removeChild(a);
   };
   };
 };
 };
+
+const nextFetchData = ()=> {
+  setTimeout(()=>{
+    getCheckinList(eventId.value).then((res) => {
+      listData.value = res.data;
+      nextFetchData();
+    });
+  }, 1500)
+};
+
 onMounted(() => {
 onMounted(() => {
   eventId.value = route.query.event_id as string;
   eventId.value = route.query.event_id as string;
   /*
   /*
@@ -145,11 +155,13 @@ onMounted(() => {
       duties: '职务'
       duties: '职务'
     }
     }
   ];
   ];
-  */
+  
   getCheckinList(eventId.value).then((res) => {
   getCheckinList(eventId.value).then((res) => {
     listData.value = res.data;
     listData.value = res.data;
-  });
+  });*/
   qrCodeUrl.value = import.meta.env.VITE_APP_BASE_API2 + 'api/event_management/checkin/qrcode?event_id=' + eventId.value;
   qrCodeUrl.value = import.meta.env.VITE_APP_BASE_API2 + 'api/event_management/checkin/qrcode?event_id=' + eventId.value;
+
+  nextFetchData();
 });
 });
 </script>
 </script>