|
@@ -8,7 +8,7 @@
|
|
|
</el-breadcrumb>
|
|
|
<!-- <div class="f_box_top_title">文件</div> -->
|
|
|
</div>
|
|
|
- <div class="f_box_top_center" v-show="false">
|
|
|
+ <div class="f_box_top_center">
|
|
|
<span :class="{active: fileType == 1}" @click="checkType(1)">文件数据</span>
|
|
|
<span :class="{active: fileType == 2}" @click="checkType(2)">召回测试</span>
|
|
|
</div>
|
|
@@ -559,7 +559,7 @@ export default {
|
|
|
JSON.stringify({ title: file.name, collection_ids: string })
|
|
|
);
|
|
|
formData.append("ingestion_mode", "fast");
|
|
|
- // formData.append("run_with_orchestration", "false");
|
|
|
+ formData.append("run_with_orchestration", "false");
|
|
|
|
|
|
// 使用同步方式上传文件
|
|
|
await this.uploadFile(formData, file.name, uuid);
|
|
@@ -588,22 +588,22 @@ export default {
|
|
|
}).then(res => {
|
|
|
console.log(res, formData);
|
|
|
const message = res.data.results && res.data.results.message;
|
|
|
- // const status = message === 'Document created and ingested successfully.' ? 'success' : 'failed';
|
|
|
- // const msg = message === 'Document created and ingested successfully.' ? '切片成功' : '切片失败';
|
|
|
- // this.$message({
|
|
|
- // message: msg,
|
|
|
- // type: status == 'success' ? status : 'error'
|
|
|
- // })
|
|
|
- setTimeout(() => {
|
|
|
- this.getData()
|
|
|
- }, 1000)
|
|
|
+ const status = message === 'Document created and ingested successfully.' ? 'success' : 'failed';
|
|
|
+ const msg = message === 'Document created and ingested successfully.' ? '切片成功' : '切片失败';
|
|
|
+ this.$message({
|
|
|
+ message: msg,
|
|
|
+ type: status == 'success' ? status : 'error'
|
|
|
+ })
|
|
|
// setTimeout(() => {
|
|
|
- // this.fileArray.forEach(e => {
|
|
|
- // if (e.documentid === uuid) {
|
|
|
- // e.ingestionStatus = status;
|
|
|
- // }
|
|
|
- // });
|
|
|
- // }, 1000);
|
|
|
+ this.getData()
|
|
|
+ // }, 1000)
|
|
|
+ setTimeout(() => {
|
|
|
+ this.fileArray.forEach(e => {
|
|
|
+ if (e.documentid === uuid) {
|
|
|
+ e.ingestionStatus = status;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }, 1000);
|
|
|
}).catch(err => {
|
|
|
this.$message.error('上传失败')
|
|
|
this.fileArray.forEach(e => {
|