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) {
|
export function uploadFileByTemplate(data) {
|
||||||
@@ -238,6 +247,7 @@ export function datasetQuerySegments(data) {
|
|||||||
params: data
|
params: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 知识文档详情查询(包含json的题词和拆分规则)
|
// 知识文档详情查询(包含json的题词和拆分规则)
|
||||||
export function datasetDocumentEx(data) {
|
export function datasetDocumentEx(data) {
|
||||||
return request({
|
return request({
|
||||||
@@ -246,6 +256,7 @@ export function datasetDocumentEx(data) {
|
|||||||
params: data
|
params: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 任务轨迹查看详情
|
// 任务轨迹查看详情
|
||||||
export function getTaskDetail(params) {
|
export function getTaskDetail(params) {
|
||||||
return request({
|
return request({
|
||||||
|
|||||||
@@ -20,65 +20,35 @@
|
|||||||
.el-message--success {
|
.el-message--success {
|
||||||
background: $--message-success-light;
|
background: $--message-success-light;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
border: 1px solid $--message-success-border;
|
//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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-message--error {
|
.el-message--error {
|
||||||
width: 255px;
|
|
||||||
height: 46px;
|
|
||||||
border-radius: 12px;
|
|
||||||
border: 1px solid #e44655;
|
|
||||||
background: $--message-error-light;
|
background: $--message-error-light;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
border: 1px solid $--message-error-border;
|
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 {
|
.el-message--warning {
|
||||||
width: 255px;
|
|
||||||
height: 46px;
|
|
||||||
border-radius: 12px;
|
|
||||||
border: 1px solid #e44655;
|
|
||||||
background: $--message-warning-light;
|
background: $--message-warning-light;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
border: 1px solid $--message-warning-border;
|
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 {
|
.el-message--info {
|
||||||
width: 255px;
|
|
||||||
height: 46px;
|
|
||||||
border-radius: 12px;
|
|
||||||
border: 1px solid #e44655;
|
|
||||||
background: $--message-info-light;
|
background: $--message-info-light;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
border: 1px solid $--message-info-border;
|
border: 1px solid $--message-info-border;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-message--info,
|
||||||
|
.el-message--warning,
|
||||||
|
.el-message--error,
|
||||||
|
.el-message--success {
|
||||||
& .el-message__content {
|
& .el-message__content {
|
||||||
font-family: PingFangSC;
|
font-family: PingFangSC;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #000000;
|
//color: $--color-primary-desc-text;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
|
|||||||
@@ -1,10 +1,6 @@
|
|||||||
let envInfo = process.env
|
let envInfo = process.env
|
||||||
// let [admin, jifen] = [envInfo.VUE_APP_ADMIN, 'http://192.168.2.62:7196/']
|
// let [admin, jifen] = [envInfo.VUE_APP_ADMIN, 'http://192.168.2.62:7196/']
|
||||||
let [admin, jifen, zixi] = [
|
let [admin, jifen, zixi] = ['/api', 'http://192.168.2.62:7196/', '/jifen']
|
||||||
'/api',
|
|
||||||
'http://192.168.2.62:7196/',
|
|
||||||
'http://192.168.8.165:7196/'
|
|
||||||
]
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
admin,
|
admin,
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ export default {
|
|||||||
input.click()
|
input.click()
|
||||||
},
|
},
|
||||||
|
|
||||||
uploadFiled() {
|
uploadFiled(back) {
|
||||||
if (!this.filed) {
|
if (!this.filed) {
|
||||||
this.$message({
|
this.$message({
|
||||||
type: 'error',
|
type: 'error',
|
||||||
@@ -167,16 +167,24 @@ export default {
|
|||||||
formData.append('useOcr', this.form.beOcr? '1': '0')
|
formData.append('useOcr', this.form.beOcr? '1': '0')
|
||||||
}
|
}
|
||||||
api(formData).then(response => {
|
api(formData).then(response => {
|
||||||
this.documentId = response.content.content
|
if(response){
|
||||||
// 向上导入documentId
|
this.documentId = response.content.content
|
||||||
this.$emit('getDocumentId', this.documentId)
|
if(back){
|
||||||
// 文件内容
|
back(this.documentId)
|
||||||
this.$emit('getUploadDetail', response.content.content)
|
} else {
|
||||||
// 表单内容
|
// 向上导入documentId
|
||||||
this.$emit('getForm', this.form, this.$refs.processForm)
|
this.$emit('getDocumentId', this.documentId)
|
||||||
if (this.form.beMinerU) {
|
// 文件内容
|
||||||
this.$emit('beMinerU', true)
|
this.$emit('getUploadDetail', response.content.content)
|
||||||
|
// 表单内容
|
||||||
|
this.$emit('getForm', this.form, this.$refs.processForm)
|
||||||
|
if (this.form.beMinerU) {
|
||||||
|
this.$emit('beMinerU', true)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleDragOver() {
|
handleDragOver() {
|
||||||
|
|||||||
@@ -73,7 +73,7 @@
|
|||||||
type="primary"
|
type="primary"
|
||||||
size="medium"
|
size="medium"
|
||||||
class="line-button"
|
class="line-button"
|
||||||
@click="fetchApi"
|
@click="oneClickAction"
|
||||||
>
|
>
|
||||||
<img :src="magic" alt="" style="width: 12px;" />
|
<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 SplitConfig from '@/views/knowledge/detail/components/split/Index.vue'
|
||||||
import Words from '@/views/knowledge/detail/components/words/Index.vue'
|
import Words from '@/views/knowledge/detail/components/words/Index.vue'
|
||||||
import magic from '@/assets/images/konwledge/magic.png'
|
import magic from '@/assets/images/konwledge/magic.png'
|
||||||
|
import { directEmbedding } from '@/api/generatedApi'
|
||||||
// import StepC
|
// import StepC
|
||||||
export default {
|
export default {
|
||||||
name: 'create',
|
name: 'create',
|
||||||
@@ -142,7 +143,20 @@ export default {
|
|||||||
this.saveMarkDown()
|
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) {
|
getDocumentId(id) {
|
||||||
this.documentId = id
|
this.documentId = id
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -59,6 +59,13 @@ module.exports = {
|
|||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
'^/jifen': ''
|
'^/jifen': ''
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
'/zixi': {
|
||||||
|
target: 'http://192.168.8.165:7196/',
|
||||||
|
changeOrigin: true,
|
||||||
|
pathRewrite: {
|
||||||
|
'^/jifen': ''
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user