mirror of
http://112.124.100.131/ebiz-ai/ebiz-ai-knowledge-manage.git
synced 2025-12-07 01:46:48 +08:00
Merge branch 'dev' into pdf识别
# Conflicts: # src/api/generatedApi/index.js # src/config/index.js
This commit is contained in:
@@ -217,6 +217,15 @@ export function uploadFileByCustom(data) {
|
||||
}
|
||||
})
|
||||
}
|
||||
/*一键上传*/
|
||||
export function directEmbedding(data) {
|
||||
return request({
|
||||
url: getUrl(`/datasetDocumentEx/direct/embedding`),
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
//知识库文件上传-通用
|
||||
export function uploadFileByTemplate(data) {
|
||||
@@ -238,6 +247,7 @@ export function datasetQuerySegments(data) {
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 知识文档详情查询(包含json的题词和拆分规则)
|
||||
export function datasetDocumentEx(data) {
|
||||
return request({
|
||||
@@ -246,6 +256,7 @@ export function datasetDocumentEx(data) {
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 任务轨迹查看详情
|
||||
export function getTaskDetail(params) {
|
||||
return request({
|
||||
|
||||
@@ -20,65 +20,35 @@
|
||||
.el-message--success {
|
||||
background: $--message-success-light;
|
||||
border-radius: 12px;
|
||||
border: 1px solid $--message-success-border;
|
||||
& .el-message__content {
|
||||
font-family: PingFangSC;
|
||||
font-size: 14px;
|
||||
color: #000000;
|
||||
line-height: 20px;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
//border: 1px solid $--message-success-border;
|
||||
}
|
||||
|
||||
.el-message--error {
|
||||
width: 255px;
|
||||
height: 46px;
|
||||
border-radius: 12px;
|
||||
border: 1px solid #e44655;
|
||||
background: $--message-error-light;
|
||||
border-radius: 12px;
|
||||
border: 1px solid $--message-error-border;
|
||||
& .el-message__content {
|
||||
font-family: PingFangSC;
|
||||
font-size: 14px;
|
||||
color: #000000;
|
||||
line-height: 20px;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
}
|
||||
|
||||
.el-message--warning {
|
||||
width: 255px;
|
||||
height: 46px;
|
||||
border-radius: 12px;
|
||||
border: 1px solid #e44655;
|
||||
background: $--message-warning-light;
|
||||
border-radius: 12px;
|
||||
border: 1px solid $--message-warning-border;
|
||||
& .el-message__content {
|
||||
font-family: PingFangSC;
|
||||
font-size: 14px;
|
||||
color: #000000;
|
||||
line-height: 20px;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
}
|
||||
|
||||
.el-message--info {
|
||||
width: 255px;
|
||||
height: 46px;
|
||||
border-radius: 12px;
|
||||
border: 1px solid #e44655;
|
||||
background: $--message-info-light;
|
||||
border-radius: 12px;
|
||||
border: 1px solid $--message-info-border;
|
||||
}
|
||||
|
||||
.el-message--info,
|
||||
.el-message--warning,
|
||||
.el-message--error,
|
||||
.el-message--success {
|
||||
& .el-message__content {
|
||||
font-family: PingFangSC;
|
||||
font-size: 14px;
|
||||
color: #000000;
|
||||
//color: $--color-primary-desc-text;
|
||||
line-height: 20px;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
let envInfo = process.env
|
||||
// let [admin, jifen] = [envInfo.VUE_APP_ADMIN, 'http://192.168.2.62:7196/']
|
||||
let [admin, jifen, zixi] = [
|
||||
'/api',
|
||||
'http://192.168.2.62:7196/',
|
||||
'http://192.168.8.165:7196/'
|
||||
]
|
||||
let [admin, jifen, zixi] = ['/api', 'http://192.168.2.62:7196/', '/jifen']
|
||||
|
||||
export default {
|
||||
admin,
|
||||
|
||||
@@ -148,7 +148,7 @@ export default {
|
||||
input.click()
|
||||
},
|
||||
|
||||
uploadFiled() {
|
||||
uploadFiled(back) {
|
||||
if (!this.filed) {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
@@ -167,16 +167,24 @@ export default {
|
||||
formData.append('useOcr', this.form.beOcr? '1': '0')
|
||||
}
|
||||
api(formData).then(response => {
|
||||
this.documentId = response.content.content
|
||||
// 向上导入documentId
|
||||
this.$emit('getDocumentId', this.documentId)
|
||||
// 文件内容
|
||||
this.$emit('getUploadDetail', response.content.content)
|
||||
// 表单内容
|
||||
this.$emit('getForm', this.form, this.$refs.processForm)
|
||||
if (this.form.beMinerU) {
|
||||
this.$emit('beMinerU', true)
|
||||
if(response){
|
||||
this.documentId = response.content.content
|
||||
if(back){
|
||||
back(this.documentId)
|
||||
} else {
|
||||
// 向上导入documentId
|
||||
this.$emit('getDocumentId', this.documentId)
|
||||
// 文件内容
|
||||
this.$emit('getUploadDetail', response.content.content)
|
||||
// 表单内容
|
||||
this.$emit('getForm', this.form, this.$refs.processForm)
|
||||
if (this.form.beMinerU) {
|
||||
this.$emit('beMinerU', true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
},
|
||||
handleDragOver() {
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
type="primary"
|
||||
size="medium"
|
||||
class="line-button"
|
||||
@click="fetchApi"
|
||||
@click="oneClickAction"
|
||||
>
|
||||
<img :src="magic" alt="" style="width: 12px;" />
|
||||
一键处理
|
||||
@@ -103,6 +103,7 @@ import StepPreprocessing from './components/preprocessing.vue'
|
||||
import SplitConfig from '@/views/knowledge/detail/components/split/Index.vue'
|
||||
import Words from '@/views/knowledge/detail/components/words/Index.vue'
|
||||
import magic from '@/assets/images/konwledge/magic.png'
|
||||
import { directEmbedding } from '@/api/generatedApi'
|
||||
// import StepC
|
||||
export default {
|
||||
name: 'create',
|
||||
@@ -142,7 +143,20 @@ export default {
|
||||
this.saveMarkDown()
|
||||
}
|
||||
},
|
||||
fetchApi() {},
|
||||
oneClickAction() {
|
||||
this.$refs.stepPreProcessing.uploadFiled(e => {
|
||||
if (e) {
|
||||
directEmbedding({ documentId: e }).then(res => {
|
||||
if (res) {
|
||||
this.$message.success('处理成功')
|
||||
this.$router.go(-1)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error('上传失败,请重试')
|
||||
}
|
||||
})
|
||||
},
|
||||
getDocumentId(id) {
|
||||
this.documentId = id
|
||||
},
|
||||
|
||||
@@ -59,6 +59,13 @@ module.exports = {
|
||||
pathRewrite: {
|
||||
'^/jifen': ''
|
||||
}
|
||||
},
|
||||
'/zixi': {
|
||||
target: 'http://192.168.8.165:7196/',
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
'^/jifen': ''
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user