mirror of
http://112.124.100.131/ebiz-ai/ebiz-ai-knowledge-manage.git
synced 2025-12-10 19:36:50 +08:00
独立知识挖掘功能
This commit is contained in:
@@ -1,11 +1,11 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
presets: ['@vue/app'],
|
presets: ['@vue/app'],
|
||||||
plugins: [
|
plugins: [
|
||||||
[
|
// [
|
||||||
'transform-remove-console',
|
// 'transform-remove-console',
|
||||||
{
|
// {
|
||||||
exclude: ['warn', 'error'] // 可选:保留 warn 和 error
|
// exclude: ['warn', 'error'] // 可选:保留 warn 和 error
|
||||||
}
|
// }
|
||||||
]
|
// ]
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ export function docManageDataset(data) {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//单一知识库详情
|
//单一知识库详情
|
||||||
export function getDatasetById(params) {
|
export function getDatasetById(params) {
|
||||||
return request({
|
return request({
|
||||||
@@ -18,6 +19,7 @@ export function getDatasetById(params) {
|
|||||||
noLoading: true
|
noLoading: true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 知识库内容修改
|
// 知识库内容修改
|
||||||
export function datasetUpdate(data) {
|
export function datasetUpdate(data) {
|
||||||
return request({
|
return request({
|
||||||
@@ -27,6 +29,7 @@ export function datasetUpdate(data) {
|
|||||||
noLoading: true
|
noLoading: true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 知识库新增
|
// 知识库新增
|
||||||
export function datasetCreate(data) {
|
export function datasetCreate(data) {
|
||||||
return request({
|
return request({
|
||||||
@@ -53,6 +56,7 @@ export function datasetDelete(data) {
|
|||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function datasetsExPages(data) {
|
export function datasetsExPages(data) {
|
||||||
return request({
|
return request({
|
||||||
url: getUrl(`/datasetDocumentEx/page`),
|
url: getUrl(`/datasetDocumentEx/page`),
|
||||||
@@ -77,6 +81,7 @@ export function minerUBbox(params) {
|
|||||||
params: params
|
params: params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//minerU 重试
|
//minerU 重试
|
||||||
export function minerURetry(params) {
|
export function minerURetry(params) {
|
||||||
return request({
|
return request({
|
||||||
@@ -86,6 +91,7 @@ export function minerURetry(params) {
|
|||||||
noLoading: true
|
noLoading: true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//minerU 获取文档处理状态
|
//minerU 获取文档处理状态
|
||||||
export function minerUQuery(params) {
|
export function minerUQuery(params) {
|
||||||
return request({
|
return request({
|
||||||
@@ -95,6 +101,7 @@ export function minerUQuery(params) {
|
|||||||
noLoading: true
|
noLoading: true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//minerU 获取markdown
|
//minerU 获取markdown
|
||||||
export function minerUMarkDown(params) {
|
export function minerUMarkDown(params) {
|
||||||
return getUrl(`/document/mineru/md?documentId=${params.documentId}`)
|
return getUrl(`/document/mineru/md?documentId=${params.documentId}`)
|
||||||
@@ -112,6 +119,7 @@ export function minerUMarkDownUpdate(data) {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 规则分页
|
// 规则分页
|
||||||
export function getRulesPage(data) {
|
export function getRulesPage(data) {
|
||||||
return request({
|
return request({
|
||||||
@@ -120,6 +128,7 @@ export function getRulesPage(data) {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getRulesList(data) {
|
export function getRulesList(data) {
|
||||||
return request({
|
return request({
|
||||||
url: getUrl(`/rules/list`),
|
url: getUrl(`/rules/list`),
|
||||||
@@ -127,6 +136,7 @@ export function getRulesList(data) {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 拆分规则-新增
|
// 拆分规则-新增
|
||||||
export function addRuleSplit(data) {
|
export function addRuleSplit(data) {
|
||||||
return request({
|
return request({
|
||||||
@@ -135,6 +145,7 @@ export function addRuleSplit(data) {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 拆分规则-详情
|
// 拆分规则-详情
|
||||||
export function getRuleDetail(id) {
|
export function getRuleDetail(id) {
|
||||||
return request({
|
return request({
|
||||||
@@ -142,6 +153,7 @@ export function getRuleDetail(id) {
|
|||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 拆分规则-编辑
|
// 拆分规则-编辑
|
||||||
export function updateRuleSplit(data) {
|
export function updateRuleSplit(data) {
|
||||||
return request({
|
return request({
|
||||||
@@ -150,6 +162,7 @@ export function updateRuleSplit(data) {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 拆分规则-下一步校验
|
// 拆分规则-下一步校验
|
||||||
export function execSplit(data) {
|
export function execSplit(data) {
|
||||||
return request({
|
return request({
|
||||||
@@ -158,6 +171,7 @@ export function execSplit(data) {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 拆分结果预览
|
// 拆分结果预览
|
||||||
export function splitResultPreview(params) {
|
export function splitResultPreview(params) {
|
||||||
return request({
|
return request({
|
||||||
@@ -166,6 +180,7 @@ export function splitResultPreview(params) {
|
|||||||
params: params
|
params: params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 题词-新增
|
// 题词-新增
|
||||||
export function addRuleExtract(data) {
|
export function addRuleExtract(data) {
|
||||||
return request({
|
return request({
|
||||||
@@ -174,6 +189,7 @@ export function addRuleExtract(data) {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 题词-编辑
|
// 题词-编辑
|
||||||
export function updateRuleExtractSplit(data) {
|
export function updateRuleExtractSplit(data) {
|
||||||
return request({
|
return request({
|
||||||
@@ -182,6 +198,7 @@ export function updateRuleExtractSplit(data) {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 题词-下一步校验
|
// 题词-下一步校验
|
||||||
export function execExtract(data) {
|
export function execExtract(data) {
|
||||||
return request({
|
return request({
|
||||||
@@ -240,6 +257,7 @@ export function uploadFileByCustom(data) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/*一键上传*/
|
/*一键上传*/
|
||||||
export function directEmbedding(data) {
|
export function directEmbedding(data) {
|
||||||
return request({
|
return request({
|
||||||
@@ -274,6 +292,7 @@ export function datasetQuerySegments(data) {
|
|||||||
// 知识文档详情查询(包含json的题词和拆分规则)
|
// 知识文档详情查询(包含json的题词和拆分规则)
|
||||||
export function datasetDocumentEx(data) {
|
export function datasetDocumentEx(data) {
|
||||||
return request({
|
return request({
|
||||||
|
noLoading: true,
|
||||||
url: getUrl(`/datasetDocumentEx/query`),
|
url: getUrl(`/datasetDocumentEx/query`),
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: data
|
params: data
|
||||||
@@ -288,6 +307,7 @@ export function getTaskDetail(params) {
|
|||||||
params
|
params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 知识库文件删除
|
// 知识库文件删除
|
||||||
export function datasetQueryDelete(data) {
|
export function datasetQueryDelete(data) {
|
||||||
return request({
|
return request({
|
||||||
@@ -323,6 +343,7 @@ export function getMd_info(params) {
|
|||||||
noLoading: true
|
noLoading: true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function mdIndex(params) {
|
export function mdIndex(params) {
|
||||||
return request({
|
return request({
|
||||||
url: getUrl(`/document/mineru/md`),
|
url: getUrl(`/document/mineru/md`),
|
||||||
@@ -341,6 +362,7 @@ export function embedding(data) {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询知识库元数据列表
|
// 查询知识库元数据列表
|
||||||
export function getMetadataList(data) {
|
export function getMetadataList(data) {
|
||||||
return request({
|
return request({
|
||||||
@@ -350,6 +372,7 @@ export function getMetadataList(data) {
|
|||||||
noLoading: true
|
noLoading: true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增元数据
|
// 新增元数据
|
||||||
export function createMetadata(data) {
|
export function createMetadata(data) {
|
||||||
return request({
|
return request({
|
||||||
@@ -358,6 +381,7 @@ export function createMetadata(data) {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改元数据
|
// 修改元数据
|
||||||
export function updateMetadata(data) {
|
export function updateMetadata(data) {
|
||||||
return request({
|
return request({
|
||||||
@@ -366,6 +390,7 @@ export function updateMetadata(data) {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除元数据
|
// 删除元数据
|
||||||
export function deleteMetadata(data) {
|
export function deleteMetadata(data) {
|
||||||
return request({
|
return request({
|
||||||
@@ -374,6 +399,7 @@ export function deleteMetadata(data) {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 启用/禁用内置元数据
|
// 启用/禁用内置元数据
|
||||||
export function builtInEnableMetadata(data) {
|
export function builtInEnableMetadata(data) {
|
||||||
return request({
|
return request({
|
||||||
@@ -382,6 +408,7 @@ export function builtInEnableMetadata(data) {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询文档元数据列表
|
// 查询文档元数据列表
|
||||||
export function getMetaDataDocList(data) {
|
export function getMetaDataDocList(data) {
|
||||||
return request({
|
return request({
|
||||||
@@ -390,6 +417,7 @@ export function getMetaDataDocList(data) {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增文档元数据
|
// 新增文档元数据
|
||||||
export function addMetaDataDoc(data) {
|
export function addMetaDataDoc(data) {
|
||||||
return request({
|
return request({
|
||||||
@@ -398,6 +426,7 @@ export function addMetaDataDoc(data) {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除文档元数据
|
// 删除文档元数据
|
||||||
export function deleteMetaDataDoc(data) {
|
export function deleteMetaDataDoc(data) {
|
||||||
return request({
|
return request({
|
||||||
@@ -406,6 +435,7 @@ export function deleteMetaDataDoc(data) {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 编辑文档元数据
|
// 编辑文档元数据
|
||||||
export function updateMetaDataDoc(data) {
|
export function updateMetaDataDoc(data) {
|
||||||
return request({
|
return request({
|
||||||
@@ -414,6 +444,7 @@ export function updateMetaDataDoc(data) {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function uploadImage(data) {
|
export function uploadImage(data) {
|
||||||
return request({
|
return request({
|
||||||
url: getUrl(`/image/upload`),
|
url: getUrl(`/image/upload`),
|
||||||
@@ -439,6 +470,7 @@ export function segmentDelete(data) {
|
|||||||
params: data
|
params: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增分段
|
// 新增分段
|
||||||
export function segmentCreate(data) {
|
export function segmentCreate(data) {
|
||||||
return request({
|
return request({
|
||||||
@@ -453,6 +485,7 @@ export function segmentTemplate(model) {
|
|||||||
// model 分别时 qa general
|
// model 分别时 qa general
|
||||||
return getUrl(`/template/download/${model}`)
|
return getUrl(`/template/download/${model}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 导入分段
|
// 导入分段
|
||||||
export function importSegment(data) {
|
export function importSegment(data) {
|
||||||
return request({
|
return request({
|
||||||
@@ -461,6 +494,7 @@ export function importSegment(data) {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 导出分段
|
// 导出分段
|
||||||
|
|
||||||
export function exportSegment(data) {
|
export function exportSegment(data) {
|
||||||
@@ -478,6 +512,7 @@ export function switchStatus(data) {
|
|||||||
noLoading: true
|
noLoading: true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 知识库关联智能体
|
// 知识库关联智能体
|
||||||
export function relatedApps(data) {
|
export function relatedApps(data) {
|
||||||
return request({
|
return request({
|
||||||
@@ -486,6 +521,7 @@ export function relatedApps(data) {
|
|||||||
params: data
|
params: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 下载知识原文件
|
// 下载知识原文件
|
||||||
export function downloadOriginalFile(data) {
|
export function downloadOriginalFile(data) {
|
||||||
return getUrl(`/datasetDocumentEx/download/original_file?documentId=` + data)
|
return getUrl(`/datasetDocumentEx/download/original_file?documentId=` + data)
|
||||||
|
|||||||
@@ -1,129 +1,129 @@
|
|||||||
import layout from "@/views/app/layout/layout.vue";
|
import layout from '@/views/app/layout/layout.vue'
|
||||||
import redirect from "@/views/app/redirect/index.vue";
|
import redirect from '@/views/app/redirect/index.vue'
|
||||||
|
|
||||||
const home = () => import("@/views/app/Home");
|
const home = () => import('@/views/app/Home')
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
{
|
{
|
||||||
path: "/",
|
path: '/',
|
||||||
component: layout,
|
component: layout,
|
||||||
redirect: "/home",
|
redirect: '/home',
|
||||||
name: "home",
|
name: 'home',
|
||||||
meta: {
|
meta: {
|
||||||
title: "主页",
|
title: '主页',
|
||||||
icon: "icon-zhuye",
|
icon: 'icon-zhuye',
|
||||||
affix: true
|
affix: true
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: "/home",
|
path: '/home',
|
||||||
name: "home-page",
|
name: 'home-page',
|
||||||
component: home,
|
component: home,
|
||||||
meta: {
|
meta: {
|
||||||
title: "主页",
|
title: '主页',
|
||||||
icon: "icon-zhuye"
|
icon: 'icon-zhuye'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/knowledge",
|
path: '/knowledge',
|
||||||
name: "knowledge",
|
name: 'knowledge',
|
||||||
component: layout,
|
component: layout,
|
||||||
redirect: "/knowledge/list",
|
redirect: '/knowledge/list',
|
||||||
meta: {
|
meta: {
|
||||||
title: "AI知识库",
|
title: 'AI知识库',
|
||||||
icon: "el-icon-s-home",
|
icon: 'el-icon-s-home',
|
||||||
affix: true
|
affix: true
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: "/knowledge/list",
|
path: '/knowledge/list',
|
||||||
name: "knowledge-list",
|
name: 'knowledge-list',
|
||||||
component: redirect,
|
component: redirect,
|
||||||
// redirect: '/knowledge/list',
|
// redirect: '/knowledge/list',
|
||||||
meta: {
|
meta: {
|
||||||
title: "知识库",
|
title: '知识库',
|
||||||
icon: "icon-dengpao1",
|
icon: 'icon-dengpao1',
|
||||||
affix: true
|
affix: true
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: "/knowledge/list",
|
path: '/knowledge/list',
|
||||||
name: "knowledge-home",
|
name: 'knowledge-home',
|
||||||
component: () => import("@/views/knowledge/index.vue"),
|
component: () => import('@/views/knowledge/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
breadcrumb: false,
|
breadcrumb: false,
|
||||||
title: "知识库",
|
title: '知识库',
|
||||||
icon: "el-icon-s-home"
|
icon: 'el-icon-s-home'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/knowledge/detail",
|
path: '/knowledge/detail',
|
||||||
name: "knowledge-detail",
|
name: 'knowledge-detail',
|
||||||
component: redirect,
|
component: redirect,
|
||||||
redirect: "/knowledge/detail",
|
redirect: '/knowledge/detail',
|
||||||
hidden: true,
|
hidden: true,
|
||||||
meta: {
|
meta: {
|
||||||
title: "知识库详情",
|
title: '知识库详情',
|
||||||
icon: "el-icon-s-home"
|
icon: 'el-icon-s-home'
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: "/knowledge/knowledge-create",
|
path: '/knowledge/knowledge-create',
|
||||||
name: "knowledge-create",
|
name: 'knowledge-create',
|
||||||
component: () =>
|
component: () =>
|
||||||
import("@/views/knowledge/detail/components/knowledgeForm.vue"),
|
import('@/views/knowledge/detail/components/knowledgeForm.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
breadcrumb: false,
|
breadcrumb: false,
|
||||||
title: "知识库详情",
|
title: '知识库详情',
|
||||||
icon: "el-icon-s-home"
|
icon: 'el-icon-s-home'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
path: "/knowledge/detail",
|
path: '/knowledge/detail',
|
||||||
name: "knowledge-detail-page",
|
name: 'knowledge-detail-page',
|
||||||
component: () => import("@/views/knowledge/detail/index.vue"),
|
component: () => import('@/views/knowledge/detail/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
breadcrumb: false,
|
breadcrumb: false,
|
||||||
title: "知识库详情",
|
title: '知识库详情',
|
||||||
icon: "el-icon-s-home"
|
icon: 'el-icon-s-home'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/knowledge/detail/create",
|
path: '/knowledge/detail/create',
|
||||||
name: "knowledge-create-page",
|
name: 'knowledge-create-page',
|
||||||
component: () => import("@/views/knowledge/detail/create.vue"),
|
component: () => import('@/views/knowledge/detail/create.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
title: "知识库新增",
|
title: '知识库新增',
|
||||||
icon: "el-icon-s-home"
|
icon: 'el-icon-s-home'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/knowledge/detail/customWord",
|
path: '/knowledge/detail/customWord',
|
||||||
name: "custom-word",
|
name: 'custom-word',
|
||||||
component: () => import("@/views/knowledge/detail/components/words/WordIndex.vue")
|
component: () => import('@/views/knowledge/detail/components/words/WordIndex.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/knowledge/reviewKnowledge",
|
path: '/knowledge/reviewKnowledge',
|
||||||
name: "knowledge-review-knowledge",
|
name: 'knowledge-review-knowledge',
|
||||||
component: () =>
|
component: () =>
|
||||||
import("@/views/knowledge/detail/reviewKnowledge.vue"),
|
import('@/views/knowledge/detail/reviewKnowledge.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
title: "直接上传至知识库",
|
title: '直接上传至知识库',
|
||||||
icon: "el-icon-s-home"
|
icon: 'el-icon-s-home'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
path: "/knowledge/detail/segments",
|
path: '/knowledge/detail/segments',
|
||||||
name: "knowledge-segments",
|
name: 'knowledge-segments',
|
||||||
component: () =>
|
component: () =>
|
||||||
import("@/views/knowledge/detail/components/viewSegments/index.vue"),
|
import('@/views/knowledge/detail/components/viewSegments/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
title: "分段查看",
|
title: '分段查看',
|
||||||
icon: "el-icon-s-home"
|
icon: 'el-icon-s-home'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -131,58 +131,58 @@ export default [
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/knowledge/track",
|
path: '/knowledge/track',
|
||||||
name: "knowledge-track",
|
name: 'knowledge-track',
|
||||||
component: redirect,
|
component: redirect,
|
||||||
redirect: "/knowledge/track",
|
redirect: '/knowledge/track',
|
||||||
meta: {
|
meta: {
|
||||||
title: "任务轨迹",
|
title: '任务轨迹',
|
||||||
icon: "icon-dingwei",
|
icon: 'icon-dingwei',
|
||||||
affix: true
|
affix: true
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: "/knowledge/track",
|
path: '/knowledge/track',
|
||||||
name: "track-page",
|
name: 'track-page',
|
||||||
component: () => import("@/views/track/Index.vue"),
|
component: () => import('@/views/track/Index.vue'),
|
||||||
|
|
||||||
meta: {
|
meta: {
|
||||||
breadcrumb: false,
|
breadcrumb: false,
|
||||||
title: "任务轨迹",
|
title: '任务轨迹',
|
||||||
icon: "icon-dingwei"
|
icon: 'icon-dingwei'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/rules",
|
path: '/rules',
|
||||||
name: "rules-page",
|
name: 'rules-page',
|
||||||
component: () => import("@/views/rules/Index.vue"),
|
component: () => import('@/views/rules/Index.vue'),
|
||||||
hidden: true,
|
hidden: true,
|
||||||
meta: {
|
meta: {
|
||||||
title: "规则管理",
|
title: '规则管理',
|
||||||
|
|
||||||
icon: "el-icon-s-home"
|
icon: 'el-icon-s-home'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/knowledge/rule",
|
path: '/knowledge/rule',
|
||||||
name: "knowledge-rule",
|
name: 'knowledge-rule',
|
||||||
component: redirect,
|
component: redirect,
|
||||||
redirect: "/knowledge/rule",
|
redirect: '/knowledge/rule',
|
||||||
meta: {
|
meta: {
|
||||||
title: "规则管理",
|
title: '规则管理',
|
||||||
icon: "icon-guizeshezhi",
|
icon: 'icon-guizeshezhi',
|
||||||
affix: true
|
affix: true
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: "/knowledge/rule",
|
path: '/knowledge/rule',
|
||||||
name: "rule-page",
|
name: 'rule-page',
|
||||||
component: () => import("@/views/rules/Index.vue"),
|
component: () => import('@/views/rules/Index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
title: "规则管理",
|
title: '规则管理',
|
||||||
icon: "el-icon-s-home"
|
icon: 'el-icon-s-home'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -191,103 +191,103 @@ export default [
|
|||||||
},
|
},
|
||||||
// 智能体详情
|
// 智能体详情
|
||||||
{
|
{
|
||||||
path: "/agent",
|
path: '/agent',
|
||||||
name: "agent",
|
name: 'agent',
|
||||||
component: layout,
|
component: layout,
|
||||||
redirect: "/agent/:thirdAppId/workflow",
|
redirect: '/agent/:thirdAppId/workflow',
|
||||||
meta: {
|
meta: {
|
||||||
title: "智能体",
|
title: '智能体',
|
||||||
icon: "icon-notebook",
|
icon: 'icon-notebook',
|
||||||
affix: true
|
affix: true
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: "/agent/:thirdAppId/workflow",
|
path: '/agent/:thirdAppId/workflow',
|
||||||
name: "agent-workflow",
|
name: 'agent-workflow',
|
||||||
component: () => import("@/views/agent/views/workflow/index.vue"),
|
component: () => import('@/views/agent/views/workflow/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
title: "agent",
|
title: 'agent',
|
||||||
icon: "icon-notebook"
|
icon: 'icon-notebook'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/system",
|
path: '/system',
|
||||||
name: "system",
|
name: 'system',
|
||||||
component: layout,
|
component: layout,
|
||||||
redirect: "/system/user",
|
redirect: '/system/user',
|
||||||
meta: {
|
meta: {
|
||||||
title: "系统管理",
|
title: '系统管理',
|
||||||
icon: "el-icon-setting",
|
icon: 'el-icon-setting',
|
||||||
affix: true
|
affix: true
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: "/system/user",
|
path: '/system/user',
|
||||||
name: "system-user",
|
name: 'system-user',
|
||||||
component: () => import("@/views/system/user/index.vue"),
|
component: () => import('@/views/system/user/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
title: "用户管理",
|
title: '用户管理',
|
||||||
icon: "el-icon-user"
|
icon: 'el-icon-user'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/system/menu",
|
path: '/system/menu',
|
||||||
name: "system-menu",
|
name: 'system-menu',
|
||||||
component: () => import("@/views/system/menu/index.vue"),
|
component: () => import('@/views/system/menu/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
title: "菜单管理",
|
title: '菜单管理',
|
||||||
icon: "el-icon-s-tools"
|
icon: 'el-icon-s-tools'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/system/role",
|
path: '/system/role',
|
||||||
name: "system-role",
|
name: 'system-role',
|
||||||
component: () => import("@/views/system/role/index.vue"),
|
component: () => import('@/views/system/role/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
title: "角色管理",
|
title: '角色管理',
|
||||||
icon: "el-icon-s-custom"
|
icon: 'el-icon-s-custom'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
path: "/intelligentAgent",
|
path: '/intelligentAgent',
|
||||||
name: "intelligentAgent",
|
name: 'intelligentAgent',
|
||||||
component: layout,
|
component: layout,
|
||||||
redirect: "/intelligentAgent/list",
|
redirect: '/intelligentAgent/list',
|
||||||
meta: {
|
meta: {
|
||||||
title: "AI智能体",
|
title: 'AI智能体',
|
||||||
icon: "icon-notebook",
|
icon: 'icon-notebook',
|
||||||
affix: true
|
affix: true
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: "/intelligentAgent/list",
|
path: '/intelligentAgent/list',
|
||||||
name: "intelligentAgent-list",
|
name: 'intelligentAgent-list',
|
||||||
component: () => import("@/views/intelligent-agent/index.vue"),
|
component: () => import('@/views/intelligent-agent/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
title: "AI智能体",
|
title: 'AI智能体',
|
||||||
icon: "icon-notebook",
|
icon: 'icon-notebook',
|
||||||
accessToken: "",
|
accessToken: '',
|
||||||
refreshToken: ""
|
refreshToken: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/intelligentAgent/logs-overview",
|
path: '/intelligentAgent/logs-overview',
|
||||||
name: "intelligentAgent-logs-overview",
|
name: 'intelligentAgent-logs-overview',
|
||||||
component: () =>
|
component: () =>
|
||||||
import("@/views/intelligent-agent/children/Logs&overview/index.vue"),
|
import('@/views/intelligent-agent/children/Logs&overview/index.vue'),
|
||||||
hidden: true,
|
hidden: true,
|
||||||
meta: {
|
meta: {
|
||||||
title: "日志与监测",
|
title: '日志与监测',
|
||||||
icon: "icon-notebook",
|
icon: 'icon-notebook',
|
||||||
accessToken: "",
|
accessToken: '',
|
||||||
refreshToken: ""
|
refreshToken: ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
];
|
]
|
||||||
|
|||||||
@@ -52,13 +52,13 @@
|
|||||||
@click="handleConfirm"
|
@click="handleConfirm"
|
||||||
>下一步</el-button
|
>下一步</el-button
|
||||||
>
|
>
|
||||||
<el-button
|
<!-- <el-button-->
|
||||||
size="medium"
|
<!-- size="medium"-->
|
||||||
type="primary"
|
<!-- type="primary"-->
|
||||||
class="line-button"
|
<!-- class="line-button"-->
|
||||||
@click="emitKnowledgeDataset"
|
<!-- @click="emitKnowledgeDataset"-->
|
||||||
>直接上传至知识库</el-button
|
<!-- >直接上传至知识库</el-button-->
|
||||||
>
|
<!-- >-->
|
||||||
</span>
|
</span>
|
||||||
</r-dialog>
|
</r-dialog>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
title="题词结果预览"
|
title="题词结果预览"
|
||||||
:visible.sync="visible"
|
:visible.sync="visible"
|
||||||
width="700px"
|
width="700px"
|
||||||
|
@update:visible='handleClose'
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
>
|
>
|
||||||
<div class="preview-content">
|
<div class="preview-content">
|
||||||
|
|||||||
@@ -1,116 +1,160 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class='splitConfig mt20'>
|
<div class="splitConfig ">
|
||||||
<div v-if='!isRedig && digRes.length'>
|
<div v-if="!isRedig && digRes.length" style='overflow: auto'>
|
||||||
<div class='preview-content'>
|
<div class="preview-content">
|
||||||
<template v-if='digRes && digRes.length > 0'>
|
<template v-if="digRes && digRes.length > 0">
|
||||||
<r-table
|
<!-- <r-table-->
|
||||||
:columns='columns'
|
<!-- :columns="columns"-->
|
||||||
:data='digRes'
|
<!-- :data="digRes"-->
|
||||||
:deletion='false'
|
<!-- :deletion="false"-->
|
||||||
></r-table>
|
<!-- ></r-table>-->
|
||||||
|
<!-- <div :key="index" v-for="(item, index) in digRes">
|
||||||
|
<li>{{ item.attribute }} {{ item.attributeContent }}</li>
|
||||||
|
<li>{{ item.originalContent }}</li>
|
||||||
|
</div> -->
|
||||||
|
<div v-for="(item, index) in digRes" :key="index" class="digRes-item">
|
||||||
|
<div class="kv-line">
|
||||||
|
<span class="kv-key">{{ item.attribute }}</span>
|
||||||
|
<span class="kv-sep">:</span>
|
||||||
|
<span class="kv-value" v-if="!isEdit">{{
|
||||||
|
item.attributeContent
|
||||||
|
}}</span>
|
||||||
|
<el-input
|
||||||
|
v-else
|
||||||
|
v-model="item.attributeContent"
|
||||||
|
size="small"
|
||||||
|
style="width: 80%; display: inline-block;"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="origin-line">
|
||||||
|
<span class="origin-label">原始段落:</span>
|
||||||
|
<span class="origin-content">{{ item.originalContent }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<el-empty
|
<el-empty
|
||||||
v-else-if='!extractResults || extractResults.length === 0'
|
v-else-if="!extractResults || extractResults.length === 0"
|
||||||
description='暂无题词结果'
|
description="暂无题词结果"
|
||||||
></el-empty>
|
></el-empty>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<ul class='flex'>
|
<ul class="flex">
|
||||||
<!-- 自动题词 -->
|
<!-- 自动题词 -->
|
||||||
<li
|
<li
|
||||||
class='flex'
|
class="flex"
|
||||||
:class="activeIndex === index ? 'active' : ''"
|
:class="activeIndex === index ? 'active' : ''"
|
||||||
v-for='(item, index) in splitOptions'
|
v-for="(item, index) in splitOptions"
|
||||||
:key='index'
|
:key="index"
|
||||||
@click='handleClick(index)'
|
@click="handleClick(index)"
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
<svg
|
<svg
|
||||||
v-if='index === 0'
|
v-if="index === 0"
|
||||||
t='1744335709188'
|
t="1744335709188"
|
||||||
class='icon'
|
class="icon"
|
||||||
viewBox='0 0 1024 1024'
|
viewBox="0 0 1024 1024"
|
||||||
version='1.1'
|
version="1.1"
|
||||||
xmlns='http://www.w3.org/2000/svg'
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
p-id='2464'
|
p-id="2464"
|
||||||
width='32'
|
width="32"
|
||||||
height='32'
|
height="32"
|
||||||
>
|
>
|
||||||
<path
|
<path
|
||||||
d='M933.868272 511.691752a140.807706 140.807706 0 0 1 90.131728-131.067068 525.562914 525.562914 0 0 0-57.334136-138.64997 139.882962 139.882962 0 0 1-184.948826-184.948826A525.562914 525.562914 0 0 0 643.067068 0a140.376159 140.376159 0 0 1-262.134136 0A525.562914 525.562914 0 0 0 242.282962 57.334136a139.882962 139.882962 0 0 1-184.948826 184.948826A506.698134 506.698134 0 0 0 0 380.932932a140.376159 140.376159 0 0 1 0 262.134136 525.562914 525.562914 0 0 0 57.334136 138.64997 139.882962 139.882962 0 0 1 184.948826 184.948826 525.562914 525.562914 0 0 0 138.64997 57.334136 140.376159 140.376159 0 0 1 262.134136 0 525.562914 525.562914 0 0 0 138.64997-57.334136 139.882962 139.882962 0 0 1 184.948826-184.948826 506.698134 506.698134 0 0 0 57.334136-138.64997A140.807706 140.807706 0 0 1 933.868272 511.691752zM511.691752 652.437809A140.437809 140.437809 0 1 1 652.437809 511.691752 140.499458 140.499458 0 0 1 511.691752 652.437809z'
|
d="M933.868272 511.691752a140.807706 140.807706 0 0 1 90.131728-131.067068 525.562914 525.562914 0 0 0-57.334136-138.64997 139.882962 139.882962 0 0 1-184.948826-184.948826A525.562914 525.562914 0 0 0 643.067068 0a140.376159 140.376159 0 0 1-262.134136 0A525.562914 525.562914 0 0 0 242.282962 57.334136a139.882962 139.882962 0 0 1-184.948826 184.948826A506.698134 506.698134 0 0 0 0 380.932932a140.376159 140.376159 0 0 1 0 262.134136 525.562914 525.562914 0 0 0 57.334136 138.64997 139.882962 139.882962 0 0 1 184.948826 184.948826 525.562914 525.562914 0 0 0 138.64997 57.334136 140.376159 140.376159 0 0 1 262.134136 0 525.562914 525.562914 0 0 0 138.64997-57.334136 139.882962 139.882962 0 0 1 184.948826-184.948826 506.698134 506.698134 0 0 0 57.334136-138.64997A140.807706 140.807706 0 0 1 933.868272 511.691752zM511.691752 652.437809A140.437809 140.437809 0 1 1 652.437809 511.691752 140.499458 140.499458 0 0 1 511.691752 652.437809z"
|
||||||
fill='#1D85ED'
|
fill="#1D85ED"
|
||||||
p-id='2465'
|
p-id="2465"
|
||||||
></path>
|
></path>
|
||||||
</svg>
|
</svg>
|
||||||
<svg
|
<svg
|
||||||
v-if='index === 1'
|
v-if="index === 1"
|
||||||
t='1744335834635'
|
t="1744335834635"
|
||||||
class='icon'
|
class="icon"
|
||||||
viewBox='0 0 1024 1024'
|
viewBox="0 0 1024 1024"
|
||||||
version='1.1'
|
version="1.1"
|
||||||
xmlns='http://www.w3.org/2000/svg'
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
p-id='7994'
|
p-id="7994"
|
||||||
width='32'
|
width="32"
|
||||||
height='32'
|
height="32"
|
||||||
>
|
>
|
||||||
<path
|
<path
|
||||||
d='M746 181.1c10.3 0 19.4 6.1 23.3 15.6l1 2.3 1.2 2.2 110.4 210c2.9 8.6 0.9 18.3-5.3 25l-0.6 0.7-0.6 0.7-344.5 401.9c-6.4 6.7-14.1 7.7-18.2 7.7s-11.7-1-18.2-7.7L150.1 437.6l-0.6-0.7-0.6-0.7c-6.2-6.8-8.2-16.4-5.3-25l110.4-210 1.2-2.2 1-2.3c3.9-9.5 13.1-15.6 23.3-15.6H746m0-54.6H279.4c-32.3 0-61.4 19.5-73.8 49.3L93.8 388.7c-11.9 28.7-6 61.6 14.9 84.4l345.2 402.7c15.8 17.3 37.3 25.9 58.9 25.9 21.5 0 43-8.6 58.9-25.9l345.2-402.7c20.9-22.9 26.8-55.8 14.9-84.4l-112-212.9c-12.3-29.8-41.5-49.3-73.8-49.3z'
|
d="M746 181.1c10.3 0 19.4 6.1 23.3 15.6l1 2.3 1.2 2.2 110.4 210c2.9 8.6 0.9 18.3-5.3 25l-0.6 0.7-0.6 0.7-344.5 401.9c-6.4 6.7-14.1 7.7-18.2 7.7s-11.7-1-18.2-7.7L150.1 437.6l-0.6-0.7-0.6-0.7c-6.2-6.8-8.2-16.4-5.3-25l110.4-210 1.2-2.2 1-2.3c3.9-9.5 13.1-15.6 23.3-15.6H746m0-54.6H279.4c-32.3 0-61.4 19.5-73.8 49.3L93.8 388.7c-11.9 28.7-6 61.6 14.9 84.4l345.2 402.7c15.8 17.3 37.3 25.9 58.9 25.9 21.5 0 43-8.6 58.9-25.9l345.2-402.7c20.9-22.9 26.8-55.8 14.9-84.4l-112-212.9c-12.3-29.8-41.5-49.3-73.8-49.3z"
|
||||||
p-id='7995'
|
p-id="7995"
|
||||||
fill='#d81e06'
|
fill="#d81e06"
|
||||||
></path>
|
></path>
|
||||||
<path
|
<path
|
||||||
d='M513.9 524.6c-19.1 0-37.5-8.1-50.4-22.2l-97.7-106.7c-10.2-11.1-9.4-28.4 1.7-38.5 11.1-10.2 28.4-9.4 38.5 1.7l97.7 106.7c3.6 3.9 7.9 4.5 10.2 4.5 2.3 0 6.6-0.6 10.2-4.5l95.5-104.2c10.2-11.1 27.4-11.9 38.5-1.7 11.1 10.2 11.9 27.4 1.7 38.5l-95.5 104.2c-13 14.1-31.3 22.2-50.4 22.2z'
|
d="M513.9 524.6c-19.1 0-37.5-8.1-50.4-22.2l-97.7-106.7c-10.2-11.1-9.4-28.4 1.7-38.5 11.1-10.2 28.4-9.4 38.5 1.7l97.7 106.7c3.6 3.9 7.9 4.5 10.2 4.5 2.3 0 6.6-0.6 10.2-4.5l95.5-104.2c10.2-11.1 27.4-11.9 38.5-1.7 11.1 10.2 11.9 27.4 1.7 38.5l-95.5 104.2c-13 14.1-31.3 22.2-50.4 22.2z"
|
||||||
p-id='7996'
|
p-id="7996"
|
||||||
fill='#d81e06'
|
fill="#d81e06"
|
||||||
></path>
|
></path>
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
<div class='block'>
|
<div class="block">
|
||||||
<h3>{{ item.title }}</h3>
|
<h3>{{ item.title }}</h3>
|
||||||
<p class='tips'>{{ item.description }}</p>
|
<p class="tips">{{ item.description }}</p>
|
||||||
<p v-if='item.tip' class='tips'>{{ item.tip }}</p>
|
<p v-if="item.tip" class="tips">{{ item.tip }}</p>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<!-- 弹窗组件 -->
|
<!-- 弹窗组件 -->
|
||||||
<custom-split-dialog class='active' ref='customTable'>
|
<custom-split-dialog class="active" ref="customTable">
|
||||||
</custom-split-dialog>
|
</custom-split-dialog>
|
||||||
|
|
||||||
<!-- 添加题词预览组件 -->
|
<!-- 添加题词预览组件 -->
|
||||||
<extract-preview
|
<extract-preview
|
||||||
style='z-index: 2010'
|
style="z-index: 2010"
|
||||||
:visible.sync='previewVisible'
|
:visible.sync="previewVisible"
|
||||||
:extract-results='extractResults'
|
:extract-results="extractResults"
|
||||||
:is-auto-extract='activeIndex === 0'
|
:is-auto-extract="activeIndex === 0"
|
||||||
:loading='previewLoading'
|
:loading="previewLoading"
|
||||||
:documentList='documentList'
|
:documentList="documentList"
|
||||||
@confirm='handlePreviewConfirm'
|
@confirm="handlePreviewConfirm"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class='card-bottom text-right mt10'>
|
<div
|
||||||
<el-button size='medium' @click='redig'>重新挖掘</el-button>
|
class="card-bottom text-right mt10"
|
||||||
|
|
||||||
|
>
|
||||||
|
<el-button v-if="!isEdit" type="primary" size="medium" @click="handleEdit"
|
||||||
|
>编辑</el-button
|
||||||
|
>
|
||||||
|
<el-button v-else type="primary" size="medium" @click="handleSave"
|
||||||
|
>保存</el-button
|
||||||
|
>
|
||||||
|
<el-button v-if="isEdit" size="medium" @click="handleCancel"
|
||||||
|
>取消</el-button
|
||||||
|
>
|
||||||
|
<el-button type="primary" size="medium" @click="redig"
|
||||||
|
>重新挖掘</el-button
|
||||||
|
>
|
||||||
<el-button
|
<el-button
|
||||||
type='primary'
|
type="primary"
|
||||||
size='medium'
|
size="medium"
|
||||||
@click='nextStep(documentExtractId)'
|
@click="nextStep(documentExtractId, '3')"
|
||||||
>确定</el-button>
|
>直接上传至知识库
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
size="medium"
|
||||||
|
@click="nextStep(documentExtractId, '4')"
|
||||||
|
>结合拆分内容上传至知识库</el-button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import CustomSplitDialog from "./CustomWords.vue";
|
import CustomSplitDialog from './CustomWords.vue'
|
||||||
import ExtractPreview from "./ExtractPreview.vue";
|
import ExtractPreview from './ExtractPreview.vue'
|
||||||
import {
|
import {
|
||||||
execExtract,
|
execExtract,
|
||||||
|
extractUpdate,
|
||||||
getExtractResultList,
|
getExtractResultList,
|
||||||
saveContentToDocument
|
saveContentToDocument
|
||||||
} from "@/api/generatedApi";
|
} from '@/api/generatedApi'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "splitConfig",
|
name: 'splitConfig',
|
||||||
components: {
|
components: {
|
||||||
CustomSplitDialog,
|
CustomSplitDialog,
|
||||||
ExtractPreview
|
ExtractPreview
|
||||||
@@ -124,25 +168,27 @@ export default {
|
|||||||
previewLoading: false,
|
previewLoading: false,
|
||||||
splitOptions: [
|
splitOptions: [
|
||||||
{
|
{
|
||||||
icon: "el-icon-setting",
|
icon: 'el-icon-setting',
|
||||||
title: "立即挖掘",
|
title: '立即挖掘',
|
||||||
description:
|
description:
|
||||||
"使用系统默认的题词方式,适合新手或紧急任务,直接使用系统预设题词规则处理文本。",
|
'使用系统默认的题词方式,适合新手或紧急任务,直接使用系统预设题词规则处理文本。',
|
||||||
tip: "提示:首次使用时建议先用自动题词测试效果,再决定是否调整。"
|
tip: '提示:首次使用时建议先用自动题词测试效果,再决定是否调整。'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: "el-icon-medal",
|
icon: 'el-icon-medal',
|
||||||
title: "自定义规则",
|
title: '自定义规则',
|
||||||
description:
|
description:
|
||||||
"使用自定义题词方式可以根据具体需求灵活调整文本分割逻辑。",
|
'使用自定义题词方式可以根据具体需求灵活调整文本分割逻辑。',
|
||||||
tip: "但需要权衡灵活性与复杂度,需要用户具备一定的题词经验。"
|
tip: '但需要权衡灵活性与复杂度,需要用户具备一定的题词经验。'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
isRedig: false,
|
isRedig: false,
|
||||||
// 题词结果
|
// 题词结果
|
||||||
digRes: [],
|
digRes: [],
|
||||||
documentId: ""
|
documentId: '',
|
||||||
};
|
isEdit: false,
|
||||||
|
digResBackup: []
|
||||||
|
}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
documentList: {
|
documentList: {
|
||||||
@@ -151,18 +197,18 @@ export default {
|
|||||||
},
|
},
|
||||||
documentExtractId: {
|
documentExtractId: {
|
||||||
type: String,
|
type: String,
|
||||||
default: () => ""
|
default: () => ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {},
|
watch: {},
|
||||||
filters: {},
|
filters: {},
|
||||||
methods: {
|
methods: {
|
||||||
handleClick(index) {
|
handleClick(index) {
|
||||||
this.activeIndex = index;
|
this.activeIndex = index
|
||||||
if (index === 1) {
|
if (index === 1) {
|
||||||
this.$refs.customTable.init();
|
this.$refs.customTable.init()
|
||||||
} else {
|
} else {
|
||||||
this.$refs.customTable.close();
|
this.$refs.customTable.close()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -171,53 +217,53 @@ export default {
|
|||||||
let params = {
|
let params = {
|
||||||
documentId: documentId,
|
documentId: documentId,
|
||||||
beAuto: this.activeIndex === 0
|
beAuto: this.activeIndex === 0
|
||||||
};
|
}
|
||||||
let splitDocIds = documentId.split(",");
|
let splitDocIds = documentId.split(',')
|
||||||
if (splitDocIds.length > 1) {
|
if (splitDocIds.length > 1) {
|
||||||
params.documentId = undefined;
|
params.documentId = undefined
|
||||||
params.documentIds = splitDocIds;
|
params.documentIds = splitDocIds
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!params.beAuto && this.$refs.customTable.ruleId) {
|
if (!params.beAuto && this.$refs.customTable.ruleId) {
|
||||||
params.rulesId = this.$refs.customTable.ruleId;
|
params.rulesId = this.$refs.customTable.ruleId
|
||||||
}
|
}
|
||||||
|
|
||||||
return params;
|
return params
|
||||||
},
|
},
|
||||||
|
|
||||||
// 执行题词操作
|
// 执行题词操作
|
||||||
async execExtractOperation(params) {
|
async execExtractOperation(params) {
|
||||||
if (!params.beAuto && !params.rulesId) {
|
if (!params.beAuto && !params.rulesId) {
|
||||||
this.$message.error("请勾选数据");
|
this.$message.error('请勾选数据')
|
||||||
return false;
|
return false
|
||||||
}
|
}
|
||||||
const res = await execExtract(params);
|
const res = await execExtract(params)
|
||||||
if (res.content.result !== "0") {
|
if (res.content.result !== '0') {
|
||||||
throw new Error(res.content.resultMessage || "执行题词失败");
|
throw new Error(res.content.resultMessage || '执行题词失败')
|
||||||
}
|
}
|
||||||
|
|
||||||
return res.content.content;
|
return res.content.content
|
||||||
},
|
},
|
||||||
|
|
||||||
// 显示预览
|
// 显示预览
|
||||||
showExtractPreview(results) {
|
showExtractPreview(results) {
|
||||||
this.extractResults = results || [];
|
this.extractResults = results || []
|
||||||
this.previewVisible = true;
|
this.previewVisible = true
|
||||||
},
|
},
|
||||||
|
|
||||||
// 获取题词结果列表 - 修改后的方法
|
// 获取题词结果列表 - 修改后的方法
|
||||||
async getExtractResultOperation(documentId) {
|
async getExtractResultOperation(documentId) {
|
||||||
if (documentId) {
|
if (documentId) {
|
||||||
this.documentId = this.documentExtractId;
|
this.documentId = this.documentExtractId
|
||||||
}
|
}
|
||||||
// this.previewLoading = true
|
// this.previewLoading = true
|
||||||
const params = { documentId: this.documentExtractId };
|
const params = { documentId: this.documentExtractId }
|
||||||
const res = await getExtractResultList(params);
|
const res = await getExtractResultList(params)
|
||||||
if (res.content.result !== "0") {
|
if (res.content.result !== '0') {
|
||||||
throw new Error(res.content.resultMessage || "获取题词结果失败");
|
throw new Error(res.content.resultMessage || '获取题词结果失败')
|
||||||
}
|
}
|
||||||
|
|
||||||
this.digRes = res.content.content || [];
|
this.digRes = res.content.content || []
|
||||||
|
|
||||||
// 显示预览弹窗
|
// 显示预览弹窗
|
||||||
// this.showExtractPreview(results)
|
// this.showExtractPreview(results)
|
||||||
@@ -225,13 +271,13 @@ export default {
|
|||||||
// 处理预览确认
|
// 处理预览确认
|
||||||
handlePreviewConfirm(extractResults) {
|
handlePreviewConfirm(extractResults) {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: "/knowledge/reviewKnowledge",
|
path: '/knowledge/reviewKnowledge',
|
||||||
query: {
|
query: {
|
||||||
documentId: this.documentId,
|
documentId: this.documentId,
|
||||||
datasetId: this.$route.query.datasetId,
|
datasetId: this.$route.query.datasetId,
|
||||||
active: "3"
|
active: '3'
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
|
|
||||||
// this.saveContentToDocumentOperation(this.documentId, extractResults)
|
// this.saveContentToDocumentOperation(this.documentId, extractResults)
|
||||||
},
|
},
|
||||||
@@ -244,28 +290,29 @@ export default {
|
|||||||
attribute: item.attribute,
|
attribute: item.attribute,
|
||||||
attributeContent: item.attributeContent
|
attributeContent: item.attributeContent
|
||||||
}))
|
}))
|
||||||
};
|
}
|
||||||
const res = await saveContentToDocument(params);
|
const res = await saveContentToDocument(params)
|
||||||
// 使用 push 的方式返回,防止出现页面异常跳转的问题
|
// 使用 push 的方式返回,防止出现页面异常跳转的问题
|
||||||
// this.$router.go(-1)
|
// this.$router.go(-1)
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: "/knowledge/detail",
|
path: '/knowledge/detail',
|
||||||
query: { ...this.$route.query }
|
query: { ...this.$route.query }
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 主方法
|
// 主方法
|
||||||
async nextStep(documentId) {
|
async nextStep(documentId, active) {
|
||||||
this.documentId = documentId;
|
this.documentId = documentId
|
||||||
|
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: "/knowledge/detail/create",
|
path: '/knowledge/detail/create',
|
||||||
query: {
|
query: {
|
||||||
...this.$route.query,
|
...this.$route.query,
|
||||||
documentId: this.documentId,
|
documentId: this.documentId,
|
||||||
activeLevel: this.isRedig ? 1 : 2
|
activeLevel: 2,
|
||||||
|
active: active
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
// return new Promise(async (resolve, reject) => {
|
// return new Promise(async (resolve, reject) => {
|
||||||
// try {
|
// try {
|
||||||
// // 1. 执行题词
|
// // 1. 执行题词
|
||||||
@@ -287,50 +334,81 @@ export default {
|
|||||||
// })
|
// })
|
||||||
},
|
},
|
||||||
redig() {
|
redig() {
|
||||||
this.isRedig = !this.isRedig;
|
this.$router.push({
|
||||||
|
name: 'custom-word',
|
||||||
|
query: { ...this.$router.query, documentId: this.documentExtractId }
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleEdit() {
|
||||||
|
this.isEdit = true
|
||||||
|
// 深拷贝一份备份
|
||||||
|
this.digResBackup = JSON.parse(JSON.stringify(this.digRes))
|
||||||
|
},
|
||||||
|
handleSave() {
|
||||||
|
this.isEdit = false
|
||||||
|
let params = {
|
||||||
|
documentId: this.documentExtractId,
|
||||||
|
resultDTOList: this.digRes.map(item => ({
|
||||||
|
id: item.id,
|
||||||
|
attribute: item.attribute,
|
||||||
|
attributeContent: item.attributeContent
|
||||||
|
}))
|
||||||
|
}
|
||||||
|
extractUpdate(params).then(res => {
|
||||||
|
if (res) {
|
||||||
|
this.$message.success('保存成功')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleCancel() {
|
||||||
|
this.isEdit = false
|
||||||
|
// 恢复原内容
|
||||||
|
this.digRes = JSON.parse(JSON.stringify(this.digResBackup))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getExtractResultOperation();
|
this.getExtractResultOperation()
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
},
|
},
|
||||||
|
mounted() {},
|
||||||
computed: {
|
computed: {
|
||||||
columns: vm => {
|
columns: vm => {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
prop: "attribute",
|
prop: 'attribute',
|
||||||
label: "属性",
|
label: '属性',
|
||||||
width: 90
|
width: 90
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: "attributeContent",
|
prop: 'attributeContent',
|
||||||
label: "题词内容",
|
label: '题词内容',
|
||||||
render: (h, p) => {
|
render: (h, p) => {
|
||||||
return h("el-input", {
|
return h('el-input', {
|
||||||
props: {
|
props: {
|
||||||
value: p.row.attributeContent,
|
value: p.row.attributeContent,
|
||||||
size: "medium",
|
size: 'medium',
|
||||||
disabled: !vm.isEdit
|
disabled: !vm.isEdit
|
||||||
},
|
},
|
||||||
on: {
|
on: {
|
||||||
input: value => {
|
input: value => {
|
||||||
p.row.attributeContent = value;
|
p.row.attributeContent = value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
];
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang='scss'>
|
<style scoped lang="scss">
|
||||||
@import '@/assets/sass/renderSass/theme.scss';
|
@import '@/assets/sass/renderSass/theme.scss';
|
||||||
|
|
||||||
.splitConfig {
|
.splitConfig {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
height: calc(100%);
|
||||||
.title {
|
.title {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
margin: 10px 0;
|
margin: 10px 0;
|
||||||
@@ -386,4 +464,30 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.digRes-item {
|
||||||
|
margin-bottom: 16px;
|
||||||
|
padding: 12px;
|
||||||
|
border: 1px solid #eee;
|
||||||
|
border-radius: 6px;
|
||||||
|
background: #fafbfc;
|
||||||
|
}
|
||||||
|
.kv-line {
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 15px;
|
||||||
|
margin-bottom: 6px;
|
||||||
|
}
|
||||||
|
.kv-key {
|
||||||
|
color: #1d85ed;
|
||||||
|
}
|
||||||
|
.kv-sep {
|
||||||
|
margin: 0 4px;
|
||||||
|
}
|
||||||
|
.origin-line {
|
||||||
|
color: #666;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
.origin-label {
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,116 +1,108 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class='splitConfig mt20'>
|
<div class="render-container">
|
||||||
<div v-if='!isRedig && digRes.length'>
|
<div class="splitConfig mt20">
|
||||||
<div class='preview-content'>
|
<div>
|
||||||
<template v-if='digRes && digRes.length > 0'>
|
<ul class="flex">
|
||||||
<r-table
|
<!-- 自动题词 -->
|
||||||
:columns='columns'
|
<li
|
||||||
:data='digRes'
|
class="flex"
|
||||||
:deletion='false'
|
:class="activeIndex === index ? 'active' : ''"
|
||||||
></r-table>
|
v-for="(item, index) in splitOptions"
|
||||||
</template>
|
:key="index"
|
||||||
<el-empty
|
@click="handleClick(index)"
|
||||||
v-else-if='!extractResults || extractResults.length === 0'
|
>
|
||||||
description='暂无题词结果'
|
<div>
|
||||||
></el-empty>
|
<svg
|
||||||
|
v-if="index === 0"
|
||||||
|
t="1744335709188"
|
||||||
|
class="icon"
|
||||||
|
viewBox="0 0 1024 1024"
|
||||||
|
version="1.1"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
p-id="2464"
|
||||||
|
width="32"
|
||||||
|
height="32"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
d="M933.868272 511.691752a140.807706 140.807706 0 0 1 90.131728-131.067068 525.562914 525.562914 0 0 0-57.334136-138.64997 139.882962 139.882962 0 0 1-184.948826-184.948826A525.562914 525.562914 0 0 0 643.067068 0a140.376159 140.376159 0 0 1-262.134136 0A525.562914 525.562914 0 0 0 242.282962 57.334136a139.882962 139.882962 0 0 1-184.948826 184.948826A506.698134 506.698134 0 0 0 0 380.932932a140.376159 140.376159 0 0 1 0 262.134136 525.562914 525.562914 0 0 0 57.334136 138.64997 139.882962 139.882962 0 0 1 184.948826 184.948826 525.562914 525.562914 0 0 0 138.64997 57.334136 140.376159 140.376159 0 0 1 262.134136 0 525.562914 525.562914 0 0 0 138.64997-57.334136 139.882962 139.882962 0 0 1 184.948826-184.948826 506.698134 506.698134 0 0 0 57.334136-138.64997A140.807706 140.807706 0 0 1 933.868272 511.691752zM511.691752 652.437809A140.437809 140.437809 0 1 1 652.437809 511.691752 140.499458 140.499458 0 0 1 511.691752 652.437809z"
|
||||||
|
fill="#1D85ED"
|
||||||
|
p-id="2465"
|
||||||
|
></path>
|
||||||
|
</svg>
|
||||||
|
<svg
|
||||||
|
v-if="index === 1"
|
||||||
|
t="1744335834635"
|
||||||
|
class="icon"
|
||||||
|
viewBox="0 0 1024 1024"
|
||||||
|
version="1.1"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
p-id="7994"
|
||||||
|
width="32"
|
||||||
|
height="32"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
d="M746 181.1c10.3 0 19.4 6.1 23.3 15.6l1 2.3 1.2 2.2 110.4 210c2.9 8.6 0.9 18.3-5.3 25l-0.6 0.7-0.6 0.7-344.5 401.9c-6.4 6.7-14.1 7.7-18.2 7.7s-11.7-1-18.2-7.7L150.1 437.6l-0.6-0.7-0.6-0.7c-6.2-6.8-8.2-16.4-5.3-25l110.4-210 1.2-2.2 1-2.3c3.9-9.5 13.1-15.6 23.3-15.6H746m0-54.6H279.4c-32.3 0-61.4 19.5-73.8 49.3L93.8 388.7c-11.9 28.7-6 61.6 14.9 84.4l345.2 402.7c15.8 17.3 37.3 25.9 58.9 25.9 21.5 0 43-8.6 58.9-25.9l345.2-402.7c20.9-22.9 26.8-55.8 14.9-84.4l-112-212.9c-12.3-29.8-41.5-49.3-73.8-49.3z"
|
||||||
|
p-id="7995"
|
||||||
|
fill="#d81e06"
|
||||||
|
></path>
|
||||||
|
<path
|
||||||
|
d="M513.9 524.6c-19.1 0-37.5-8.1-50.4-22.2l-97.7-106.7c-10.2-11.1-9.4-28.4 1.7-38.5 11.1-10.2 28.4-9.4 38.5 1.7l97.7 106.7c3.6 3.9 7.9 4.5 10.2 4.5 2.3 0 6.6-0.6 10.2-4.5l95.5-104.2c10.2-11.1 27.4-11.9 38.5-1.7 11.1 10.2 11.9 27.4 1.7 38.5l-95.5 104.2c-13 14.1-31.3 22.2-50.4 22.2z"
|
||||||
|
p-id="7996"
|
||||||
|
fill="#d81e06"
|
||||||
|
></path>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
<div class="block">
|
||||||
|
<h3>{{ item.title }}</h3>
|
||||||
|
<p class="tips">{{ item.description }}</p>
|
||||||
|
<p v-if="item.tip" class="tips">{{ item.tip }}</p>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<!-- 弹窗组件 -->
|
||||||
|
<custom-split-dialog class="active" ref="customTable">
|
||||||
|
</custom-split-dialog>
|
||||||
|
|
||||||
|
<!-- 添加题词预览组件 -->
|
||||||
|
<extract-preview
|
||||||
|
@update:visible="value => (previewVisible = value)"
|
||||||
|
style="z-index: 2010"
|
||||||
|
:visible.sync="previewVisible"
|
||||||
|
:extract-results="extractResults"
|
||||||
|
:is-auto-extract="activeIndex === 0"
|
||||||
|
:loading="previewLoading"
|
||||||
|
:documentList="documentList"
|
||||||
|
@confirm="handlePreviewConfirm"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="card-bottom text-right mt10">
|
||||||
<div v-else>
|
<el-button type="primary" size="medium" @click="onBack()">
|
||||||
<ul class='flex'>
|
取消
|
||||||
<!-- 自动题词 -->
|
</el-button>
|
||||||
<li
|
<el-button
|
||||||
class='flex'
|
type="primary"
|
||||||
:class="activeIndex === index ? 'active' : ''"
|
size="medium"
|
||||||
v-for='(item, index) in splitOptions'
|
@click="nextStep(documentExtractId)"
|
||||||
:key='index'
|
|
||||||
@click='handleClick(index)'
|
|
||||||
>
|
>
|
||||||
<div>
|
确定
|
||||||
<svg
|
</el-button>
|
||||||
v-if='index === 0'
|
</div>
|
||||||
t='1744335709188'
|
|
||||||
class='icon'
|
|
||||||
viewBox='0 0 1024 1024'
|
|
||||||
version='1.1'
|
|
||||||
xmlns='http://www.w3.org/2000/svg'
|
|
||||||
p-id='2464'
|
|
||||||
width='32'
|
|
||||||
height='32'
|
|
||||||
>
|
|
||||||
<path
|
|
||||||
d='M933.868272 511.691752a140.807706 140.807706 0 0 1 90.131728-131.067068 525.562914 525.562914 0 0 0-57.334136-138.64997 139.882962 139.882962 0 0 1-184.948826-184.948826A525.562914 525.562914 0 0 0 643.067068 0a140.376159 140.376159 0 0 1-262.134136 0A525.562914 525.562914 0 0 0 242.282962 57.334136a139.882962 139.882962 0 0 1-184.948826 184.948826A506.698134 506.698134 0 0 0 0 380.932932a140.376159 140.376159 0 0 1 0 262.134136 525.562914 525.562914 0 0 0 57.334136 138.64997 139.882962 139.882962 0 0 1 184.948826 184.948826 525.562914 525.562914 0 0 0 138.64997 57.334136 140.376159 140.376159 0 0 1 262.134136 0 525.562914 525.562914 0 0 0 138.64997-57.334136 139.882962 139.882962 0 0 1 184.948826-184.948826 506.698134 506.698134 0 0 0 57.334136-138.64997A140.807706 140.807706 0 0 1 933.868272 511.691752zM511.691752 652.437809A140.437809 140.437809 0 1 1 652.437809 511.691752 140.499458 140.499458 0 0 1 511.691752 652.437809z'
|
|
||||||
fill='#1D85ED'
|
|
||||||
p-id='2465'
|
|
||||||
></path>
|
|
||||||
</svg>
|
|
||||||
<svg
|
|
||||||
v-if='index === 1'
|
|
||||||
t='1744335834635'
|
|
||||||
class='icon'
|
|
||||||
viewBox='0 0 1024 1024'
|
|
||||||
version='1.1'
|
|
||||||
xmlns='http://www.w3.org/2000/svg'
|
|
||||||
p-id='7994'
|
|
||||||
width='32'
|
|
||||||
height='32'
|
|
||||||
>
|
|
||||||
<path
|
|
||||||
d='M746 181.1c10.3 0 19.4 6.1 23.3 15.6l1 2.3 1.2 2.2 110.4 210c2.9 8.6 0.9 18.3-5.3 25l-0.6 0.7-0.6 0.7-344.5 401.9c-6.4 6.7-14.1 7.7-18.2 7.7s-11.7-1-18.2-7.7L150.1 437.6l-0.6-0.7-0.6-0.7c-6.2-6.8-8.2-16.4-5.3-25l110.4-210 1.2-2.2 1-2.3c3.9-9.5 13.1-15.6 23.3-15.6H746m0-54.6H279.4c-32.3 0-61.4 19.5-73.8 49.3L93.8 388.7c-11.9 28.7-6 61.6 14.9 84.4l345.2 402.7c15.8 17.3 37.3 25.9 58.9 25.9 21.5 0 43-8.6 58.9-25.9l345.2-402.7c20.9-22.9 26.8-55.8 14.9-84.4l-112-212.9c-12.3-29.8-41.5-49.3-73.8-49.3z'
|
|
||||||
p-id='7995'
|
|
||||||
fill='#d81e06'
|
|
||||||
></path>
|
|
||||||
<path
|
|
||||||
d='M513.9 524.6c-19.1 0-37.5-8.1-50.4-22.2l-97.7-106.7c-10.2-11.1-9.4-28.4 1.7-38.5 11.1-10.2 28.4-9.4 38.5 1.7l97.7 106.7c3.6 3.9 7.9 4.5 10.2 4.5 2.3 0 6.6-0.6 10.2-4.5l95.5-104.2c10.2-11.1 27.4-11.9 38.5-1.7 11.1 10.2 11.9 27.4 1.7 38.5l-95.5 104.2c-13 14.1-31.3 22.2-50.4 22.2z'
|
|
||||||
p-id='7996'
|
|
||||||
fill='#d81e06'
|
|
||||||
></path>
|
|
||||||
</svg>
|
|
||||||
</div>
|
|
||||||
<div class='block'>
|
|
||||||
<h3>{{ item.title }}</h3>
|
|
||||||
<p class='tips'>{{ item.description }}</p>
|
|
||||||
<p v-if='item.tip' class='tips'>{{ item.tip }}</p>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<!-- 弹窗组件 -->
|
|
||||||
<custom-split-dialog class='active' ref='customTable'>
|
|
||||||
</custom-split-dialog>
|
|
||||||
|
|
||||||
<!-- 添加题词预览组件 -->
|
|
||||||
<extract-preview
|
|
||||||
style='z-index: 2010'
|
|
||||||
:visible.sync='previewVisible'
|
|
||||||
:extract-results='extractResults'
|
|
||||||
:is-auto-extract='activeIndex === 0'
|
|
||||||
:loading='previewLoading'
|
|
||||||
:documentList='documentList'
|
|
||||||
@confirm='handlePreviewConfirm'
|
|
||||||
/>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class='card-bottom text-right mt10'>
|
|
||||||
<el-button size='medium' @click='redig'>重新挖掘</el-button>
|
|
||||||
<el-button
|
|
||||||
type='primary'
|
|
||||||
size='medium'
|
|
||||||
@click='nextStep(documentExtractId)'
|
|
||||||
>确定</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import CustomSplitDialog from "./CustomWords.vue";
|
import CustomSplitDialog from './CustomWords.vue'
|
||||||
import ExtractPreview from "./ExtractPreview.vue";
|
import ExtractPreview from './ExtractPreview.vue'
|
||||||
import {
|
import {
|
||||||
|
datasetDocumentEx,
|
||||||
execExtract,
|
execExtract,
|
||||||
getExtractResultList,
|
getExtractResultList,
|
||||||
saveContentToDocument
|
saveContentToDocument
|
||||||
} from "@/api/generatedApi";
|
} from '@/api/generatedApi'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "splitConfig",
|
name: 'splitConfig',
|
||||||
components: {
|
components: {
|
||||||
CustomSplitDialog,
|
CustomSplitDialog,
|
||||||
ExtractPreview
|
ExtractPreview
|
||||||
@@ -124,25 +116,29 @@ export default {
|
|||||||
previewLoading: false,
|
previewLoading: false,
|
||||||
splitOptions: [
|
splitOptions: [
|
||||||
{
|
{
|
||||||
icon: "el-icon-setting",
|
icon: 'el-icon-setting',
|
||||||
title: "立即挖掘",
|
title: '立即挖掘',
|
||||||
description:
|
description:
|
||||||
"使用系统默认的题词方式,适合新手或紧急任务,直接使用系统预设题词规则处理文本。",
|
'使用系统默认的题词方式,适合新手或紧急任务,直接使用系统预设题词规则处理文本。',
|
||||||
tip: "提示:首次使用时建议先用自动题词测试效果,再决定是否调整。"
|
tip: '提示:首次使用时建议先用自动题词测试效果,再决定是否调整。'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: "el-icon-medal",
|
icon: 'el-icon-medal',
|
||||||
title: "自定义规则",
|
title: '自定义规则',
|
||||||
description:
|
description:
|
||||||
"使用自定义题词方式可以根据具体需求灵活调整文本分割逻辑。",
|
'使用自定义题词方式可以根据具体需求灵活调整文本分割逻辑。',
|
||||||
tip: "但需要权衡灵活性与复杂度,需要用户具备一定的题词经验。"
|
tip: '但需要权衡灵活性与复杂度,需要用户具备一定的题词经验。'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
isRedig: false,
|
isRedig: false,
|
||||||
// 题词结果
|
// 题词结果
|
||||||
digRes: [],
|
digRes: [],
|
||||||
documentId: ""
|
documentId: '',
|
||||||
};
|
extractStatus: {
|
||||||
|
timer: NaN,
|
||||||
|
status: undefined
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
documentList: {
|
documentList: {
|
||||||
@@ -151,18 +147,18 @@ export default {
|
|||||||
},
|
},
|
||||||
documentExtractId: {
|
documentExtractId: {
|
||||||
type: String,
|
type: String,
|
||||||
default: () => ""
|
default: () => ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {},
|
watch: {},
|
||||||
filters: {},
|
filters: {},
|
||||||
methods: {
|
methods: {
|
||||||
handleClick(index) {
|
handleClick(index) {
|
||||||
this.activeIndex = index;
|
this.activeIndex = index
|
||||||
if (index === 1) {
|
if (index === 1) {
|
||||||
this.$refs.customTable.init();
|
this.$refs.customTable.init()
|
||||||
} else {
|
} else {
|
||||||
this.$refs.customTable.close();
|
this.$refs.customTable.close()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -171,67 +167,64 @@ export default {
|
|||||||
let params = {
|
let params = {
|
||||||
documentId: documentId,
|
documentId: documentId,
|
||||||
beAuto: this.activeIndex === 0
|
beAuto: this.activeIndex === 0
|
||||||
};
|
}
|
||||||
let splitDocIds = documentId.split(",");
|
let splitDocIds = documentId.split(',')
|
||||||
if (splitDocIds.length > 1) {
|
if (splitDocIds.length > 1) {
|
||||||
params.documentId = undefined;
|
params.documentId = undefined
|
||||||
params.documentIds = splitDocIds;
|
params.documentIds = splitDocIds
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!params.beAuto && this.$refs.customTable.ruleId) {
|
if (!params.beAuto && this.$refs.customTable.ruleId) {
|
||||||
params.rulesId = this.$refs.customTable.ruleId;
|
params.rulesId = this.$refs.customTable.ruleId
|
||||||
}
|
}
|
||||||
|
|
||||||
return params;
|
return params
|
||||||
},
|
},
|
||||||
|
|
||||||
// 执行题词操作
|
// 执行题词操作
|
||||||
async execExtractOperation(params) {
|
async execExtractOperation(params) {
|
||||||
if (!params.beAuto && !params.rulesId) {
|
if (!params.beAuto && !params.rulesId) {
|
||||||
this.$message.error("请勾选数据");
|
this.$message.error('请勾选数据')
|
||||||
return false;
|
return false
|
||||||
}
|
}
|
||||||
const res = await execExtract(params);
|
const res = await execExtract(params)
|
||||||
if (res.content.result !== "0") {
|
if (res.content.result !== '0') {
|
||||||
throw new Error(res.content.resultMessage || "执行题词失败");
|
throw new Error(res.content.resultMessage || '执行题词失败')
|
||||||
}
|
}
|
||||||
|
|
||||||
return res.content.content;
|
return res.content.content
|
||||||
},
|
},
|
||||||
|
|
||||||
// 显示预览
|
// 显示预览
|
||||||
showExtractPreview(results) {
|
showExtractPreview(results) {
|
||||||
this.extractResults = results || [];
|
this.extractResults = results || []
|
||||||
this.previewVisible = true;
|
this.previewVisible = true
|
||||||
},
|
},
|
||||||
|
|
||||||
// 获取题词结果列表 - 修改后的方法
|
// 获取题词结果列表 - 修改后的方法
|
||||||
async getExtractResultOperation(documentId) {
|
async getExtractResultOperation() {
|
||||||
if (documentId) {
|
const params = { documentId: this.documentId }
|
||||||
this.documentId = this.documentExtractId;
|
const res = await getExtractResultList(params)
|
||||||
}
|
if (res.content.result !== '0') {
|
||||||
// this.previewLoading = true
|
throw new Error(res.content.resultMessage || '获取题词结果失败')
|
||||||
const params = { documentId: this.documentExtractId };
|
|
||||||
const res = await getExtractResultList(params);
|
|
||||||
if (res.content.result !== "0") {
|
|
||||||
throw new Error(res.content.resultMessage || "获取题词结果失败");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.digRes = res.content.content || [];
|
// this.digRes = res.content.content || []
|
||||||
|
const results = res.content.content || []
|
||||||
|
|
||||||
// 显示预览弹窗
|
// 显示预览弹窗
|
||||||
// this.showExtractPreview(results)
|
this.showExtractPreview(results)
|
||||||
},
|
},
|
||||||
// 处理预览确认
|
// 处理预览确认
|
||||||
handlePreviewConfirm(extractResults) {
|
handlePreviewConfirm(extractResults) {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: "/knowledge/reviewKnowledge",
|
path: '/knowledge/reviewKnowledge',
|
||||||
query: {
|
query: {
|
||||||
documentId: this.documentId,
|
documentId: this.documentId,
|
||||||
datasetId: this.$route.query.datasetId,
|
datasetId: this.$route.query.datasetId,
|
||||||
active: "3"
|
active: '3'
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
|
|
||||||
// this.saveContentToDocumentOperation(this.documentId, extractResults)
|
// this.saveContentToDocumentOperation(this.documentId, extractResults)
|
||||||
},
|
},
|
||||||
@@ -244,35 +237,31 @@ export default {
|
|||||||
attribute: item.attribute,
|
attribute: item.attribute,
|
||||||
attributeContent: item.attributeContent
|
attributeContent: item.attributeContent
|
||||||
}))
|
}))
|
||||||
};
|
}
|
||||||
const res = await saveContentToDocument(params);
|
await saveContentToDocument(params)
|
||||||
// 使用 push 的方式返回,防止出现页面异常跳转的问题
|
|
||||||
// this.$router.go(-1)
|
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: "/knowledge/detail",
|
path: '/knowledge/detail',
|
||||||
query: { ...this.$route.query }
|
query: { ...this.$route.query }
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 主方法
|
// 主方法
|
||||||
async nextStep(documentId) {
|
async nextStep() {
|
||||||
this.documentId = documentId;
|
this.documentId = this.$route.query.documentId
|
||||||
|
const params = this.buildExecExtractParams(this.documentId)
|
||||||
this.$router.push({
|
this.execExtractOperation(params).then(async res => {
|
||||||
path: "/knowledge/detail/create",
|
if (res) {
|
||||||
query: {
|
this.getExtractStatus()
|
||||||
...this.$route.query,
|
|
||||||
documentId: this.documentId,
|
|
||||||
activeLevel: this.isRedig ? 1 : 2
|
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
|
|
||||||
// return new Promise(async (resolve, reject) => {
|
// return new Promise(async (resolve, reject) => {
|
||||||
// try {
|
// try {
|
||||||
// // 1. 执行题词
|
// // 1. 执行题词
|
||||||
// const params = this.buildExecExtractParams(documentId)
|
// const params = this.buildExecExtractParams(this.documentId)
|
||||||
// this.execExtractOperation(params).then(async res => {
|
// this.execExtractOperation(params).then(async res => {
|
||||||
// if (res) {
|
// if (res) {
|
||||||
// await this.getExtractResultOperation(documentId)
|
// await this.getExtractResultOperation(this.documentId)
|
||||||
// // 显示预览弹窗
|
// // 显示预览弹窗
|
||||||
// // this.showExtractPreview(res)
|
// // this.showExtractPreview(res)
|
||||||
// }
|
// }
|
||||||
@@ -286,48 +275,80 @@ export default {
|
|||||||
// }
|
// }
|
||||||
// })
|
// })
|
||||||
},
|
},
|
||||||
redig() {
|
getExtractStatus() {
|
||||||
this.isRedig = !this.isRedig
|
if (this.extractStatus.timer) return
|
||||||
|
this.$notify({
|
||||||
|
title: '提示',
|
||||||
|
message: this.$createElement('i', {}, this.extractStatusResults)
|
||||||
|
})
|
||||||
|
this.extractStatus.timer = setInterval(async () => {
|
||||||
|
const { content } = await datasetDocumentEx({
|
||||||
|
documentId: this.documentId
|
||||||
|
}).content
|
||||||
|
this.extractStatus.status = content.extractStatus
|
||||||
|
if (
|
||||||
|
Number(content.extractStatus) === 1 ||
|
||||||
|
Number(content.extractStatus) === 2
|
||||||
|
) {
|
||||||
|
this.$notify({
|
||||||
|
title: '提示',
|
||||||
|
type: 'success',
|
||||||
|
message: this.$createElement('i', {}, this.extractStatusResults)
|
||||||
|
})
|
||||||
|
clearInterval(this.extractStatus.timer)
|
||||||
|
}
|
||||||
|
}, 1000)
|
||||||
|
this.onBack()
|
||||||
|
},
|
||||||
|
onBack() {
|
||||||
|
this.$router.history.go(-1)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
|
||||||
// this.getExtractResultOperation()
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
},
|
|
||||||
computed: {
|
computed: {
|
||||||
columns: vm => {
|
columns: vm => {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
prop: "attribute",
|
prop: 'attribute',
|
||||||
label: "属性",
|
label: '属性',
|
||||||
width: 90
|
width: 90
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: "attributeContent",
|
prop: 'attributeContent',
|
||||||
label: "题词内容",
|
label: '题词内容',
|
||||||
render: (h, p) => {
|
render: (h, p) => {
|
||||||
return h("el-input", {
|
return h('el-input', {
|
||||||
props: {
|
props: {
|
||||||
value: p.row.attributeContent,
|
value: p.row.attributeContent,
|
||||||
size: "medium",
|
size: 'medium',
|
||||||
disabled: !vm.isEdit
|
disabled: !vm.isEdit
|
||||||
},
|
},
|
||||||
on: {
|
on: {
|
||||||
input: value => {
|
input: value => {
|
||||||
p.row.attributeContent = value;
|
p.row.attributeContent = value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
];
|
]
|
||||||
|
},
|
||||||
|
extractStatusResults() {
|
||||||
|
const map = new Map([
|
||||||
|
[0, '相关数据信息还未执行'],
|
||||||
|
[1, '相关数据已经处理完成,请移步相关知识库查看'],
|
||||||
|
[2, '数据处理失败,请返回相关知识库重新处理相应内容'],
|
||||||
|
[3, '题词数据挖掘正在排队中,稍后将进行处理'],
|
||||||
|
[4, '题词数据挖掘正在处理中']
|
||||||
|
])
|
||||||
|
if (map.has(this.extractStatus.status))
|
||||||
|
return map.get(this.extractStatus.status)
|
||||||
|
return '数据正在处理中'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang='scss'>
|
<style scoped lang="scss">
|
||||||
@import '@/assets/sass/renderSass/theme.scss';
|
@import '@/assets/sass/renderSass/theme.scss';
|
||||||
|
|
||||||
.splitConfig {
|
.splitConfig {
|
||||||
|
|||||||
@@ -235,7 +235,7 @@ export default {
|
|||||||
} else if (this.active === 1) {
|
} else if (this.active === 1) {
|
||||||
await this.$refs.splitConfig.nextStep(this.documentId)
|
await this.$refs.splitConfig.nextStep(this.documentId)
|
||||||
} else if (this.active === 2) {
|
} else if (this.active === 2) {
|
||||||
await this.$refs.words.nextStep(this.documentId)
|
// await this.$refs.words.nextStep(this.documentId)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
updateRouteParams() {
|
updateRouteParams() {
|
||||||
@@ -250,6 +250,7 @@ export default {
|
|||||||
// 预览完成
|
// 预览完成
|
||||||
handlePreviewConfirm() {
|
handlePreviewConfirm() {
|
||||||
this.active = 2
|
this.active = 2
|
||||||
|
this.updateRouteParams()
|
||||||
},
|
},
|
||||||
// 重新上传
|
// 重新上传
|
||||||
handleReUpload() {
|
handleReUpload() {
|
||||||
|
|||||||
@@ -1,59 +1,62 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class=" render-container">
|
<div class=' render-container'>
|
||||||
<div class="clearfix flex align-items-c justify-content-b ">
|
<div class='clearfix flex align-items-c justify-content-b '>
|
||||||
<div class=" flex align-items-c justify-content-b" style="flex:1">
|
<div class=' flex align-items-c justify-content-b' style='flex:1'>
|
||||||
<div class="hover-back mr5">
|
<div class='hover-back mr5'>
|
||||||
<el-icon
|
<el-icon
|
||||||
class="el-icon-arrow-left"
|
class='el-icon-arrow-left'
|
||||||
style="font-size: 24px;cursor: pointer"
|
style='font-size: 24px;cursor: pointer'
|
||||||
@click.native="$router.history.go(-1)"
|
@click.native='$router.history.go(-1)'
|
||||||
></el-icon>
|
></el-icon>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<img :src="knowledgeImage" class="header-icon" />
|
<img :src='knowledgeImage' class='header-icon' />
|
||||||
<div class="ml10" style="flex:1">
|
<div class='ml10' style='flex:1'>
|
||||||
<div class="flex align-items-c">
|
<div class='flex align-items-c'>
|
||||||
<div class="mr20 header" v-if="!editKnowledge">
|
<div class='mr20 header' v-if='!editKnowledge'>
|
||||||
{{ knowledgeName ? knowledgeName : '' }}
|
{{ knowledgeName ? knowledgeName : '' }}
|
||||||
</div>
|
</div>
|
||||||
<el-input
|
<el-input
|
||||||
class="mr20 w200"
|
class='mr20 w200'
|
||||||
size="small"
|
size='small'
|
||||||
v-else
|
v-else
|
||||||
v-model="copyKnowledgeName"
|
v-model='copyKnowledgeName'
|
||||||
>{{ knowledgeName }}</el-input
|
>{{ knowledgeName }}
|
||||||
|
</el-input
|
||||||
>
|
>
|
||||||
<el-icon
|
<el-icon
|
||||||
class="fs16 el-icon-edit-outline cursor-pointer"
|
class='fs16 el-icon-edit-outline cursor-pointer'
|
||||||
@click.native="editKnowledgeName"
|
@click.native='editKnowledgeName'
|
||||||
v-if="!editKnowledge"
|
v-if='!editKnowledge'
|
||||||
/>
|
/>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<el-button type="primary" size="medium" @click="saveKnowledgeName"
|
<el-button type='primary' size='medium' @click='saveKnowledgeName'
|
||||||
>保存</el-button
|
>保存
|
||||||
|
</el-button
|
||||||
>
|
>
|
||||||
<el-button size="medium" @click="cancelKnowledgeName"
|
<el-button size='medium' @click='cancelKnowledgeName'
|
||||||
>取消</el-button
|
>取消
|
||||||
|
</el-button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<span class="segment-content">{{
|
<span class='segment-content'>{{
|
||||||
segmentedMode | filterSegmentedMode
|
segmentedMode | filterSegmentedMode
|
||||||
}}</span>
|
}}</span>
|
||||||
|
|
||||||
<el-dropdown
|
<el-dropdown
|
||||||
size="medium"
|
size='medium'
|
||||||
placement="right"
|
placement='right'
|
||||||
v-if="relatedAppList.length > 0"
|
v-if='relatedAppList.length > 0'
|
||||||
@command="handleRelatedApp"
|
@command='handleRelatedApp'
|
||||||
>
|
>
|
||||||
<span class="segment-content cursor-pointer"
|
<span class='segment-content cursor-pointer'
|
||||||
>{{ relatedAppList.length }} 个关联应用</span
|
>{{ relatedAppList.length }} 个关联应用</span
|
||||||
>
|
>
|
||||||
<el-dropdown-menu>
|
<el-dropdown-menu>
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
v-for="item in relatedAppList"
|
v-for='item in relatedAppList'
|
||||||
:command="item"
|
:command='item'
|
||||||
:key="item.id"
|
:key='item.id'
|
||||||
disabled
|
disabled
|
||||||
>
|
>
|
||||||
<span>{{ item.appName }}</span>
|
<span>{{ item.appName }}</span>
|
||||||
@@ -61,8 +64,8 @@
|
|||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex align-items-c mt10 ">
|
<div class='flex align-items-c mt10 '>
|
||||||
<p class="fs14 knowledgeDesc" style="line-height: 20px">
|
<p class='fs14 knowledgeDesc' style='line-height: 20px'>
|
||||||
描述:{{ knowledgeDesc }}
|
描述:{{ knowledgeDesc }}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -70,99 +73,100 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="margin-left: auto" class="text-right">
|
<div style='margin-left: auto' class='text-right'>
|
||||||
<!-- <el-button type="primary" size="medium" class="normal-button" @click="jumpEditKnowledge">修改知识库</el-button>-->
|
<!-- <el-button type="primary" size="medium" class="normal-button" @click="jumpEditKnowledge">修改知识库</el-button>-->
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type='primary'
|
||||||
size="medium"
|
size='medium'
|
||||||
icon="el-icon-plus"
|
icon='el-icon-plus'
|
||||||
class="primary-button"
|
class='primary-button'
|
||||||
disbaled
|
disbaled
|
||||||
@click="jumpAddKnowledge"
|
@click='jumpAddKnowledge'
|
||||||
>上传知识
|
>上传知识
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type='primary'
|
||||||
size="medium"
|
size='medium'
|
||||||
icon="el-icon-edit-outline"
|
icon='el-icon-edit-outline'
|
||||||
class="primary-button"
|
class='primary-button'
|
||||||
@click="jumpEditKnowledge"
|
@click='jumpEditKnowledge'
|
||||||
>修改知识库
|
>修改知识库
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type='primary'
|
||||||
size="medium"
|
size='medium'
|
||||||
icon="el-icon-search"
|
icon='el-icon-search'
|
||||||
class="line-button"
|
class='line-button'
|
||||||
@click="searchSetting"
|
@click='searchSetting'
|
||||||
>检索设置
|
>检索设置
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type='primary'
|
||||||
icon="el-icon-s-promotion"
|
icon='el-icon-s-promotion'
|
||||||
size="medium"
|
size='medium'
|
||||||
class="line-button"
|
class='line-button'
|
||||||
@click="handleHitTestClick"
|
@click='handleHitTestClick'
|
||||||
>命中测试
|
>命中测试
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type='primary'
|
||||||
icon="el-icon-help"
|
icon='el-icon-help'
|
||||||
size="medium"
|
size='medium'
|
||||||
class="line-button"
|
class='line-button'
|
||||||
@click="handleMetaData"
|
@click='handleMetaData'
|
||||||
>元数据
|
>元数据
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt20 card-body">
|
<div class='mt20 card-body'>
|
||||||
<el-empty v-if="!hasList">
|
<el-empty v-if='!hasList'>
|
||||||
<div class="mt20">
|
<div class='mt20'>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type='primary'
|
||||||
size="medium"
|
size='medium'
|
||||||
class="fs14"
|
class='fs14'
|
||||||
@click="jumpAddKnowledge"
|
@click='jumpAddKnowledge'
|
||||||
>立即添加</el-button
|
>立即添加
|
||||||
|
</el-button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</el-empty>
|
</el-empty>
|
||||||
|
|
||||||
<div class="table-container" v-else>
|
<div class='table-container' v-else>
|
||||||
<div class="flex align-items-c justify-content-b">
|
<div class='flex align-items-c justify-content-b'>
|
||||||
<el-form
|
<el-form
|
||||||
:model="form"
|
:model='form'
|
||||||
label-width="100px"
|
label-width='100px'
|
||||||
label-position="top"
|
label-position='top'
|
||||||
inline
|
inline
|
||||||
>
|
>
|
||||||
<el-form-item label="知识文件名称" prop="fileName">
|
<el-form-item label='知识文件名称' prop='fileName'>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.knowledgeNameLike"
|
v-model='form.knowledgeNameLike'
|
||||||
size="medium"
|
size='medium'
|
||||||
placeholder="请输入知识文件名称"
|
placeholder='请输入知识文件名称'
|
||||||
@keydown.enter.native="search"
|
@keydown.enter.native='search'
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="知识文件来源" prop="documentSource">
|
<el-form-item label='知识文件来源' prop='documentSource'>
|
||||||
<el-select v-model="form.documentSource" size="medium">
|
<el-select v-model='form.documentSource' size='medium'>
|
||||||
<el-option label="全部" value=""></el-option>
|
<el-option label='全部' value=''></el-option>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in documentSourceOptions"
|
v-for='item in documentSourceOptions'
|
||||||
:label="item.label"
|
:label='item.label'
|
||||||
:value="item.value"
|
:value='item.value'
|
||||||
:key="item.value"
|
:key='item.value'
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="上传用户" prop="createdUserLike">
|
<el-form-item label='上传用户' prop='createdUserLike'>
|
||||||
<el-select v-model="form.createdUserLike" size="medium">
|
<el-select v-model='form.createdUserLike' size='medium'>
|
||||||
<el-option label="全部" value=""></el-option>
|
<el-option label='全部' value=''></el-option>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in createdUserOptions"
|
v-for='item in createdUserOptions'
|
||||||
:label="item.label"
|
:label='item.label'
|
||||||
:value="item.value"
|
:value='item.value'
|
||||||
:key="item.value"
|
:key='item.value'
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -174,100 +178,102 @@
|
|||||||
<!-- size="medium"-->
|
<!-- size="medium"-->
|
||||||
<!-- ></el-input>-->
|
<!-- ></el-input>-->
|
||||||
<!-- </el-form-item>-->
|
<!-- </el-form-item>-->
|
||||||
<el-form-item label="上传时间" prop="times">
|
<el-form-item label='上传时间' prop='times'>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
size="medium"
|
size='medium'
|
||||||
style="width:100%"
|
style='width:100%'
|
||||||
v-model="form.times"
|
v-model='form.times'
|
||||||
value-format="yyyy-MM-dd"
|
value-format='yyyy-MM-dd'
|
||||||
start-placeholder="开始时间"
|
start-placeholder='开始时间'
|
||||||
end-placeholder="结束时间"
|
end-placeholder='结束时间'
|
||||||
type="daterange"
|
type='daterange'
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div class="mt15 flex align-items-c justify-content-b">
|
<div class='mt15 flex align-items-c justify-content-b'>
|
||||||
<el-button size="medium" type="primary" @click="search"
|
<el-button size='medium' type='primary' @click='search'
|
||||||
>查询</el-button
|
>查询
|
||||||
|
</el-button
|
||||||
>
|
>
|
||||||
<el-button size="medium" @click="reset">重置</el-button>
|
<el-button size='medium' @click='reset'>重置</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<r-table
|
<r-table
|
||||||
:columns="columns"
|
:columns='columns'
|
||||||
:data="list"
|
:data='list'
|
||||||
:deletion="false"
|
:deletion='false'
|
||||||
:total="total"
|
:total='total'
|
||||||
@page-change="pageChange"
|
@page-change='pageChange'
|
||||||
@current-change="currentChange"
|
@current-change='currentChange'
|
||||||
:current-page="page"
|
:current-page='page'
|
||||||
:page-size="pageSize"
|
:page-size='pageSize'
|
||||||
></r-table>
|
></r-table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<document-drawer
|
<document-drawer
|
||||||
:visible.sync="drawer"
|
:visible.sync='drawer'
|
||||||
:descriptions="descriptions"
|
:descriptions='descriptions'
|
||||||
:document-detail="documentDetail"
|
:document-detail='documentDetail'
|
||||||
:active-segment="activeSegment"
|
:active-segment='activeSegment'
|
||||||
@openMetaDrawer="handleMetaData"
|
@openMetaDrawer='handleMetaData'
|
||||||
@update:visible="val => (drawer = val)"
|
@update:visible='val => (drawer = val)'
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<knowledgeForm
|
<knowledgeForm
|
||||||
:visible.sync="drawerForm"
|
:visible.sync='drawerForm'
|
||||||
:datasetId="$route.query.datasetId"
|
:datasetId='$route.query.datasetId'
|
||||||
@update:visible="getKnowledgeDetail"
|
@update:visible='getKnowledgeDetail'
|
||||||
>
|
>
|
||||||
</knowledgeForm>
|
</knowledgeForm>
|
||||||
|
|
||||||
<!-- 命中测试抽屉弹窗 -->
|
<!-- 命中测试抽屉弹窗 -->
|
||||||
<el-drawer
|
<el-drawer
|
||||||
:title="hitTestConfig.title"
|
:title='hitTestConfig.title'
|
||||||
:visible.sync="hitTestConfig.visible"
|
:visible.sync='hitTestConfig.visible'
|
||||||
:wrapperClosable="false"
|
:wrapperClosable='false'
|
||||||
size="80%"
|
size='80%'
|
||||||
>
|
>
|
||||||
<hitTest></hitTest>
|
<hitTest></hitTest>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
|
|
||||||
<!--元数据-->
|
<!--元数据-->
|
||||||
<el-drawer
|
<el-drawer
|
||||||
:title="metaDataDrawer.title"
|
:title='metaDataDrawer.title'
|
||||||
:visible.sync="metaDataDrawer.visible"
|
:visible.sync='metaDataDrawer.visible'
|
||||||
:wrapperClosable="false"
|
:wrapperClosable='false'
|
||||||
size="30%"
|
size='30%'
|
||||||
>
|
>
|
||||||
<meta-data ref="metaData" :datasetId="$route.query.datasetId"></meta-data>
|
<meta-data ref='metaData' :datasetId='$route.query.datasetId'></meta-data>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
|
|
||||||
<!--元数据操作抽屉-->
|
<!--元数据操作抽屉-->
|
||||||
<el-drawer
|
<el-drawer
|
||||||
:title="metadataOperatorDrawer.title"
|
:title='metadataOperatorDrawer.title'
|
||||||
:visible.sync="metadataOperatorDrawer.visible"
|
:visible.sync='metadataOperatorDrawer.visible'
|
||||||
size="30%"
|
size='30%'
|
||||||
:wrapperClosable="false"
|
:wrapperClosable='false'
|
||||||
>
|
>
|
||||||
<metadata-operator
|
<metadata-operator
|
||||||
ref="metadataOperator"
|
ref='metadataOperator'
|
||||||
@openMetaDrawer="handleMetaData"
|
@openMetaDrawer='handleMetaData'
|
||||||
@close="close"
|
@close='close'
|
||||||
></metadata-operator>
|
></metadata-operator>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
<!--检索设置弹窗-->
|
<!--检索设置弹窗-->
|
||||||
<search-setting ref="searchSetting"></search-setting>
|
<search-setting ref='searchSetting'></search-setting>
|
||||||
<!--知识挖掘抽屉-->
|
<!--知识挖掘抽屉-->
|
||||||
<el-drawer
|
<el-drawer
|
||||||
:title="knowledgeMiningDrawer.title"
|
:title='knowledgeMiningDrawer.title'
|
||||||
:visible.sync="knowledgeMiningDrawer.visible"
|
v-if='knowledgeMiningDrawer.visible'
|
||||||
size="45%"
|
:visible.sync='knowledgeMiningDrawer.visible'
|
||||||
:wrapperClosable="false"
|
size='45%'
|
||||||
|
:wrapperClosable='false'
|
||||||
>
|
>
|
||||||
<words
|
<words
|
||||||
ref="words"
|
ref='words'
|
||||||
@openMetaDrawer="handleMetaData"
|
@openMetaDrawer='handleMetaData'
|
||||||
@close="close"
|
@close='close'
|
||||||
:document-extract-id="documentExtractId"
|
:document-extract-id='documentExtractId'
|
||||||
></words>
|
></words>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
</div>
|
</div>
|
||||||
@@ -280,7 +286,7 @@ import {
|
|||||||
datasetsExPages,
|
datasetsExPages,
|
||||||
datasetUpdate,
|
datasetUpdate,
|
||||||
downloadOriginalFile,
|
downloadOriginalFile,
|
||||||
getDatasetById,
|
getDatasetById, getExtractResultList,
|
||||||
relatedApps
|
relatedApps
|
||||||
} from '@/api/generatedApi'
|
} from '@/api/generatedApi'
|
||||||
import { getUserList } from '@/api/generatedApi/system'
|
import { getUserList } from '@/api/generatedApi/system'
|
||||||
@@ -296,6 +302,7 @@ import MetadataOperator from '@/views/knowledge/detail/components/metaData/Metad
|
|||||||
import SearchSetting from '@/views/knowledge/detail/components/SearchSetting/Index.vue'
|
import SearchSetting from '@/views/knowledge/detail/components/SearchSetting/Index.vue'
|
||||||
import { displayStatus } from '@/assets/js/utils/utilOptions'
|
import { displayStatus } from '@/assets/js/utils/utilOptions'
|
||||||
import Words from '@/views/knowledge/detail/components/words/Index.vue'
|
import Words from '@/views/knowledge/detail/components/words/Index.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'index',
|
name: 'index',
|
||||||
// 父子组件共享
|
// 父子组件共享
|
||||||
@@ -356,7 +363,7 @@ export default {
|
|||||||
splitRules: '',
|
splitRules: '',
|
||||||
extractRules: ''
|
extractRules: ''
|
||||||
},
|
},
|
||||||
documentExtractId: ''
|
documentExtractId: '',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: {},
|
props: {},
|
||||||
@@ -543,8 +550,25 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 知识挖掘操作
|
// 知识挖掘操作
|
||||||
handleKnoledgeMining(row) {
|
async handleKnowledgeMining(row) {
|
||||||
this.knowledgeMiningDrawer.visible = true
|
// this.previewLoading = true
|
||||||
|
const params = { documentId: row.id }
|
||||||
|
const res = await getExtractResultList(params)
|
||||||
|
if (res.content.result !== '0') {
|
||||||
|
throw new Error(res.content.resultMessage || '获取题词结果失败')
|
||||||
|
}
|
||||||
|
const isVisible = !!res.content.content.length
|
||||||
|
if (isVisible) {
|
||||||
|
this.knowledgeMiningDrawer.visible = isVisible
|
||||||
|
} else {
|
||||||
|
this.$router.push({
|
||||||
|
name: 'custom-word',
|
||||||
|
query: {
|
||||||
|
...this.$route.query,
|
||||||
|
documentId: row.id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
this.documentExtractId = row.id
|
this.documentExtractId = row.id
|
||||||
// this.$nextTick(() => {
|
// this.$nextTick(() => {
|
||||||
// if (this.$refs.metadataOperator) {
|
// if (this.$refs.metadataOperator) {
|
||||||
@@ -659,7 +683,6 @@ export default {
|
|||||||
return item ? item.label : '否'
|
return item ? item.label : '否'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {},
|
|
||||||
async mounted() {
|
async mounted() {
|
||||||
this.getKnowledgeDetail()
|
this.getKnowledgeDetail()
|
||||||
// 获取知识库文件列表
|
// 获取知识库文件列表
|
||||||
@@ -732,7 +755,7 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: '状态',
|
key: '状态',
|
||||||
prop: 'statusLabel'
|
prop: 'statusLabel',
|
||||||
// render: (h, params) => {
|
// render: (h, params) => {
|
||||||
// let label = this.displayStatus.find(item => {
|
// let label = this.displayStatus.find(item => {
|
||||||
// return item.value === params.row.displayStatus
|
// return item.value === params.row.displayStatus
|
||||||
@@ -846,41 +869,40 @@ export default {
|
|||||||
}
|
}
|
||||||
// '标注元数据'
|
// '标注元数据'
|
||||||
),
|
),
|
||||||
params.row.optStatus > 1
|
h(
|
||||||
? h(
|
'el-button',
|
||||||
'el-button',
|
{
|
||||||
{
|
class: 'floatSpan',
|
||||||
class: 'floatSpan',
|
props: {
|
||||||
props: {
|
type: 'primary',
|
||||||
type: 'primary',
|
size: 'mini',
|
||||||
size: 'mini',
|
icon: 'el-icon-cpu',
|
||||||
icon: 'el-icon-cpu',
|
title: '知识挖掘',
|
||||||
title: '知识挖掘'
|
disabled: params.row.optStatus < 2
|
||||||
},
|
},
|
||||||
on: {
|
on: {
|
||||||
click: () => this.handleKnoledgeMining(params.row)
|
click: () => this.handleKnowledgeMining(params.row)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// '知识挖掘'
|
// '知识挖掘'
|
||||||
)
|
),
|
||||||
: '',
|
|
||||||
params.row.optStatus < 4
|
params.row.optStatus < 4
|
||||||
? h(
|
? h(
|
||||||
'el-button',
|
'el-button',
|
||||||
{
|
{
|
||||||
class: 'floatSpan',
|
class: 'floatSpan',
|
||||||
props: {
|
props: {
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
size: 'mini',
|
size: 'mini',
|
||||||
icon: 'el-icon-video-play',
|
icon: 'el-icon-video-play',
|
||||||
title: '继续处理'
|
title: '继续处理'
|
||||||
},
|
},
|
||||||
on: {
|
on: {
|
||||||
click: () => this.jumpToUpload(params)
|
click: () => this.jumpToUpload(params)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// '文件拆分处理'
|
}
|
||||||
)
|
// '文件拆分处理'
|
||||||
|
)
|
||||||
: ''
|
: ''
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
@@ -890,7 +912,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang='scss'>
|
||||||
.ellipsis-title {
|
.ellipsis-title {
|
||||||
// 最多展示一行 省略号展示
|
// 最多展示一行 省略号展示
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@@ -1141,6 +1163,7 @@ export default {
|
|||||||
|
|
||||||
.hover-back {
|
.hover-back {
|
||||||
padding: 10px 5px;
|
padding: 10px 5px;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background: rgba(87, 104, 161, 0.2);
|
background: rgba(87, 104, 161, 0.2);
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
|
|||||||
@@ -132,12 +132,6 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="buttons text-right">
|
<div class="buttons text-right">
|
||||||
<el-button class="line-button" size="medium" @click="saveUs"
|
|
||||||
>保存并处理拆分内容</el-button
|
|
||||||
>
|
|
||||||
<el-button class="line-button" size="medium" @click="saveUs"
|
|
||||||
>保存并处理题词内容</el-button
|
|
||||||
>
|
|
||||||
<el-button class="line-button" size="medium" @click="saveUs"
|
<el-button class="line-button" size="medium" @click="saveUs"
|
||||||
>保存并处理</el-button
|
>保存并处理</el-button
|
||||||
>
|
>
|
||||||
@@ -242,8 +236,10 @@ import {
|
|||||||
segmentEstimate,
|
segmentEstimate,
|
||||||
preprocessSegmentEstimate,
|
preprocessSegmentEstimate,
|
||||||
splitSegmentEstimate,
|
splitSegmentEstimate,
|
||||||
extractSegmentEstimate, splitAndExtractEmbedding, splitAndExtractSegmentEstimate
|
extractSegmentEstimate,
|
||||||
} from "@/api/generatedApi/embedding";
|
splitAndExtractEmbedding,
|
||||||
|
splitAndExtractSegmentEstimate
|
||||||
|
} from '@/api/generatedApi/embedding'
|
||||||
|
|
||||||
import MarkdownIt from 'markdown-it'
|
import MarkdownIt from 'markdown-it'
|
||||||
import markdownItKatex from 'markdown-it-katex'
|
import markdownItKatex from 'markdown-it-katex'
|
||||||
@@ -306,7 +302,8 @@ export default {
|
|||||||
let splitDocIds = documentId.split(',')
|
let splitDocIds = documentId.split(',')
|
||||||
|
|
||||||
let api = segmentEstimate
|
let api = segmentEstimate
|
||||||
switch (active) {
|
console.log(active)
|
||||||
|
switch (String(active)) {
|
||||||
case '0':
|
case '0':
|
||||||
api = segmentEstimate
|
api = segmentEstimate
|
||||||
break
|
break
|
||||||
@@ -365,7 +362,8 @@ export default {
|
|||||||
|
|
||||||
let splitDocIds = documentId.split(',')
|
let splitDocIds = documentId.split(',')
|
||||||
let api = directEmbedding
|
let api = directEmbedding
|
||||||
switch (active) {
|
|
||||||
|
switch (String(active)) {
|
||||||
case '0':
|
case '0':
|
||||||
api = directEmbedding
|
api = directEmbedding
|
||||||
break
|
break
|
||||||
|
|||||||
Reference in New Issue
Block a user