|
@@ -54,7 +54,7 @@
|
|
/>
|
|
/>
|
|
</div>
|
|
</div>
|
|
<div class="f_box_top_right">
|
|
<div class="f_box_top_right">
|
|
- <el-button type="primary" size="small" @click="serchFile"
|
|
|
|
|
|
+ <el-button type="primary" size="small" @click="refresh"
|
|
style="background-color: rgb(51, 112, 255);"
|
|
style="background-color: rgb(51, 112, 255);"
|
|
>
|
|
>
|
|
<img style="vertical-align: middle;transform: scale(1.1);padding-bottom: 2px;box-sizing: border-box;" src="../../../assets/shuax.svg" alt="">
|
|
<img style="vertical-align: middle;transform: scale(1.1);padding-bottom: 2px;box-sizing: border-box;" src="../../../assets/shuax.svg" alt="">
|
|
@@ -170,7 +170,7 @@
|
|
@mouseleave="isHover = false"
|
|
@mouseleave="isHover = false"
|
|
v-if="scope.row.userid == userid">
|
|
v-if="scope.row.userid == userid">
|
|
<img
|
|
<img
|
|
- style="width: 14px;"
|
|
|
|
|
|
+ style="width: 14px; margin-right:8px;"
|
|
:src="isHover ? tqList2 : tqList"
|
|
:src="isHover ? tqList2 : tqList"
|
|
alt="">
|
|
alt="">
|
|
<span :class="isHover ? 'lookHp2' : 'lookHp1'">{{lang.extract}}</span>
|
|
<span :class="isHover ? 'lookHp2' : 'lookHp1'">{{lang.extract}}</span>
|
|
@@ -238,6 +238,7 @@
|
|
:total="total"
|
|
:total="total"
|
|
@current-change="handleCurrentChange"
|
|
@current-change="handleCurrentChange"
|
|
:page-sizes="[10, 20, 50, 100]"
|
|
:page-sizes="[10, 20, 50, 100]"
|
|
|
|
+ :current-page="page"
|
|
>
|
|
>
|
|
<el-select v-model="limit" @change="handleSizeChange" class="file_mySelect">
|
|
<el-select v-model="limit" @change="handleSizeChange" class="file_mySelect">
|
|
<el-option
|
|
<el-option
|
|
@@ -264,6 +265,21 @@
|
|
:url="wurl"
|
|
:url="wurl"
|
|
></wOffice>
|
|
></wOffice>
|
|
<checkDialog ref="checkDialog"></checkDialog>
|
|
<checkDialog ref="checkDialog"></checkDialog>
|
|
|
|
+ <el-dialog
|
|
|
|
+ :title="lang.prompt2"
|
|
|
|
+ :visible.sync="promptDialog"
|
|
|
|
+ class="fileDialogBlock"
|
|
|
|
+ :close-on-click-modal="false"
|
|
|
|
+ :before-close="handleClose"
|
|
|
|
+ >
|
|
|
|
+ <span class="promptBox" v-loading="promptLoading">
|
|
|
|
+ <!-- <el-input v-model="prompt" :placeholder="lang.promptPlaceholder" class="promptInput"></el-input> -->
|
|
|
|
+ <el-input type="textarea" v-model="prompt" :placeholder="lang.promptPlaceholder" rows="5"></el-input>
|
|
|
|
+ <div class="btnbox">
|
|
|
|
+ <el-button type="primary" @click="handleExtract">{{ lang.confirm }}</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </span>
|
|
|
|
+ </el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -373,7 +389,11 @@ export default {
|
|
user: "",
|
|
user: "",
|
|
userArray: [],
|
|
userArray: [],
|
|
pcount: 0,
|
|
pcount: 0,
|
|
- ptotal: 0
|
|
|
|
|
|
+ ptotal: 0,
|
|
|
|
+ row: {},
|
|
|
|
+ promptDialog: false,
|
|
|
|
+ promptLoading: false,
|
|
|
|
+ prompt: "",
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -424,6 +444,9 @@ export default {
|
|
},
|
|
},
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ handleClose(done){
|
|
|
|
+ done();
|
|
|
|
+ },
|
|
handleCurrentChange(val) {
|
|
handleCurrentChange(val) {
|
|
this.page = val;
|
|
this.page = val;
|
|
this.getData();
|
|
this.getData();
|
|
@@ -486,6 +509,9 @@ export default {
|
|
this.serchFile();
|
|
this.serchFile();
|
|
}, 300);
|
|
}, 300);
|
|
},
|
|
},
|
|
|
|
+ refresh(){
|
|
|
|
+ this.getData();
|
|
|
|
+ },
|
|
serchFile() {
|
|
serchFile() {
|
|
this.page = 1;
|
|
this.page = 1;
|
|
this.getData();
|
|
this.getData();
|
|
@@ -698,16 +724,21 @@ export default {
|
|
|
|
|
|
extractFile(row) {
|
|
extractFile(row) {
|
|
if (row.ingestionStatus != "success") return this.$message.info(this.lang.fileUploadFail)
|
|
if (row.ingestionStatus != "success") return this.$message.info(this.lang.fileUploadFail)
|
|
-
|
|
|
|
|
|
+ this.row = row
|
|
|
|
+ this.promptDialog = true;
|
|
|
|
+ },
|
|
|
|
+ handleExtract() {
|
|
|
|
+ this.promptLoading = true
|
|
let params = {
|
|
let params = {
|
|
- documentid: row.documentid
|
|
|
|
|
|
+ documentid: this.row.documentid,
|
|
|
|
+ prompt: this.prompt
|
|
};
|
|
};
|
|
// 获取切片
|
|
// 获取切片
|
|
try {
|
|
try {
|
|
const res = this.ajax.post(this.$store.state.fileApi + "extractFile2", [
|
|
const res = this.ajax.post(this.$store.state.fileApi + "extractFile2", [
|
|
params
|
|
params
|
|
]).then(res => {
|
|
]).then(res => {
|
|
- console.log(res, row);
|
|
|
|
|
|
+ console.log(res, this.row);
|
|
const message = res.data.result && res.data.result.message;
|
|
const message = res.data.result && res.data.result.message;
|
|
// const status = message === 'Document entities and relationships extracted successfully.' ? 'success' : 'failed';
|
|
// const status = message === 'Document entities and relationships extracted successfully.' ? 'success' : 'failed';
|
|
// const msg = message === 'Document entities and relationships extracted successfully.' ? '提取成功' : '提取失败';
|
|
// const msg = message === 'Document entities and relationships extracted successfully.' ? '提取成功' : '提取失败';
|
|
@@ -721,12 +752,15 @@ export default {
|
|
// }
|
|
// }
|
|
// });
|
|
// });
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
|
+ this.promptLoading = false
|
|
|
|
+ this.promptDialog = false
|
|
this.getData();
|
|
this.getData();
|
|
}, 1000)
|
|
}, 1000)
|
|
}).catch(err => {
|
|
}).catch(err => {
|
|
|
|
+ this.promptLoading = false
|
|
this.$message.error(this.lang.extrFailed)
|
|
this.$message.error(this.lang.extrFailed)
|
|
this.fileArray.forEach(e => {
|
|
this.fileArray.forEach(e => {
|
|
- if (e.documentid === row.documentid) {
|
|
|
|
|
|
+ if (e.documentid === this.row.documentid) {
|
|
e.extractionStatus = 'failed';
|
|
e.extractionStatus = 'failed';
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -736,8 +770,10 @@ export default {
|
|
this.$message.success(this.lang.extractingFile);
|
|
this.$message.success(this.lang.extractingFile);
|
|
this.getData();
|
|
this.getData();
|
|
} catch (err) {
|
|
} catch (err) {
|
|
|
|
+ this.promptLoading = false
|
|
|
|
+
|
|
console.error(err);
|
|
console.error(err);
|
|
- }
|
|
|
|
|
|
+ }
|
|
},
|
|
},
|
|
isSelectable(row) {
|
|
isSelectable(row) {
|
|
return row.userid == this.userid;
|
|
return row.userid == this.userid;
|
|
@@ -1355,5 +1391,31 @@ export default {
|
|
padding: 8px 6px;
|
|
padding: 8px 6px;
|
|
border-radius: 8px;
|
|
border-radius: 8px;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+.fileDialogBlock >>> .el-dialog {
|
|
|
|
+ width: 648px;
|
|
|
|
+ min-height: 180px;
|
|
|
|
+ border-radius: 12px;
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.fileDialogBlock >>> .el-dialog__title {
|
|
|
|
+ font-weight: 600 !important;
|
|
|
|
+ font-size: 18px !important;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.fileDialogBlock >>> .el-upload-list__item .el-icon-close {
|
|
|
|
+ top: 13px;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.promptBox{
|
|
|
|
+ display: block;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.btnbox{
|
|
|
|
+ margin-top: 10px;
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: flex-end;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|
|
|
|
|