mirror of
http://112.124.100.131/ebiz-ai/ebiz-ai-knowledge-manage.git
synced 2025-12-11 03:46:50 +08:00
feat:保存题词修改
This commit is contained in:
@@ -112,8 +112,8 @@ export default {
|
|||||||
handler(newVal, oldVal) {
|
handler(newVal, oldVal) {
|
||||||
if (newVal) {
|
if (newVal) {
|
||||||
this.getMinerUStatus()
|
this.getMinerUStatus()
|
||||||
|
|
||||||
this.prdUrl = getPdfUrl({ documentId: newVal })
|
this.prdUrl = getPdfUrl({ documentId: newVal })
|
||||||
|
console.log('this.prdUrl')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
immediate: true
|
immediate: true
|
||||||
|
|||||||
@@ -175,27 +175,20 @@ export default {
|
|||||||
this.saveContentToDocumentOperation(this.documentId, extractResults)
|
this.saveContentToDocumentOperation(this.documentId, extractResults)
|
||||||
},
|
},
|
||||||
// 保存题词内容到文档
|
// 保存题词内容到文档
|
||||||
async saveContentToDocumentOperation(documentId, resultDTOList) {
|
async saveContentToDocumentOperation(documentId, resultList) {
|
||||||
try {
|
const params = {
|
||||||
const params = {
|
documentId,
|
||||||
documentId,
|
resultDTOList: resultList.map(item => ({
|
||||||
resultDTOList
|
id: item.id,
|
||||||
}
|
attribute: item.attribute,
|
||||||
|
attributeContent: item.attributeContent
|
||||||
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
|
|
||||||
}
|
}
|
||||||
|
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)
|
const params = this.buildExecExtractParams(documentId)
|
||||||
this.execExtractOperation(params).then(async res => {
|
this.execExtractOperation(params).then(async res => {
|
||||||
if (res) {
|
if (res) {
|
||||||
await this.getExtractResultOperation(documentId)
|
// await this.getExtractResultOperation(documentId)
|
||||||
|
// 显示预览弹窗
|
||||||
|
this.showExtractPreview(res)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user