lsc 6 mesiacov pred
rodič
commit
232c64d448

+ 13 - 12
src/components/pages/knowledge/fileBox.vue

@@ -535,7 +535,7 @@ export default {
           this.proVisible = false;
           this.$message.success("操作完成");
           this.getData(); // 在上传完所有文件后再调用getData
-        }, 1000);
+        }, 2000);
       };
 
       await uploadFiles(event.target.files);
@@ -681,17 +681,18 @@ export default {
         ]).then(res => {
           console.log(res, row);
           const message = res.data.result && res.data.result.message;
-          const status = message === 'Document entities and relationships extracted successfully.' ? 'success' : 'failed';
-          const msg = message === 'Document entities and relationships extracted successfully.' ? '提取成功' : '提取失败';
-          this.$message({
-            message: msg,
-            type: status == 'success' ? status : 'error'
-          })
-          this.fileArray.forEach(e => {
-            if (e.documentid === row.documentid) {
-              e.extractionStatus = status;
-            }
-          });
+          // const status = message === 'Document entities and relationships extracted successfully.' ? 'success' : 'failed';
+          // const msg = message === 'Document entities and relationships extracted successfully.' ? '提取成功' : '提取失败';
+          // this.$message({
+          //   message: msg,
+          //   type: status == 'success' ? status : 'error'
+          // })
+          // this.fileArray.forEach(e => {
+          //   if (e.documentid === row.documentid) {
+          //     e.extractionStatus = status;
+          //   }
+          // });
+          this.getData();
         }).catch(err => {
           this.$message.error('提取失败')
           this.fileArray.forEach(e => {

+ 13 - 13
src/components/pages/knowledge/folderFileBox.vue

@@ -564,7 +564,7 @@ export default {
           this.proVisible = false;
           this.$message.success("操作完成");
           this.getData(); // 在上传完所有文件后再调用getData
-        }, 1000);
+        }, 2000);
       };
 
       await uploadFiles(event.target.files);
@@ -759,17 +759,18 @@ export default {
         ]).then(res => {
           console.log(res, row);
           const message = res.data.result && res.data.result.message;
-          const status = message === 'Document entities and relationships extracted successfully.' ? 'success' : 'failed';
-          const msg = message === 'Document entities and relationships extracted successfully.' ? '提取成功' : '提取失败';
-          this.$message({
-            message: msg,
-            type: status == 'success' ? status : 'error'
-          })
-          this.fileArray.forEach(e => {
-            if (e.documentid === row.documentid) {
-              e.extractionStatus = status;
-            }
-          });
+          // const status = message === 'Document entities and relationships extracted successfully.' ? 'success' : 'failed';
+          // const msg = message === 'Document entities and relationships extracted successfully.' ? '提取成功' : '提取失败';
+          // this.$message({
+          //   message: msg,
+          //   type: status == 'success' ? status : 'error'
+          // })
+          // this.fileArray.forEach(e => {
+          //   if (e.documentid === row.documentid) {
+          //     e.extractionStatus = status;
+          //   }
+          // });
+          this.getData();
         }).catch(err => {
           this.$message.error('提取失败')
           this.fileArray.forEach(e => {
@@ -782,7 +783,6 @@ export default {
 
         console.log(res.data);
         this.$message.success("提取文件中");
-        this.getData();
       } catch (err) {
         console.error(err);
       }