mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: Optimize copywriting
This commit is contained in:
parent
e4c8a25108
commit
eb8dbdbaf5
|
|
@ -402,7 +402,7 @@
|
|||
<template
|
||||
v-if="data.type === WorkflowType.ToolLib || data.type === WorkflowType.ToolLibCustom"
|
||||
>
|
||||
<div class="card-never border-r-6 mt-8">
|
||||
<div class="card-never border-r-6 mt-8" v-if="data.index != 0">
|
||||
<h5 class="p-8-12">{{ $t('chat.executionDetails.input') }}</h5>
|
||||
<div class="p-8-12 border-t-dashed lighter pre-wrap">
|
||||
{{ data.params || '-' }}
|
||||
|
|
@ -1162,7 +1162,11 @@
|
|||
<!-- 知识库写入 -->
|
||||
<template v-if="data.type === WorkflowType.KnowledgeWriteNode">
|
||||
<div class="card-never border-r-6 mt-8">
|
||||
<h5 class="p-8-12">{{ $t('chat.executionDetails.writeContent') }}</h5>
|
||||
<h5 class="p-8-12">
|
||||
{{ $t('chat.executionDetails.writeContent') }}({{
|
||||
$t('chat.executionDetails.documentSplitTip')
|
||||
}})
|
||||
</h5>
|
||||
<div class="p-8-12 border-t-dashed lighter">
|
||||
<el-tabs v-model="currentWriteContent" class="paragraph-tabs">
|
||||
<template v-for="(item, index) in data.write_content" :key="index">
|
||||
|
|
@ -1199,9 +1203,8 @@
|
|||
{{ $t('views.document.form.selector.label') }}: {{ data.input_params.selector }}
|
||||
</p>
|
||||
<p class="mb-8 color-secondary">
|
||||
{{ $t('views.document.form.source_url.label') }}: {{
|
||||
data.input_params.source_url
|
||||
}}
|
||||
{{ $t('views.document.form.source_url.label') }}:
|
||||
{{ data.input_params.source_url }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1218,7 +1221,7 @@
|
|||
:key="index"
|
||||
class="mb-8"
|
||||
>
|
||||
<h4>{{file_content.name}}</h4>
|
||||
<h4>{{ file_content.name }}</h4>
|
||||
<MdPreview
|
||||
v-if="file_content"
|
||||
ref="editorRef"
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@ export default {
|
|||
fileLimitCountTip1: 'Maximum upload per time',
|
||||
fileLimitCountTip2: 'files',
|
||||
fileLimitSizeTip1: 'each file must not exceed',
|
||||
toImportDocConfirm:
|
||||
'The workflow of the current knowledge base is not published, and documents cannot be imported. Please publish the workflow first.',
|
||||
},
|
||||
upload: {
|
||||
selectFile: 'Select File',
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ export default {
|
|||
fileLimitCountTip1: '每次最多上传',
|
||||
fileLimitCountTip2: '个文件',
|
||||
fileLimitSizeTip1: '每个文件不超过',
|
||||
toImportDocConfirm: '当前知识库的工作流未发布,无法导入文档,请先发布工作流。',
|
||||
},
|
||||
upload: {
|
||||
selectFile: '选择文件',
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ export default {
|
|||
fileLimitCountTip1: '每次最多上傳',
|
||||
fileLimitCountTip2: '個文件',
|
||||
fileLimitSizeTip1: '每個文件不超過',
|
||||
toImportDocConfirm: '當前知識庫的工作流未發布,無法導入文檔,請先發布工作流。',
|
||||
},
|
||||
upload: {
|
||||
selectFile: '選擇文件',
|
||||
|
|
|
|||
|
|
@ -39,16 +39,9 @@
|
|||
>{{ $t('views.document.importDocument') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="knowledgeDetail?.type === 4 && permissionPrecise.doc_create(id)&&knowledgeDetail.is_publish"
|
||||
v-if="knowledgeDetail?.type === 4 && permissionPrecise.doc_create(id)"
|
||||
type="primary"
|
||||
@click="
|
||||
router.push({
|
||||
path: `/knowledge/import/workflow/${folderId}`,
|
||||
query: {
|
||||
id: id,
|
||||
},
|
||||
})
|
||||
"
|
||||
@click="toImportWorkflow"
|
||||
>{{ $t('views.document.importDocument') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
|
|
@ -860,6 +853,25 @@ const title = ref('')
|
|||
|
||||
const selectKnowledgeDialogRef = ref()
|
||||
|
||||
const toImportWorkflow = () => {
|
||||
if (knowledgeDetail.value.is_publish) {
|
||||
router.push({
|
||||
path: `/knowledge/import/workflow/${folderId}`,
|
||||
query: {
|
||||
id: id,
|
||||
},
|
||||
})
|
||||
} else {
|
||||
MsgConfirm(t('common.tip'), t('views.document.tip.toImportDocConfirm'), {
|
||||
cancelButtonText: t('common.close'),
|
||||
showConfirmButton: false,
|
||||
type: 'warning',
|
||||
})
|
||||
.then(() => {})
|
||||
.catch(() => {})
|
||||
}
|
||||
}
|
||||
|
||||
const exportDocument = (document: any) => {
|
||||
loadSharedApi({ type: 'document', systemType: apiType.value })
|
||||
.exportDocument(document.name, document.knowledge_id, document.id, loading)
|
||||
|
|
|
|||
|
|
@ -554,14 +554,24 @@ const get_route = () => {
|
|||
}
|
||||
|
||||
const toImportDoc = () => {
|
||||
const newUrl = router.resolve({
|
||||
path: `/knowledge/import/workflow/${folderId}`,
|
||||
query: {
|
||||
id: id,
|
||||
},
|
||||
}).href
|
||||
if (detail.value.is_publish) {
|
||||
const newUrl = router.resolve({
|
||||
path: `/knowledge/import/workflow/${folderId}`,
|
||||
query: {
|
||||
id: id,
|
||||
},
|
||||
}).href
|
||||
|
||||
window.open(newUrl)
|
||||
window.open(newUrl)
|
||||
} else {
|
||||
MsgConfirm(t('common.tip'), t('views.document.tip.toImportDocConfirm'), {
|
||||
cancelButtonText: t('common.close'),
|
||||
showConfirmButton: false,
|
||||
type: 'warning',
|
||||
})
|
||||
.then(() => {})
|
||||
.catch(() => {})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -34,7 +34,9 @@
|
|||
:label="item.content"
|
||||
:value="item.id"
|
||||
>
|
||||
{{ item.content }}
|
||||
<span class="ellipsis" :title="item.content" style="max-width: 255px" >
|
||||
{{ item.content }}
|
||||
</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<template v-for="(item, index) in problemList" :key="index">
|
||||
|
|
|
|||
Loading…
Reference in New Issue