mirror of
http://112.124.100.131/ebiz-ai/ebiz-ai-knowledge-manage.git
synced 2025-12-09 19:06:49 +08:00
feat:保存题词修改
This commit is contained in:
@@ -112,8 +112,8 @@ export default {
|
||||
handler(newVal, oldVal) {
|
||||
if (newVal) {
|
||||
this.getMinerUStatus()
|
||||
|
||||
this.prdUrl = getPdfUrl({ documentId: newVal })
|
||||
console.log('this.prdUrl')
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
|
||||
@@ -175,27 +175,20 @@ export default {
|
||||
this.saveContentToDocumentOperation(this.documentId, extractResults)
|
||||
},
|
||||
// 保存题词内容到文档
|
||||
async saveContentToDocumentOperation(documentId, resultDTOList) {
|
||||
try {
|
||||
const params = {
|
||||
documentId,
|
||||
resultDTOList
|
||||
}
|
||||
|
||||
const res = await saveContentToDocument(params)
|
||||
console.log('saveContentToDocument result:', res.content)
|
||||
|
||||
if (res.content.result !== '0') {
|
||||
throw new Error(res.content.resultMessage || '保存题词内容失败')
|
||||
}
|
||||
|
||||
// 使用 push 的方式返回,防止出现页面异常跳转的问题
|
||||
// this.$router.go(-1)
|
||||
this.$router.push({ path: '/knowledge/detail', query: { ...this.$route.query } })
|
||||
} catch (error) {
|
||||
this.$message.error('保存题词内容失败: ' + error.message)
|
||||
throw error
|
||||
async saveContentToDocumentOperation(documentId, resultList) {
|
||||
const params = {
|
||||
documentId,
|
||||
resultDTOList: resultList.map(item => ({
|
||||
id: item.id,
|
||||
attribute: item.attribute,
|
||||
attributeContent: item.attributeContent
|
||||
}))
|
||||
}
|
||||
const res = await saveContentToDocument(params)
|
||||
console.log('saveContentToDocument result:', res.content)
|
||||
// 使用 push 的方式返回,防止出现页面异常跳转的问题
|
||||
// this.$router.go(-1)
|
||||
this.$router.push({ path: '/knowledge/detail', query: { ...this.$route.query } })
|
||||
},
|
||||
|
||||
// 主方法
|
||||
@@ -207,7 +200,9 @@ export default {
|
||||
const params = this.buildExecExtractParams(documentId)
|
||||
this.execExtractOperation(params).then(async res => {
|
||||
if (res) {
|
||||
await this.getExtractResultOperation(documentId)
|
||||
// await this.getExtractResultOperation(documentId)
|
||||
// 显示预览弹窗
|
||||
this.showExtractPreview(res)
|
||||
}
|
||||
})
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user