|
@@ -8,7 +8,11 @@
|
|
|
</el-breadcrumb>
|
|
|
<!-- <div class="f_box_top_title">文件</div> -->
|
|
|
</div>
|
|
|
- <div class="f_box_top_right">
|
|
|
+ <div class="f_box_top_center" v-show="false">
|
|
|
+ <span :class="{active: fileType == 1}" @click="checkType(1)">文件数据</span>
|
|
|
+ <span :class="{active: fileType == 2}" @click="checkType(2)">召回测试</span>
|
|
|
+ </div>
|
|
|
+ <div class="f_box_top_right" v-if="fileType == 1">
|
|
|
|
|
|
<div class="input">
|
|
|
<input
|
|
@@ -83,6 +87,7 @@
|
|
|
<!-- v-else-if="stype == '2' && fileArray.length" -->
|
|
|
|
|
|
<div
|
|
|
+ v-show="fileType == 1"
|
|
|
class="f_box_file_list"
|
|
|
v-loading.body="isLoading"
|
|
|
>
|
|
@@ -278,6 +283,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <testBox v-show="fileType == 2" :userid="userid" :folderid="folderid"></testBox>
|
|
|
<wpdf :dialogVisiblePdf.sync="dialogVisiblePdf" :url="wurl"></wpdf>
|
|
|
<wVideo :dialogVisibleVideo.sync="dialogVisibleVideo" :url="wurl"></wVideo>
|
|
|
<wOffice
|
|
@@ -313,13 +319,15 @@ import wOffice from "../test/file/wOffice.vue";
|
|
|
import { v4 as uuidv4 } from "uuid";
|
|
|
import relateFiles from "./components/relateFiles";
|
|
|
import checkDialog from "./components/checkDialog";
|
|
|
+import testBox from "./components/testBox";
|
|
|
export default {
|
|
|
components: {
|
|
|
wVideo,
|
|
|
wpdf,
|
|
|
wOffice,
|
|
|
relateFiles,
|
|
|
- checkDialog
|
|
|
+ checkDialog,
|
|
|
+ testBox
|
|
|
},
|
|
|
props: {
|
|
|
userid: {
|
|
@@ -396,7 +404,8 @@ export default {
|
|
|
page: 1,
|
|
|
debounceTimeout: null,
|
|
|
pcount: 0,
|
|
|
- ptotal: 0
|
|
|
+ ptotal: 0,
|
|
|
+ fileType: 1
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -550,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);
|
|
@@ -579,20 +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'
|
|
|
- })
|
|
|
- this.getData()
|
|
|
+ // 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 => {
|
|
@@ -646,7 +657,7 @@ export default {
|
|
|
}
|
|
|
];
|
|
|
this.ajax //deleteFileByFilter
|
|
|
- .post(this.$store.state.fileApi + "deleteFileByFilter", params)
|
|
|
+ .post(this.$store.state.fileApi + "deleteFile", params)
|
|
|
.then(res => {
|
|
|
this.$message({
|
|
|
message: "删除成功",
|
|
@@ -792,6 +803,9 @@ export default {
|
|
|
} catch (err) {
|
|
|
console.error(err);
|
|
|
}
|
|
|
+ },
|
|
|
+ checkType(type){
|
|
|
+ this.fileType = type
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
@@ -1554,5 +1568,27 @@ export default {
|
|
|
display: flex !important;
|
|
|
align-items: center !important;
|
|
|
}
|
|
|
+
|
|
|
+.f_box_top_center{
|
|
|
+ margin: auto;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+}
|
|
|
+
|
|
|
+.f_box_top_center > span{
|
|
|
+ font-size: 14px;
|
|
|
+ cursor: pointer;
|
|
|
+ padding: 6px 8px;
|
|
|
+ color: #1A202C;
|
|
|
+}
|
|
|
+
|
|
|
+.f_box_top_center > span:hover{
|
|
|
+ background: rgb(242, 243, 243);
|
|
|
+ border-radius: 5px;
|
|
|
+}
|
|
|
+
|
|
|
+.f_box_top_center > span.active{
|
|
|
+ color: #2B5FD9;
|
|
|
+}
|
|
|
</style>
|
|
|
|