liyongli 1 vuosi sitten
vanhempi
commit
88922289cf
1 muutettua tiedostoa jossa 13 lisäystä ja 1 poistoa
  1. 13 1
      src/view/plagiarismCheck/index.vue

+ 13 - 1
src/view/plagiarismCheck/index.vue

@@ -155,10 +155,21 @@ const total = ref(0);
 const proName = ref('');
 const file = ref([]);
 const file1 = ref([]);
+let t = undefined;
 const onSubmit = () => {
   getProList();
 };
 
+// 轮询结果'
+const lunxun = () => {
+    if (t) {
+        clearInterval(t);
+    }
+    t = setTimeout(() => {
+        getProList()
+    }, 5000);
+}
+
 const create = () => {
   importId = '';
   dialogVisible.value = true;
@@ -185,6 +196,7 @@ const getProList = () => {
   }).then(res => {
     tableData.value = res.records || [];
     total.value = res.total;
+    lunxun();
   });
 };
 getProList();
@@ -198,7 +210,7 @@ const deleteProject = id => {
 };
 
 const createPro = () => {
-  console.log(isNaN(importId));
+    
   !importId &&
     createPlag({
       projectName: proName.value